1

I need to be able to change languages while I'm working, so every time I log in - I use this command:

setxkbmap -layout us,ua -option grp:toggle

Is there any way I can execute this command every time I boot up?

(setxkbmap -layout us,ua -option grp:toggle) & $(setxkbmap -layout us,ua -option grp:toggle)

not worked for me, but I've only tried them after execution of my window manager.

Currently, my .xinitrc file looks like this:

/usr/bin/pipewire &
/use/bin/pipewire-pulse &


picom &
~/.fehbg

while true
do
    xsetroot -name "$(cat /sys/class/power_supply/BAT1/capacity)% | $(cat ~xenovar/mission.txt) | $(date +"%H:%M")"
    sleep 1m
done &
    
#exec startplasma-x11
exec dwm
$(setxkbmap -layout us,ua -option grp:toggle)

1 Answer 1

1

Place:

setxkbmap -layout us,ua -option grp:toggle

before the exec dwm line. No (). No $().

You can have & at the end of the line as well, but it's not necessary for command that basically returns right away.


Lines after the first exec line would not be executed, because exec:

Replace the shell with the given command.

2
  • Thank you very much, It worked for me. How do I mark question as closed? Commented Jun 16 at 11:20
  • @OleksandrDanulchyk By marking the answer as "correct" (I don't really know the UI; there should be a tick under the voting block?)
    – Tom Yan
    Commented Jun 16 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .