This repository contains the Hyprland event listener script that drives workspace-aware wallpapers for the Omarchy desktop (an Arch Linux derivative). The script listens for monitor and workspace events and swaps backgrounds via swww so each workspace can have its own image.
Out of the box the wallpaper mapping targets the Matt Black theme. The listener is intentionally minimal and assumes a single theme directory of wallpapers, so treat it as a starting point that you can adapt to match the structure of your own Omarchy setup.
All commands below assume an Arch-based system with the yay AUR helper installed.
Fast wallpaper switcher used to display images and (eventually) pre-cache them.
yay -S --needed swwwMaintains compositor state for swww so image transitions are smooth. This package currently lives in the AUR.
yay -S --needed swww-daemonStreams Hyprland events from the UNIX socket into the listener script.
yay -S --needed socatℹ️ The script also expects Hyprland's
hyprctlbinary andjq(both part of a standard Omarchy/Hyprland install).
- Copy
omarchy-background-listener.shsomewhere in your$PATH(for example,~/.config/omarchy/bin/). - Make it executable:
chmod +x ~/.config/omarchy/bin/omarchy-background-listener.sh - Place your wallpapers under
~/Pictures/wallpapers/or adjust theWS_IMGmap in the script to point to your preferred locations. - Ensure
swww-daemonis running before starting the listener:swww-daemon & ~/.config/omarchy/bin/omarchy-background-listener.sh &
Add the following lines to your ~/.config/omarchy/autostart.conf so the daemon and listener start with Hyprland (update paths if you put the script elsewhere):
exec-once = swww-daemon
exec-once = ~/.config/omarchy/bin/omarchy-background-listener.sh
Comment out the default sway background line, as the listener now controls backgrounds:
# exec-once = uwsm app -- swaybg -i ~/.config/omarchy/current/background -m fill
Restart Hyprland or reload the config to activate the changes.
- Replace the entries in
WS_IMGwith images that match your workspace layout or, better yet, refactor the script to load mappings from a config file so it can support multiple themes beyond the current Matt Black setup. - The move to
swwwwas motivated by its ability to pre-cache images for buttery transitions—precaching hooks have not been added yet, so contributions in that direction are welcome. - Per-monitor defaults, named workspaces, and theme profiles are all areas ready for improvement.
This code is provided as-is, with no formal support. Review the script, adapt it to your environment, and test changes carefully before relying on it in production sessions.
