mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-05 08:58:44 +00:00
Switch to dotbot
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
##!/usr/bin/env sh
|
||||
|
||||
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
|
||||
if [[ $line == "activelayout>>"* ]]; then
|
||||
split=(${line//>>/ })
|
||||
lang=(${split[1]//,/ })
|
||||
language=${lang[1]}
|
||||
lang_code=${language:0:2}
|
||||
lang_code_lower=$(echo $lang_code | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [[ $lang_code_lower == "bu" ]]; then
|
||||
lang_code_lower="bg"
|
||||
fi
|
||||
|
||||
echo $lang_code_lower
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user