commit 4bc866d4741f34c4aac8b8e2aa53601a516e172f
parent d006040eb0661cf4ac0d9be4802eac4f61919a58
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Mon, 14 Mar 2016 11:41:07 -0700
show keyboard layout in status bar unless mpd is playing
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.i3/config b/.i3/config
@@ -88,7 +88,7 @@ bindsym $mod+v exec gvim
#bindsym $mod+t exec tor-browser.sh
bindsym $mod+t exec torbrowser-launcher
bindsym $mod+p exec zathura
-bindsym $mod+$alt+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && notify-send `cat ~/.kbd-layout`
+bindsym $mod+$alt+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && notify-send `cat ~/.kbd-layout` && killall -SIGUSR1 i3status
#bindsym $alt+Shift+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh &&
#notify-send `cat ~/.kbd-layout`
bindsym $mod+n exec nautilus
diff --git a/bin/i3status-mpc.sh b/bin/i3status-mpc.sh
@@ -3,7 +3,8 @@
i3status --config ~/.i3/status | (read line && echo $line && read line && echo $line && while :
do
read line
- dat=""
+ #dat=""
+ dat="$(cat ~/.kbd-layout)"
if [[ -n $(mpc | grep playing) ]]
then
dat="$(mpc current -f '[%artist%]'): $(mpc current -f '[%title%]')"