You are not logged in.
I'm using:
setxkbmap -layout us,il -option grp:alt_shift_toggle
on my .xinitrc file to set a toggle key for english and hebrew.
Now I'm using i3lock-fancy to lock my computer on suspend, I have my custom service file:
i3lock@.service:
[Unit]
Description=User resume actions
Before=sleep.target
[Service]
Type=forking
User=alex
Environment=DISPLAY=:0
ExecStart=/usr/bin/bash /home/alex/scripts/i3lockwrapper.sh
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target
And my custom lock wrapper:
i3lockwrapper.sh:
#!/bin/sh
# Shell script to wrap i3lock
# Set keyboard layout to english
setxkbmap us
setxkbmap -layout us,il -option grp:alt_shift_toggle
# Lock screen
/usr/bin/i3lock-fancy -- scrot &
But it seems that the command setxkbmap doesn't work. If my keyboard layout was hebrew before suspending it won't change to english.
Am I doing something wrong here?
Offline