From 2b7692d1e2ecc4182db2f4f0d9f6f99f7eac41c6 Mon Sep 17 00:00:00 2001 From: Ryan Kes <> Date: Sun, 20 Dec 2020 16:14:11 +0100 Subject: [PATCH] fix(dwm): for emacs 2 processes are supposed to be running --- dwm/.local/share/dwm/autostart.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dwm/.local/share/dwm/autostart.sh b/dwm/.local/share/dwm/autostart.sh index 927e314..5b3f859 100755 --- a/dwm/.local/share/dwm/autostart.sh +++ b/dwm/.local/share/dwm/autostart.sh @@ -2,16 +2,19 @@ ###---Start app if not running already---### start_if_not_running() { + count=1 ###---iceweasel/firefox is weird---### if [ "$1" = "iceweasel" ]; then PROCESS_NAME="iceweasel|MainThread" elif [ "$1" = "element-desktop-nightly" ]; then PROCESS_NAME="element-desktop" + elif [ "$1" = "emacs" ]; then + count=2 else PROCESS_NAME=$1 fi - if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt 1 ]; then + if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt $count ]; then if command -v "$1"; then eval "$1 &" fi