From 991f30d07ffbdeef8498ca45cf85284b2e85280e Mon Sep 17 00:00:00 2001 From: kayprish <86522033+kayprish@users.noreply.github.com> Date: Thu, 1 Jan 2026 03:10:40 +0100 Subject: Modify SwitchKeyboardLayout.sh to not require .cache/kb_layout (#901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Modify SwitchKeyboardLayout.sh to not require .cache/kb_layout The bulk of the SwitchKeyboardLayout.sh script has been renamed to KeyboardLayout.sh, meanwhile its behavior has been changed. Instead of relying on the file .cache/kb_layout, to check the current keyboard layout, as well as to toggle it, it now uses hyprctl to query this information, while making sure that it checks the first non-ignored keyboard. In this way, it querys from keyboards which it's also in charge of modifying. The logic from the script is also repurposed in waybar, just for viewing, so the script was renamed. * Implement fixes for KeyboardLayout.sh changes * Remove SwitchKeyboardLayout call from initial-boot.sh --------- Co-authored-by: Petar Kapriš Co-authored-by: Donald Williams <129223418+dwilliam62@users.noreply.github.com> --- config/waybar/ModulesCustom | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/waybar/ModulesCustom') diff --git a/config/waybar/ModulesCustom b/config/waybar/ModulesCustom index f4c871f7..cb390c0f 100644 --- a/config/waybar/ModulesCustom +++ b/config/waybar/ModulesCustom @@ -90,10 +90,10 @@ }, "custom/keyboard": { - "exec": "cat $HOME/.cache/kb_layout", + "exec": "$HOME/.config/hypr/scripts/KeyboardLayout.sh status", "interval": 1, "format": " {}", - "on-click": "$HOME/.config/hypr/scripts/SwitchKeyboardLayout.sh", + "on-click": "$HOME/.config/hypr/scripts/KeyboardLayout.sh switch", }, "custom/light_dark": { -- cgit v1.2.3