mirror of
https://github.com/softinio/nix-config.git
synced 2025-09-05 09:06:42 -07:00
Updates to use emacsclient and daemon
This commit is contained in:
parent
0e1b18cb0d
commit
095e7b7232
5 changed files with 61 additions and 4 deletions
18
run-emacsclient
Executable file
18
run-emacsclient
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$EMACSCLIENT_OPTS" ]; then
|
||||
EMACSCLIENT_OPTS="-nc"
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
COMMAND='/Users/salar/.nix-profile/bin/emacsclient '$EMACSCLIENT_OPTS' -e "(if (display-graphic-p) (x-focus-frame nil))"'
|
||||
else
|
||||
COMMAND='/Users/salar/.nix-profile/bin/emacsclient '$EMACSCLIENT_OPTS' "$@"'
|
||||
fi
|
||||
|
||||
if [ -z "$(shopt | grep login_shell)" ]; then
|
||||
echo "$COMMAND" | exec bash --login -s "$@"
|
||||
else
|
||||
eval "exec $COMMAND"
|
||||
fi
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue