diff --git a/scripts/wpass.nix b/scripts/wpass.nix index 2b07387..6263095 100644 --- a/scripts/wpass.nix +++ b/scripts/wpass.nix @@ -1,9 +1,6 @@ { config, pkgs, lib, ... }: pkgs.writeShellScriptBin "wpass" '' - # passmenu, for wayland - # depends: wtype, pass - - shopt -s nullglob globstar + set -xe wtype=${pkgs.wtype}/bin/wtype dmenu=${pkgs.bmenu}/bin/bmenu @@ -24,7 +21,7 @@ pkgs.writeShellScriptBin "wpass" '' test -n "$entry" || exit 0 - username=`${pkgs.pass}/bin/pass show "$entry" 2>/dev/null | perl -ne 'print $1 if /^(login|user|email): (.*)/'` + username=`${pkgs.pass}/bin/pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'` password=`${pkgs.pass}/bin/pass show "$entry" 2>/dev/null | head -n 1` action=`printf "Autotype\nUsername -> $username\nPassword" | "$dmenu" -p Action` diff --git a/user/sway.nix b/user/sway.nix index 1578e67..41adfc4 100644 --- a/user/sway.nix +++ b/user/sway.nix @@ -261,7 +261,7 @@ in { "Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip"; }; other_binds = { - "${mod}+p" = "exec ${pkgs.wpass}"; + "${mod}+p" = "exec ${pkgs.wpass}/bin/wpass"; "${mod}+s" = "exec ${menu}"; "${mod}+Return" = "exec ${terminal}"; "${mod}+Ctrl+Return" = "exec thunar";