refactor: new system basics
This commit is contained in:
9
polybar/scripts/listxkbmap.sh
Executable file
9
polybar/scripts/listxkbmap.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
layout=$(xkb-switch)
|
||||
caps_lock_status=$(xset -q | sed -n 's/^.*Caps Lock:\s*\(\S*\).*$/\1/p')
|
||||
if [ $caps_lock_status == "on" ]; then
|
||||
caps="- CAPS"
|
||||
fi
|
||||
|
||||
echo ${layout:0:2} ${caps}
|
||||
Reference in New Issue
Block a user