diff options
| author | spl3g <spleefer6@yandex.ru> | 2025-04-15 22:44:16 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-05-01 14:59:18 +0300 |
| commit | af2d338cc6d2631f128d5e978702b4ab26ff7407 (patch) | |
| tree | d1d2994933d264d4b507a6bed29149b99e402f30 /home-manager/homeModules | |
| parent | ba1f63c6c5137dc9a7c8550ff2f1f052377a0091 (diff) | |
feat(hyprland): add a script that makes bitwarden float
Diffstat (limited to 'home-manager/homeModules')
| -rw-r--r-- | home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh b/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh new file mode 100644 index 0000000..a79ec90 --- /dev/null +++ b/home-manager/homeModules/attachments/hypr-scripts/bitwarden-float.sh @@ -0,0 +1,21 @@ +windowtitlev2() { + IFS=',' read -r -a args <<< "$1" + args[0]="${args[0]#*>>}" + + if [[ ${args[1]} == "Extension: (Bitwarden Password Manager) - — Mozilla Firefox" ]]; then + hyprctl --batch "\ + dispatch setfloating address:0x${args[0]}; \ + dispatch resizewindowpixel exact 20% 50%, address:0x${args[0]}; \ + dispatch centerwindow; \ + " + fi +} + +handle() { + case $1 in + windowtitlev2\>*) windowtitlev2 "$1" ;; + esac +} + +socat -U - UNIX-CONNECT:"/$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" \ + | while read -r line; do handle "$line"; done |
