Compare commits

...

3 Commits

Author SHA1 Message Date
Tyler Perkins 43cfed2814
Fix bkmark hard coded path 2023-11-25 18:19:41 -05:00
Tyler Perkins a742810d67
Add install script 2023-11-25 18:18:54 -05:00
Tyler Perkins c5a12d565d
Add passmenu 2023-11-25 18:13:52 -05:00
4 changed files with 57 additions and 1 deletions

2
bkmark
View File

@ -1,5 +1,5 @@
#!/bin/bash
SOURCE="/home/tyler/.frequent"
SOURCE="$HOME/.frequent"
xdotool type $(cat $SOURCE | dmenu -l 50 | cut -d ' ' -f1)

16
install.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
INSTALL_LOCATION="$HOME/.local/bin"
echo "Installing scripts to $INSTALL_LOCATION"
cp -v ./bkmark $INSTALL_LOCATION
touch $HOME/.frequent
cp -v ./fix_screens $INSTALL_LOCATION
cp -v ./mount_drive $INSTALL_LOCATION
cp -v ./passmenu $INSTALL_LOCATION
cp -v ./pipes.sh $INSTALL_LOCATION
if [[ "$PATH:" != *":$HOME/.local/bin:"* ]]; then
echo "The install location ($INSTALL_LOCATION), is not in your PATH! Please add it to you path."
fi

37
passmenu Executable file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env bash
LINES=25
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
if [[ -n $WAYLAND_DISPLAY ]]; then
dmenu=dmenu-wl
xdotool="ydotool type --file -"
elif [[ -n $DISPLAY ]]; then
dmenu=dmenu
xdotool="xdotool type --clearmodifiers --file -"
else
echo "Error: No Wayland or X11 display detected" >&2
exit 1
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | "$dmenu" "-l" "$LINES" "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool
fi

3
secrets.json Normal file
View File

@ -0,0 +1,3 @@
{
"foo": "bar"
}