dotfiles/.i3blocks/bepo

15 lines
390 B
Text
Raw Normal View History

2020-09-15 02:50:48 +02:00
#!/bin/bash
runtime="${XDG_RUNTIME_DIR}/i3blocks"
[[ ! -d "$runtime" ]] && mkdir -p "$runtime"
2021-01-15 21:59:21 +01:00
[[ ! -f "$runtime/keyboard" ]] && [[ -z "$button" ]] && button=1
2020-09-15 02:50:48 +02:00
2020-12-31 11:14:20 +01:00
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"