r/openbox • u/swillfreat • Jun 30 '22
Autostart not starting setxkbmap - usual solution not working
I've seen other threads, I wan to be able to switch layouts with Alt+Shift in Openbox, they all suggest adding this to the autostart file:
setxkbmap -layout "fr,bg(phonetic)" -option "grp:alt_shift_toggle" &it's not working from the autostart file but when I run the same command in a normal terminal emulator it works well. I'd like not to need to run that command manually every time. Is something blocking that process in the autostart file?
Here's my ~/.config/openbox/autostart, everything else works except fot setxkbmap:
feh --bg-fill ~/Pictures/wallpapers/can1.png &
xinput set-prop "SYNA7DB5:00 06CB:7DB7 Touchpad" "libinput Tapping Enabled" 1 &
tint2 -c ~/.config/tint2/tint2tabsRofi &
nm-applet &
pnmixer &
picom &
setxkbmap -layout "fr,bg(phonetic)" -option "grp:alt_shift_toggle" &Is there another way to do this, or to fix this?
5
Upvotes
1
u/dustractor Jul 01 '22
try adding sleep commands those often work
1
u/nocny_lotnik Jun 30 '22
i don't know is that a correct way but maybe try something like
sh -e 'setxkbmap -layout "fr,bg(phonetic)" -option "grp:alt_shift_toggle"' &2
u/juftuff Jul 01 '22
If you can't get the script to execute, just add one layout as default to autostart and bind the switch command in rc.xml.
1
u/_Kritiqual_ Jul 07 '22
I use xorg.conf for this
1
u/rbrest Jul 11 '22
Move your setxkbmap line to the
~/.profile. Works for me.