ec: rework gui/text

This commit is contained in:
2023-01-10 10:10:27 +00:00
parent 3c4c4f5696
commit baefc81a10

8
bin/ec
View File

@@ -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