switching to vivaldi

This commit is contained in:
Chris Cochrun 2025-03-03 06:28:08 -06:00
parent 99a4d8420e
commit 3b3d36eb03
7 changed files with 206 additions and 84 deletions

View file

@ -2,17 +2,17 @@
export MOZ_ENABLE_WAYLAND=1
echo $MOZ_ENABLE_WAYLAND
# Check to see if firefox is running
if [ $(pgrep -c firefox) -gt 0 ]; then
# Check to see if librewolf is running
if [ $(pgrep -c librewolf) -gt 0 ]; then
echo "ff running"
if [ "$XDG_SESSION_TYPE" = "x11" ]; then
#X11
ffrg=$(wmctrl -lx | rg firefox | awk '{print $1}')
ffrg=$(wmctrl -lx | rg librewolf | awk '{print $1}')
# echo $emacsrg
if [ -z $ffrg ]; then
exec firefox
exec librewolf
exit
else
exec wmctrl -ia $ffrg
@ -21,7 +21,7 @@ if [ $(pgrep -c firefox) -gt 0 ]; then
else
if [ "$KDE_FULL_SESSION" = "true" ]; then
echo "KDE"
exec /home/chris/bin/ww -fa firefox -c firefox
exec /home/chris/bin/ww -fa librewolf -c librewolf
exit
else
# WAYLAND
@ -30,10 +30,10 @@ if [ $(pgrep -c firefox) -gt 0 ]; then
ffwin=$(echo $ffrg | sed 's/.*\: //')
# echo $ffwin
exec hyprctl dispatch focuswindow "class:ff"
exec hyprctl dispatch focuswindow "class:lw"
exit
fi
fi
else
exec firefox --name "ff"
exec librewolf --name "lw"
fi

35
scripts/vivlof Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Check to see if vivaldi is running
if [ $(pgrep -c vivaldi) -gt 0 ]; then
echo "vivaldi running"
if [ "$XDG_SESSION_TYPE" = "x11" ]; then
#X11
ffrg=$(wmctrl -lx | rg vivaldi | awk '{print $1}')
if [ -z $ffrg ]; then
exec vivaldi
exit
else
exec wmctrl -ia $ffrg
exit
fi
else
if [ "$KDE_FULL_SESSION" = "true" ]; then
echo "KDE"
exec /home/chris/bin/ww -fa librewolf -c librewolf
exit
else
# WAYLAND
ffrg=$(hyprctl clients | rg vivaldi-stable)
ffwin=$(echo $ffrg | sed 's/.*\: //')
exec hyprctl dispatch focuswindow "class:vivaldi-stable"
exit
fi
fi
else
exec vivaldi
fi