From 3a3be9e38f2a2284f48b1222152267cfba39e076 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 9 Jun 2025 10:59:35 +0200 Subject: [PATCH] Control backgrounds and be able to cycle through them --- config/hypr/hyprland.conf | 4 ++-- default/hypr/backgrounds.conf | 4 ++++ install/theme.sh | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 default/hypr/backgrounds.conf diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 6f594b7..d582166 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -26,8 +26,8 @@ source = ~/.local/share/omarchy/default/hypr/envs.conf # Autostart necessary processes (like notifications daemons, status bars, etc.) exec-once = hypridle & swaync & waybar -# Set a random image from ~/.local/share/backgrounds as the background -exec-once = swaybg -i $(find ~/.local/share/backgrounds/ -type f -print0 | shuf -zn1 | xargs -0 printf '%s\n') +# Control backgrounds +source = ~/.local/share/omarchy/default/hypr/backgrounds.conf ##################### ### LOOK AND FEEL ### diff --git a/default/hypr/backgrounds.conf b/default/hypr/backgrounds.conf new file mode 100644 index 0000000..83745aa --- /dev/null +++ b/default/hypr/backgrounds.conf @@ -0,0 +1,4 @@ +# Set a random image from ~/.local/share/backgrounds as the background +# Picks another random background on SUPER + CTRL + SPACE +exec-once = swaybg -i $(find ~/.local/share/backgrounds/ -type f -print0 | shuf -zn1 | xargs -0 printf '%s\n') +bind = SUPER CTRL, SPACE, exec, pkill -x swaybg && setsid swaybg -i $(find ~/.local/share/backgrounds/ -type f -print0 | shuf -zn1 | xargs -0 printf '%s\n') diff --git a/install/theme.sh b/install/theme.sh index 93c66d3..7666258 100644 --- a/install/theme.sh +++ b/install/theme.sh @@ -1,2 +1,5 @@ # Prefer dark mode everything gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + +# Download first background +curl -sL -o ~/.local/share/backgrounds/Milad-Fakurian-Abstract-Purple-Blue.jpg https://unsplash.com/photos/u8Jn2rzYIps/download?ixid=M3wxMjA3fDB8MXxzZWFyY2h8Mnx8YWJzdHJhY3QlMjB3YWxscGFwZXJ8ZW58MHx8fHwxNzQ5Mjc5ODk1fDA