home: keepassxc: Add browser integration options.

Julien LepillerWed Jul 22 17:14:47+0200 2020

33a358a

home: keepassxc: Add browser integration options. * home/keepassxc.scm (keepassxc-configuration): Add fields for browser integration. * doc/keepassxc.scm: Document them.

doc/keepassxc.md

5252
* **word-count** (default 7): Undocumented.
5353
* **wordlist** (default "eff_large.wordlist"): Undocumented.
5454
* **word-separator** (default " "): Undocumented.
55+
* **browser-integration?** (default #f): Enables browser integration with the
56+
  browser plugins, such as `keepassxc-browser`.
57+
* **browser-sort-by-username?** (default #f): When `#f`, sort by title, otherwise
58+
  sort by usernames in the browser extension.
59+
* **browser-can-unlock?** (default #t): Whether the browser extension can ask
60+
  for database unlock.
61+
* **browser-adapt-url?** (default #t): Match URL scheme (e.g. `https://...`)
62+
* **browser-best-match-only?** (default #f): Whether to return only best-matching
63+
  credentials.
64+
* **browser-expired?** (default #f): Allow to return expired credentials to the
65+
  browser extension.
66+
* **browser-search-all-databases?** (default #f): Allow the browser extension to
67+
  access any open database.
5568
5669
Example
5770
-------

home/keepassxc.scm

4444
            keepassxc-word-count
4545
            keepassxc-wordlist
4646
            keepassxc-word-separator
47+
            keepassxc-browser-integration?
48+
            keepassxc-browser-sort-by-username?
49+
            keepassxc-browser-can-unlock?
50+
            keepassxc-browser-adapt-url?
51+
            keepassxc-browser-best-match-only?
52+
            keepassxc-browser-expired?
53+
            keepassxc-browser-search-all-databases?
4754
4855
            keepassxc-home-type))
4956

8996
  (wordlist              keepassxc-wordlist
9097
                         (default "eff_large.wordlist"))
9198
  (word-separator        keepassxc-word-separator
92-
                         (default " ")))
99+
                         (default " "))
100+
  ;; browser integration
101+
  (browser-integration?  keepassxc-browser-integration?
102+
                         (default #f))
103+
  (browser-sort-by-username? keepassxc-browser-sort-by-username?
104+
                             (default #f))
105+
  (browser-can-unlock?   keepassxc-browser-can-unlock?
106+
                         (default #t))
107+
  (browser-adapt-url?    keepassxc-browser-adapt-url?
108+
                         (default #t))
109+
  (browser-best-match-only? keepassxc-browser-best-match-only?
110+
                            (default #f))
111+
  (browser-expired?      keepassxc-browser-expired?
112+
                         (default #f))
113+
  (browser-search-all-databases? keepassxc-browser-search-all-databases?
114+
                                 (default #f)))
93115
94116
(define keepassxc-home-type
95117
  (home-type

112134
                                   ,(string-join
113135
                                      (keepassxc-last-opened-databases config)
114136
                                      ", "))))
137+
                                ("Browser"
138+
                                 (("AllowExpiredCredentials"
139+
                                  ,(keepassxc-browser-expired? config))
140+
                                  ("BestMatchOnly"
141+
                                   ,(keepassxc-browser-best-match-only? config))
142+
                                  ("Enabled"
143+
                                   ,(keepassxc-browser-integration? config))
144+
                                  ("MatchUrlScheme"
145+
                                   ,(keepassxc-browser-best-match-only? config))
146+
                                  ("SearchInAllDatabases"
147+
                                   ,(keepassxc-browser-search-all-databases? config))
148+
                                  ("SortByUsernam"
149+
                                   ,(keepassxc-browser-sort-by-username? config))
150+
                                  ("UnlockDatabase"
151+
                                   ,(keepassxc-browser-can-unlock? config))))
115152
                                ("GUI"
116153
                                 (("HidePasswords"
117154
                                   ,(keepassxc-hide-passwords? config))