added togglefloat to hg tip (i consider this useful for some cases), using MODKEY-Shift-space as shortcut

keyboard
arg@mig29 18 years ago
parent 35e96b8deb
commit 46d5f9d1bf
  1. 1
      config.arg.h
  2. 1
      config.default.h
  3. 1
      dwm.h
  4. 8
      view.c

@ -45,6 +45,7 @@ static Key key[] = { \
{ MODKEY|ControlMask|ShiftMask, XK_4, toggletag, { .i = 3 } }, \ { MODKEY|ControlMask|ShiftMask, XK_4, toggletag, { .i = 3 } }, \
{ MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
{ MODKEY, XK_space, togglemode, { 0 } }, \ { MODKEY, XK_space, togglemode, { 0 } }, \
{ MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
{ MODKEY, XK_0, viewall, { 0 } }, \ { MODKEY, XK_0, viewall, { 0 } }, \
{ MODKEY, XK_1, view, { .i = 0 } }, \ { MODKEY, XK_1, view, { .i = 0 } }, \
{ MODKEY, XK_2, view, { .i = 1 } }, \ { MODKEY, XK_2, view, { .i = 1 } }, \

@ -42,6 +42,7 @@ static Key key[] = { \
{ MODKEY|ControlMask|ShiftMask, XK_5, toggletag, { .i = 4 } }, \ { MODKEY|ControlMask|ShiftMask, XK_5, toggletag, { .i = 4 } }, \
{ MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \ { MODKEY|ShiftMask, XK_c, killclient, { 0 } }, \
{ MODKEY, XK_space, togglemode, { 0 } }, \ { MODKEY, XK_space, togglemode, { 0 } }, \
{ MODKEY|ShiftMask, XK_space, togglefloat, { 0 } }, \
{ MODKEY, XK_0, viewall, { 0 } }, \ { MODKEY, XK_0, viewall, { 0 } }, \
{ MODKEY, XK_1, view, { .i = 0 } }, \ { MODKEY, XK_1, view, { .i = 0 } }, \
{ MODKEY, XK_2, view, { .i = 1 } }, \ { MODKEY, XK_2, view, { .i = 1 } }, \

@ -164,6 +164,7 @@ extern void focusprev(Arg *arg); /* focuses previous visible client, arg is ign
extern Bool isvisible(Client *c); /* returns True if client is visible */ extern Bool isvisible(Client *c); /* returns True if client is visible */
extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */ extern void resizemaster(Arg *arg); /* resizes the master percent with arg's index value */
extern void restack(void); /* restores z layers of all clients */ extern void restack(void); /* restores z layers of all clients */
extern void togglefloat(Arg *arg); /* toggles selected client floating/tiled resp. */
extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */ extern void togglemode(Arg *arg); /* toggles global arrange function (dotile/dofloat) */
extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */ extern void toggleview(Arg *arg); /* toggles the tag with arg's index (in)visible */
extern void view(Arg *arg); /* views the tag with arg's index */ extern void view(Arg *arg); /* views the tag with arg's index */

@ -200,6 +200,14 @@ restack(void) {
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
} }
void
togglefloat(Arg *arg) {
if (!sel)
return;
sel->isfloat = !sel->isfloat;
arrange();
}
void void
togglemode(Arg *arg) { togglemode(Arg *arg) {
arrange = (arrange == dofloat) ? dotile : dofloat; arrange = (arrange == dofloat) ? dotile : dofloat;

Loading…
Cancel
Save