Change wallpaper

This commit is contained in:
Warren Hood 2024-02-09 13:17:01 +02:00
parent bc979b1269
commit 0d24e431a1
7 changed files with 39 additions and 0 deletions

View file

@ -25,6 +25,7 @@ env = XDG_SESSION_TYPE,wayland
env = GBM_BACKEND,nvidia-drm env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = WLR_NO_HARDWARE_CURSORS,1 env = WLR_NO_HARDWARE_CURSORS,1
env = GDK_BACKEND,wayland
# Set GTK Themes # Set GTK Themes
env = GTK_THEME,Breeze:dark env = GTK_THEME,Breeze:dark
@ -232,3 +233,8 @@ bind = , XF86AudioNext, exec, ~/.scripts/playerctl-fast next
exec-once = dunst & waybar & /usr/lib/polkit-kde-authentication-agent-1 exec-once = dunst & waybar & /usr/lib/polkit-kde-authentication-agent-1
# exec-once = ~/.scripts/start-xdg-desktop-portal-hyprland # exec-once = ~/.scripts/start-xdg-desktop-portal-hyprland
# exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
#
# hyprpaper for wallpaper stuff
# exec-once = hyprpaper & ~/.config/hypr/setwallpapers
exec-once = hyprpaper

View file

@ -0,0 +1,10 @@
preload = ~/.wallpapers/anime1.jpg
#set the default wallpaper(s) seen on initial workspace(s) --depending on the number of monitors used
wallpaper = ,~/.wallpapers/anime1.jpg
#enable splash text rendering over the wallpaper
splash = false
#fully disable ipc
# ipc = off

View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
# A simple wallpaper setting script
wallpapers_dir=~/.wallpapers
# wallpaper=miku.jpg
wallpaper=anime1.jpg
monitors=$(hyprctl monitors | grep Monitor | awk '{print $2}')
# unload all existing wallpapers to free mem
echo "Unloading all wallpapers: $(hyprctl hyprpaper unload all)"
echo "Preloading wallpaper '$wallpaper': $(hyprctl hyprpaper preload "$wallpapers_dir/$wallpaper")"
# Set wallpaper on all monitors (doesn't work)
# result=$(hyprctl hyprpaper wallpaper ", $wallpapers_dir/$wallpaper")
# echo "Set wallpaper: $result"
# Set wallpaper on each monitor one by one
for mon in $monitors; do
result=$(hyprctl hyprpaper wallpaper "$mon, $wallpapers_dir/$wallpaper")
echo "Set wallpaper on monitor $mon: $result"
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 KiB

View file

@ -0,0 +1 @@
miku.jpg

View file

Before

Width:  |  Height:  |  Size: 436 KiB

After

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB