From: Amin Bandali Date: Sat, 7 Mar 2015 17:49:11 +0000 (-0500) Subject: use XF86LaunchA for changing the keyboard layout X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/commitdiff_plain/ed5099ff571bda9392e255a6fdb8fceffdfd11a9?ds=inline use XF86LaunchA for changing the keyboard layout --- diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index 4a8c6ea..cc7ec59 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -137,3 +137,6 @@ XF86AudioLowerVolume XF86AudioMute pamixer --toggle-mute + +XF86LaunchA + toggle-layout \ No newline at end of file diff --git a/sxhkd/.local/bin/toggle-layout b/sxhkd/.local/bin/toggle-layout new file mode 100755 index 0000000..fcae134 --- /dev/null +++ b/sxhkd/.local/bin/toggle-layout @@ -0,0 +1,9 @@ +#!/bin/bash + +lang="$(setxkbmap -print | grep xkb_symbols | cut -d'+' -f 2)" + +if [ "$lang" = "us" ]; then + setxkbmap ir +else + setxkbmap us +fi \ No newline at end of file