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

30
env/.local/scripts/proton-pass-manager vendored Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Manages the proton pass web application. If the app is not open then
# it will launch the app (which has a workspace rule that put's it into a
# special workspace). If the app is open then it will toggle the special
# workspace. This allows the application to not close and be able to hide
# and show it quickly using the same keybind that would launch it.
SCRIPTS="${SCRIPTS}"
if [[ -z $SCRIPTS ]]; then
echo "scripts directory not set"
echo "using ~/.local/scripts"
SCRIPTS=~/.local/scripts
fi
pattern="pass.proton.me"
url="https://$pattern"
# Get the window address if it exists.
window_addr=$(hyprctl clients -j | jq -r ".[] | select((.class | contains(\"$pattern\"))) | .address")
if [[ -z $window_addr ]]; then
echo "No window, launching..."
hyprctl dispatch togglespecialworkspace pass
eval exec $SCRIPTS/launch-webapp $url
else
echo "We have a window, toggling special workspace"
hyprctl dispatch togglespecialworkspace pass
fi