summaryrefslogtreecommitdiff
path: root/scripts/open-emacs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/open-emacs')
-rwxr-xr-xscripts/open-emacs12
1 files changed, 0 insertions, 12 deletions
diff --git a/scripts/open-emacs b/scripts/open-emacs
deleted file mode 100755
index 2f63efd..0000000
--- a/scripts/open-emacs
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-emacs_attached() {
- [ "$(emacsclient -e '(- (length (frame-list)) 1)')" = 0 ] && return 1 || return 0
-}
-
-if emacs_attached; then
- # focus emacs
- swaymsg [con_id="$(swaymsg -t get_tree | jq -r '.nodes[1].nodes[].nodes[] | .. | (.id|tostring) + " " + .app_id?' | grep emacs | awk '{print $1}')"] focus
-else
- emacsclient -c
-fi