wpass: enter qutebrowser insert mode befor autotype
This commit is contained in:
		
							parent
							
								
									9ecae78687
								
							
						
					
					
						commit
						007895fcb5
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,5 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
_gpg-unlock
 | 
			
		||||
set -xe
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -8,10 +10,9 @@ find_file() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
main() {
 | 
			
		||||
 | 
			
		||||
  test -n "$PASSWORD_STORE_DIR" &&
 | 
			
		||||
    cd "$PASSWORD_STORE_DIR" ||
 | 
			
		||||
    cd "$HOME/.password-store"
 | 
			
		||||
    test -n "$PASSWORD_STORE_DIR" &&
 | 
			
		||||
      cd "$PASSWORD_STORE_DIR" ||
 | 
			
		||||
      cd "$HOME/.password-store"
 | 
			
		||||
 | 
			
		||||
    entry=`find_file "$@"`
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -35,6 +36,10 @@ main() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
autotype(){
 | 
			
		||||
    if pgrep qutebrowser >/dev/null; then
 | 
			
		||||
        qutebrowser ":mode-enter insert"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    env wtype -s 100 "$username"
 | 
			
		||||
    env wtype -s 100 -k tab
 | 
			
		||||
    env wtype -s 100 "$password"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue