From ebae2be8c6cc37fd6e66baaac18368789ee97851 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 00:50:08 -0500 Subject: feat(hypr): align SUPER+J/K binds to current layout on startup\n\n- Add scripts/KeybindsLayoutInit.sh to set J/K (and O for togglesplit) based on general:layout\n- Wire via Startup_Apps.conf (exec-once) so default dwindle or master both get correct binds\n- Complements scripts/ChangeLayout.sh dynamic rebinds --- config/hypr/configs/Startup_Apps.conf | 1 + config/hypr/scripts/KeybindsLayoutInit.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100755 config/hypr/scripts/KeybindsLayoutInit.sh diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf index d952e65b..07a92a3f 100644 --- a/config/hypr/configs/Startup_Apps.conf +++ b/config/hypr/configs/Startup_Apps.conf @@ -19,6 +19,7 @@ exec-once = swww-daemon --format xrgb # Startup exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = $scriptsDir/KeybindsLayoutInit.sh # Initialize Drop Down terminal - See Bug#810 https://github.com/JaKooLit/Hyprland-Dots/issues/810#issuecomment-3351947644 exec-once = $HOME/.config/hypr/scripts/Dropterminal.sh kitty & diff --git a/config/hypr/scripts/KeybindsLayoutInit.sh b/config/hypr/scripts/KeybindsLayoutInit.sh new file mode 100755 index 00000000..7e328cde --- /dev/null +++ b/config/hypr/scripts/KeybindsLayoutInit.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Initialize J/K keybinds to match the current default layout at startup + +# Query current layout (master|dwindle) +LAYOUT=$(hyprctl -j getoption general:layout | jq -r '.str') + +case "$LAYOUT" in + master) + # Ensure master layout-style binds + hyprctl keyword unbind SUPER,J + hyprctl keyword unbind SUPER,K + hyprctl keyword unbind SUPER,O + hyprctl keyword bind SUPER,J,layoutmsg,cyclenext + hyprctl keyword bind SUPER,K,layoutmsg,cycleprev + ;; + dwindle) + # Ensure dwindle layout-style binds + hyprctl keyword unbind SUPER,J + hyprctl keyword unbind SUPER,K + hyprctl keyword unbind SUPER,O + hyprctl keyword bind SUPER,J,cyclenext + hyprctl keyword bind SUPER,K,cyclenext,prev + hyprctl keyword bind SUPER,O,togglesplit + ;; + *) + # Do nothing for unexpected values + : + ;; + esac -- cgit v1.2.3 From 3665ebd0f02a04e44d382d4cc9f306525e02279d Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:11:21 -0500 Subject: feat(hypr): source composed generated/Startup_Apps.conf and WindowRules.conf\n\n- Hypr now loads ~/.config/hypr/generated outputs from ComposeHyprConfigs.sh\n- Avoids confusion when UserConfigs/Startup_Apps.conf is only an overlay --- config/hypr/hyprland.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index fa8435dc..1cf7bd31 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -9,13 +9,15 @@ exec-once = $HOME/.config/hypr/initial-boot.sh # Sourcing external config files $configs = $HOME/.config/hypr/configs # Default Configs directory path +$Generated = $HOME/.config/hypr/generated # Composed configs (base + user overlays) source=$configs/Keybinds.conf # Pre-configured keybinds # ## This is where you want to start tinkering $UserConfigs = $HOME/.config/hypr/UserConfigs # User Configs directory path -source= $UserConfigs/Startup_Apps.conf +# Use composed Startup_Apps (base + user overlay + disables) +source= $Generated/Startup_Apps.conf source= $UserConfigs/ENVariables.conf # Environment variables to load @@ -26,7 +28,8 @@ source= $UserConfigs/Laptops.conf # For laptop related source= $UserConfigs/LaptopDisplay.conf # Laptop display related. You need to read the comment on this file -source= $UserConfigs/WindowRules.conf # all about Hyprland Window Rules and Layer Rules +# Use composed WindowRules (base + user overlay + disables) +source= $Generated/WindowRules.conf # all about Hyprland Window Rules and Layer Rules source= $UserConfigs/UserDecorations.conf # Decorations config file -- cgit v1.2.3 From 5fc91179274f7dceed62e24aad274a600d082f22 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:25:14 -0500 Subject: fix(copy): always add KeybindsLayoutInit.sh to UserConfigs/Startup_Apps overlay\n\n- Ensures the layout-aware J/K init survives composition and user updates\n- Prevents cases where generated/Startup_Apps.conf misses the init entry --- copy.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/copy.sh b/copy.sh index b4e958a9..1addda84 100755 --- a/copy.sh +++ b/copy.sh @@ -281,6 +281,14 @@ if command -v qs >/dev/null 2>&1; then sed -i '/#pkill qs && qs &/s/^#//' config/hypr/scripts/Refresh.sh fi +# Ensure layout-aware keybinds init runs on startup (adds to user overlay so it survives composes) +OVERLAY_SA="config/hypr/UserConfigs/Startup_Apps.conf" +mkdir -p "$(dirname "$OVERLAY_SA")" +if ! grep -qx 'exec-once = \$scriptsDir/KeybindsLayoutInit.sh' "$OVERLAY_SA"; then + echo 'exec-once = $scriptsDir/KeybindsLayoutInit.sh' >>"$OVERLAY_SA" + echo "${INFO} Added KeybindsLayoutInit.sh to user Startup_Apps overlay" 2>&1 | tee -a "$LOG" +fi + # Note: The SUPER+A keybind now uses OverviewToggle.sh which automatically # tries quickshell first and falls back to AGS, so both can be installed -- cgit v1.2.3 From a35eb612dda901c5d14d559e55e64c0b1e93eae4 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:32:31 -0500 Subject: fix(startup): preserve KeybindsLayoutInit in composed Startup_Apps; harden hyprlock 12h edits\n\n- ComposeHyprConfigs.sh: ignore disabling /KeybindsLayoutInit.sh\n- copy.sh migration: filter KeybindsLayoutInit from Startup_Apps.disable\n- copy.sh: target existing hyprlock template, avoid sed errors --- config/hypr/scripts/ComposeHyprConfigs.sh | 4 ++++ copy.sh | 22 +++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/config/hypr/scripts/ComposeHyprConfigs.sh b/config/hypr/scripts/ComposeHyprConfigs.sh index 55bc3c5c..f0928a24 100755 --- a/config/hypr/scripts/ComposeHyprConfigs.sh +++ b/config/hypr/scripts/ComposeHyprConfigs.sh @@ -58,6 +58,10 @@ compose_startup_apps() { while IFS= read -r d; do d="$(echo "$d" | trim)" [[ -z "$d" || "$d" =~ ^# ]] && continue + # Never disable our layout-aware keybind init unless user re-enables via explicit edit here + if [[ "$d" == "\$scriptsDir/KeybindsLayoutInit.sh" ]]; then + continue + fi unset 'cmds[$d]' done <"$disable_file" fi diff --git a/copy.sh b/copy.sh index 1addda84..cd5f5212 100755 --- a/copy.sh +++ b/copy.sh @@ -414,11 +414,19 @@ while true; do sed -i 's#^\(\s*\)\("format": "{:%a %d | %H:%M}",\) #\1//\2#g' config/waybar/Modules 2>&1 | tee -a "$LOG" # for hyprlock - sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%H")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" - sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" + HYPRLOCK_FILE="config/hypr/hyprlock.conf" + if [ ! -f "$HYPRLOCK_FILE" ] && [ -f "config/hypr/hyprlock-1080p.conf" ]; then + HYPRLOCK_FILE="config/hypr/hyprlock-1080p.conf" + fi + if [ -f "$HYPRLOCK_FILE" ]; then + sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%H")"/# &/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%I")" #AM\/PM/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" - sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%S")"/# &/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" - sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/' config/hypr/hyprlock.conf 2>&1 | tee -a "$LOG" + sed -i 's/^\s*text = cmd\[update:1000\] echo "\$(date +"%S")"/# &/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + sed -i 's/^\(\s*\)# *text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/\1 text = cmd\[update:1000\] echo "\$(date +"%S %p")" #AM\/PM/' "$HYPRLOCK_FILE" 2>&1 | tee -a "$LOG" + else + echo "${WARN} hyprlock template not found; skipping 12H lock format edits" 2>&1 | tee -a "$LOG" + fi echo "${OK} 12H format set on waybar clocks succesfully." 2>&1 | tee -a "$LOG" @@ -854,7 +862,11 @@ compose_overlay_from_backup() { grep -E '^\s*exec-once\s*=' "$base_file" | sed -E 's/^\s+//;s/\s+$//' | sort -u >"$base_file.tmp.exec" comm -23 "$old_user_file.tmp.exec" "$base_file.tmp.exec" >"$new_user_file" # treat commented exec-once in old user as disables - grep -E '^\s*#\s*exec-once\s*=' "$old_user_file" | sed -E 's/^\s*#\s*exec-once\s*=\s*//' | sed -E 's/^\s+//;s/\s+$//' | sort -u >"$disable_file" + grep -E '^\s*#\s*exec-once\s*=' "$old_user_file" \ + | sed -E 's/^\s*#\s*exec-once\s*=\s*//' \ + | sed -E 's/^\s+//;s/\s+$//' \ + | grep -Ev '^\$scriptsDir/KeybindsLayoutInit\.sh$' \ + | sort -u >"$disable_file" rm -f "$old_user_file.tmp.exec" "$base_file.tmp.exec" elif [ "$type" = "windowrules" ]; then # additions -- cgit v1.2.3 From 67cc7cdab26ad7dc0f9c0aa691a1efc3a200518a Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:45:53 -0500 Subject: fix(qs): Edit Startup Apps opens full vendor defaults (configs/Startup_Apps.conf)\n\n- Restores prior behavior where users edit the complete startup config\n- Composition still merges overlay+vendor at runtime --- config/hypr/scripts/Kool_Quick_Settings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 79ddc163..d6e1b089 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -58,7 +58,7 @@ main() { "view/edit Window Rules") file="$UserConfigs/WindowRules.conf" ;; "view/edit User Keybinds") file="$UserConfigs/UserKeybinds.conf" ;; "view/edit User Settings") file="$UserConfigs/UserSettings.conf" ;; - "view/edit Startup Apps") file="$UserConfigs/Startup_Apps.conf" ;; + "view/edit Startup Apps") file="$configs/Startup_Apps.conf" ;; "view/edit Decorations") file="$UserConfigs/UserDecorations.conf" ;; "view/edit Animations") file="$UserConfigs/UserAnimations.conf" ;; "view/edit Laptop Keybinds") file="$UserConfigs/Laptops.conf" ;; -- cgit v1.2.3 From 109a4b1ab03ef16b20c00aeb2775f515fc56ff07 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:50:39 -0500 Subject: fix(hypr): source UserConfigs/Startup_Apps.conf and WindowRules.conf again\n\n- Revert to runtime includes that always exist to restore startup apps\n- Keep KeybindsLayoutInit in vendor configs/Startup_Apps.conf so it runs --- config/hypr/hyprland.conf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 1cf7bd31..fa8435dc 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -9,15 +9,13 @@ exec-once = $HOME/.config/hypr/initial-boot.sh # Sourcing external config files $configs = $HOME/.config/hypr/configs # Default Configs directory path -$Generated = $HOME/.config/hypr/generated # Composed configs (base + user overlays) source=$configs/Keybinds.conf # Pre-configured keybinds # ## This is where you want to start tinkering $UserConfigs = $HOME/.config/hypr/UserConfigs # User Configs directory path -# Use composed Startup_Apps (base + user overlay + disables) -source= $Generated/Startup_Apps.conf +source= $UserConfigs/Startup_Apps.conf source= $UserConfigs/ENVariables.conf # Environment variables to load @@ -28,8 +26,7 @@ source= $UserConfigs/Laptops.conf # For laptop related source= $UserConfigs/LaptopDisplay.conf # Laptop display related. You need to read the comment on this file -# Use composed WindowRules (base + user overlay + disables) -source= $Generated/WindowRules.conf # all about Hyprland Window Rules and Layer Rules +source= $UserConfigs/WindowRules.conf # all about Hyprland Window Rules and Layer Rules source= $UserConfigs/UserDecorations.conf # Decorations config file -- cgit v1.2.3 From f8e7eb13f48aa5576674318bcd7b3ab920e72846 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 02:53:52 -0500 Subject: fix(startup): load vendor Startup_Apps/WindowRules then user overlay\n\n- Restores baseline autostarts (waybar, swaync, etc.) while allowing user additions\n- Keeps SUPER+SHIFT+E editing vendor Startup_Apps for full view --- config/hypr/hyprland.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index fa8435dc..8f0fc1e5 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -15,6 +15,8 @@ source=$configs/Keybinds.conf # Pre-configured keybinds # ## This is where you want to start tinkering $UserConfigs = $HOME/.config/hypr/UserConfigs # User Configs directory path +# Load vendor defaults, then user additions/overrides +source= $configs/Startup_Apps.conf source= $UserConfigs/Startup_Apps.conf source= $UserConfigs/ENVariables.conf # Environment variables to load @@ -26,7 +28,9 @@ source= $UserConfigs/Laptops.conf # For laptop related source= $UserConfigs/LaptopDisplay.conf # Laptop display related. You need to read the comment on this file -source= $UserConfigs/WindowRules.conf # all about Hyprland Window Rules and Layer Rules +# Load vendor defaults, then user additions +source= $configs/WindowRules.conf # all about Hyprland Window Rules and Layer Rules (defaults) +source= $UserConfigs/WindowRules.conf # user rules and layer rules source= $UserConfigs/UserDecorations.conf # Decorations config file -- cgit v1.2.3 From 8361dcc058fb41225630934d37bae65dd9b76e43 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 5 Nov 2025 03:05:23 -0500 Subject: chore(release): v2.3.18\n\nKeybinds\n- Initialize SUPER+J/K to match default layout at login via scripts/KeybindsLayoutInit.sh\n- Keep ChangeLayout.sh dynamic rebinds on layout toggle\n- Credit: Suresh Thagunna (https://github.com/suresh466)\n\nStartup\n- Source vendor Startup_Apps/WindowRules first, then UserConfigs overlay to restore baseline autostarts while honoring user additions\n- Quick Settings: Edit Startup Apps opens full vendor defaults\n\nMeta\n- Version marker: config/hypr/v2.3.18 --- CHANGELOG.md | 9 +++++++++ config/hypr/UserConfigs/ENVariables.conf | 2 +- config/hypr/v2.3.17 | 5 ----- config/hypr/v2.3.18 | 5 +++++ 4 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 config/hypr/v2.3.17 create mode 100644 config/hypr/v2.3.18 diff --git a/CHANGELOG.md b/CHANGELOG.md index dd01997b..f6623708 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog — JAK's Hyprland Dotfiles +## v2.3.18 — 2025-11-05 + +- Keybinds: initialize SUPER+J/K at login to match the default layout (master or dwindle). + - Adds scripts/KeybindsLayoutInit.sh and wires it to Startup_Apps so J/K and O (togglesplit) are correct on first session. + - ChangeLayout.sh continues to rebind dynamically when layouts are toggled. + - Credits: [Suresh Thagunna](https://github.com/suresh466) for identifying the mismatch and proposing an auto-alignment approach. +- Startup config sourcing: load vendor Startup_Apps and WindowRules first, then user overlays, restoring baseline autostarts while keeping user additions. +- Quick Settings: “Edit Startup Apps” opens the full vendor defaults for clarity. + ## October 2025 ### ⌨️ Keybinds diff --git a/config/hypr/UserConfigs/ENVariables.conf b/config/hypr/UserConfigs/ENVariables.conf index d82fc2a6..4e736dc3 100644 --- a/config/hypr/UserConfigs/ENVariables.conf +++ b/config/hypr/UserConfigs/ENVariables.conf @@ -5,7 +5,7 @@ # environment-variables # Current Version of JakooLit Dotfiles: -env = DOTS_VERSION,2.3.17 +env = DOTS_VERSION,2.3.18 # Toolkit Backend Variables env = GDK_BACKEND,wayland,x11,* diff --git a/config/hypr/v2.3.17 b/config/hypr/v2.3.17 deleted file mode 100644 index 31b3414d..00000000 --- a/config/hypr/v2.3.17 +++ /dev/null @@ -1,5 +0,0 @@ -### https://github.com/JaKooLit ### -## https://github.com/JaKooLit/Hyprland-Dots -## This is to have a reference of which version would be - -## note that this will always be higher than the released versions \ No newline at end of file diff --git a/config/hypr/v2.3.18 b/config/hypr/v2.3.18 new file mode 100644 index 00000000..31b3414d --- /dev/null +++ b/config/hypr/v2.3.18 @@ -0,0 +1,5 @@ +### https://github.com/JaKooLit ### +## https://github.com/JaKooLit/Hyprland-Dots +## This is to have a reference of which version would be + +## note that this will always be higher than the released versions \ No newline at end of file -- cgit v1.2.3