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