mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
language
This script provides a keyboard layout indicator for dwmblocks
This commit is contained in:
parent
6e476c459b
commit
4d7232a85f
16
.local/bin/statusbar/language
Normal file
16
.local/bin/statusbar/language
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
#requirements: dmenu, xorg-setxkbmap
|
||||
# quick language switch:
|
||||
lang1="us" #for English (US)
|
||||
lang2="fr" #for French (CA)
|
||||
#French can be replaced by any other language, for example:
|
||||
# lang2="ua" #for Ukrainian (UA)
|
||||
|
||||
setxkbmap -query | grep "layout" | awk '{print $2}'
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1) [ $(setxkbmap -query | grep "layout" | awk '{print $2}') == $lang1 ] && setxkbmap $lang2 || setxkbmap $lang1 ;;
|
||||
2) langselect ;;
|
||||
3) notify-send "Language module" "\- Left click to quickly change between the $lang1 and $lang2 layouts
|
||||
- Middle click opens dmenu for more language options" ;;
|
||||
esac
|
||||
Loading…
x
Reference in New Issue
Block a user