dotfiles/.i3blocks/bepo
2021-01-15 21:59:21 +01:00

14 lines
390 B
Bash
Executable file

#!/bin/bash
runtime="${XDG_RUNTIME_DIR}/i3blocks"
[[ ! -d "$runtime" ]] && mkdir -p "$runtime"
[[ ! -f "$runtime/keyboard" ]] && [[ -z "$button" ]] && button=1
case $button in
1) setxkbmap fr bepo_afnor; echo "bépo" > "$runtime/keyboard";;
3) setxkbmap fr oss; echo "oss " > "$runtime/keyboard";;
2) setxkbmap fr us; echo "qwer" > "$runtime/keyboard";;
esac
cat "$runtime/keyboard"