adding nyxtlof and some sway config
This commit is contained in:
parent
6f25e400a9
commit
6e88893a19
4 changed files with 42 additions and 8 deletions
33
scripts/nyxtlof
Executable file
33
scripts/nyxtlof
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Check to see if nyxt is running
|
||||
if [ -n $(pgrep -c nyxt) ]; then
|
||||
echo running
|
||||
|
||||
if [ $XDG_SESSION_TYPE = "x11" ]; then
|
||||
#X11
|
||||
nyxtrg=$(wmctrl -lx | rg nyxt | awk '{print $1}')
|
||||
# echo $emacsrg
|
||||
|
||||
if [ -z $nyxtrg ]; then
|
||||
nyxt
|
||||
exit
|
||||
else
|
||||
wmctrl -ia $nyxtrg
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo wayland
|
||||
# WAYLAND
|
||||
nyxtrg=$(wlrctl window list | rg nyxt:)
|
||||
|
||||
nyxtwin=$(echo $nyxtrg | sed 's/.*\: //')
|
||||
# echo $nyxtwin
|
||||
|
||||
wlrctl toplevel focus nyxt
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo not running
|
||||
nyxt
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue