From d120ccb9e91d8cbc71075fd73e4b1001379236af Mon Sep 17 00:00:00 2001 From: John Mertz Date: Sun, 16 Jul 2023 14:53:24 -0400 Subject: [PATCH] Configurable waybar path, initialize with nix path --- sway/displays.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sway/displays.pl b/sway/displays.pl index 398726f..54e2885 100755 --- a/sway/displays.pl +++ b/sway/displays.pl @@ -36,6 +36,9 @@ my $swaysock = $ENV{'SWAYSOCK'} || $ENV{'HOME'} . "/.spool/sway-ipc.sock"; # Path to actual config file generated from template my $waybar_config = "$ENV{'HOME'}/.config/waybar/config"; +# Path to waybar binary +my $waybar_bin = "$ENV{'HOME'}/.dotfiles/nix/bin/waybar"; + # File to log and recover last used layout name my $last = "$ENV{'HOME'}/.spool/last_display"; @@ -419,5 +422,5 @@ unless ($pid) { die "Failed to write configuration file: $waybar_config\n"; } my $waydisplay = $ENV{'WAYLAND_DISPLAY'} || 'wayland-0'; - `WAYLAND_DISPLAY=$waydisplay nohup waybar -b waybar0 --config=$waybar_config >> $ENV{'HOME'}/.waybar.log`; + `WAYLAND_DISPLAY=$waydisplay nohup $waybar_bin -b waybar0 --config=$waybar_config >> $ENV{'HOME'}/.waybar.log`; }