commit 6b66bba3bc57a4820ad09db1566b0b214f14d7db
parent ad82b4bcf7edcd4e9887428672696e19c339d0a3
Author: Ed van Bruggen <edvb@uw.edu>
Date: Tue, 13 Mar 2018 00:40:59 -0700
Change menu length based on its size
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/menu b/menu
@@ -7,7 +7,7 @@ draw_line () {
}
menu_list=" run\n term\n web\n music\n file\n edit\n view\n todo\n calc\n man\n top\n$(draw_line)\n exit"
-dmenucmd="dmenu -i -l 13"
+dmenucmd="dmenu -i -l $(echo -e $menu_list | wc -l)"
cmd=$(echo -e "$menu_list" | eval "$dmenucmd")
case $cmd in