Login
Immutable PageDiscussionInfoAttachments
attachment:dwm-6.0-rotate.diff of clear/misc

MMA

Attachment 'dwm-6.0-rotate.diff'

Download

   1 diff -u dwm-6.0/config.def.h dwm-6.0-rotate/config.def.h
   2 --- dwm-6.0/config.def.h	2011-12-20 00:02:46.000000000 +0900
   3 +++ dwm-6.0-rotate/config.def.h	2012-04-22 17:18:37.000000000 +0900
   4 @@ -62,6 +62,7 @@
   5  	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
   6  	{ MODKEY,                       XK_Return, zoom,           {0} },
   7  	{ MODKEY,                       XK_Tab,    view,           {0} },
   8 +	{ MODKEY,                       XK_r,      rotate,         {0} },
   9  	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
  10  	{ MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },
  11  	{ MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },
  12 diff -u dwm-6.0/dwm.c dwm-6.0-rotate/dwm.c
  13 --- dwm-6.0/dwm.c	2011-12-20 00:02:46.000000000 +0900
  14 +++ dwm-6.0-rotate/dwm.c	2012-04-22 17:16:50.000000000 +0900
  15 @@ -211,6 +211,7 @@
  16  static void resizeclient(Client *c, int x, int y, int w, int h);
  17  static void resizemouse(const Arg *arg);
  18  static void restack(Monitor *m);
  19 +static void rotate(const Arg *arg);
  20  static void run(void);
  21  static void scan(void);
  22  static Bool sendevent(Client *c, Atom proto);
  23 @@ -1436,6 +1437,19 @@
  24  }
  25  
  26  void
  27 +rotate(const Arg *arg) {
  28 +	Client *c, *bottom;
  29 +
  30 +	if(!selmon->lt[selmon->sellt]->arrange)
  31 +		return;
  32 +
  33 +	for(bottom = c = nexttiled(selmon->clients); c; c = nexttiled(c->next))
  34 +		bottom = c;
  35 +	if(bottom)
  36 +		pop(bottom);
  37 +}
  38 +
  39 +void
  40  run(void) {
  41  	XEvent ev;
  42  	/* main event loop */

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2019-12-24 16:36:52, 2.9 KB) [[attachment:dwm-6.0-moderatetile.diff]]
  • [get | view] (2019-12-24 16:36:52, 1.5 KB) [[attachment:dwm-6.0-rotate.diff]]
  • [get | view] (2019-12-24 16:36:52, 1.5 KB) [[attachment:dwm-6.0-statuscolor.diff]]
  • [get | view] (2019-12-24 16:36:52, 3.4 KB) [[attachment:now_implementing.png]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.