From e2640242fea89ec1057f3259139df59ebc6aa37b Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 7 May 2022 15:10:27 -0400 Subject: * .local/bin/change-theme: Only call emacsclient there is an emacs process. --- .local/bin/change-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.local/bin/change-theme') diff --git a/.local/bin/change-theme b/.local/bin/change-theme index 5d997cd..7b20bde 100755 --- a/.local/bin/change-theme +++ b/.local/bin/change-theme @@ -20,7 +20,9 @@ printf "*.foreground: $fg\n*.background: $bg" | xrdb -override printf "*VT100*foreground: $fg\n*VT100*background: $bg" | xrdb -override # emacs -emacsclient -ue "(set-face-attribute 'default nil :foreground \"$fg\" :background \"$bg\")" +if [ "$(pgrep -u $USER emacs)" ]; then + emacsclient -ue "(set-face-attribute 'default nil :foreground \"$fg\" :background \"$bg\")" +fi # terminals for term in /dev/pts/*; do if [ -w "$term" ]; then -- cgit v1.2.3-60-g2f50