Made scripts more readable by moving most logic to functions.
This commit is contained in:
parent
86e3a3a79c
commit
5c738fdc77
11 changed files with 234 additions and 133 deletions
14
dmenu-runner
14
dmenu-runner
|
@ -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 $@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue