From 56205698522799e17d041d2124f706af623ccca1 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 21 Dec 2020 03:11:50 -0700 Subject: [PATCH] develop: switch to using gopass --- overlays/qutebrowser.nix | 6 +++++ profiles/develop/default.nix | 4 +-- ...mime-format-for-qute-pass-userscript.patch | 25 +++++++++++++++++++ profiles/graphical/qutebrowser/config.py | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 overlays/qutebrowser.nix create mode 100644 profiles/graphical/qutebrowser/0001-Fix-gopass-mime-format-for-qute-pass-userscript.patch diff --git a/overlays/qutebrowser.nix b/overlays/qutebrowser.nix new file mode 100644 index 0000000..40e26f4 --- /dev/null +++ b/overlays/qutebrowser.nix @@ -0,0 +1,6 @@ +final: prev: { + qutebrowser = prev.qutebrowser.overrideAttrs + (o: { + patches = o.patches ++ [ ../profiles/graphical/qutebrowser/0001-Fix-gopass-mime-format-for-qute-pass-userscript.patch ]; + }); +} diff --git a/profiles/develop/default.nix b/profiles/develop/default.nix index 8bf0ab2..337efe7 100644 --- a/profiles/develop/default.nix +++ b/profiles/develop/default.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { imports = [ ./zsh ./kakoune ./tmux ]; - environment.shellAliases = { v = "$EDITOR"; }; + environment.shellAliases = { v = "$EDITOR"; pass = "gopass"; }; environment.sessionVariables = { PAGER = "less"; @@ -18,7 +18,7 @@ gnupg less ncdu - pass + gopass tig tokei wget diff --git a/profiles/graphical/qutebrowser/0001-Fix-gopass-mime-format-for-qute-pass-userscript.patch b/profiles/graphical/qutebrowser/0001-Fix-gopass-mime-format-for-qute-pass-userscript.patch new file mode 100644 index 0000000..8fb9b5c --- /dev/null +++ b/profiles/graphical/qutebrowser/0001-Fix-gopass-mime-format-for-qute-pass-userscript.patch @@ -0,0 +1,25 @@ +From 3284ec900e42b279bc3bc40593d7356ab1e3f9b0 Mon Sep 17 00:00:00 2001 +From: Timothy DeHerrera +Date: Mon, 21 Dec 2020 02:50:55 -0700 +Subject: [PATCH] Fix gopass mime format for qute-pass userscript + +--- + misc/userscripts/qute-pass | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass +index b49e87dd8..388a7a737 100755 +--- a/misc/userscripts/qute-pass ++++ b/misc/userscripts/qute-pass +@@ -152,6 +152,8 @@ def _run_pass(pass_arguments): + + + def pass_(path): ++ if arguments.mode == "gopass": ++ return _run_pass(['show', '-o', path]) + return _run_pass(['show', path]) + + +-- +2.29.2 + diff --git a/profiles/graphical/qutebrowser/config.py b/profiles/graphical/qutebrowser/config.py index d559632..b9cf346 100644 --- a/profiles/graphical/qutebrowser/config.py +++ b/profiles/graphical/qutebrowser/config.py @@ -263,7 +263,7 @@ for mode in\ config.bind('', 'leave-mode', mode=mode) # Bindings for normal mode -config.bind(',p', 'spawn --userscript qute-pass') +config.bind(',p', 'spawn --userscript qute-pass -M gopass') config.bind(',P', 'set-cmd-text -s :open -p') config.bind(',r', 'restart') config.bind(',c', 'config-source')