diff --git a/CHANGELOG.md b/CHANGELOG.md index a4514adc0a..31e9dac329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - Hyprland: dropped the legacy hyprlang dot, the files it deployed no longer exist ### Fixed +- Waybar: the theme module and the HyDE menu call `theme.switch` again; `themeswitch` was removed and the calls failed outright +- Dolphin: the "Set As Wallpaper" service menu switches the theme again +- Fish: `HYPRLAND_CONFIG` points at the deployed `hypr/hyde.lua` instead of a config the Lua release deleted, so a session started outside uwsm no longer comes up without a config +- Hyprland: the config editor offers the user's `hypr/hyprland.lua` instead of four files nothing reads, which it used to create empty on save +- System monitor: a console monitor no longer launches with no terminal attached, and `[sysmonitor] terminal` is a real setting - Docs: the keybinding reference describes the Lua configuration instead of the removed `userprefs.conf`, documents binds that were missing from it, corrects four descriptions that no longer matched the code, and explains why an override needs the original bind's flags - Docs: the shipped `hypr/hyprland.lua` stub shows a working bind instead of pointing at a wiki that does not exist - Docs: the keybinding links in the German, Arabic, French, Dutch and Turkish readmes resolve again diff --git a/Configs/.config/fish/conf.d/hyde.fish b/Configs/.config/fish/conf.d/hyde.fish index 61d6869832..7bb2c98e14 100644 --- a/Configs/.config/fish/conf.d/hyde.fish +++ b/Configs/.config/fish/conf.d/hyde.fish @@ -74,7 +74,12 @@ set -gx PARALLEL_HOME "$XDG_CONFIG_HOME/parallel" end if test -z "$HYPRLAND_CONFIG" -set -gx HYPRLAND_CONFIG "$XDG_DATA_HOME/hypr/hyprland.conf" +for candidate in "$XDG_DATA_HOME/hypr/hyde.lua" /usr/local/share/hypr/hyde.lua /usr/share/hypr/hyde.lua +if test -r "$candidate" +set -gx HYPRLAND_CONFIG "$candidate" +break +end +end end fish_add_path $HOME/.local/bin:$PATH diff --git a/Configs/.config/uwsm/env-hyprland.d/00-hyde.sh b/Configs/.config/uwsm/env-hyprland.d/00-hyde.sh index fe4c9cec18..f008a97fa7 100644 --- a/Configs/.config/uwsm/env-hyprland.d/00-hyde.sh +++ b/Configs/.config/uwsm/env-hyprland.d/00-hyde.sh @@ -25,7 +25,7 @@ if [ -z "$HYDE_ACTIVATED" ]; then unset _hyde_activate fi -HYPRLAND_CONFIG="${HYPRLAND_CONFIG:-${XDG_DATA_HOME:-$HOME/.local/share}/hypr/hyprland.lua}" +HYPRLAND_CONFIG="${HYPRLAND_CONFIG:-${XDG_DATA_HOME:-$HOME/.local/share}/hypr/hyde.lua}" HYPRLAND_NO_SD_NOTIFY=1 # If systemd, disables the sd_notify calls. HYPRLAND_NO_SD_VARS=1 # Disables management of variables in systemd and dbus activation environments. diff --git a/Configs/.local/lib/hyde/hyde-launch.sh b/Configs/.local/lib/hyde/hyde-launch.sh index c71ccaf899..821181baae 100755 --- a/Configs/.local/lib/hyde/hyde-launch.sh +++ b/Configs/.local/lib/hyde/hyde-launch.sh @@ -3,4 +3,4 @@ notify-send -a "Deprecation Notice" "hyde-launch.sh is deprecated. Please use hyde-shell open instead." -i dialog-information -"${LIB_DIR}/hyde/open.sh" "$@" +hyde-shell open "$@" diff --git a/Configs/.local/lib/hyde/keybinds_hint.sh b/Configs/.local/lib/hyde/keybinds_hint.sh index 18c829579c..23d41cc70c 100755 --- a/Configs/.local/lib/hyde/keybinds_hint.sh +++ b/Configs/.local/lib/hyde/keybinds_hint.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash pkill -x rofi && exit [[ $HYDE_SHELL_INIT -ne 1 ]] && eval "$(hyde-shell init)" -confDir="${XDG_CONFIG_HOME:-$HOME/.config}" -keyconfDir="$confDir/hypr" -kb_hint_conf=("$keyconfDir/hyprland.conf" "$keyconfDir/keybindings.conf" "$keyconfDir/userprefs.conf") -kb_hint_conf+=("${ROFI_KEYBIND_HINT_CONFIG[@]}") kb_cache="$XDG_RUNTIME_DIR/hyde/keybinds_hint.rofi" if [[ $1 == "--reload" ]]; then diff --git a/Configs/.local/lib/hyde/system.monitor.sh b/Configs/.local/lib/hyde/system.monitor.sh index f268bd6467..40c7592cb6 100755 --- a/Configs/.local/lib/hyde/system.monitor.sh +++ b/Configs/.local/lib/hyde/system.monitor.sh @@ -60,9 +60,11 @@ for sysMon in "${!pkgChk[@]}"; do break fi if pkg_installed "${pkgChk[sysMon]}"; then - term=$(grep -E '^\s*'"$term" "$HOME/.config/hypr/keybindings.conf" | cut -d '=' -f2 | xargs) - term=${TERMINAL:-$term} - term=${SYSMONITOR_TERMINAL:-$term} + term=${SYSMONITOR_TERMINAL:-${TERMINAL}} + if [ -z "${term}" ]; then + print_log -warn "system.monitor" "no terminal configured, set [sysmonitor] terminal or TERMINAL" + continue + fi if $term "${pkgChk[sysMon]}"; then pid="$!" echo "$pid:::${pkgChk[sysMon]}" > "$pidFile" diff --git a/Configs/.local/lib/hyde/wallpaper.kon.sh b/Configs/.local/lib/hyde/wallpaper.kon.sh index d605234412..7196c8f817 100755 --- a/Configs/.local/lib/hyde/wallpaper.kon.sh +++ b/Configs/.local/lib/hyde/wallpaper.kon.sh @@ -42,7 +42,7 @@ if [ ! -z "$setTheme" ] && [ ! -z "$setWall" ]; then fi cp "$setWall" "$tgtPath/$setTheme/wallpapers" ln -fs "$tgtPath/$setTheme/wallpapers/$(basename "$setWall")" "$tgtPath/$setTheme/wall.set" - "$scrDir/themeswitch.sh" -s "$setTheme" + "$scrDir/theme.switch.sh" -s "$setTheme" notify-send -a "HyDE Alert" -i "$thmbDir/$inwallHash.sqre" "Wallpaper set in $setTheme" else echo -e "[Desktop Entry]\nType=Service\nMimeType=image/png;image/jpeg;image/jpg;image/gif\nActions=Menu-Refresh$(printf ";%s" "${thmList[@]}")\nX-KDE-Submenu=Set As Wallpaper...\n\n[Desktop Action Menu-Refresh]\nName=.: Refresh List :.\nExec=$scrName" > "$kmenuDesk" diff --git a/Configs/.local/share/hyde/config-registry.toml b/Configs/.local/share/hyde/config-registry.toml index 468a9658d0..b04dc22d57 100644 --- a/Configs/.local/share/hyde/config-registry.toml +++ b/Configs/.local/share/hyde/config-registry.toml @@ -69,24 +69,9 @@ description = "Hyprland Window Manager" icon = "🪟" [hyprland.files.main] -description = "Main Hyprland Configuration" -path = "${XDG_CONFIG_HOME:-$HOME/.config}/hypr/userprefs.conf" -pre_hook = ["bash", "-c", "echo 'Editing Hyprland main config...'"] - -[hyprland.files.keybinds] -description = "Hyprland Keybindings" -path = "${XDG_CONFIG_HOME:-$HOME/.config}/hypr/keybindings.conf" -pre_hook = ["bash", "-c", "echo 'Editing Hyprland keybinds...'"] - -[hyprland.files.windowrules] -description = "Hyprland Window Rules" -path = "${XDG_CONFIG_HOME:-$HOME/.config}/hypr/windowrules.conf" -pre_hook = ["bash", "-c", "echo 'Editing Hyprland window rules...'"] - -[hyprland.files.nvidia] -description = "Hyprland NVIDIA Settings" -path = "${XDG_CONFIG_HOME:-$HOME/.config}/hypr/nvidia.conf" -pre_hook = ["bash", "-c", "echo 'Editing Hyprland NVIDIA settings...'"] +description = "User Hyprland Configuration - binds, rules and settings" +path = "${XDG_CONFIG_HOME:-$HOME/.config}/hypr/hyprland.lua" +pre_hook = ["bash", "-c", "echo 'Editing Hyprland user config...'"] diff --git a/Configs/.local/share/hyde/schema/config.toml b/Configs/.local/share/hyde/schema/config.toml index 37588cbebb..593d672dde 100644 --- a/Configs/.local/share/hyde/schema/config.toml +++ b/Configs/.local/share/hyde/schema/config.toml @@ -215,6 +215,7 @@ steps = 5 # Number of steps to increase/decrease brightness. [sysmonitor] execute = "" # Default command to execute. commands = [""] # Fallback command options. +terminal = "" # Terminal used to launch a console monitor. Falls back to TERMINAL. # hyprlock configuration. [hyprlock] diff --git a/Configs/.local/share/hyde/schema/schema.toml b/Configs/.local/share/hyde/schema/schema.toml index 006af3ab8a..d3b981e6a5 100644 --- a/Configs/.local/share/hyde/schema/schema.toml +++ b/Configs/.local/share/hyde/schema/schema.toml @@ -787,6 +787,11 @@ type = "array" [properties.sysmonitor.properties.commands.items] type = "string" +[properties.sysmonitor.properties.terminal] +default = "" +description = "Terminal used to launch a console monitor. Falls back to TERMINAL." +type = "string" + [properties.hyprlock] description = "hyprlock configuration." type = "object" diff --git a/Configs/.local/share/waybar/layouts/macos.jsonc b/Configs/.local/share/waybar/layouts/macos.jsonc index ac6c60223a..5bdf0d1cc6 100644 --- a/Configs/.local/share/waybar/layouts/macos.jsonc +++ b/Configs/.local/share/waybar/layouts/macos.jsonc @@ -94,8 +94,8 @@ "wallpaper-next": "hyde-shell wallpaper --next --global", "wallpaper-previous": "hyde-shell wallpaper --previous --global", "wallpaper-random": "hyde-shell wallpaper --random --global", - "theme-next": "hyde-shell themeswitch -n", - "theme-previous": "hyde-shell themeswitch -p", + "theme-next": "hyde-shell theme.switch -n", + "theme-previous": "hyde-shell theme.switch -p", "theme-select": "hyde-shell themeselect", "theme-import": "hyde-shell app -T -- hydectl theme import", "waybar-restart": "hyde-shell waybar -ubg", diff --git a/Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc b/Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc index 993c416ea9..11d9a2c8a9 100644 --- a/Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc +++ b/Configs/.local/share/waybar/modules/custom-hyde-menu.jsonc @@ -11,8 +11,8 @@ "wallpaper-next": "hyde-shell wallpaper --next --global", "wallpaper-previous": "hyde-shell wallpaper --previous --global", "wallpaper-random": "hyde-shell wallpaper --random --global", - "theme-next": "hyde-shell themeswitch -n", - "theme-previous": "hyde-shell themeswitch -p", + "theme-next": "hyde-shell theme.switch -n", + "theme-previous": "hyde-shell theme.switch -p", "theme-select": "hyde-shell themeselect", "theme-import": "hyde-shell app -T -- hydectl theme import", "layouts-select": "hyde-shell layouts --select;pkill -RTMIN+19 waybar", diff --git a/Configs/.local/share/waybar/modules/custom-theme.jsonc b/Configs/.local/share/waybar/modules/custom-theme.jsonc index 0b4e0992a2..162cd34de2 100644 --- a/Configs/.local/share/waybar/modules/custom-theme.jsonc +++ b/Configs/.local/share/waybar/modules/custom-theme.jsonc @@ -3,8 +3,8 @@ "format": "{0}", "rotate": 0, "tooltip-format": "\udb81\udfe1 Switch theme", - "on-click": "hyde-shell themeswitch -n", - "on-click-right": "hyde-shell themeswitch -p", + "on-click": "hyde-shell theme.switch -n", + "on-click-right": "hyde-shell theme.switch -p", "on-click-middle": "sleep 0.1 && hyde-shell themeselect", "interval": 86400, "tooltip": true diff --git a/tests/test_references.sh b/tests/test_references.sh new file mode 100755 index 0000000000..78acfcba67 --- /dev/null +++ b/tests/test_references.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env sh +# Shipped configs must not reference files the Lua release removed. + +. "$(dirname -- "$0")/lib/common.sh" + +configs_dir="$REPO_ROOT/Configs" +checked=0 + +# Retired names and the replacement each caller should use instead. The legacy +# restore_cfg.* pair under Scripts/ is deliberately out of scope: it deploys the +# pre-Lua tree and is no longer wired into the installer. +check_retired() { + retired=$1 + replacement=$2 + hits=$(grep -rIl -- "$retired" "$configs_dir" 2>/dev/null || true) + checked=$((checked + 1)) + [ -z "$hits" ] && return 0 + for hit in $hits; do + fail "$(printf '%s references retired %s (use %s)' "${hit#"$REPO_ROOT"/}" "$retired" "$replacement")" + done +} + +check_retired 'hyde-shell themeswitch' 'hyde-shell theme.switch' +check_retired 'themeswitch.sh' 'theme.switch.sh' +check_retired 'hyde/open.sh' 'hyde-shell open' +check_retired 'hypr/keybindings.conf' 'hypr/hyprland.lua' +check_retired 'hypr/userprefs.conf' 'hypr/hyprland.lua' +check_retired 'hypr/windowrules.conf' 'hypr/hyprland.lua' +check_retired 'hypr/nvidia.conf' 'hypr/hyprland.lua' + +# The Lua entry point is deployed as hyde.lua under XDG_DATA_HOME; every shell +# integration has to agree on that name or a session starts with no config. +entry_point="$configs_dir/.local/share/hypr/hyde.lua" +[ -f "$entry_point" ] || fail "the Lua entry point Configs/.local/share/hypr/hyde.lua is missing" +checked=$((checked + 1)) + +for integration in \ + ".config/uwsm/env-hyprland.d/00-hyde.sh" \ + ".config/fish/conf.d/hyde.fish"; do + path="$configs_dir/$integration" + [ -f "$path" ] || continue + checked=$((checked + 1)) + grep -q 'HYPRLAND_CONFIG' "$path" || continue + grep -q 'hypr/hyde\.lua' "$path" || + fail "$integration sets HYPRLAND_CONFIG without pointing at hypr/hyde.lua" + grep -E 'HYPRLAND_CONFIG.*hypr/hyprland\.(conf|lua)' "$path" >/dev/null && + fail "$integration still defaults HYPRLAND_CONFIG to a path no dot deploys" +done + +printf ' %d reference rule(s) checked\n' "$checked" +finish