fix wpass

This commit is contained in:
Leonardo Eugênio 2022-08-08 22:50:12 -03:00
parent 4c5667cd6d
commit 1ad8e22a0b
2 changed files with 3 additions and 6 deletions

View file

@ -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`

View file

@ -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";