diff --git a/local/bin/.gitignore b/local/bin/.gitignore index 1f393ca..6c76b0a 100644 --- a/local/bin/.gitignore +++ b/local/bin/.gitignore @@ -22,6 +22,9 @@ tox-quickstart hlint stylish-haskell unlit +vis +vis-* +cabal # shouldn't share this one with the world macaddress diff --git a/local/bin/xdopass b/local/bin/xdopass new file mode 100755 index 0000000..8a59e78 --- /dev/null +++ b/local/bin/xdopass @@ -0,0 +1,11 @@ +#!/bin/bash + +window="$(xdotool getwindowfocus)" + +alias_="$(zenity --password --title="Password Calculator - Alias" 2> /dev/null)" +secret="$(zenity --password --title="Password Calculator - Secret" 2> /dev/null)" + +pass="$(echo -n "$secret$alias_" | shasum | sed 's/../\\\\x&/g' | xargs echo -e | base64 -w16 | head -1)" + +xdotool type --window "$window" "$pass" +xdotool windowfocus "$window"