Skip to content

Commit ecd86ee

Browse files
committed
add waybar reloading
1 parent 5aa5677 commit ecd86ee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

wpgtk/data/reload.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ def polybar():
3232
util.silent_Popen(["polybar-msg", "cmd", "restart"])
3333

3434

35+
def waybar():
36+
"""Reloads waybar configuration on the fly."""
37+
if shutil.which("waybar") and util.get_pid("waybar"):
38+
subprocess.Popen(["pkill", "-SIGUSR2", "waybar"])
39+
40+
3541
def dunst():
3642
"""Kills dunst so that notify-send reloads it when called."""
3743
if shutil.which("dunst") and util.get_pid("dunst"):
@@ -139,6 +145,7 @@ def all():
139145
reload.kitty()
140146
reload.sway()
141147
polybar()
148+
waybar()
142149

143150
if settings.getboolean("gtk", True):
144151
gtk3()

0 commit comments

Comments
 (0)