dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 71c9602699d7b55cf94ef30c7ebcb3fc61b2a973
parent f8f3874317057d51b5fc9c1f2ae4febfdf739306
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed, 19 Dec 2018 17:38:39 +0100

Use emoji for denoting keyboard layout and disable dunst notification

Diffstat:
Mlinks/.config/i3/config | 2+-
Mlinks/.config/i3/i3blocks | 4++--
Alinks/.config/i3/i3scripts/i3layout | 19+++++++++++++++++++
Mlinks/bin/keyboard-layout-switch.sh | 2+-
4 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/links/.config/i3/config b/links/.config/i3/config @@ -69,7 +69,7 @@ bindsym $mod+comma exec signal-desktop bindsym $mod+w exec firefox bindsym $mod+Shift+w exec tor-browser bindsym $mod+p exec zathura -bindsym Mod1+Mod4+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && notify-send `cat ~/.kbd-layout` && pkill -RTMIN+3 i3blocks +bindsym Mod1+Mod4+l exec --no-startup-id ~/bin/keyboard-layout-switch.sh && pkill -RTMIN+3 i3blocks bindsym $mod+n exec $term -e ranger # volume control with alsamixer diff --git a/links/.config/i3/i3blocks b/links/.config/i3/i3blocks @@ -41,8 +41,8 @@ label= interval=20 signal=2 -[layout] -command=cat $HOME/.kbd-layout +[i3layout] +#command=cat $HOME/.kbd-layout interval=once signal=3 diff --git a/links/.config/i3/i3scripts/i3layout b/links/.config/i3/i3scripts/i3layout @@ -0,0 +1,19 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) ~/bin/keyboard-layout-switch.sh && pkill -RTMIN+3 i3blocks;; + #3) pgrep -x dunst >/dev/null && notify-send "<b>πŸ”‹ Battery module:</b> +#πŸ”‹: discharging +#β™»: stagnant charge +#πŸ”Œ: charging +#⚑: charged +#❗: battery very low! +#- Text color reflects charge left" ;; +esac + +lang=$(cat ~/.kbd-layout) || exit + +[ "$lang" = "dk" ] && lang=πŸ‡©πŸ‡° +[ "$lang" = "us" ] && lang=πŸ‡ΊπŸ‡Έ + +printf "%s" "$lang" diff --git a/links/bin/keyboard-layout-switch.sh b/links/bin/keyboard-layout-switch.sh @@ -17,7 +17,7 @@ if [ ! -f $LAYOUTFILE ]; then echo "us" > $LAYOUTFILE setxkbmap $LANG1 $OPTS xmodmap ~/.Xmodmap - notify-send $LANG1 + #notify-send $LANG1 exit fi