custimizing menu script
This commit is contained in:
parent
37882a7e99
commit
a808f4e087
1 changed files with 28 additions and 27 deletions
|
@ -2,19 +2,22 @@
|
||||||
# Script for using either bemenu or dmenu
|
# Script for using either bemenu or dmenu
|
||||||
# with preconfigured options
|
# with preconfigured options
|
||||||
|
|
||||||
# Simple configuration
|
# Configuration
|
||||||
MENU="dmenu"
|
MENU="dmenu"
|
||||||
col_main="#83a598"
|
col_main="#83a598"
|
||||||
col_second="#121212"
|
col_second="#121212"
|
||||||
|
font_bemenu="JetbrainsMono"
|
||||||
|
font_dmenu="JetbrainsMono:size=10"
|
||||||
|
|
||||||
# If given 'pass' as arg,
|
# Case 'pass' argument is given format accordingly
|
||||||
# format accordingly
|
PROMPT="$1" ; MODE="$2"
|
||||||
PROMPT="$1"
|
|
||||||
MODE="$2"
|
|
||||||
|
|
||||||
[ "$MODE" = "pass" ] &&
|
[ "$MODE" = "pass" ] &&
|
||||||
BPASS="-x" &&
|
BPASS="-x" && DPASS="-P"
|
||||||
DPASS="-P"
|
|
||||||
|
if [ "$PROMPT" = "" -o "$PROMPT" = "-h" ] ; then
|
||||||
|
printf "Usage: menu [prompt] [run/pass/empty]"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
# bemenu opts
|
# bemenu opts
|
||||||
BEMENU_OPTS=" \
|
BEMENU_OPTS=" \
|
||||||
|
@ -34,32 +37,30 @@ BEMENU_OPTS=" \
|
||||||
--ab $col_second \
|
--ab $col_second \
|
||||||
--af $col_main \
|
--af $col_main \
|
||||||
--bdr $col_main \
|
--bdr $col_main \
|
||||||
-p $PROMPT \
|
--fn "$font_bemenu" \
|
||||||
|
-p "$PROMPT" \
|
||||||
$BPASS \
|
$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
|
# If chosen bemenu, use this args
|
||||||
[ "$MENU" = "bemenu" ] &&
|
[ "$MENU" = "bemenu" ] &&
|
||||||
OPTS="$BEMENU_OPTS" &&
|
OPTS="$BEMENU_OPTS" &&
|
||||||
RUN="-run"
|
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
|
# If chosen dmenu, use this args
|
||||||
[ "$MENU" = "dmenu" ] &&
|
[ "$MENU" = "dmenu" ] &&
|
||||||
OPTS="$DMENU_OPTS" &&
|
OPTS="$DMENU_OPTS" &&
|
||||||
|
|
Loading…
Reference in a new issue