summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/open-emacs2
-rwxr-xr-xscripts/open-emacs-project2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/open-emacs b/scripts/open-emacs
index 92272df..2f63efd 100755
--- a/scripts/open-emacs
+++ b/scripts/open-emacs
@@ -6,7 +6,7 @@ emacs_attached() {
if emacs_attached; then
# focus emacs
- swaymsg [con_id="$(swaymsg -t get_tree | jq -r '.nodes[1].nodes[].nodes[] | .. | (.id|tostring) + " " + .name?' | grep -e "[0-9]* ." | grep Emacs | awk '{print $1}')"] focus
+ 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
diff --git a/scripts/open-emacs-project b/scripts/open-emacs-project
index 23df773..f2e83ab 100755
--- a/scripts/open-emacs-project
+++ b/scripts/open-emacs-project
@@ -25,4 +25,4 @@ selected="${selected/\~/$HOME}"
switch_to "$selected"
# focus emacs
-swaymsg [con_id="$(swaymsg -t get_tree | jq -r '.nodes[1].nodes[].nodes[] | .. | (.id|tostring) + " " + .name?' | grep -e "[0-9]* ." | grep Emacs | awk '{print $1}')"] focus
+swaymsg [con_id="$(swaymsg -t get_tree | jq -r '.nodes[1].nodes[].nodes[] | .. | (.id|tostring) + " " + .app_id?' | grep emacs | awk '{print $1}')"] focus