From ed5099ff571bda9392e255a6fdb8fceffdfd11a9 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 7 Mar 2015 12:49:11 -0500 Subject: use XF86LaunchA for changing the keyboard layout --- sxhkd/.config/sxhkd/sxhkdrc | 3 +++ sxhkd/.local/bin/toggle-layout | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100755 sxhkd/.local/bin/toggle-layout (limited to 'sxhkd') 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 -- cgit v1.2.3-60-g2f50