fix wpass
This commit is contained in:
		
							parent
							
								
									4c5667cd6d
								
							
						
					
					
						commit
						1ad8e22a0b
					
				
					 2 changed files with 3 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -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`
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue