all repos — dotfiles @ d2a8ccd9b2a5ea42c842934fc3db7a8095bfe129

linux dotfiles

scripts: passmenu: add --slow option
Prithu Goswami pg@prithu.dev
Tue, 12 Mar 2024 08:25:33 +0530
commit

d2a8ccd9b2a5ea42c842934fc3db7a8095bfe129

parent

08f1f7e105600d2f2249f3393ad3edb5e457b9f0

3 files changed, 18 insertions(+), 3 deletions(-)

jump to
M bin/scripts/passmenubin/scripts/passmenu

@@ -3,9 +3,14 @@

shopt -s nullglob globstar typeit=0 +typeitslow=0 if [[ $1 == "--type" ]]; then typeit=1 shift +fi +if [[ $1 == "--slow" ]]; then + typeitslow=1 + shift fi prefix=${PASSWORD_STORE_DIR-~/.password-store}

@@ -20,6 +25,11 @@

if [[ $typeit -eq 0 ]]; then pass show -c "$password" 2>/dev/null else - pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | - xdotool type --clearmodifiers --file - + if [[ $typeitslow -eq 0 ]]; then + pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | + xdotool type --clearmodifiers --file - + else + pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | + xdotool type --delay 100 --clearmodifiers --file - + fi fi
M bin/scripts/passmenu_bin/scripts/passmenu_

@@ -1,3 +1,7 @@

#!/bin/sh -passmenu --type -nb '#000' -sb '#FFF' -sf '#000' -h 20 -l 6 +if [[ $1 = "slow" ]]; then + passmenu --type --slow -nb '#000' -sb '#FFF' -sf '#000' -h 20 -l 6 +else + passmenu --type -nb '#000' -sb '#FFF' -sf '#000' -h 20 -l 6 +fi
M config/launcherconfig/launcher

@@ -1,5 +1,6 @@

log passmenu_ +passmenu_ slow rofi -show emoji -no-show-icons rofi -show drun -modes "drun,window,filebrowser" redshift -l 12.90:77.64 -t 5700:3600 -v