Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | if [ -z "$DISPLAY" ]; then | |
4 | IS_GRAPHICAL=true | |
5 | else | |
6 | IS_GRAPHICAL=$(emacs --batch -Q --eval='(if (fboundp '"'"'tool-bar-mode) (message "true") (message "false"))' 2>&1) | |
7 | fi | |
8 | ||
9 | if $IS_GRAPHICAL; then | |
10 | emacsclient -a "" -nc "$@" | |
11 | else | |
12 | emacsclient -a "" -t "$@" | |
13 | fi |