summaryrefslogtreecommitdiffstats
path: root/.config/bspwm/bspwmrc
diff options
context:
space:
mode:
Diffstat (limited to '.config/bspwm/bspwmrc')
-rwxr-xr-x.config/bspwm/bspwmrc20
1 files changed, 16 insertions, 4 deletions
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
index 2f4f677..426e976 100755
--- a/.config/bspwm/bspwmrc
+++ b/.config/bspwm/bspwmrc
@@ -7,6 +7,7 @@ use Time::HiRes;
use WWW::Curl::Easy;
use constant {
+ DASH_PATH => '/usr/local/bin/dash',
SXHKD_PATH => '/usr/local/bin/sxhkd',
PGREP_PATH => '/bin/pgrep',
PKILL_PATH => '/bin/pkill',
@@ -56,7 +57,12 @@ sub run_if_dead
my $bin;
my $pid;
- $bin = $argv[0];
+ if ($argv[0] =~ /SXHKD_SHELL/) {
+ $bin = $argv[1];
+ }
+ else {
+ $bin = $argv[0];
+ }
$bin =~ s/.+\///g;
my (undef, undef, $retval) = capture {
system(
@@ -68,8 +74,14 @@ sub run_if_dead
if ($retval != 0) {
$pid = fork();
if (not $pid) {
- exec(@argv);
- exit;
+ if ($argv[0] =~ /SXHKD_SHELL/) {
+ exec($argv[0] . ' ' . $argv[1]);
+ exit;
+ }
+ else {
+ exec(@argv);
+ exit;
+ }
}
}
return;
@@ -131,7 +143,7 @@ sub bspc_rules
sub run_bg_programs
{
- run_if_dead(SXHKD_PATH);
+ run_if_dead('SXHKD_SHELL=' . DASH_PATH, SXHKD_PATH);
run_if_dead(COMPTON_PATH);
run_if_dead(DUNST_PATH);
run_if_dead(LOWBAT_PATH);