From 63d12637d9893629097870c1a68783c980823b36 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Thu, 4 Jan 2024 21:25:35 +0300 Subject: [PATCH] bitwarden password keybind. you technically need to `rbw login` but oh well --- home-manager/home.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/home-manager/home.nix b/home-manager/home.nix index 644377b..adae3bb 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,4 +1,4 @@ -{ inputs, outputs, pkgs, ... }: +{ inputs, outputs, pkgs, lib, ... }: { imports = [ @@ -38,7 +38,7 @@ # misc cowsay file which tree gnused grc # um - doas-sudo-shim gnome.dconf-editor + doas-sudo-shim gnome.dconf-editor rbw ]; colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha; @@ -130,17 +130,31 @@ "show-screenshot-ui" = []; }; gnomeBindings.wm = { - "panel-run-dialog" = [ "Launch1" ]; + #"panel-run-dialog" = [ "Launch1" ]; }; gnomeBindings.custom = { "take-screenshot" = { binding = "Print"; - command = "${pkgs.lib.getExe pkgs.flameshot} gui"; + command = "${lib.getExe pkgs.flameshot} gui"; + }; + "grab-password" = let + grabScript = pkgs.writeScript "grab-password" '' + ${lib.getExe pkgs.rbw} get $(${lib.getExe pkgs.gnome.zenity} --entry --text="" --title="") | ${lib.getExe pkgs.xclip} -selection clipboard + ''; + in { + binding = "Launch1"; + command = ''${grabScript}''; }; }; # usually you don't need to do this, but this is a workaround for https://github.com/flameshot-org/flameshot/issues/3328 services.flameshot.enable = true; + programs.rbw = { + enable = true; + settings.base_url = "https://bitwarden.lavatech.top"; + settings.email = "oatmealine@disroot.org"; + }; + # This value determines the home Manager release that your # configuration is compatible with. This helps avoid breakage # when a new home Manager release introduces backwards