neodotfiles/user/.config/suckless/dwmblocks/scripts/block_layout
Clay Gomera a61c0e8605 updated
2023-09-04 13:36:18 -04:00

11 lines
402 B
Bash
Executable file

#!/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
echo "󰥻 $layout " | tr '[:lower:]' '[:upper:]';