Replace swaybg by hyprpaper

This commit is contained in:
Viyurz 2024-06-29 10:32:34 +02:00
parent 3ebd13a8a0
commit 12354c74b5
Signed by: Viyurz
SSH key fingerprint: SHA256:IskOHTmhHSJIvAt04N6aaxd5SZCVWW1Guf9tEcxIMj8
3 changed files with 24 additions and 3 deletions

View file

@ -14,6 +14,7 @@ exec-once = gnome-keyring
# Hypridle # Hypridle
exec-once = hypridle exec-once = hypridle
exec-once = hyprpaper
# Mailspring # Mailspring
exec-once = mailspring --background --password-store="gnome-libsecret" exec-once = mailspring --background --password-store="gnome-libsecret"

15
.scripts/mpv-yt-playlists.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/bash
declare -A playlists=(
[V1]='https://www.youtube.com/playlist?list=PLhe0fcbtmXgH05vjUb9aXib59PEpx1r7W'
)
playlist_url="${playlists[$1]}"
if [ -z "$playlist_url" ]; then
echo "Bad playlist name."
exit 1
fi
pkill -9 -u "$USER" mpv > /dev/null
hyprctl dispatch exec "mpv '$playlist_url' --no-video --shuffle"

View file

@ -30,7 +30,7 @@ EOF
function check_requirements { function check_requirements {
req_satisfied=1 req_satisfied=1
for executable in convert hyprctl kitty mako pastel swaybg wal waybar wlogout wofi; do for executable in convert hyprctl hyprpaper kitty mako pastel wal waybar wlogout wofi; do
if ! which "$executable" > /dev/null; then if ! which "$executable" > /dev/null; then
echo "Executable $executable not found!" echo "Executable $executable not found!"
req_satisfied=0 req_satisfied=0
@ -175,8 +175,13 @@ function set_betterdiscord_theme {
function set_desktop_wallpaper_theme { function set_desktop_wallpaper_theme {
pkill -u "$USER" swaybg &> /dev/null if ! pgrep -u "$USER" hyprpaper > /dev/null; then
hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null hyprctl dispatch exec hyprpaper > /dev/null
fi
hyprctl hyprpaper preload "$wallpaper"
hyprctl hyprpaper wallpaper "eDP-1,$wallpaper"
hyprctl hyprpaper unload unused
} }