#!/bin/sh if [ -z "$DISPLAY" ]; then IS_GRAPHICAL=0 else IS_GRAPHICAL=$(emacs -batch -Q --eval='(if (fboundp '"'"'tool-bar-mode) (message "1") (message "0"))' 2>&1) fi if [ $IS_GRAPHICAL -eq 1 ]; then emacsclient -a "" -nc "$@" else emacsclient -a "" -t "$@" fi