I got a little crazy here. a lot of laptop poop

This commit is contained in:
Chris Cochrun 2021-09-22 09:58:13 -05:00
parent 263d10c080
commit fab3b36dec
47 changed files with 3726 additions and 189 deletions

32
scripts/emacslof Executable file
View file

@ -0,0 +1,32 @@
#!/bin/sh
# Check to see if an emacsclient is running
if [ $(pgrep -c emacsclient) -gt 0 ]; then
if [ $XDG_SESSION_TYPE = "x11" ]; then
#X11
emacsrg=$(wmctrl -lx | rg emacs | rg -v org-agenda | awk '{print $1}')
echo $emacsrg
if [ -z $emacsrg ]; then
emacsclient -c
exit
else
wmctrl -ia $emacsrg
exit
fi
else
# WAYLAND
emacsrg=$(wlrctl window list | rg -v 'emacs:\sorg-agenda' | rg 'emacs:')
emacswin=$(echo $emacsrg | sed 's/.*\: //')
echo $emacswin
wlrctl toplevel focus title:"$emacswin"
exit
fi
else
emacsclient -c
fi