Minor fixes

This commit is contained in:
2026-07-08 18:45:42 +01:00
parent e13a9fa82d
commit 0c9bfa8714
4 changed files with 30 additions and 11 deletions
+18 -6
View File
@@ -1,17 +1,29 @@
#!/usr/bin/env bash
declare -A aliases=(
[prism]="nvidia-offload prismlauncher"
[editor]="kitty -e fish -c editor"
[yazi]="kitty -e fish -c yazi"
[btop]="kitty -e fish -c btop"
)
choice=$(
(
printf "%s\n" prism
{
printf '%s\n' "${!aliases[@]}"
compgen -c
) |
grep -v -E '^(if|fi|case|esac|for|done|while|until|select|function|return|continue|break|time|exec|source|alias|builtin|read|export|unset|local|set|declare|typeset|:|\.|\[|coproc|l|ll|ls|then|else|elif|do|in|\{|\}|!|\[\[|\]\]|_.*|compgen)$' |
sort |
} |
grep -v -E '^(\..*|if|fi|case|esac|for|done|while|until|select|function|return|continue|break|time|exec|source|alias|builtin|read|export|unset|local|set|declare|typeset|:|\.|\[|coproc|l|ll|ls|then|else|elif|do|in|\{|\}|!|\[\[|\]\]|_.*|compgen)$' |
sort -u |
dmenu -i -p "Enter command  " \
-nf '#4abaaf' -nb '#1f2335' -sb '#7aa2f7' -sf '#102030' -fn 'AgaveNerdFont-16'
)
[ -z "$choice" ] && exit 0
fish -c "$choice" >/dev/null 2>&1 &
if [[ -v "aliases[$choice]" ]]; then
eval "${aliases[$choice]}" >/dev/null 2>&1 &
else
"$choice" >/dev/null 2>&1 &
fi
disown