ec: rework gui/text
This commit is contained in:
8
bin/ec
8
bin/ec
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
TEXT_FLAGS='-a "" -t'
|
||||||
emacsclient -a "" -t "$@"
|
GUI_FLAGS='-n -a "" -c'
|
||||||
|
if [ -z "$DISPLAY" ]; then
|
||||||
|
emacsclient $TEXT_FLAGS "$@"
|
||||||
else
|
else
|
||||||
emacsclient -n -a "" -c "$@"
|
emacsclient $GUI_FLAGS "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user