I DONLT KNOW ANYMORE!!

This commit is contained in:
Chris Cochrun 2022-01-03 12:27:41 -06:00
parent 5729629ba7
commit ed8d575d18
18 changed files with 88 additions and 55 deletions

View file

@ -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

View file

@ -1,4 +1,6 @@
#!/bin/sh
export MOZ_ENABLE_WAYLAND=1
echo $MOZ_ENABLE_WAYLAND
# Check to see if firefox is running
if [ $(pgrep -c GeckoMain) -gt 0 ]; then
@ -16,14 +18,19 @@ if [ $(pgrep -c GeckoMain) -gt 0 ]; then
exit
fi
else
# WAYLAND
ffrg=$(wlrctl window list | rg firefox)
if [ $KDE_FULL_SESSION = "true" ]; then
ww -f firefox -c firefox
exit
else
# WAYLAND
ffrg=$(wlrctl window list | rg firefox)
ffwin=$(echo $ffrg | sed 's/.*\: //')
# echo $ffwin
ffwin=$(echo $ffrg | sed 's/.*\: //')
# echo $ffwin
wlrctl toplevel focus title:"$ffwin"
exit
wlrctl toplevel focus title:"$ffwin"
exit
fi
fi
else
firefox

View file

@ -1,8 +1,13 @@
#!/usr/bin/env bash
# Very basic interface for rbw using rofi
if [ $(hostname) = "syl" ]; then
style="laptop-rbw-wayland"
#echo "this is hidpi"
if [ $XDG_SESSION_TYPE = "x11" ]; then
style="laptop-rbw"
echo "this is x11"
else
style="laptop-rbw-wayland"
echo "this is wayland"
fi
else
style="desktop-rbw"
#echo "this is not hidpi"

View file

@ -18,14 +18,19 @@ if pgrep -x nyxt > /dev/null; then
fi
else
echo wayland
# WAYLAND
nyxtrg=$(wlrctl window list | rg nyxt:)
if [ $KDE_FULL_SESSION = "true" ]; then
ww -f nyxt -c nyxt
exit
else
# WAYLAND
nyxtrg=$(wlrctl window list | rg nyxt:)
nyxtwin=$(echo $nyxtrg | sed 's/.*\: //')
# echo $nyxtwin
nyxtwin=$(echo $nyxtrg | sed 's/.*\: //')
# echo $nyxtwin
wlrctl toplevel focus nyxt
exit
wlrctl toplevel focus nyxt
exit
fi
fi
else
echo not running

View file

@ -1,15 +1,7 @@
#!/bin/sh
exec ydotoold &
exec libinput-gestures-setup start service &
sleep 2
killall mako
sleep 1
latte-restart
exec systemctl enable --user --now libinput-gestures &
xcape -e 'Super_L=Super_L|Control_L|Escape'

View file

@ -3,8 +3,11 @@
# Check to see if firefox is running
if pgrep -x qutebrowser > /dev/null; then
echo "qb running"
if [ $XDG_SESSION_TYPE = "x11" ]; then
#X11
echo "X11"
qbrg=$(wmctrl -lx | rg qutebrowser | awk '{print $1}')
# echo $emacsrg
@ -16,14 +19,19 @@ if pgrep -x qutebrowser > /dev/null; then
exit
fi
else
# WAYLAND
qbrg=$(wlrctl window list | rg qutebrowser)
if [ $KDE_FULL_SESSION = "true" ]; then
ww -f org.qutebrowser.qutebrowser -c qutebrowser
exit
else
# WAYLAND
qbrg=$(wlrctl window list | rg qutebrowser)
qbwin=$(echo $qbrg | sed 's/.*\: //')
# echo $ffwin
qbwin=$(echo $qbrg | sed 's/.*\: //')
# echo $ffwin
wlrctl toplevel focus title:"$qbwin"
exit
wlrctl toplevel focus title:"$qbwin"
exit
fi
fi
else
qutebrowser

2
scripts/study-off.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
curl -X POST -F 'name=value' https://home.cochrun.xyz/api/webhook/study-off

2
scripts/study-on.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
curl -X POST -F 'name=value' https://home.cochrun.xyz/api/webhook/study-on