use normal mode by default, but insert mode in spmenu_run

This commit is contained in:
speedie 2023-02-26 05:50:36 +01:00
parent 3f089ce416
commit a0ab4aed96
3 changed files with 3 additions and 3 deletions

View file

@ -64,6 +64,6 @@ spmenu.imagesize: 86
spmenu.imagegaps: 0 spmenu.imagegaps: 0
spmenu.imageposition: 0 spmenu.imageposition: 0
spmenu.generatecache: 0 spmenu.generatecache: 0
spmenu.mode: 1 spmenu.mode: 0
spmenu.normtext: Normal spmenu.normtext: Normal
spmenu.instext: Insert spmenu.instext: Insert

View file

@ -22,7 +22,7 @@ static int imageposition = 0; /* Image position (0: Top, 1: Bottom
static int generatecache = 0; /* Generate image cache by default */ static int generatecache = 0; /* Generate image cache by default */
/* Mode options */ /* Mode options */
static int mode = 1; /* Mode to start speedwm in (0: Normal mode, 1: Insert mode) */ static int mode = 0; /* Mode to start speedwm in (0: Normal mode, 1: Insert mode) */
static char normtext[] = "Normal"; /* Text to display for normal mode */ static char normtext[] = "Normal"; /* Text to display for normal mode */
static char instext[] = "Insert"; /* Text to display for insert mode */ static char instext[] = "Insert"; /* Text to display for insert mode */

View file

@ -10,7 +10,7 @@ PATH() {
# Run spmenu and parse it # Run spmenu and parse it
PARSE() { PARSE() {
DOUT="$(PATH | spmenu -H "${XDG_CACHE_HOME:-$HOME/.cache/}/spmenu_run.hist" "$@")" DOUT="$(PATH | spmenu -im -H "${XDG_CACHE_HOME:-$HOME/.cache/}/spmenu_run.hist" "$@")"
[ "$(printf '%c' "$DOUT")" = "#" ] && RUN_ARG="$TERMINAL" || RUN_ARG="$SHELL" [ "$(printf '%c' "$DOUT")" = "#" ] && RUN_ARG="$TERMINAL" || RUN_ARG="$SHELL"
[ "$RUN_ARG" != "$TERMINAL" ] && printf "%s" "$DOUT" | sed "s/#//g" | ${SHELL:-"/bin/sh"} & [ "$RUN_ARG" != "$TERMINAL" ] && printf "%s" "$DOUT" | sed "s/#//g" | ${SHELL:-"/bin/sh"} &