Support animated GIF wallpapers via awww
swaybg only ever renders one frame, so an animated GIF (detected by its magic bytes, not the .gif extension - the active wallpaper file is always literally named wallpaper.png regardless of real format) now goes through awww instead, which was already installed. Found that awww img's --transition-type none - the obvious flag for an instant switch - silently kills the render loop that also drives GIF frame advancement; --transition-step 255 gives the same instant switch without that side effect. New `wallpaper.py start` picks the right backend for whatever's currently active and replaces the hardcoded swaybg autostart line in hyprland.lua, so a GIF wallpaper survives a restart correctly too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dujsk9jYfxUVLtb5B8eC94
This commit is contained in:
@@ -81,7 +81,7 @@ Theming used to go through a third-party app called aether; it's gone now (it di
|
||||
- Thunar's grid is `ExoIconView`, an old widget that fetches its selection color as a named symbolic color (`gtk_style_context_lookup_color("theme_selected_bg_color")`) instead of through normal `:selected` CSS matching — `.view:selected` and even a blanket `*:selected` do nothing for it. The fix is redefining `@define-color theme_selected_bg_color`/`theme_selected_fg_color` (+ the `unfocused_` pair) in `gtk.css`, which is what `gtk_selection_color`/`gtk_selection_opacity` actually drive
|
||||
- Folder icon *colors* aren't CSS at all — they're baked into the icon theme's SVGs. [`theme/icon_theme.py`](theme/icon_theme.py) generates a small icon theme at `~/.local/share/icons/AetherRice` (inheriting Papirus-Dark for everything else) by taking Papirus-Dark's own "blue" folder SVGs and substituting their two fixed colors for the accent and a darkened variant — no sudo needed, and it matches the accent exactly rather than snapping to one of `papirus-folders`' fixed presets
|
||||
- [`theme/render.py`](theme/render.py) renders every template to its destination and reloads the affected apps (`hyprctl reload`, `makoctl reload`, kitty via `SIGUSR1`, a best-effort `dbus-send` KGlobalSettings ping for KDE apps). Qt/GTK apps only read their palette/CSS at startup, and not every app listens for the `dbus-send` ping either — an already-open window generally keeps its old colors until it's restarted, a freshly launched one picks up a palette change immediately. It also pings the running shell over Quickshell's two IPC targets (`theme` for the bar, `theme-widget` for the widget itself — two separate top-level QML components) so the bar's own accent/border/pill colors and all four opacities, which live in QML rather than a config file another app reads, pick up changes immediately too — no restart. Run it after editing a template by hand, or use `--set KEY VALUE` to change one color (`#rrggbb`) or opacity (`0`-`1`) from a terminal, `--get KEY` / `--dump` to read the palette back out
|
||||
- [`theme/wallpaper.py`](theme/wallpaper.py) swaps the wallpaper: `apply <path>` archives the current one (deduped by hash) into `~/.local/share/quickshell/wallpapers/` and copies the new one to [`hypr/wallpaper.png`](hypr/wallpaper.png) (loaded via `swaybg` in `hyprland.lua`), `pick` does the same via a native file picker, `list` feeds the widget's gallery of past wallpapers
|
||||
- [`theme/wallpaper.py`](theme/wallpaper.py) swaps the wallpaper: `apply <path>` archives the current one (deduped by hash) into `~/.local/share/quickshell/wallpapers/` and copies the new one to [`hypr/wallpaper.png`](hypr/wallpaper.png) (still that filename regardless of the real format inside - `swaybg`/Qt image loading both sniff content, not the extension), `pick` does the same via a native file picker, `list` feeds the widget's gallery of past wallpapers, `start` (re)starts whichever backend the current wallpaper needs without touching it (called on Hyprland startup). A static image goes through `swaybg` as before; an animated GIF (detected by its magic bytes, not `.gif`) goes through [`awww`](https://codeberg.org/LGFae/awww) instead, since `swaybg` only ever shows one frame - `awww img`'s `--transition-type none` looked like the right flag for an instant switch but silently kills the render loop that also drives GIF frame advancement, so `--transition-step 255` is used instead for the same effect
|
||||
- [`theme/presets.py`](theme/presets.py) saves/loads/deletes named snapshots of the *entire* palette (every color and opacity value) as JSON files in `~/.local/share/quickshell/theme-presets/` — per-machine user data, not project config, so it's never tracked by this repo, same reasoning as the wallpaper history above. A built-in `Default` entry (the palette below) is always available, can't be saved over or deleted, and doesn't live in that folder — it's hardcoded in both `presets.py` and the widget
|
||||
|
||||
mako's per-urgency border colors (normal = accent, low = muted, critical = red) work the same way as Hyprland's border colors: edit the template at `theme/templates/mako/colors.ini`, not `mako/colors.ini` itself — that gets overwritten on the next render.
|
||||
@@ -160,7 +160,7 @@ It's a blue theme (`#1793d1` accent on a dark `#1a1b26` background) built around
|
||||
|
||||
## Requirements
|
||||
|
||||
Beyond Hyprland itself, the bar's scripts expect: `quickshell`, `nmcli`, `wpctl`, `nvidia-smi` (GPU stats — no-ops gracefully if absent), `sensors` (lm_sensors, for CPU temperature), `python3`, and `curl` (for the network widget's public-IP lookup). The theme widget's wallpaper picker additionally needs `zenity` (native file picker) and `swaybg`.
|
||||
Beyond Hyprland itself, the bar's scripts expect: `quickshell`, `nmcli`, `wpctl`, `nvidia-smi` (GPU stats — no-ops gracefully if absent), `sensors` (lm_sensors, for CPU temperature), `python3`, and `curl` (for the network widget's public-IP lookup). The theme widget's wallpaper picker additionally needs `zenity` (native file picker) and `swaybg`; an animated GIF wallpaper additionally needs `awww` (optional - only touched when the active wallpaper is a GIF).
|
||||
|
||||
This is an Arch + Hyprland rice through and through, so the list below is Arch-authoritative — everything in the pacman column is a plain `extra`/`multilib` package on current Arch, nothing needs an AUR helper. `apt`/`dnf` columns are best-effort: Hyprland and its ecosystem (Hyprland itself, `quickshell`, `hyprcursor`) move fast and generally aren't in Debian/Ubuntu's or Fedora's stock repos, so those need a third-party repo (Fedora: the [`solopasha/hyprland` COPR](https://copr.fedorainfracloud.org/coprs/solopasha/hyprland/) covers most of it) or building from source — a blank cell means "no known repo package, check the project's own install docs". Snap has essentially no coverage here (this is all system/Wayland-level tooling, not the kind of app snap packages); where an optional app happens to have one, it's noted below the table instead.
|
||||
|
||||
@@ -174,7 +174,8 @@ This is an Arch + Hyprland rice through and through, so the list below is Arch-a
|
||||
| `rofi` | Launcher | `rofi` | `rofi` | `rofi` |
|
||||
| `mako` | Notifications | `mako` | `mako-notifier` | `mako` |
|
||||
| `thunar` (+ `thunar-volman`, `thunar-archive-plugin`, `tumbler`, `gvfs`) | File manager, mounting, archives, thumbnails | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` | `thunar thunar-volman thunar-archive-plugin tumbler gvfs` |
|
||||
| `swaybg` | Wallpaper | `swaybg` | `swaybg` | `swaybg` |
|
||||
| `swaybg` | Wallpaper (static) | `swaybg` | `swaybg` | `swaybg` |
|
||||
| `awww` | Wallpaper (animated GIF only, optional) | `awww` | build from [source](https://codeberg.org/LGFae/awww) | build from [source](https://codeberg.org/LGFae/awww) |
|
||||
| `hyprcursor` (`hyprcursor-util`) | Cursor theme build | `hyprcursor` | — | `hyprcursor` (COPR) |
|
||||
| `librsvg` (`rsvg-convert`) | Cursor theme build | `librsvg` | `librsvg2-bin` | `librsvg2-tools` |
|
||||
| `grim` + `slurp` | Screenshots | `grim slurp` | `grim slurp` | `grim slurp` |
|
||||
@@ -202,7 +203,7 @@ This is an Arch + Hyprland rice through and through, so the list below is Arch-a
|
||||
# enabled by default, no AUR helper needed)
|
||||
sudo pacman -S --needed hyprland sddm xdg-desktop-portal-hyprland quickshell kitty rofi \
|
||||
mako thunar thunar-volman thunar-archive-plugin tumbler gvfs gvfs-mtp gvfs-smb \
|
||||
xarchiver swaybg hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
|
||||
xarchiver swaybg awww hyprcursor librsvg grim slurp wl-clipboard cliphist zenity \
|
||||
networkmanager network-manager-applet wireplumber pavucontrol blueman brightnessctl \
|
||||
playerctl lm_sensors nvidia-utils curl python qt5ct qt6ct nwg-look materia-gtk-theme \
|
||||
papirus-icon-theme ttf-jetbrains-mono-nerd
|
||||
|
||||
Reference in New Issue
Block a user