baskerville / sxhkd

Simple X hotkey daemon
BSD 2-Clause "Simplified" License
2.77k stars 138 forks source link

Problem with command ENV when starting Alacritty #211

Closed xquangdang closed 3 years ago

xquangdang commented 3 years ago

Distro: arch on x11 I use alacritty as my main terminal emulator. When I start alacritty in bash/zsh with env WINIT_UNIX_BACKEND=x11 alacritty &, alacritty will accept ibus input. But if I run alacritty with sxhkd, alacritty do not take ibus input, so I cannot type Vietnamese My sxhkdrc:

# terminal emulator
super + Return
    env WINIT_UNIX_BACKEND=x11 alacritty &
SeerLite commented 3 years ago

Hi! According to the ArchWiki, you need the following environment variables set up:

GTK_IM_MODULE=ibus
XMODIFIERS=@im=ibus
QT_IM_MODULE=ibus

Maybe sxhkd isn't sourcing these, causing the issue you're describing? Check if they're present inside Alacritty started with and without sxhkd.

xquangdang commented 3 years ago

Hi! According to the ArchWiki, you need the following environment variables set up:

GTK_IM_MODULE=ibus
XMODIFIERS=@im=ibus
QT_IM_MODULE=ibus

Maybe sxhkd isn't sourcing these, causing the issue you're describing? Check if they're present inside Alacritty started with and without sxhkd.

I already have these env in my .bashrc. I have a script like x11_alacritty, when I call this script from zsh in a running term, alacritty work just fine. But if I run this script with sxhkd/dmenu, alacritty not take ibus input like normal

SeerLite commented 3 years ago

My suspicion is these variables aren't sourced by sxhkd. Did you check if they're already there when running normal alacritty from a shell?

How are you starting sxhkd? From bspwmrc? If it turns out these env variables actually are sourced by sxhkd then the problem has to be something else.

xquangdang commented 3 years ago

My suspicion is these variables aren't sourced by sxhkd. Did you check if they're already there when running normal alacritty from a shell?

How are you starting sxhkd? From bspwmrc? If it turns out these env variables actually are sourced by sxhkd then the problem has to be something else.

I added these ENVs to .xinitrc but no luck. Then I reboot and it starts working. Maybe I missed something or logout is not enough. Thank you very much.