]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Qutebrowser bitwarden wrapper scripts
authorMaximilian Friedersdorff <maximilian.friedersdorff@envsys.co.uk>
Thu, 4 May 2023 08:51:06 +0000 (09:51 +0100)
committerMaximilian Friedersdorff <maximilian.friedersdorff@envsys.co.uk>
Thu, 4 May 2023 08:51:06 +0000 (09:51 +0100)
states/qutebrowser/files/config.py
states/qutebrowser/files/qute-bitwarden-personal [new file with mode: 0755]
states/qutebrowser/files/qute-bitwarden-work [new file with mode: 0755]
states/qutebrowser/init.sls

index 3ad62c70e8f732182b42cc7ddafe0edd986810c6..78ebb763f7abb25b9c057e6303feb6bb58dfee4a 100644 (file)
@@ -26,15 +26,15 @@ c.content.headers.user_agent = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/2
 c.content.headers.custom = {'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
 {% endif %}
 
-config.bind(',zl', "spawn --userscript qute-pass --dmenu-invocation 'rofi -dmenu'")
-config.bind(',zul', "spawn --userscript qute-pass --dmenu-invocation 'rofi -dmenu' --username-only")
-config.bind(',zpl', "spawn --userscript qute-pass --dmenu-invocation 'rofi -dmenu' --password-only")
-config.bind(',zol', "spawn --userscript qute-pass --dmenu-invocation 'rofi -dmenu' --otp-only")
-
-config.bind(',bl', 'spawn --userscript qute-bitwarden --auto-lock 14400 --dmenu-invocation "rofi -dmenu"')
-config.bind(',bul', 'spawn --userscript qute-bitwarden --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --username-only')
-config.bind(',bpl', 'spawn --userscript qute-bitwarden --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --password-only')
-config.bind(',bol', 'spawn --userscript qute-bitwarden --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --totp-only')
+config.bind(',zl', "spawn --userscript qute-bitwarden-personal --auto-lock 14400 --dmenu-invocation 'rofi -dmenu'")
+config.bind(',zul', "spawn --userscript qute-bitwarden-personal --auto-lock 14400--dmenu-invocation 'rofi -dmenu' --username-only")
+config.bind(',zpl', "spawn --userscript qute-bitwarden-personal --auto-lock 14400--dmenu-invocation 'rofi -dmenu' --password-only")
+config.bind(',zol', "spawn --userscript qute-bitwarden-personal --auto-lock 14400--dmenu-invocation 'rofi -dmenu' --totp-only")
+
+config.bind(',bl', 'spawn --userscript qute-bitwarden-work --auto-lock 14400 --dmenu-invocation "rofi -dmenu"')
+config.bind(',bul', 'spawn --userscript qute-bitwarden-work --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --username-only')
+config.bind(',bpl', 'spawn --userscript qute-bitwarden-work --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --password-only')
+config.bind(',bol', 'spawn --userscript qute-bitwarden-work --auto-lock 14400 --dmenu-invocation "rofi -dmenu" --totp-only')
 
 config.bind(',s', 'set tabs.show always')
 config.bind(',h', 'set tabs.show switching')
diff --git a/states/qutebrowser/files/qute-bitwarden-personal b/states/qutebrowser/files/qute-bitwarden-personal
new file mode 100755 (executable)
index 0000000..1391183
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+BITWARDEN_APPDATA_DIR=~/.config/bitwarden_personal /usr/share/qutebrowser/userscripts/qute-bitwarden "$@"
diff --git a/states/qutebrowser/files/qute-bitwarden-work b/states/qutebrowser/files/qute-bitwarden-work
new file mode 100755 (executable)
index 0000000..4c15547
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+BITWARDEN_APPDATA_DIR=~/.config/bitwarden_work /usr/share/qutebrowser/userscripts/qute-bitwarden "$@"
index c8a40ae9cc95ddcb6a8c577bcd82ac9d44aa58fc..001461e8d7570de40203a22e63a1b580712e7e0e 100644 (file)
@@ -20,16 +20,6 @@ userscripts dir:
     - require:
       - pkg: install qutebrowser
 
-symlink qute-pass:
-  file.symlink:
-    - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/qute-pass
-    - target: /usr/share/qutebrowser/userscripts/qute-pass
-    - user: {{ grains['user'] }}
-    - group: {{ grains['user'] }}
-    - mode: 750
-    - require:
-      - file: userscripts dir
-
 noscript_enable file:
   file.managed:
     - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/noscript_enable
@@ -50,6 +40,26 @@ noscript_disable file:
     - require:
       - file: userscripts dir
 
+qute-bitwarden-personal file:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/qute-bitwarden-personal
+    - source: salt://qutebrowser/files/qute-bitwarden-personal
+    - user: {{ grains['user'] }}
+    - groups: {{ grains['user'] }}
+    - mode: 750
+    - require:
+      - file: userscripts dir
+
+qute-bitwarden-work file:
+  file.managed:
+    - name: {{ grains['homedir'] }}/.local/share/qutebrowser/userscripts/qute-bitwarden-work
+    - source: salt://qutebrowser/files/qute-bitwarden-work
+    - user: {{ grains['user'] }}
+    - groups: {{ grains['user'] }}
+    - mode: 750
+    - require:
+      - file: userscripts dir
+
 qutebrowser wrapper:
   file.managed:
     - name: {{ grains['homedir'] }}/.local/bin/qutebrowser