neodotfiles/source/dwmblocks/scripts/block_layout

12 lines
403 B
Text
Raw Normal View History

2024-03-28 21:40:01 +00:00
#!/usr/bin/env bash
# ***This script was made by Clay Gomera (Drake)***
# - Description: A dwmblocks script to print the keyboard layout
# - Dependencies: dwm, dwmblocks, setxkbmap
# this variable will store the current keyboard layout in X
layout=$(setxkbmap -query | grep -oP 'layout:\s*\K\w+');
# print the current keyboard layout in all caps
2024-07-15 19:11:54 +00:00
echo " 󰥻 $layout " | tr '[:lower:]' '[:upper:]';