back to swww (2)

This commit is contained in:
end-4 2024-01-23 12:45:22 +07:00
parent 2e1f0509df
commit ea018ac20a
3 changed files with 14 additions and 9 deletions

View file

@ -7,14 +7,22 @@ else
# Select and set image (hyprland) # Select and set image (hyprland)
cd "$HOME/Pictures" cd "$HOME/Pictures"
imgpath=$(yad --width 1200 --height 800 --file --title='Choose wallpaper') imgpath=$(yad --width 1200 --height 800 --file --title='Choose wallpaper')
screensizey=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1)
cursorposx=$(hyprctl cursorpos -j | gojq '.x')
cursorposy=$(hyprctl cursorpos -j | gojq '.y')
cursorposy_inverted=$(( screensizey - cursorposy ))
if [ "$imgpath" == '' ]; then if [ "$imgpath" == '' ]; then
echo 'Aborted' echo 'Aborted'
exit 0 exit 0
fi fi
ags run-js "wallpaper.set('')"
sleep 0.1 && ags run-js "wallpaper.set('${imgpath}')" & # ags run-js "wallpaper.set('')"
# sleep 0.1 && ags run-js "wallpaper.set('${imgpath}')" &
swww img "$imgpath" --transition-step 100 --transition-fps 60 \
--transition-type grow --transition-angle 30 --transition-duration 1 \
--transition-pos "$cursorposx, $cursorposy_inverted"
fi fi
# Generate colors for ags n stuff # Generate colors for ags n stuff

View file

@ -1,4 +0,0 @@
general {
col.active_border = rgba(0DB7D4FF) rgba(7AA2F7FF) rgba(9778D0FF) 45deg
col.inactive_border = rgba(04404aaa)
}

View file

@ -1,7 +1,6 @@
# Status bar # Bar, wallpaper
#exec-once = eww daemon && eww open bar && eww open bgdecor exec-once = swww init
exec-once = ags & exec-once = ags &
#exec-once = waybar
# Input method # Input method
exec-once = fcitx5 exec-once = fcitx5
@ -15,8 +14,10 @@ exec-once = swayidle -w timeout 450 'pidof java || systemctl suspend' &
exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk
# Clipboard: history # Clipboard: history
# exec-once = wl-paste --watch cliphist store &
exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store exec-once = wl-paste --type image --watch cliphist store
# Clipboard: disable middle-click paste # Clipboard: disable middle-click paste
exec-once = wl-paste -p --watch wl-copy -p "" exec-once = wl-paste -p --watch wl-copy -p ""