From 24ec5904fe31f3b3f33dd49970dee32ae06b5d3c Mon Sep 17 00:00:00 2001 From: Yuri Zamyatin Date: Sun, 6 Jul 2025 00:22:16 +0000 Subject: [PATCH] bemenu --- arch-user/bin/bemenu/run-calc.sh | 2 +- arch-user/bin/bemenu/run-pass.sh | 6 ++---- arch-user/config/bemenu/env.sh.tmpl | 10 +++++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/arch-user/bin/bemenu/run-calc.sh b/arch-user/bin/bemenu/run-calc.sh index d15741c..7ce342b 100755 --- a/arch-user/bin/bemenu/run-calc.sh +++ b/arch-user/bin/bemenu/run-calc.sh @@ -6,7 +6,7 @@ if [ -z "$query" ]; then query="$(echo "tui" | bemenu --prompt "qalc")" fi if [ "$query" = "tui" ]; then - exec footclient --app-id="footclient_float" -D ~/ "qalc"; + exec footclient --app-id="footclient_float" -D ~/ "qalc" elif [ -n "$query" ]; then qalc_res="$(qalc --terse "$query")" menu_res="$(echo -e "$qalc_res\ntui" | bemenu --prompt "qalc")" diff --git a/arch-user/bin/bemenu/run-pass.sh b/arch-user/bin/bemenu/run-pass.sh index a4bb55e..c4ad178 100755 --- a/arch-user/bin/bemenu/run-pass.sh +++ b/arch-user/bin/bemenu/run-pass.sh @@ -1,14 +1,12 @@ #!/bin/bash set -e -type="$1" -shift - cd "$PASSWORD_STORE_DIR" pws="$(find -path "*/.*" -prune -o -path "*/cred/*" -name "*.gpg" -printf '%P\n' | sed 's/\.gpg$//')" 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";; *) pass -c "$pw" && notify-send "$pw" -a pass "Password copied to clipboard, clears in 45s";; esac diff --git a/arch-user/config/bemenu/env.sh.tmpl b/arch-user/config/bemenu/env.sh.tmpl index 3aaf8ff..ae83804 100755 --- a/arch-user/config/bemenu/env.sh.tmpl +++ b/arch-user/config/bemenu/env.sh.tmpl @@ -10,11 +10,11 @@ export BEMENU_OPTS="\ --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" }} \ --scb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ ---nb #{{ .theme.color.bg }} \ ---ab #{{ .theme.color.bg }} \ ---hb #{{ .theme.color.bg }} \ ---fb #{{ .theme.color.bg }} \ ---tb #{{ .theme.color.bg }} \ +--nb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ +--ab #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ +--hb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ +--fb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ +--tb #{{ .theme.color.bg }}{{ math.Mul .theme.opacity.high 255 | conv.ToInt64 | printf "%02X" }} \ --nf #{{ .theme.color.fg }} \ --af #{{ .theme.color.fg }} \ --cf #{{ .theme.color.fg }} \