summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <me@aminb.org>2015-03-07 12:49:11 -0500
committerAmin Bandali <me@aminb.org>2015-03-07 12:49:11 -0500
commited5099ff571bda9392e255a6fdb8fceffdfd11a9 (patch)
treec65610bfb4ff1d21c4bc39ffdf8b4498adbdbb71
parent5009311386052de13a10969a7440402b300a1db9 (diff)
downloadconfigs-ed5099ff571bda9392e255a6fdb8fceffdfd11a9.tar.gz
configs-ed5099ff571bda9392e255a6fdb8fceffdfd11a9.tar.xz
configs-ed5099ff571bda9392e255a6fdb8fceffdfd11a9.zip
use XF86LaunchA for changing the keyboard layout
Diffstat (limited to '')
-rw-r--r--sxhkd/.config/sxhkd/sxhkdrc3
-rwxr-xr-xsxhkd/.local/bin/toggle-layout9
2 files changed, 12 insertions, 0 deletions
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