Compare commits
3 Commits
b29f885020
...
43cfed2814
Author | SHA1 | Date |
---|---|---|
Tyler Perkins | 43cfed2814 | |
Tyler Perkins | a742810d67 | |
Tyler Perkins | c5a12d565d |
2
bkmark
2
bkmark
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
SOURCE="/home/tyler/.frequent"
|
||||
SOURCE="$HOME/.frequent"
|
||||
|
||||
xdotool type $(cat $SOURCE | dmenu -l 50 | cut -d ' ' -f1)
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"foo": "bar"
|
||||
}
|
Loading…
Reference in New Issue