Created
July 6, 2024 06:18
-
-
Save nefigcas/ab6b09b8eb730fcf24ad071167a1df9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# if no args open new frame | |
if [ $# -eq 0 ]; then | |
jumpapp -R emacs || emacsclient -nc | |
exit | |
fi | |
emacsclient -e "(frames-on-display-list \"$DISPLAY\")" # &>/dev/null | |
if [ $? -eq 0 ]; then | |
jumpapp -R emacs ; emacsclient -n "$*" | |
else | |
jumpapp -R emacs || emacsclient -nc "$*" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment