X-Git-Url: https://git.shemshak.org/gitweb.cgi/~bandali/configs/blobdiff_plain/298f42fef8c1cb876c6596cbca3920a549a9a6d0..5da7f54df61425188693d2d077e18d6a3bbbc634:/.local/bin/change-theme?ds=sidebyside 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