Made scripts more readable by moving most logic to functions.

This commit is contained in:
cronyakatsuki 2022-11-04 14:54:08 +01:00
parent 86e3a3a79c
commit 5c738fdc77
11 changed files with 234 additions and 133 deletions

View file

@ -1,7 +1,15 @@
#!/bin/sh
. $HOME/.config/dmenu/config
load_config () {
. $HOME/.config/dmenu/config
}
choice=$(dmenu_path | grep dmenu- | $DMENU -p "Choose script to run:")
main () {
load_config
$choice
choice=$(dmenu_path | grep dmenu- | $DMENU -p "Choose script to run:")
$choice
}
main $@