You are not logged in.
I am using DWM and I want to set mod + F1 as the keyboard layout change key. Basicly, I want it to be set as setxkbmap us if any other layout which is not US and ME are loaded. If I click mod + F1 and setxkbmap us is already loaded I want it to change to setxkbmap me . Same thing applies if the setxkbmap me is already loaded.
Offline
Offline
The description doesn't sound like just toggling layouts.
If it is, defining a multi-layout config and toggling those layouts is *much* better - faster and it will not interfere w/ any xmodmap augmentation.
Otherwise try
#!/bin/sh
if [ "$(setxkbmap -query | awk '/layout/{print $2}')" = "us" ]; then
setxkbmap -layout me
else
setxkbmap -layout us
fi
Offline
Thank you both. This solved it.
Offline