diff --git a/README.org b/README.org index 01618b5..fb1c25b 100644 --- a/README.org +++ b/README.org @@ -36,6 +36,7 @@ - [[#commands][Commands]] - [[#buttons][Buttons]] - [[#waybar][Waybar]] + - [[#launch-script][Launch Script]] - [[#start-configuration][Start Configuration]] - [[#bar][Bar]] - [[#configuration-1][Configuration]] @@ -278,7 +279,6 @@ static const Env envs[] = { static const char *const autostart[] = { /* Display / Compositor Setup */ "/usr/bin/shikane", NULL, - "/usr/bin/waybar", "-c", "/home/sravan/.config/dwl/waybar/config.jsonc", "-s", "/home/sravan/.config/dwl/waybar/style.css", NULL, "/usr/bin/bash", "/home/sravan/.azotebg", NULL, "/usr/bin/gammastep", "-x", NULL, /* Background Processes */ @@ -293,6 +293,8 @@ static const char *const autostart[] = { "/usr/bin/nm-applet", NULL, "/usr/bin/kdeconnect-indicator", NULL, "/usr/bin/udiskie", "-a", "-n", "-s", NULL, + /* Status Bar */ + "/usr/bin/sh", "-c", "/home/sravan/.config/dwl/waybar/launch.sh", NULL, /* GUI Applications */ "/usr/bin/nextcloud", NULL, "/usr/bin/syncthing-gtk", NULL, @@ -517,6 +519,18 @@ static const Button buttons[] = { * Waybar +** Launch Script + +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle waybar/launch.sh +killall waybar + +sleep 5 + +/usr/bin/waybar \ + -c $HOME/.config/dwl/waybar/config.jsonc \ + -s $HOME/.config/dwl/waybar/style.css & +#+END_SRC + ** Start Configuration #+BEGIN_SRC jsonc :tangle waybar/config.jsonc @@ -796,5 +810,5 @@ dwl-rebuild: # Run waybar with dwl configuration dwl-launch-waybar: - /usr/bin/waybar -c /home/sravan/.config/dwl/waybar/config.jsonc -s /home/sravan/.config/dwl/waybar/style.css + ./waybar/launch.sh #+END_SRC diff --git a/config.h b/config.h index c134ac2..ab23ca2 100644 --- a/config.h +++ b/config.h @@ -49,7 +49,6 @@ static const Env envs[] = { static const char *const autostart[] = { /* Display / Compositor Setup */ "/usr/bin/shikane", NULL, - "/usr/bin/waybar", "-c", "/home/sravan/.config/dwl/waybar/config.jsonc", "-s", "/home/sravan/.config/dwl/waybar/style.css", NULL, "/usr/bin/bash", "/home/sravan/.azotebg", NULL, "/usr/bin/gammastep", "-x", NULL, /* Background Processes */ @@ -64,6 +63,8 @@ static const char *const autostart[] = { "/usr/bin/nm-applet", NULL, "/usr/bin/kdeconnect-indicator", NULL, "/usr/bin/udiskie", "-a", "-n", "-s", NULL, + /* Status Bar */ + "/usr/bin/sh", "-c", "/home/sravan/.config/dwl/waybar/launch.sh", NULL, /* GUI Applications */ "/usr/bin/nextcloud", NULL, "/usr/bin/syncthing-gtk", NULL, diff --git a/justfile b/justfile index 8730466..539a6fd 100644 --- a/justfile +++ b/justfile @@ -10,4 +10,4 @@ dwl-rebuild: # Run waybar with dwl configuration dwl-launch-waybar: - /usr/bin/waybar -c /home/sravan/.config/dwl/waybar/config.jsonc -s /home/sravan/.config/dwl/waybar/style.css + ./waybar/launch.sh diff --git a/waybar/launch.sh b/waybar/launch.sh new file mode 100755 index 0000000..fe29551 --- /dev/null +++ b/waybar/launch.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +killall waybar + +sleep 5 + +/usr/bin/waybar \ + -c $HOME/.config/dwl/waybar/config.jsonc \ + -s $HOME/.config/dwl/waybar/style.css &