fix wpass
This commit is contained in:
parent
4c5667cd6d
commit
1ad8e22a0b
|
@ -1,9 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
pkgs.writeShellScriptBin "wpass" ''
|
pkgs.writeShellScriptBin "wpass" ''
|
||||||
# passmenu, for wayland
|
set -xe
|
||||||
# depends: wtype, pass
|
|
||||||
|
|
||||||
shopt -s nullglob globstar
|
|
||||||
|
|
||||||
wtype=${pkgs.wtype}/bin/wtype
|
wtype=${pkgs.wtype}/bin/wtype
|
||||||
dmenu=${pkgs.bmenu}/bin/bmenu
|
dmenu=${pkgs.bmenu}/bin/bmenu
|
||||||
|
@ -24,7 +21,7 @@ pkgs.writeShellScriptBin "wpass" ''
|
||||||
|
|
||||||
test -n "$entry" || exit 0
|
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`
|
password=`${pkgs.pass}/bin/pass show "$entry" 2>/dev/null | head -n 1`
|
||||||
|
|
||||||
action=`printf "Autotype\nUsername -> $username\nPassword" | "$dmenu" -p Action`
|
action=`printf "Autotype\nUsername -> $username\nPassword" | "$dmenu" -p Action`
|
||||||
|
|
|
@ -261,7 +261,7 @@ in {
|
||||||
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
||||||
};
|
};
|
||||||
other_binds = {
|
other_binds = {
|
||||||
"${mod}+p" = "exec ${pkgs.wpass}";
|
"${mod}+p" = "exec ${pkgs.wpass}/bin/wpass";
|
||||||
"${mod}+s" = "exec ${menu}";
|
"${mod}+s" = "exec ${menu}";
|
||||||
"${mod}+Return" = "exec ${terminal}";
|
"${mod}+Return" = "exec ${terminal}";
|
||||||
"${mod}+Ctrl+Return" = "exec thunar";
|
"${mod}+Ctrl+Return" = "exec thunar";
|
||||||
|
|
Loading…
Reference in a new issue