New backup 2024-04-09 21:45:02
This commit is contained in:
parent
a322e23626
commit
daee02496a
2 changed files with 13 additions and 4 deletions
|
@ -9,6 +9,8 @@ killall swayidle
|
|||
killall kdeconnectd
|
||||
killall wlpaste
|
||||
killall polkit-gnome-authentication-agent-1
|
||||
killall swaybg
|
||||
killall $HOME/.config/sway/scripts/wallpaper
|
||||
|
||||
autotiling & \
|
||||
waybar & \
|
||||
|
@ -18,4 +20,5 @@ swayidle & \
|
|||
blueman-applet & \
|
||||
wl-paste -t text --watch clipman store --max-items 1024 & \
|
||||
/home/pogmommy/.cargo/bin/batalert -u /sys/class/power_supply/macsmc-battery/uevent --alert 20 --notification-step 5 & \
|
||||
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
|
||||
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & \
|
||||
$HOME/.config/sway/scripts/wallpaper
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
bgpid=""
|
||||
output=$(swaymsg -t get_outputs | jq -r '.[] | {name} | "\(.name)"')
|
||||
wsno=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | {name} | "\(.name)"' | awk '{print $1}' | grep -o "^[1-9]*")
|
||||
wpid=$(($(printf "%02d\n" $wsno)-1))
|
||||
wpid=$(echo "${wpid:0:1}")
|
||||
swaybg -i "$HOME/.config/sway/assets/wallpaper/${output}/${wpid}.jpg" -o "${output}" &
|
||||
bgpid=$!
|
||||
|
||||
swaymsg -r -t subscribe -m '["workspace"]' | jq -rc --unbuffered 'select(.change == "focus") | .current | "\(.name) \(.output)"' | while read name output;do
|
||||
wsno=$(echo "$name" | awk '{print $1}' | grep -o "^[1-9]*")
|
||||
|
@ -24,6 +29,7 @@ echo "$HOME/.config/sway/assets/wallpaper/${output}/${wpid}.jpg"
|
|||
old_bgpid=$bgpid
|
||||
swaybg -i "$HOME/.config/sway/assets/wallpaper/${output}/${wpid}.jpg" -o "${output}" &
|
||||
bgpid=$!
|
||||
kill $old_bgpid
|
||||
bash -c "sleep 0.4;kill $old_bgpid" &
|
||||
# bash -c "sleep 0.5;kill $old_bgpid" &
|
||||
sleep 0.5
|
||||
kill $old_bgpid & echo "killing $old_bgpid"
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue