Fix wallpaper persistence, tray icons, Booru bugs, session launcher

- Persist last-set wallpaper and restore it via exec-once, since
  hyprpaper/mpvpaper start every session with nothing loaded
- Fix Vesktop's system tray icon rendering as a broken texture: only
  resolve tray icons through the icon theme when they're actual names,
  not raw pixmap-sourced image:// URLs
- Launch Hyprland via start-hyprland (its official watchdog launcher)
  instead of the raw binary, removing the startup warning and adding
  hang recovery
- Fix Booru panel: Lewds toggle now actually persists, tag autocomplete
  no longer drops/races overlapping requests, and pagination wraps
  instead of overflowing off-screen
- Remove the redundant gap between windows and sidebars/tiles
  (gaps_in/gaps_out, and duplicate flyout margins stacked on top of
  Hyprland's automatic exclusive-zone inset)
This commit is contained in:
Nexoniarz 2026-08-30 15:48:06 +02:00
commit ea7fefbba8
7 changed files with 96 additions and 4 deletions

View file

@ -11,7 +11,13 @@
services.greetd = {
enable = true;
settings.default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --cmd Hyprland";
# start-hyprland, not the raw Hyprland binary: it's Hyprland's own
# watchdog-wrapped launcher (ships alongside Hyprland in the same
# package) that also auto-restarts the compositor if it hangs.
# Launching the raw binary directly works but logs a startup warning
# ("Hyprland is being launched without start-hyprland. This is highly
# advised against.") and skips that recovery.
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --cmd start-hyprland";
user = "greeter";
};
};

View file

@ -8,6 +8,7 @@ let
showDesktopToggle = pkgs.writeShellScriptBin "show-desktop-toggle" (builtins.readFile ./scripts/show-desktop-toggle.sh);
wallpaperSet = pkgs.writeShellScriptBin "wallpaper-set" (builtins.readFile ./scripts/wallpaper-set.sh);
wallpaperDelete = pkgs.writeShellScriptBin "wallpaper-delete" (builtins.readFile ./scripts/wallpaper-delete.sh);
wallpaperRestore = pkgs.writeShellScriptBin "wallpaper-restore" (builtins.readFile ./scripts/wallpaper-restore.sh);
displaySet = pkgs.writeShellScriptBin "display-set" (builtins.readFile ./scripts/display-set.sh);
hyprThemeSet = pkgs.writeShellScriptBin "hypr-theme-set" (builtins.readFile ./scripts/hypr-theme-set.sh);
gtkThemeSet = pkgs.writeShellScriptBin "gtk-theme-set" (builtins.readFile ./scripts/gtk-theme-set.sh);
@ -31,6 +32,7 @@ in
showDesktopToggle
wallpaperSet
wallpaperDelete
wallpaperRestore
displaySet
hyprThemeSet
gtkThemeSet

View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Reapplies the last-set wallpaper on login/reboot. hyprpaper and mpvpaper
# both start every session with nothing loaded, and wallpaper-set only ever
# ran through live IPC with no persistence of its own — without this the
# desktop silently reverted to blank on every fresh login. Run via
# exec-once in hyprland.conf, after hyprpaper.
set -euo pipefail
state_file="$HOME/.config/hypr/wallpaper.conf"
[ -f "$state_file" ] || exit 0
# hyprpaper's IPC socket isn't guaranteed ready the instant exec-once fires
# it, since exec-once entries all start back-to-back with no ordering
# guarantee beyond process spawn order.
for _ in $(seq 1 50); do
hyprctl hyprpaper listactive > /dev/null 2>&1 && break
sleep 0.1
done
bash "$state_file"

View file

@ -58,3 +58,12 @@ case "${image,,}" in
hyprctl hyprpaper wallpaper ",$image,$fit_mode" > /dev/null
;;
esac
# Persist so the wallpaper survives a reboot/relogin. hyprpaper/mpvpaper
# both start every session with nothing loaded — this was previously only
# ever set at runtime via IPC, so the desktop silently reverted to blank
# every fresh login. wallpaper-restore (exec-once in hyprland.conf, after
# hyprpaper starts) re-runs the exact command saved here.
state_file="$HOME/.config/hypr/wallpaper.conf"
mkdir -p "$(dirname "$state_file")"
printf 'wallpaper-set %q %q %q %q %q\n' "$image" "$fit_mode" "$muted" "$speed" "$auto_pause" > "$state_file"