bemenu
This commit is contained in:
parent
14263c00b2
commit
24ec5904fe
@ -6,7 +6,7 @@ if [ -z "$query" ]; then
|
|||||||
query="$(echo "tui" | bemenu --prompt "qalc")"
|
query="$(echo "tui" | bemenu --prompt "qalc")"
|
||||||
fi
|
fi
|
||||||
if [ "$query" = "tui" ]; then
|
if [ "$query" = "tui" ]; then
|
||||||
exec footclient --app-id="footclient_float" -D ~/ "qalc";
|
exec footclient --app-id="footclient_float" -D ~/ "qalc"
|
||||||
elif [ -n "$query" ]; then
|
elif [ -n "$query" ]; then
|
||||||
qalc_res="$(qalc --terse "$query")"
|
qalc_res="$(qalc --terse "$query")"
|
||||||
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
|
menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")"
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
type="$1"
|
|
||||||
shift
|
|
||||||
|
|
||||||
cd "$PASSWORD_STORE_DIR"
|
cd "$PASSWORD_STORE_DIR"
|
||||||
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')"
|
||||||
pw="$(echo "$pws" | bemenu --prompt "pass")"
|
pw="$(echo "$pws" | bemenu --prompt "pass")"
|
||||||
|
|
||||||
case "$type" in
|
case "$2" in
|
||||||
|
info) exec footclient --app-id="footclient_float" -D ~/ "$SHELL" -c "pass $pw | vim -";;
|
||||||
otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";;
|
otp) pass otp -c "$pw" && notify-send "$pw" -a pass "OTP copied to clipboard, clears in 45s";;
|
||||||
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
*) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";;
|
||||||
esac
|
esac
|
||||||
|
@ -10,11 +10,11 @@ export BEMENU_OPTS="\
|
|||||||
--bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
--bdr #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
--scf #{{ .theme.color.fg_accent }}{{ math.Mul .theme.opacity.med 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
--scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--nb #{{ .theme.color.bg }} \
|
--nb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--ab #{{ .theme.color.bg }} \
|
--ab #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--hb #{{ .theme.color.bg }} \
|
--hb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--fb #{{ .theme.color.bg }} \
|
--fb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--tb #{{ .theme.color.bg }} \
|
--tb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \
|
||||||
--nf #{{ .theme.color.fg }} \
|
--nf #{{ .theme.color.fg }} \
|
||||||
--af #{{ .theme.color.fg }} \
|
--af #{{ .theme.color.fg }} \
|
||||||
--cf #{{ .theme.color.fg }} \
|
--cf #{{ .theme.color.fg }} \
|
||||||
|
Loading…
Reference in New Issue
Block a user