Configurable waybar path, initialize with nix path

This commit is contained in:
John Mertz 2023-07-16 14:53:24 -04:00
parent 4ba252d306
commit d120ccb9e9
1 changed files with 4 additions and 1 deletions

View File

@ -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`;
}