diff --git a/.config/hypr/change_wallpaper.sh b/.config/hypr/change_wallpaper.sh deleted file mode 100755 index 4402cc0..0000000 --- a/.config/hypr/change_wallpaper.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# You can run this script with the random parameter to select a random wallpaper -# from the active wallpaper directory. Otherwise a prompt will appear asking -# for a wallpaper - -WALLPAPER_DIR="$HOME/.config/hypr/wallpapers/" -CURRENT_WALL=$(hyprctl hyprpaper listloaded) - -if [[ $1 == "random" ]];then - # Get a random wallpaper that is not the current one - WALLPAPER=$(find "$WALLPAPER_DIR" -maxdepth 1 -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) -else - CHOICE=$(find $WALLPAPER_DIR -maxdepth 1 -type f -printf "%f\n" | sort | rofi -dmenu -p "Wallpaper: ") - WALLPAPER="$WALLPAPER_DIR$CHOICE" - # if we quit rofi then WALLPAPER == WALLPAPER_DIR then we need to quit without - # changing the wallpaper - if [[ $WALLPAPER_DIR == $WALLPAPER ]];then - exit 0 - fi -fi - -# Apply the selected wallpaper -hyprctl hyprpaper reload ,"$WALLPAPER" -# set background for hyprlock -ln -sf $WALLPAPER $HOME/.config/hypr/wallpapers/background.jpg diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index e4d5986..989aa32 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -24,7 +24,7 @@ monitor=eDP-1,1920x1200,auto,1.25 exec-once = uwsm app -- waybar exec-once= uwsm app -- /usr/lib/polkit-kde-authentication-agent-1 # select a random wallpaper -exec-once = uwsm app -- uwsm app -- sh -c '$(xdg-user-dir HOME)/.config/hypr/change_wallpaper.sh random' +exec-once = uwsm app -- uwsm app -- waypaper --state-file ~/.config/waypaper/state.ini --folder ~/.config/hypr/wallpapers --restore exec-once = uwsm app -- dunst exec-once = uwsm app -- batsignal -b -e -w 30 -c 20 -d 10 -f 100 exec-once = uwsm app -- nm-applet @@ -150,7 +150,7 @@ bind = $mainMod, C, killactive, bind = $mainMod, M, exec, uwsm stop bind = $mainMod, E, exec, uwsm app -- nemo bind = $mainMod, W, exec, uwsm app -- zen-browser -bind = $mainMod SHIFT, W, exec, uwsm app -- sh -c '$(xdg-user-dir HOME)/.config/hypr/change_wallpaper.sh' +bind = $mainMod SHIFT, W, exec, uwsm app -- waypaper --state-file ~/.config/waypaper/state.ini --folder ~/.config/hypr/wallpapers bind = $mainMod, T, togglefloating, bind = $mainMod, S, exec, uwsm app -- sh -c 'IMG=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png') && grim $IMG && wl-copy < $IMG' # screenshot bind = $mainMod SHIFT, S, exec, uwsm app -- sh -c 'IMG=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png') && grim -g "$(slurp)" $IMG && wl-copy < $IMG' # screenshot only a part of the screen diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index a409485..9f2bc77 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -1,6 +1,6 @@ background { monitor = - path = ~/.config/hypr/wallpapers/background.jpg + path = ~/.config/hypr/wallpapers/.current-background.jpg color = rgba(25, 20, 20, 1.0) # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations diff --git a/.config/waypaper/config.ini b/.config/waypaper/config.ini new file mode 100644 index 0000000..f29cc2a --- /dev/null +++ b/.config/waypaper/config.ini @@ -0,0 +1,22 @@ +[Settings] +language = en +show_path_in_tooltip = True +backend = hyprpaper +fill = fill +sort = name +color = #ffffff +subfolders = False +all_subfolders = False +show_hidden = False +show_gifs_only = False +post_command = ln -sf $wallpaper $HOME/.config/hypr/wallpapers/.current-background.jpg +number_of_columns = 3 +swww_transition_type = any +swww_transition_step = 90 +swww_transition_angle = 0 +swww_transition_duration = 2 +swww_transition_fps = 60 +mpvpaper_sound = False +mpvpaper_options = +use_xdg_state = True +