Skip to content

burakTanBilgi/omarchy-bg-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omarchy-bg-random

Two small wallpaper utilities for Omarchy:

  • omarchy-bg-random — picks a random wallpaper from the active theme's backgrounds folder (plus your per-theme override folder) and applies it. Run on every login via exec-once for a fresh wallpaper each time you log in.
  • omarchy-theme-bg-prev — the missing "previous wallpaper" companion to Omarchy's stock omarchy-theme-bg-next. Stock Omarchy only ships forward-cycling; this lets you cycle backwards too.

Both honor the same lookup logic as Omarchy's stock wallpaper machinery, so user overrides in ~/.config/omarchy/backgrounds/<theme>/ are respected.

Install

git clone https://github.com/burakTanBilgi/omarchy-bg-random.git
cd omarchy-bg-random
./install.sh

Or by hand:

install -Dm755 bin/omarchy-bg-random      ~/.local/bin/omarchy-bg-random
install -Dm755 bin/omarchy-theme-bg-prev  ~/.local/bin/omarchy-theme-bg-prev

Wire it up

Random wallpaper on every login

Append to ~/.config/hypr/autostart.conf:

exec-once = $HOME/.local/bin/omarchy-bg-random

Keybindings (next / previous)

Append to ~/.config/hypr/bindings.conf:

bindd = SUPER SHIFT, comma,  Next background,     exec, omarchy-theme-bg-next
bindd = SUPER ALT,   period, Previous background, exec, omarchy-theme-bg-prev

SUPER+SHIFT+, is the keystroke that produces < on a US layout; SUPER+ALT+. is the keystroke that produces > (without shift) — the mnemonic is "the keys on either side of the comma/period that look like back/forward arrows."

Reload Hyprland: hyprctl reload.

Where your wallpapers live

Stock theme backgrounds (don't edit — managed by Omarchy):

~/.local/share/omarchy/themes/<theme>/backgrounds/

Your own additions for any given theme (kept across omarchy-update):

~/.config/omarchy/backgrounds/<theme>/

Both omarchy-bg-random and omarchy-theme-bg-prev scan both of these folders together — drop any image in the user folder and it joins the rotation automatically.

Implementation notes

  • Wallpapers are applied via swaybg started by uwsm-app, matching Omarchy's stock setup. omarchy-bg-random and -prev both pkill -x swaybg before relaunching so the new image takes effect.
  • The current selection is symlinked at ~/.config/omarchy/current/background, same as upstream.

Race with stock swaybg on boot

The stock Hyprland autostart fires swaybg -i ~/.config/omarchy/current/background once at session start. Adding exec-once = $HOME/.local/bin/omarchy-bg-random to your autostart.conf causes a brief flash of the previous wallpaper before the random one takes over (the random script kills+restarts swaybg). If this bothers you, you can either:

  1. Disable the stock line (not easy without forking Omarchy), or
  2. Live with the ~200ms flash (recommended).

See also

License

MIT

About

Random + cyclable theme wallpaper utilities for Omarchy (Arch + Hyprland).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages