mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
add 'moveamount' to cwmrc; it sets keyboard movement amount, making
it more useful on large screens manpage tweak & ok jmc@ ok okan@, oga@
This commit is contained in:
parent
507b65a27f
commit
17ae65adc5
2
calmwm.h
2
calmwm.h
|
@ -256,6 +256,8 @@ struct conf {
|
||||||
int flags;
|
int flags;
|
||||||
#define CONF_BWIDTH 1
|
#define CONF_BWIDTH 1
|
||||||
int bwidth;
|
int bwidth;
|
||||||
|
#define CONF_MAMOUNT 1
|
||||||
|
int mamount;
|
||||||
|
|
||||||
char termpath[MAXPATHLEN];
|
char termpath[MAXPATHLEN];
|
||||||
char lockpath[MAXPATHLEN];
|
char lockpath[MAXPATHLEN];
|
||||||
|
|
1
conf.c
1
conf.c
|
@ -77,6 +77,7 @@ conf_init(struct conf *c)
|
||||||
{
|
{
|
||||||
c->flags = 0;
|
c->flags = 0;
|
||||||
c->bwidth = CONF_BWIDTH;
|
c->bwidth = CONF_BWIDTH;
|
||||||
|
c->mamount = CONF_MAMOUNT;
|
||||||
|
|
||||||
TAILQ_INIT(&c->ignoreq);
|
TAILQ_INIT(&c->ignoreq);
|
||||||
TAILQ_INIT(&c->cmdq);
|
TAILQ_INIT(&c->cmdq);
|
||||||
|
|
103
cwmrc.5
103
cwmrc.5
|
@ -14,7 +14,7 @@
|
||||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd $Mdocdate: January 21 2009 $
|
.Dd $Mdocdate: February 7 2009 $
|
||||||
.Dt CWMRC 5
|
.Dt CWMRC 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -169,6 +169,11 @@ may be taken from the
|
||||||
.Sx MOUSEBIND COMMAND LIST
|
.Sx MOUSEBIND COMMAND LIST
|
||||||
(see below).
|
(see below).
|
||||||
.Pp
|
.Pp
|
||||||
|
.It Ic moveamount Ar pixels
|
||||||
|
Set a default size for the keyboard movement bindings,
|
||||||
|
in pixels.
|
||||||
|
The default is 1.
|
||||||
|
.Pp
|
||||||
.It Ic sticky Ic yes Ns \&| Ns Ic no
|
.It Ic sticky Ic yes Ns \&| Ns Ic no
|
||||||
Toggle sticky group mode.
|
Toggle sticky group mode.
|
||||||
The default behavior for new windows is to not assign any group.
|
The default behavior for new windows is to not assign any group.
|
||||||
|
@ -264,53 +269,101 @@ Maximize current window full-screen.
|
||||||
.It vmaximize
|
.It vmaximize
|
||||||
Maximize current window vertically.
|
Maximize current window vertically.
|
||||||
.It moveup
|
.It moveup
|
||||||
Move window 1 pixel up.
|
Move window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It movedown
|
.It movedown
|
||||||
Move window 1 pixel down.
|
Move window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It moveright
|
.It moveright
|
||||||
Move window 1 pixel right.
|
Move window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It moveleft
|
.It moveleft
|
||||||
Move window 1 pixel left.
|
Move window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.It bigmoveup
|
.It bigmoveup
|
||||||
Move window 10 pixels up.
|
Move window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It bigmovedown
|
.It bigmovedown
|
||||||
Move window 10 pixels down.
|
Move window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It bigmoveright
|
.It bigmoveright
|
||||||
Move window 10 pixels right.
|
Move window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It bigmoveleft
|
.It bigmoveleft
|
||||||
Move window 10 pixels left.
|
Move window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.It resizeup
|
.It resizeup
|
||||||
Resize window 1 pixel up.
|
Resize window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It resizedown
|
.It resizedown
|
||||||
Resize window 1 pixel down.
|
Resize window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It resizeright
|
.It resizeright
|
||||||
Resize window 1 pixel right.
|
Resize window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It resizeleft
|
.It resizeleft
|
||||||
Resize window 1 pixel left.
|
Resize window
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.It bigresizeup
|
.It bigresizeup
|
||||||
Resize window 10 pixels up.
|
Resize window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It bigresizedown
|
.It bigresizedown
|
||||||
Resize window 10 pixels down.
|
Resize window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It bigresizeright
|
.It bigresizeright
|
||||||
Resize window 10 pixels right.
|
Resize window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It bigresizeleft
|
.It bigresizeleft
|
||||||
Resize window 10 pixels left.
|
Resize window 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.It ptrmoveup
|
.It ptrmoveup
|
||||||
Move pointer 1 pixel up.
|
Move pointer
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It ptrmovedown
|
.It ptrmovedown
|
||||||
Move pointer 1 pixel down.
|
Move pointer
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It ptrmoveright
|
.It ptrmoveright
|
||||||
Move pointer 1 pixel right.
|
Move pointer
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It ptrmoveleft
|
.It ptrmoveleft
|
||||||
Move pointer 1 pixel left.
|
Move pointer
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.It bigptrmoveup
|
.It bigptrmoveup
|
||||||
Move pointer 10 pixels up.
|
Move pointer 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels up.
|
||||||
.It bigptrmovedown
|
.It bigptrmovedown
|
||||||
Move pointer 10 pixels down.
|
Move pointer 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels down.
|
||||||
.It bigptrmoveright
|
.It bigptrmoveright
|
||||||
Move pointer 10 pixels right.
|
Move pointer 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels right.
|
||||||
.It bigptrmoveleft
|
.It bigptrmoveleft
|
||||||
Move pointer 10 pixels left.
|
Move pointer 10 times
|
||||||
|
.Ar moveamount
|
||||||
|
pixels left.
|
||||||
.El
|
.El
|
||||||
.Sh MOUSEBIND COMMAND LIST
|
.Sh MOUSEBIND COMMAND LIST
|
||||||
.Bl -tag -width 18n -compact
|
.Bl -tag -width 18n -compact
|
||||||
|
|
3
kbfunc.c
3
kbfunc.c
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#define KNOWN_HOSTS ".ssh/known_hosts"
|
#define KNOWN_HOSTS ".ssh/known_hosts"
|
||||||
#define HASH_MARKER "|1|"
|
#define HASH_MARKER "|1|"
|
||||||
#define MOVE_AMOUNT 1
|
|
||||||
|
|
||||||
extern int _xev_quit;
|
extern int _xev_quit;
|
||||||
|
|
||||||
|
@ -54,7 +53,7 @@ kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
|
||||||
mx = my = 0;
|
mx = my = 0;
|
||||||
|
|
||||||
flags = arg->i;
|
flags = arg->i;
|
||||||
amt = MOVE_AMOUNT;
|
amt = Conf.mamount;
|
||||||
|
|
||||||
if (flags & CWM_BIGMOVE) {
|
if (flags & CWM_BIGMOVE) {
|
||||||
flags -= CWM_BIGMOVE;
|
flags -= CWM_BIGMOVE;
|
||||||
|
|
7
parse.y
7
parse.y
|
@ -66,7 +66,7 @@ typedef struct {
|
||||||
|
|
||||||
%token FONTNAME STICKY GAP MOUSEBIND
|
%token FONTNAME STICKY GAP MOUSEBIND
|
||||||
%token AUTOGROUP BIND COMMAND IGNORE
|
%token AUTOGROUP BIND COMMAND IGNORE
|
||||||
%token YES NO BORDERWIDTH
|
%token YES NO BORDERWIDTH MOVEAMOUNT
|
||||||
%token ERROR
|
%token ERROR
|
||||||
%token <v.string> STRING
|
%token <v.string> STRING
|
||||||
%token <v.number> NUMBER
|
%token <v.number> NUMBER
|
||||||
|
@ -110,6 +110,9 @@ main : FONTNAME STRING {
|
||||||
| BORDERWIDTH NUMBER {
|
| BORDERWIDTH NUMBER {
|
||||||
conf->bwidth = $2;
|
conf->bwidth = $2;
|
||||||
}
|
}
|
||||||
|
| MOVEAMOUNT NUMBER {
|
||||||
|
conf->mamount = $2;
|
||||||
|
}
|
||||||
| COMMAND STRING string {
|
| COMMAND STRING string {
|
||||||
conf_cmd_add(conf, $3, $2, 0);
|
conf_cmd_add(conf, $3, $2, 0);
|
||||||
free($2);
|
free($2);
|
||||||
|
@ -207,6 +210,7 @@ lookup(char *s)
|
||||||
{ "gap", GAP},
|
{ "gap", GAP},
|
||||||
{ "ignore", IGNORE},
|
{ "ignore", IGNORE},
|
||||||
{ "mousebind", MOUSEBIND},
|
{ "mousebind", MOUSEBIND},
|
||||||
|
{ "moveamount", MOVEAMOUNT},
|
||||||
{ "no", NO},
|
{ "no", NO},
|
||||||
{ "sticky", STICKY},
|
{ "sticky", STICKY},
|
||||||
{ "yes", YES}
|
{ "yes", YES}
|
||||||
|
@ -499,6 +503,7 @@ parse_config(const char *filename, struct conf *xconf)
|
||||||
|
|
||||||
xconf->flags = conf->flags;
|
xconf->flags = conf->flags;
|
||||||
xconf->bwidth = conf->bwidth;
|
xconf->bwidth = conf->bwidth;
|
||||||
|
xconf->mamount = conf->mamount;
|
||||||
|
|
||||||
while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) {
|
while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) {
|
||||||
TAILQ_REMOVE(&conf->cmdq, cmd, entry);
|
TAILQ_REMOVE(&conf->cmdq, cmd, entry);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user