feat: Adds proton pass manager script, updates keybinds and window rules for proton pass.

This commit is contained in:
2025-09-30 15:39:05 -04:00
parent c89b0e307c
commit cefdf21fc8
5 changed files with 81 additions and 7 deletions

34
env/.local/scripts/launch-or-focus-webapp vendored Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# Launch a web app or focus if it's already open.
if [[ $# == 0 ]]; then
echo "Usage: launch-or-focus-webapp <url>"
exit 1
fi
SCRIPTS="${SCRIPTS}"
if [[ -z $SCRIPTS ]]; then
echo "scripts directory not set"
echo "using ~/.local/scripts"
SCRIPTS=~/.local/scripts
fi
url=$1
# parse domain pattern from the url
pattern=${url#https:\/\/} # removing leading 'https://'
pattern=${pattern#http:\/\/} # removing leading 'http://'
pattern=${pattern%%/*} # removing everything after '/' that's left (which should leave us with the domain)
window=$(hyprctl clients -j | jq -r ".[] | select((.class | contains(\"$pattern\"))) | .address")
echo "Pattern: \"$pattern\""
echo "Window: \"$window\""
if [[ -n $window ]]; then
hyprctl dispatch focuswindow "address:$window"
else
eval exec "$SCRIPTS/launch-webapp $url"
fi