aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/SwitchKeyboardLayout.sh
diff options
context:
space:
mode:
authorJaKooLit <jimmielovejay@gmail.com>2024-06-22 10:23:16 +0900
committerJaKooLit <jimmielovejay@gmail.com>2024-06-22 10:23:16 +0900
commit6950a11c370d02233910c2e645f714bc9555e7db (patch)
treea60fe3d90a9be99626dd87d9789271a5f03af2ba /config/hypr/scripts/SwitchKeyboardLayout.sh
parent1d1101d5d96db905b35d160a5c4199bd26887da9 (diff)
updated SwitchKB layout script in line with Settings space
Diffstat (limited to 'config/hypr/scripts/SwitchKeyboardLayout.sh')
-rwxr-xr-xconfig/hypr/scripts/SwitchKeyboardLayout.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/hypr/scripts/SwitchKeyboardLayout.sh b/config/hypr/scripts/SwitchKeyboardLayout.sh
index cbacd74f..55bdf997 100755
--- a/config/hypr/scripts/SwitchKeyboardLayout.sh
+++ b/config/hypr/scripts/SwitchKeyboardLayout.sh
@@ -8,7 +8,7 @@ notif="$HOME/.config/swaync/images/bell.png"
# Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found
if [ ! -f "$layout_f" ]; then
- default_layout=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null)
+ default_layout=$(grep 'kb_layout = ' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null)
if [ -z "$default_layout" ]; then
default_layout="us" # Default to 'us' layout if Settings.conf or 'kb_layout' is not found
fi
@@ -19,7 +19,7 @@ current_layout=$(cat "$layout_f")
# Read keyboard layout settings from Settings.conf
if [ -f "$settings_file" ]; then
- kb_layout_line=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2)
+ kb_layout_line=$(grep 'kb_layout = ' "$settings_file" | cut -d '=' -f 2)
IFS=',' read -ra layout_mapping <<< "$kb_layout_line"
fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage