Restart nwg-wrapper after resume screen

This commit is contained in:
q3aql 2025-05-14 17:13:55 +02:00
parent 720780d504
commit 0cd9faa298
4 changed files with 18 additions and 4 deletions

View File

@ -54,7 +54,7 @@ exec --no-startup-id WAYLAND_DISPLAY=wayland-1 wl-paste --watch clipman store
# Load Conky
#exec --no-startup-id sleep 10 && conky -c ~/.config/conky/conkyrc_sway &
exec --no-startup-id sleep 10 && nwg-wrapper -s conky_sway.sh -r 2000 -p right -mr 15 -mt 10 -mb 80
exec --no-startup-id sleep 10 && ~/.config/sway/nwg-wrapper-conky.sh
# Use pactl to adjust volume in PulseAudio.
#set $refresh_i3status killall -SIGUSR1 i3status

View File

@ -58,9 +58,7 @@ class MainWindow:
def exec_command4(self):
print('# Start/Restart nwg-wrapper (conky sway)')
command = "killall nwg-wrapper && sleep 1"
os.system(command)
command = "nwg-wrapper -s conky_sway.sh -r 2000 -p right -mr 15 -mt 10 -mb 80 &"
command = "~/.config/sway/nwg-wrapper-conky.sh"
os.system(command)
def exec_command5(self):

View File

@ -0,0 +1,10 @@
#!/bin/bash
# Stop previous process
killall nwg-wrapper
# Sleep 1s
sleep 1
# Start new process
nwg-wrapper -s conky_sway.sh -r 2000 -p right -mr 15 -mt 10 -mb 80 &

View File

@ -12,6 +12,9 @@ LoadConfigResume="${HOME}/.config/sway/startwlrrandr.sh"
# StateFile variable
stateFile="${HOME}/.config/sway/screen-state"
# Start/Restart nwg-wrapper
nwgWrapperRestart="${HOME}/.config/sway/nwg-wrapper-conky.sh"
# Function for sleep monitors
function sleepMonitors() {
# Check monitor 3
@ -64,6 +67,9 @@ function resumeMonitors() {
# Load monitors config quickly
bash ${LoadConfigResume} screensaver
echo "resume" > ${stateFile}
# Restart nwg-wrapper
sleep 2
bash ${nwgWrapperRestart}
}
# Boot parameters