From a808f4e087c31c4ed0d9ab02135bdff9f28f6277 Mon Sep 17 00:00:00 2001 From: tavo-wasd Date: Thu, 12 Oct 2023 08:48:22 -0600 Subject: [PATCH] custimizing menu script --- scripts/menu/menu | 55 ++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/scripts/menu/menu b/scripts/menu/menu index 5f77f7b..fce1b1d 100755 --- a/scripts/menu/menu +++ b/scripts/menu/menu @@ -2,19 +2,22 @@ # Script for using either bemenu or dmenu # with preconfigured options -# Simple configuration +# Configuration MENU="dmenu" col_main="#83a598" col_second="#121212" +font_bemenu="JetbrainsMono" +font_dmenu="JetbrainsMono:size=10" -# If given 'pass' as arg, -# format accordingly -PROMPT="$1" -MODE="$2" - +# Case 'pass' argument is given format accordingly +PROMPT="$1" ; MODE="$2" [ "$MODE" = "pass" ] && - BPASS="-x" && - DPASS="-P" + BPASS="-x" && DPASS="-P" + +if [ "$PROMPT" = "" -o "$PROMPT" = "-h" ] ; then + printf "Usage: menu [prompt] [run/pass/empty]" + return 0 +fi # bemenu opts BEMENU_OPTS=" \ @@ -34,32 +37,30 @@ BEMENU_OPTS=" \ --ab $col_second \ --af $col_main \ --bdr $col_main \ - -p $PROMPT \ + --fn "$font_bemenu" \ + -p "$PROMPT" \ $BPASS \ " + +# dmenu opts +DMENU_OPTS=" \ + -c \ + -i \ + -l 10 \ + -nb $col_second \ + -nf $col_main \ + -sb $col_main \ + -sf $col_second \ + -fn "$font_dmenu" \ + -p "$PROMPT" \ + $DPASS \ +" + # If chosen bemenu, use this args [ "$MENU" = "bemenu" ] && OPTS="$BEMENU_OPTS" && RUN="-run" -# dmenu opts -DMENU_OPTS=" \ - -i \ - -l 10 \ - -p $PROMPT \ - $DPASS \ -" -# DMENU_OPTS=" \ -# -i \ -# -l 10 \ -# -nb $col_second \ -# -nf $col_main \ -# -sb $col_main \ -# -sf $col_second \ -# -p $PROMPT \ -# $DPASS \ -# " - # If chosen dmenu, use this args [ "$MENU" = "dmenu" ] && OPTS="$DMENU_OPTS" &&