diff options
author | Giuseppe | 2017-06-16 15:46:17 +0200 |
---|---|---|
committer | Giuseppe | 2017-06-16 15:46:17 +0200 |
commit | 560db878cf102bc143d31ca78242a085add4efa6 (patch) | |
tree | 5a5363466f76b7f52e3de76575dc66bfc17d205c | |
parent | 983bd73b78c7a76c77227e0810da31017a1ca7ce (diff) | |
download | aur-560db878cf102bc143d31ca78242a085add4efa6.tar.gz |
Make preexec.sh return if i3 is not running.
Fix some problems that 300a0b2 had too!
-rw-r--r-- | preexec.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/preexec.sh b/preexec.sh index 29165e37bbc9..c4f81c3d72e8 100644 --- a/preexec.sh +++ b/preexec.sh @@ -7,7 +7,7 @@ __nwd_preexec() { local no_i3 no_i3=0 - [[ -z $DISPLAY || $(pgrep i3|wc -l) -eq 0 ]] && no_i3=1 + [[ -z $DISPLAY || -z $(i3 --get-socketpath) ]] && no_i3=1 [[ $no_i3 -eq 1 || -z $1 ]] && return __nwd_cmd=$1 @@ -20,7 +20,7 @@ __nwd_precmd() { local no_i3 no_i3=0 - [[ -z $DISPLAY || $(pgrep i3|wc -l) -eq 0 ]] && no_i3=1 + [[ -z $DISPLAY || -z $(i3 --get-socketpath) ]] && no_i3=1 [[ $no_i3 -eq 1 || -z $__nwd_cmd ]] && return local current_focused |