mirror of
https://github.com/0intro/wmii
synced 2024-11-25 07:09:38 +03:00
Add command history to rc.wmii
This commit is contained in:
parent
9e4195e708
commit
b2d98ca9b2
@ -4,7 +4,8 @@ include $(ROOT)/mk/wmii.mk
|
||||
|
||||
wmiir.c: $(ROOT)/mk/wmii.mk
|
||||
|
||||
DIRS = wmii
|
||||
DIRS = wmii \
|
||||
menu
|
||||
TARG = wihack \
|
||||
wmii.rc \
|
||||
wmii.sh \
|
||||
|
@ -4,7 +4,7 @@ include $(ROOT)/mk/wmii.mk
|
||||
|
||||
main.c: $(ROOT)/mk/wmii.mk
|
||||
|
||||
TARG = menu
|
||||
TARG = wimenu
|
||||
HFILES= dat.h fns.h
|
||||
|
||||
LIB = $(LIBIXP)
|
||||
|
@ -43,12 +43,6 @@ wmiifont=`{wi_readctl font}
|
||||
wmiinormcol=`{wi_readctl normcolors}
|
||||
wmiifocuscol=`{wi_readctl focuscolors}
|
||||
|
||||
fn wi_menu {
|
||||
dmenu -b -fn $wmiifont \
|
||||
-nf $wmiinormcol(1) -nb $wmiinormcol(2) \
|
||||
-sf $wmiifocuscol(1) -sb $wmiifocuscol(2)
|
||||
}
|
||||
|
||||
fn wi_9menu {
|
||||
wmii9menu -font `{echo $wmiifont | sed 's/,.*//'} \
|
||||
-^(nf nb br)^$wmiinormcol \
|
||||
|
@ -215,17 +215,21 @@ key $MODKEY-Shift-c || fn $key {
|
||||
wmiir xwrite /client/sel/ctl kill}
|
||||
|
||||
key $MODKEY-a || fn $key {
|
||||
Action `{wi_actions | wi_menu} &}
|
||||
Action `{wi_actions | wimenu} &}
|
||||
key $MODKEY-p || fn $key {
|
||||
ifs=() { wi_runcmd `{wi_menu <$progs_file} & }}
|
||||
ifs=() { cmd = `{wimenu -h $progs_hist <$progs_file} }
|
||||
wi_runcmd $cmd &
|
||||
{ cat $progs_hist; echo $cmd; } | uniq | sed '/^$/d' \
|
||||
| tail -$progs_len >$progs_hist.$pid
|
||||
mv $progs_hist.$pid $progs_hist}
|
||||
key $MODKEY-Return || fn $key {
|
||||
wi_runcmd $WMII_TERM &}
|
||||
|
||||
key $MODKEY-t || fn $key {
|
||||
wmiir xwrite /ctl view `{wi_tags | wi_menu} &}
|
||||
wmiir xwrite /ctl view `{wi_tags | wimenu} &}
|
||||
key $MODKEY-Shift-t || fn $key {
|
||||
sel = `{wmiir read /client/sel/ctl | sed 1q} \
|
||||
wmiir xwrite /client/$sel/tags `{wi_tags | wi_menu} &}
|
||||
wmiir xwrite /client/$sel/tags `{wi_tags | wimenu} &}
|
||||
|
||||
key $MODKEY-^`{seq 0 9} || fn $key {
|
||||
wmiir xwrite /ctl view `{echo $1 | sed 's/.*-//'}}
|
||||
@ -247,6 +251,9 @@ Action overridekeys
|
||||
|
||||
# Misc Setup
|
||||
progs_file=`{namespace}^/proglist.$pid
|
||||
progs_hist=`{namespace}^/proghist
|
||||
progs_len=5000
|
||||
touch $progs_hist
|
||||
Action status &
|
||||
Action rehash &
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user