actually add hidecaps, oops
This commit is contained in:
parent
de3264d4f6
commit
d512351828
BIN
README.pdf
BIN
README.pdf
Binary file not shown.
16
buildconf
16
buildconf
|
@ -1,13 +1,13 @@
|
||||||
# buildconf
|
# buildconf
|
||||||
#
|
#
|
||||||
# This is the default configuration used to build spmenu. The build.sh script reads it.
|
# This is the default configuration used to build spmenu. The build.sh script reads it.
|
||||||
imlib2=true
|
imlib2=false
|
||||||
pango=true
|
pango=false
|
||||||
pangoxft=true
|
pangoxft=false
|
||||||
xinerama=true
|
xinerama=false
|
||||||
openssl=true
|
openssl=false
|
||||||
fribidi=true
|
fribidi=false
|
||||||
libconfig=true
|
libconfig=false
|
||||||
cc=gcc
|
cc=gcc
|
||||||
opt=-O2
|
opt=-O2
|
||||||
warn=true
|
warn=false
|
||||||
|
|
|
@ -233,6 +233,9 @@ You may use long, descriptive arguments or the shorter arguments.
|
||||||
`-si, --show-image`
|
`-si, --show-image`
|
||||||
: Show image
|
: Show image
|
||||||
|
|
||||||
|
`-scl, --show-caps`
|
||||||
|
: Show caps lock indicator
|
||||||
|
|
||||||
`-xrdb, --xrdb`
|
`-xrdb, --xrdb`
|
||||||
: Load .Xresources on runtime
|
: Load .Xresources on runtime
|
||||||
|
|
||||||
|
|
15
libs/arg.c
15
libs/arg.c
|
@ -516,21 +516,8 @@ setprofile(const Arg *arg)
|
||||||
void
|
void
|
||||||
spawn(const Arg *arg)
|
spawn(const Arg *arg)
|
||||||
{
|
{
|
||||||
struct sigaction sa;
|
if (!system(arg->v))
|
||||||
|
|
||||||
if (fork() == 0) {
|
|
||||||
if (dpy)
|
|
||||||
close(ConnectionNumber(dpy));
|
|
||||||
|
|
||||||
sigemptyset(&sa.sa_mask);
|
|
||||||
sa.sa_flags = 0;
|
|
||||||
sa.sa_handler = SIG_DFL;
|
|
||||||
sigaction(SIGCHLD, &sa, NULL);
|
|
||||||
|
|
||||||
setsid();
|
|
||||||
execvp(((char **)arg->v)[1], ((char **)arg->v)+1);
|
|
||||||
fprintf(stderr, "spmenu: failed to execute command '%s'", ((char **)arg->v)[0]);
|
fprintf(stderr, "spmenu: failed to execute command '%s'", ((char **)arg->v)[0]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -157,6 +157,10 @@ readargs(int argc, char *argv[])
|
||||||
hideimage = 1;
|
hideimage = 1;
|
||||||
} else if (!strcmp(argv[i], "-si") || (!strcmp(argv[i], "--show-image"))) { // show image
|
} else if (!strcmp(argv[i], "-si") || (!strcmp(argv[i], "--show-image"))) { // show image
|
||||||
hideimage = 0;
|
hideimage = 0;
|
||||||
|
} else if (!strcmp(argv[i], "-hcl") || (!strcmp(argv[i], "--hide-caps"))) { // hide caps
|
||||||
|
hidecaps = 1;
|
||||||
|
} else if (!strcmp(argv[i], "-scl") || (!strcmp(argv[i], "--show-caps"))) { // hide caps
|
||||||
|
hidecaps = 0;
|
||||||
} else if (!strcmp(argv[i], "-ip") || (!strcmp(argv[i], "--indent"))) { // indent to prompt width
|
} else if (!strcmp(argv[i], "-ip") || (!strcmp(argv[i], "--indent"))) { // indent to prompt width
|
||||||
indentitems = 1;
|
indentitems = 1;
|
||||||
} else if (!strcmp(argv[i], "-nip") || (!strcmp(argv[i], "--no-indent"))) { // don't indent to prompt width
|
} else if (!strcmp(argv[i], "-nip") || (!strcmp(argv[i], "--no-indent"))) { // don't indent to prompt width
|
||||||
|
@ -487,6 +491,7 @@ usage(void)
|
||||||
"spmenu -sc, --show-caret, --show-cursor Show caret\n"
|
"spmenu -sc, --show-caret, --show-cursor Show caret\n"
|
||||||
"spmenu -shl, --show-highlighting Show highlight\n"
|
"spmenu -shl, --show-highlighting Show highlight\n"
|
||||||
"spmenu -si, --show-image Show image\n"
|
"spmenu -si, --show-image Show image\n"
|
||||||
|
"spmenu -scl, --show-caps Show caps lock indicator\n"
|
||||||
"spmenu -xrdb, --xrdb Load .Xresources on runtime\n"
|
"spmenu -xrdb, --xrdb Load .Xresources on runtime\n"
|
||||||
"spmenu -nxrdb, --no-xrdb Don't load .Xresources on runtime\n"
|
"spmenu -nxrdb, --no-xrdb Don't load .Xresources on runtime\n"
|
||||||
"spmenu -gbc, --global-colors Recognize global colors (such as *.color1) on runtime\n"
|
"spmenu -gbc, --global-colors Recognize global colors (such as *.color1) on runtime\n"
|
||||||
|
|
|
@ -112,7 +112,7 @@ path() {
|
||||||
print_help() {
|
print_help() {
|
||||||
if [ "$DMENU_COMPAT" != "true" ]; then
|
if [ "$DMENU_COMPAT" != "true" ]; then
|
||||||
COL='\033[0;31m'
|
COL='\033[0;31m'
|
||||||
RUNLAUNCHER_EX_ARGS="--lines 20 --columns 1 --normal --sgr1 $HELP_COLOR --hide-cursor --no-allow-typing --no-color-items --hide-prompt --hide-powerline --hide-input --hide-right-arrow --hide-left-arrow --hide-mode --hide-match-count"
|
RUNLAUNCHER_EX_ARGS="--lines 20 --columns 1 --normal --sgr1 $HELP_COLOR --hide-cursor --no-allow-typing --no-color-items --hide-prompt --hide-powerline --hide-input --hide-right-arrow --hide-left-arrow --hide-mode --hide-match-count --hide-caps"
|
||||||
read -ra rl_ex <<< "$RUNLAUNCHER_EX_ARGS"
|
read -ra rl_ex <<< "$RUNLAUNCHER_EX_ARGS"
|
||||||
fi
|
fi
|
||||||
cat << EOF | $RUNLAUNCHER "${rl_help[@]}" "${rl_ex[@]}" > /dev/null
|
cat << EOF | $RUNLAUNCHER "${rl_help[@]}" "${rl_ex[@]}" > /dev/null
|
||||||
|
@ -405,7 +405,7 @@ prepare_dirnav() {
|
||||||
print_desktop_help() {
|
print_desktop_help() {
|
||||||
if [ "$DMENU_COMPAT" != "true" ]; then
|
if [ "$DMENU_COMPAT" != "true" ]; then
|
||||||
COL='\033[0;31m'
|
COL='\033[0;31m'
|
||||||
RUNLAUNCHER_EX_ARGS="--lines 20 --columns 1 --normal --sgr1 $HELP_COLOR --hide-cursor --no-allow-typing --no-color-items --hide-prompt --hide-powerline --hide-input --hide-right-arrow --hide-left-arrow --hide-mode --hide-match-count"
|
RUNLAUNCHER_EX_ARGS="--lines 20 --columns 1 --normal --sgr1 $HELP_COLOR --hide-cursor --hide-caps --no-allow-typing --no-color-items --hide-prompt --hide-powerline --hide-input --hide-right-arrow --hide-left-arrow --hide-mode --hide-match-count"
|
||||||
read -ra rl_ex <<< "${RUNLAUNCHER_EX_ARGS}"
|
read -ra rl_ex <<< "${RUNLAUNCHER_EX_ARGS}"
|
||||||
fi
|
fi
|
||||||
cat << EOF | $RUNLAUNCHER "${rl_help[@]}" "${rl_ex[@]}" > /dev/null
|
cat << EOF | $RUNLAUNCHER "${rl_help[@]}" "${rl_ex[@]}" > /dev/null
|
||||||
|
|
3
spmenu.1
3
spmenu.1
|
@ -251,6 +251,9 @@ Show highlight
|
||||||
\f[V]-si, --show-image\f[R]
|
\f[V]-si, --show-image\f[R]
|
||||||
Show image
|
Show image
|
||||||
.TP
|
.TP
|
||||||
|
\f[V]-scl, --show-caps\f[R]
|
||||||
|
Show caps lock indicator
|
||||||
|
.TP
|
||||||
\f[V]-xrdb, --xrdb\f[R]
|
\f[V]-xrdb, --xrdb\f[R]
|
||||||
Load .Xresources on runtime
|
Load .Xresources on runtime
|
||||||
.TP
|
.TP
|
||||||
|
|
|
@ -459,6 +459,10 @@ Show highlight
|
||||||
<dd>
|
<dd>
|
||||||
Show image
|
Show image
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><code>-scl, --show-caps</code></dt>
|
||||||
|
<dd>
|
||||||
|
Show caps lock indicator
|
||||||
|
</dd>
|
||||||
<dt><code>-xrdb, --xrdb</code></dt>
|
<dt><code>-xrdb, --xrdb</code></dt>
|
||||||
<dd>
|
<dd>
|
||||||
Load .Xresources on runtime
|
Load .Xresources on runtime
|
||||||
|
|
BIN
spmenu.pdf
BIN
spmenu.pdf
Binary file not shown.
Loading…
Reference in a new issue