I DONLT KNOW ANYMORE!!
This commit is contained in:
parent
5729629ba7
commit
ed8d575d18
18 changed files with 88 additions and 55 deletions
|
@ -6,10 +6,10 @@ 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
|
||||
# echo $emacsrg
|
||||
|
||||
if [ -z $emacsrg ]; then
|
||||
emacsclient -c
|
||||
emacsclient -c &
|
||||
exit
|
||||
else
|
||||
wmctrl -ia $emacsrg
|
||||
|
@ -17,16 +17,21 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then
|
|||
fi
|
||||
|
||||
else
|
||||
# WAYLAND
|
||||
emacsrg=$(wlrctl window list | rg -v 'emacs:\sorg-agenda' | rg 'emacs:')
|
||||
if [ $KDE_FULL_SESSION = "true" ]; then
|
||||
ww -f emacs -c emacsclient
|
||||
exit
|
||||
else
|
||||
# WAYLAND
|
||||
emacsrg=$(wlrctl window list | rg -v 'emacs:\sorg-agenda' | rg 'emacs:')
|
||||
|
||||
emacswin=$(echo $emacsrg | sed 's/.*\: //')
|
||||
echo $emacswin
|
||||
emacswin=$(echo $emacsrg | sed 's/.*\: //')
|
||||
# echo $emacswin
|
||||
|
||||
wlrctl toplevel focus title:"$emacswin"
|
||||
exit
|
||||
wlrctl toplevel focus title:"$emacswin"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
emacsclient -c
|
||||
emacsclient -c &
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue