Add more dotfiles
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!@bash@/bin/bash
|
||||
|
||||
list=""
|
||||
|
||||
declare -A commands_map
|
||||
|
||||
mapfile -t lines
|
||||
|
||||
for line in "${lines[@]}"; do
|
||||
id=$(@coreutils@/bin/echo "$line" | @gawk@/bin/awk -F '[ #()]' '{print $2}')
|
||||
list+="$id"$'\n'
|
||||
commands_map["$id"]="$line"
|
||||
done
|
||||
|
||||
selected=$(@coreutils@/bin/printf "$list" | @dmenu@/bin/dmenu -i -p "Select what to do:" -nf '#e0af68' -nb '#1f2335' -sb '#414868' -sf '#ffffff' -fn 'HurmitNerdFont-16')
|
||||
|
||||
if [ -n "$selected" ]; then
|
||||
command_to_run=${commands_map["$selected"]}
|
||||
@coreutils@/bin/printf "$command_to_run"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user