diff --git a/.config/hypr/hyprland.d/exec.conf b/.config/hypr/hyprland.d/exec.conf index f2469d3..6a9aa81 100644 --- a/.config/hypr/hyprland.d/exec.conf +++ b/.config/hypr/hyprland.d/exec.conf @@ -14,6 +14,7 @@ exec-once = gnome-keyring # Hypridle exec-once = hypridle +exec-once = hyprpaper # Mailspring exec-once = mailspring --background --password-store="gnome-libsecret" diff --git a/.scripts/mpv-yt-playlists.sh b/.scripts/mpv-yt-playlists.sh new file mode 100755 index 0000000..d28270b --- /dev/null +++ b/.scripts/mpv-yt-playlists.sh @@ -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" diff --git a/.scripts/theme-changer.sh b/.scripts/theme-changer.sh index b8bc097..aa0e215 100755 --- a/.scripts/theme-changer.sh +++ b/.scripts/theme-changer.sh @@ -30,7 +30,7 @@ EOF function check_requirements { 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 echo "Executable $executable not found!" req_satisfied=0 @@ -175,8 +175,13 @@ function set_betterdiscord_theme { function set_desktop_wallpaper_theme { - pkill -u "$USER" swaybg &> /dev/null - hyprctl dispatch exec "swaybg -i \"$wallpaper\"" > /dev/null + if ! pgrep -u "$USER" hyprpaper > /dev/null; then + hyprctl dispatch exec hyprpaper > /dev/null + fi + + hyprctl hyprpaper preload "$wallpaper" + hyprctl hyprpaper wallpaper "eDP-1,$wallpaper" + hyprctl hyprpaper unload unused }