em 278 B

123456789101112
  1. #!/bin/sh
  2. ps aux | grep 'emacs *--daemon' > /dev/null || DISPLAY='' emacs --daemon -nw --no-splash
  3. echo "$1"
  4. if [ ! -z "$1" ]; then
  5. exec emacsclient -a "" "$@"
  6. else
  7. # If any arguments is provided create a new frame without wait
  8. exec emacsclient -a "" -nc "$@"
  9. fi