mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
15 lines
452 B
Plaintext
15 lines
452 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
keybinds_file="$HOME/.local/share/script-data/keybinds"
|
||
|
dmenu_cmd="dmenu -bw 2 -i -W 340 -X 1011 -Y 15 -l 29"
|
||
|
selected=$(awk -F, '{
|
||
|
gsub(/^ +| +$/,"",$1);
|
||
|
gsub(/^ +| +$/,"",$2);
|
||
|
gsub(/^ +| +$/,"",$3);
|
||
|
printf "%-15s%25s\t%s\n", $1, $2, $3;
|
||
|
}' "$keybinds_file" | $dmenu_cmd)
|
||
|
|
||
|
bind="$(echo "$selected" | awk '{print $1}')"
|
||
|
action="$(echo "$selected" | awk -F'[[:space:]]{2,}|\t' '{print $2}')"
|
||
|
notify-send "$bind" "$action"
|