From c575e0672a6a3f7f7e841c9b2ba6b2a97fb4c53f Mon Sep 17 00:00:00 2001 From: brockar Date: Sat, 22 Nov 2025 23:23:55 -0300 Subject: new: UserConfigsSwitches.sh Script to manage UserConfigs --- config/hypr/scripts/UserConfigsSwitcher.sh | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 config/hypr/scripts/UserConfigsSwitcher.sh (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/UserConfigsSwitcher.sh b/config/hypr/scripts/UserConfigsSwitcher.sh new file mode 100755 index 00000000..ad1d4e63 --- /dev/null +++ b/config/hypr/scripts/UserConfigsSwitcher.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Script to manage UserConfigs and UserConfigsBak + +HYPR_CONFIG_DIR="$HOME/.config/hypr" +USER_CONFIGS="$HYPR_CONFIG_DIR/UserConfigs" +USER_CONFIGS_BAK="$HYPR_CONFIG_DIR/UserConfigsBak" + +if [ -d "$USER_CONFIGS" ] && [ ! -d "$USER_CONFIGS_BAK" ]; then + echo "Moving UserConfigs to UserConfigsBak..." + mv "$USER_CONFIGS" "$USER_CONFIGS_BAK" + echo "Done. Your UserConfigs are now in UserConfigsBak." +elif [ ! -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then + echo "Moving UserConfigsBak to UserConfigs..." + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + echo "Done. Your backup has been restored to UserConfigs." +elif [ -d "$USER_CONFIGS" ] && [ -d "$USER_CONFIGS_BAK" ]; then + echo "Both UserConfigs and UserConfigsBak exist." + echo "Please choose what to do:" + PS3="Enter your choice: " + select option in "Backup current UserConfigs (move to UserConfigsBak)" "Restore backup (move UserConfigsBak to UserConfigs)" "Swap them" "Do nothing"; do + case $REPLY in + 1) + echo "Backing up UserConfigs..." + rm -rf "$USER_CONFIGS_BAK" + mv "$USER_CONFIGS" "$USER_CONFIGS_BAK" + echo "Done. UserConfigs moved to UserConfigsBak." + break + ;; + 2) + echo "Restoring backup..." + rm -rf "$USER_CONFIGS" + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + echo "Done. UserConfigsBak moved to UserConfigs." + break + ;; + 3) + echo "Swapping..." + mv "$USER_CONFIGS" "$HYPR_CONFIG_DIR/UserConfigs.tmp" + mv "$USER_CONFIGS_BAK" "$USER_CONFIGS" + mv "$HYPR_CONFIG_DIR/UserConfigs.tmp" "$USER_CONFIGS_BAK" + echo "Done. UserConfigs and UserConfigsBak have been swapped." + break + ;; + 4) + echo "No changes made." + break + ;; + *) + echo "Invalid option. Please try again." + ;; + esac + done +else + echo "Neither UserConfigs nor UserConfigsBak directory found. Nothing to do." +fi -- cgit v1.2.3 From 1659f153cedda7f0b450b9822ce962ffe3d27b6c Mon Sep 17 00:00:00 2001 From: Don Williams Date: Tue, 25 Nov 2025 22:22:01 -0500 Subject: Updated Edit Menu for both system and user settings Also changed to just "Edit" since it calls an editor not viewwr On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: Kool_Quick_Settings.sh --- config/hypr/scripts/Kool_Quick_Settings.sh | 44 ++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 16742492..cdcaed2a 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -22,16 +22,18 @@ UserScripts="$HOME/.config/hypr/UserScripts" # Function to display the menu options without numbers menu() { cat </dev/null; then -- cgit v1.2.3 From e0141281bee6d15904e9d21cc1c665db1e3f34a0 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Tue, 25 Nov 2025 23:28:15 -0500 Subject: fix: Update Kool_Quick_Settings.sh for UserConfigs/configs separation - Remove UserKeybinds option (file no longer exists) - Point user overlay files to UserConfigs versions (Startup_Apps, WindowRules) - Add System Defaults view-only section - Point UserSettings to configs/SystemSettings.conf with info notification - Separate menu into USER CUSTOMIZATIONS, SYSTEM DEFAULTS, and UTILITIES sections - Add show_info() helper function for notifications --- config/hypr/scripts/Kool_Quick_Settings.sh | 57 +++++++++++++++++------------- 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index cdcaed2a..791193c2 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## # Rofi menu for KooL Hyprland Quick Settings (SUPER SHIFT E) +# Updated for UserConfigs/configs separation # Modify this config file for default terminal and EDITOR config_file="$HOME/.config/hypr/UserConfigs/01-UserDefaults.conf" @@ -19,21 +20,29 @@ iDIR="$HOME/.config/swaync/images" scriptsDir="$HOME/.config/hypr/scripts" UserScripts="$HOME/.config/hypr/UserScripts" +# Function to show info notification +show_info() { + notify-send -i "$iDIR/info.png" "Info" "$1" +} + # Function to display the menu options without numbers menu() { cat </dev/null; then -- cgit v1.2.3 From 32a3fe5a4309fa922e3671d5e3dd6ef58864f289 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 26 Nov 2025 00:11:56 -0500 Subject: Small formatting change on Setting Menu --- config/hypr/scripts/Kool_Quick_Settings.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index 791193c2..fdff1204 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -29,19 +29,19 @@ show_info() { menu() { cat < /dev/null; then pkill rofi fi -main \ No newline at end of file +main -- cgit v1.2.3 From fa43567ceb993d50f4fed16fb49a53a741cdddb0 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 26 Nov 2025 00:15:22 -0500 Subject: Updated menu names for clarity --- config/hypr/scripts/Kool_Quick_Settings.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index fdff1204..a7d7d588 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -64,18 +64,18 @@ main() { # Map choices to corresponding files case "$choice" in - "edit User Defaults") file="$UserConfigs/01-UserDefaults.conf" ;; - "edit User ENV variables") file="$UserConfigs/ENVariables.conf" ;; - "edit User Startup Apps (overlay)") file="$UserConfigs/Startup_Apps.conf" ;; - "edit User Window Rules (overlay)") file="$UserConfigs/WindowRules.conf" ;; - "edit User Settings") file="$configs/SystemSettings.conf"; show_info "Editing default settings. Copy to UserConfigs/UserSettings.conf to override." ;; - "edit User Decorations") file="$UserConfigs/UserDecorations.conf" ;; - "edit User Animations") file="$UserConfigs/UserAnimations.conf" ;; - "edit User Laptop Settings") file="$UserConfigs/Laptops.conf" ;; - "view System Default Keybinds") file="$configs/Keybinds.conf" ;; - "view System Default Startup Apps") file="$configs/Startup_Apps.conf" ;; - "view System Default Window Rules") file="$configs/WindowRules.conf" ;; - "view System Default Settings") file="$configs/SystemSettings.conf" ;; + "Edit User Defaults") file="$UserConfigs/01-UserDefaults.conf" ;; + "Edit User ENV variables") file="$UserConfigs/ENVariables.conf" ;; + "Edit User Startup Apps (overlay)") file="$UserConfigs/Startup_Apps.conf" ;; + "Edit User Window Rules (overlay)") file="$UserConfigs/WindowRules.conf" ;; + "Edit User Settings") file="$configs/SystemSettings.conf"; show_info "Editing default settings. Copy to UserConfigs/UserSettings.conf to override." ;; + "Edit User Decorations") file="$UserConfigs/UserDecorations.conf" ;; + "Edit User Animations") file="$UserConfigs/UserAnimations.conf" ;; + "Edit User Laptop Settings") file="$UserConfigs/Laptops.conf" ;; + "Edit System Default Keybinds") file="$configs/Keybinds.conf" ;; + "Edit System Default Startup Apps") file="$configs/Startup_Apps.conf" ;; + "Edit System Default Window Rules") file="$configs/WindowRules.conf" ;; + "Edit System Default Settings") file="$configs/SystemSettings.conf" ;; "Choose Kitty Terminal Theme") $scriptsDir/Kitty_themes.sh ;; "Configure Monitors (nwg-displays)") if ! command -v nwg-displays &>/dev/null; then -- cgit v1.2.3 From ba597ae6742d21ab7f811a27c688559bfe8bb6dd Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 26 Nov 2025 00:18:19 -0500 Subject: Left out UserKeybinds in editor screen --- config/hypr/scripts/Kool_Quick_Settings.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Kool_Quick_Settings.sh b/config/hypr/scripts/Kool_Quick_Settings.sh index a7d7d588..8ab71ba2 100755 --- a/config/hypr/scripts/Kool_Quick_Settings.sh +++ b/config/hypr/scripts/Kool_Quick_Settings.sh @@ -30,6 +30,7 @@ menu() { cat < Date: Wed, 26 Nov 2025 09:37:58 -0500 Subject: KeyBinds.sh checks sys and user keybinds and flags dups --- config/hypr/scripts/KeyBinds.sh | 84 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 3 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index 46953cc5..c2aa56b7 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -21,9 +21,87 @@ msg='☣️ NOTE ☣️: Clicking with Mouse or Pressing ENTER will have NO func files=("$keybinds_conf" "$user_keybinds_conf") [[ -f "$laptop_conf" ]] && files+=("$laptop_conf") -raw_keybinds=$(cat "${files[@]}" 2>/dev/null \ - | grep -E '^[[:space:]]*bind' \ - | sed -E 's/[[:space:]]+#.*$//') +# Parse binds/unbinds from files, detect overrides, and keep unique effective binds +declare -A binding_map # combo -> bind line (effective) +declare -A source_map # combo -> source file +declare -A user_bind_map # combo -> user bind line +declare -A unbound_user # combo -> 1 if explicitly unbound in user file +declare -A seen_any_bind # combo -> 1 if any bind seen (for iteration) +declare -A default_seen # combo -> 1 if default bind exists +declare -a missing_unbind_suggestions_arr + +normalize_combo() { echo "$1" | sed -E 's/[[:space:]]//g'; } + +extract_combo() { + # arg: a bind/unbind line; returns "mods,key" via echo + local s="$1" + s="$(echo "$s" | sed -E 's/[[:space:]]+#.*$//')" + if [[ "$s" =~ = ]]; then + local rhs="${s#*=}" + local mods="$(echo "$rhs" | awk -F',' '{gsub(/^[ \t]+|[ \t]+$/,"",$1); print $1}')" + local key="$(echo "$rhs" | awk -F',' '{gsub(/^[ \t]+|[ \t]+$/,"",$2); print $2}')" + echo "${mods},${key}" + fi +} + +for file in "${files[@]}"; do + [[ ! -f "$file" ]] && continue + while IFS= read -r line; do + [[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue + + if [[ "$line" =~ ^[[:space:]]*bind[a-z]*[[:space:]]*= ]]; then + combo_raw="$(extract_combo "$line")" + [[ -z "$combo_raw" ]] && continue + combo="$(normalize_combo "$combo_raw")" + seen_any_bind["$combo"]=1 + + if [[ "$file" != "$user_keybinds_conf" ]]; then + default_seen["$combo"]=1 + fi + + # prefer user bind, else first seen + if [[ -z "${source_map[$combo]}" ]]; then + binding_map["$combo"]="$line" + source_map["$combo"]="$file" + fi + if [[ "$file" == "$user_keybinds_conf" ]]; then + user_bind_map["$combo"]="$line" + binding_map["$combo"]="$line" + source_map["$combo"]="$file" + fi + + elif [[ "$line" =~ ^[[:space:]]*unbind[[:space:]]*= ]]; then + combo_raw="$(extract_combo "$line")" + [[ -z "$combo_raw" ]] && continue + combo="$(normalize_combo "$combo_raw")" + if [[ "$file" == "$user_keybinds_conf" ]]; then + unbound_user["$combo"]=1 + fi + fi + done < "$file" +done + +# Build raw_keybinds for display and collect missing unbind suggestions +raw_keybinds="" +for combo in "${!seen_any_bind[@]}"; do + eff_line="${binding_map[$combo]}" + src="${source_map[$combo]}" + [[ -z "$eff_line" ]] && continue + raw_keybinds+="$eff_line"$'\n' + + # If user overrides a default but didn't unbind in user file, suggest unbind + if [[ "$src" == "$user_keybinds_conf" && -n "${default_seen[$combo]}" && -z "${unbound_user[$combo]}" ]]; then + suggest="$(echo "$eff_line" | sed -E 's/^[[:space:]]*bind[a-z]*/unbind/')" + missing_unbind_suggestions_arr+=("$suggest") + fi +done + +# If there are missing unbinds, write suggestions to a temp file and note in message +if (( ${#missing_unbind_suggestions_arr[@]} > 0 )); then + suggestions_file="$(mktemp -t hypr-unbind-suggestions.XXXX.conf)" + printf '%s\n' "${missing_unbind_suggestions_arr[@]}" > "$suggestions_file" + msg="$msg | Overrides missing unbind: ${#missing_unbind_suggestions_arr[@]} (suggestions: $suggestions_file)" +fi # check for any keybinds to display if [[ -z "$raw_keybinds" ]]; then -- cgit v1.2.3 From d0a64c6fda3fb62331ae6bb0c696358efed98ecd Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 26 Nov 2025 09:45:44 -0500 Subject: Fixed AWK to pull keybind description not dispatcher --- config/hypr/scripts/KeyBinds.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index c2aa56b7..4158b762 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -109,7 +109,7 @@ if [[ -z "$raw_keybinds" ]]; then exit 1 fi -# transform into a readable list: MODS+KEY — DESCRIPTION — DISPATCHER [PARAMS] +# transform into a readable list: MODS+KEY — DESCRIPTION (for bindd) or DISPATCHER [PARAMS] (for bind) display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' function trim(s){ gsub(/^[ \t]+|[ \t]+$/,"",s); return s } /^[[:space:]]*bind/ { @@ -138,13 +138,8 @@ display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' combo = (mods && key) ? mods "+" key : (key?key:mods); - if (desc != "") { - if (dispatcher != "" && params != "") - print combo, " — ", desc, " — ", dispatcher, " ", params; - else if (dispatcher != "") - print combo, " — ", desc, " — ", dispatcher; - else - print combo, " — ", desc; + if (hasdesc && desc != "") { + print combo, " — ", desc; } else { if (dispatcher != "" && params != "") print combo, " — ", dispatcher, " ", params; -- cgit v1.2.3 From 510eafbe0560cff6e459b64fcb778d645cd43ab3 Mon Sep 17 00:00:00 2001 From: Don Williams Date: Sun, 30 Nov 2025 18:47:13 -0500 Subject: Update Overview integration with corrected qs ipc commands and startup --- config/hypr/configs/Startup_Apps.conf | 2 +- config/hypr/scripts/OverviewToggle.sh | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf index 425b9b03..0cfb6427 100644 --- a/config/hypr/configs/Startup_Apps.conf +++ b/config/hypr/configs/Startup_Apps.conf @@ -37,7 +37,7 @@ exec-once = swaync #exec-once = blueman-applet #exec-once = rog-control-center exec-once = waybar -exec-once = qs # quickshell AGS Desktop Overview alternative +exec-once = qs -c overview # Quickshell Overview # Clipboard manager exec-once = wl-paste --type text --watch cliphist store diff --git a/config/hypr/scripts/OverviewToggle.sh b/config/hypr/scripts/OverviewToggle.sh index 2737234c..8d4b285f 100755 --- a/config/hypr/scripts/OverviewToggle.sh +++ b/config/hypr/scripts/OverviewToggle.sh @@ -4,20 +4,18 @@ set -euo pipefail -# 1) Try Quickshell via Hyprland global dispatch (works if QS is running and listening) -# Only attempt this if a Quickshell process is running; otherwise Hyprland will -# still return success for the dispatch and we'll never fall back to AGS. +# 1) Try Quickshell via IPC (works if QS is running and listening) if pgrep -x quickshell >/dev/null 2>&1; then - if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + if qs ipc -c overview call overview toggle >/dev/null 2>&1; then exit 0 fi fi # If QS isn't running, but the CLI exists, try starting it and retry once if command -v qs >/dev/null 2>&1; then - qs >/dev/null 2>&1 & + qs -c overview >/dev/null 2>&1 & sleep 0.6 - if hyprctl dispatch global quickshell:overviewToggle >/dev/null 2>&1; then + if qs ipc -c overview call overview toggle >/dev/null 2>&1; then exit 0 fi fi -- cgit v1.2.3