forked from speedie/spmenu
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
|
||||
#
|
||||
# This is the default configuration used to build spmenu. The build.sh script reads it.
|
||||
imlib2=true
|
||||
pango=true
|
||||
pangoxft=true
|
||||
xinerama=true
|
||||
openssl=true
|
||||
fribidi=true
|
||||
libconfig=true
|
||||
imlib2=false
|
||||
pango=false
|
||||
pangoxft=false
|
||||
xinerama=false
|
||||
openssl=false
|
||||
fribidi=false
|
||||
libconfig=false
|
||||
cc=gcc
|
||||
opt=-O2
|
||||
warn=true
|
||||
warn=false
|
||||
|
|
|
@ -233,6 +233,9 @@ You may use long, descriptive arguments or the shorter arguments.
|
|||
`-si, --show-image`
|
||||
: Show image
|
||||
|
||||
`-scl, --show-caps`
|
||||
: Show caps lock indicator
|
||||
|
||||
`-xrdb, --xrdb`
|
||||
: Load .Xresources on runtime
|
||||
|
||||
|
|
15
libs/arg.c
15
libs/arg.c
|
@ -516,21 +516,8 @@ setprofile(const Arg *arg)
|
|||
void
|
||||
spawn(const Arg *arg)
|
||||
{
|
||||
struct sigaction sa;
|
||||
|
||||
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);
|
||||
if (!system(arg->v))
|
||||
fprintf(stderr, "spmenu: failed to execute command '%s'", ((char **)arg->v)[0]);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -157,6 +157,10 @@ readargs(int argc, char *argv[])
|
|||
hideimage = 1;
|
||||
} else if (!strcmp(argv[i], "-si") || (!strcmp(argv[i], "--show-image"))) { // show image
|
||||
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
|
||||
indentitems = 1;
|
||||
} 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 -shl, --show-highlighting Show highlight\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 -nxrdb, --no-xrdb Don't load .Xresources on runtime\n"
|
||||
"spmenu -gbc, --global-colors Recognize global colors (such as *.color1) on runtime\n"
|
||||
|
|
|
@ -112,7 +112,7 @@ path() {
|
|||
print_help() {
|
||||
if [ "$DMENU_COMPAT" != "true" ]; then
|
||||
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"
|
||||
fi
|
||||
cat << EOF | $RUNLAUNCHER "${rl_help[@]}" "${rl_ex[@]}" > /dev/null
|
||||
|
@ -405,7 +405,7 @@ prepare_dirnav() {
|
|||
print_desktop_help() {
|
||||
if [ "$DMENU_COMPAT" != "true" ]; then
|
||||
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}"
|
||||
fi
|
||||
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]
|
||||
Show image
|
||||
.TP
|
||||
\f[V]-scl, --show-caps\f[R]
|
||||
Show caps lock indicator
|
||||
.TP
|
||||
\f[V]-xrdb, --xrdb\f[R]
|
||||
Load .Xresources on runtime
|
||||
.TP
|
||||
|
|
|
@ -459,6 +459,10 @@ Show highlight
|
|||
<dd>
|
||||
Show image
|
||||
</dd>
|
||||
<dt><code>-scl, --show-caps</code></dt>
|
||||
<dd>
|
||||
Show caps lock indicator
|
||||
</dd>
|
||||
<dt><code>-xrdb, --xrdb</code></dt>
|
||||
<dd>
|
||||
Load .Xresources on runtime
|
||||
|
|
BIN
spmenu.pdf
BIN
spmenu.pdf
Binary file not shown.
Loading…
Reference in a new issue