renamed versatile into untiled
58710087
9 file(s) · +51 −51
| 203 | 203 | updatetitle(c); |
|
| 204 | 204 | for(t = clients; t && t->win != trans; t = t->next); |
|
| 205 | 205 | settags(c, t); |
|
| 206 | - | if(!c->isversatile) |
|
| 207 | - | c->isversatile = (t != NULL) || c->isfixed; |
|
| 206 | + | if(!c->isuntiled) |
|
| 207 | + | c->isuntiled = (t != NULL) || c->isfixed; |
|
| 208 | 208 | attach(c); |
|
| 209 | 209 | attachstack(c); |
|
| 210 | 210 | c->isbanned = True; |
|
| 285 | 285 | } |
|
| 286 | 286 | ||
| 287 | 287 | void |
|
| 288 | - | toggleversatile(const char *arg) { |
|
| 289 | - | if(!sel || lt->arrange == versatile) |
|
| 288 | + | toggletiled(const char *arg) { |
|
| 289 | + | if(!sel || lt->arrange == untile) |
|
| 290 | 290 | return; |
|
| 291 | - | sel->isversatile = !sel->isversatile; |
|
| 291 | + | sel->isuntiled = !sel->isuntiled; |
|
| 292 | 292 | lt->arrange(); |
|
| 293 | 293 | } |
|
| 294 | 294 | ||
| 18 | 18 | const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL }; |
|
| 19 | 19 | #define RULES \ |
|
| 20 | 20 | static Rule rule[] = { \ |
|
| 21 | - | /* class:instance:title regex tags regex isversatile */ \ |
|
| 21 | + | /* class:instance:title regex tags regex isuntiled */ \ |
|
| 22 | 22 | { "Firefox", "3", False }, \ |
|
| 23 | 23 | { "Gimp", NULL, True }, \ |
|
| 24 | 24 | { "MPlayer", NULL, True }, \ |
|
| 30 | 30 | static Layout layout[] = { \ |
|
| 31 | 31 | /* symbol function */ \ |
|
| 32 | 32 | { "[]=", tile }, /* first entry is default */ \ |
|
| 33 | - | { "><>", versatile }, \ |
|
| 33 | + | { "><>", untile }, \ |
|
| 34 | 34 | }; |
|
| 35 | 35 | #define MASTERWIDTH 600 /* master width per thousand */ |
|
| 36 | 36 | #define NMASTER 1 /* clients in master area */ |
|
| 37 | - | #define SNAP 40 /* versatile snap pixel */ |
|
| 37 | + | #define SNAP 40 /* untiled snap pixel */ |
|
| 38 | 38 | ||
| 39 | 39 | /* key definitions */ |
|
| 40 | 40 | #define MODKEY Mod1Mask |
|
| 56 | 56 | { MODKEY, XK_k, focusclient, "-1" }, \ |
|
| 57 | 57 | { MODKEY, XK_m, togglemax, NULL }, \ |
|
| 58 | 58 | { MODKEY, XK_Return, zoom, NULL }, \ |
|
| 59 | - | { MODKEY|ShiftMask, XK_space, toggleversatile,NULL }, \ |
|
| 59 | + | { MODKEY|ShiftMask, XK_space, toggletiled, NULL }, \ |
|
| 60 | 60 | { MODKEY|ShiftMask, XK_c, killclient, NULL }, \ |
|
| 61 | 61 | { MODKEY, XK_0, view, NULL }, \ |
|
| 62 | 62 | { MODKEY, XK_1, view, "0" }, \ |
|
| 20 | 20 | * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/ { printf("%s\n",$2) }' */ |
|
| 21 | 21 | #define RULES \ |
|
| 22 | 22 | static Rule rule[] = { \ |
|
| 23 | - | /* class:instance:title regex tags regex isversatile */ \ |
|
| 23 | + | /* class:instance:title regex tags regex isuntiled */ \ |
|
| 24 | 24 | { "Gimp", NULL, True }, \ |
|
| 25 | 25 | { "MPlayer", NULL, True }, \ |
|
| 26 | 26 | { "Acroread", NULL, True }, \ |
|
| 31 | 31 | static Layout layout[] = { \ |
|
| 32 | 32 | /* symbol function */ \ |
|
| 33 | 33 | { "[]=", tile }, /* first entry is default */ \ |
|
| 34 | - | { "><>", versatile }, \ |
|
| 34 | + | { "><>", untile }, \ |
|
| 35 | 35 | }; |
|
| 36 | 36 | #define MASTERWIDTH 600 /* master width per thousand */ |
|
| 37 | 37 | #define NMASTER 1 /* clients in master area */ |
|
| 38 | - | #define SNAP 20 /* versatile snap pixel */ |
|
| 38 | + | #define SNAP 20 /* untiled snap pixel */ |
|
| 39 | 39 | ||
| 40 | 40 | /* key definitions */ |
|
| 41 | 41 | #define MODKEY Mod1Mask |
|
| 52 | 52 | { MODKEY|ShiftMask, XK_Tab, focusclient, "-1" }, \ |
|
| 53 | 53 | { MODKEY, XK_m, togglemax, NULL }, \ |
|
| 54 | 54 | { MODKEY, XK_Return, zoom, NULL }, \ |
|
| 55 | - | { MODKEY|ShiftMask, XK_space, toggleversatile,NULL }, \ |
|
| 55 | + | { MODKEY|ShiftMask, XK_space, toggletiled, NULL }, \ |
|
| 56 | 56 | { MODKEY|ShiftMask, XK_c, killclient, NULL }, \ |
|
| 57 | 57 | { MODKEY, XK_0, view, NULL }, \ |
|
| 58 | 58 | { MODKEY, XK_1, view, "0" }, \ |
|
| 81 | 81 | dc.x = x; |
|
| 82 | 82 | if(sel) { |
|
| 83 | 83 | drawtext(sel->name, dc.sel); |
|
| 84 | - | drawsquare(sel->ismax, sel->isversatile, dc.sel); |
|
| 84 | + | drawsquare(sel->ismax, sel->isuntiled, dc.sel); |
|
| 85 | 85 | } |
|
| 86 | 86 | else |
|
| 87 | 87 | drawtext(NULL, dc.norm); |
| 5 | 5 | .B dwm |
|
| 6 | 6 | .RB [ \-v ] |
|
| 7 | 7 | .SH DESCRIPTION |
|
| 8 | - | dwm is a dynamic window manager for X. It manages windows in tiling and |
|
| 9 | - | versatile layouts. Either layout can be applied dynamically, optimizing the |
|
| 8 | + | dwm is a dynamic window manager for X. It manages windows in tiled and |
|
| 9 | + | untiled layouts. Either layout can be applied dynamically, optimizing the |
|
| 10 | 10 | environment for the application in use and the task performed. |
|
| 11 | 11 | .P |
|
| 12 | - | In tiling layout windows are managed in a master and stacking area. The master |
|
| 12 | + | In tiled layout windows are managed in a master and stacking area. The master |
|
| 13 | 13 | area contains the windows which currently need most attention, whereas the |
|
| 14 | - | stacking area contains all other windows. In versatile layout windows can be |
|
| 15 | - | resized and moved freely. Dialog windows are always managed versatile, |
|
| 14 | + | stacking area contains all other windows. In untiled layout windows can be |
|
| 15 | + | resized and moved freely. Dialog windows are always managed untiled, |
|
| 16 | 16 | regardless of the layout applied. |
|
| 17 | 17 | .P |
|
| 18 | 18 | Windows are grouped by tags. Each window can be tagged with one or multiple |
|
| 20 | 20 | .P |
|
| 21 | 21 | dwm contains a small status bar which displays all available tags, the layout, |
|
| 22 | 22 | the title of the focused window, and the text read from standard input. A |
|
| 23 | - | versatile window is indicated with an empty square and a maximized |
|
| 24 | - | versatile window is indicated with a filled square before the windows |
|
| 23 | + | untiled window is indicated with an empty square and a maximized |
|
| 24 | + | untiled window is indicated with a filled square before the windows |
|
| 25 | 25 | title. The selected tags are indicated with a different color. The tags of |
|
| 26 | 26 | the focused window are indicated with a filled square in the top left |
|
| 27 | 27 | corner. The tags which are applied to one or more windows are indicated |
|
| 40 | 40 | .TP |
|
| 41 | 41 | .B Button1 |
|
| 42 | 42 | click on a tag label to display all windows with that tag, click on the layout |
|
| 43 | - | label toggles between tiling and versatile layout. |
|
| 43 | + | label toggles between tiled and untiled layout. |
|
| 44 | 44 | .TP |
|
| 45 | 45 | .B Button3 |
|
| 46 | 46 | click on a tag label adds/removes all windows with that tag to/from the view. |
|
| 57 | 57 | .BR xterm (1). |
|
| 58 | 58 | .TP |
|
| 59 | 59 | .B Mod1-Return |
|
| 60 | - | Zooms/cycles current window to/from master area (tiling layout only). |
|
| 60 | + | Zooms/cycles current window to/from master area (tiled layout only). |
|
| 61 | 61 | .TP |
|
| 62 | 62 | .B Mod1-Tab |
|
| 63 | 63 | Focus next window. |
|
| 66 | 66 | Focus previous window. |
|
| 67 | 67 | .TP |
|
| 68 | 68 | .B Mod1-g |
|
| 69 | - | Increase master area width (tiling layout only). |
|
| 69 | + | Increase master area width (tiled layout only). |
|
| 70 | 70 | .TP |
|
| 71 | 71 | .B Mod1-s |
|
| 72 | - | Decrease master area width (tiling layout only). |
|
| 72 | + | Decrease master area width (tiled layout only). |
|
| 73 | 73 | .TP |
|
| 74 | 74 | .B Mod1-i |
|
| 75 | - | Increase the number of windows in the master area (tiling layout only). |
|
| 75 | + | Increase the number of windows in the master area (tiled layout only). |
|
| 76 | 76 | .TP |
|
| 77 | 77 | .B Mod1-d |
|
| 78 | - | Decrease the number of windows in the master area (tiling layout only). |
|
| 78 | + | Decrease the number of windows in the master area (tiled layout only). |
|
| 79 | 79 | .TP |
|
| 80 | 80 | .B Mod1-m |
|
| 81 | - | Toggles maximization of current window (versatile layout only). |
|
| 81 | + | Toggles maximization of current window (untiled layout only). |
|
| 82 | 82 | .TP |
|
| 83 | 83 | .B Mod1-Shift-[1..n] |
|
| 84 | 84 | Apply |
|
| 97 | 97 | Close focused window. |
|
| 98 | 98 | .TP |
|
| 99 | 99 | .B Mod1-space |
|
| 100 | - | Toggle between tiling and versatile layout (affects all windows). |
|
| 100 | + | Toggle between tiled and untiled layout (affects all windows). |
|
| 101 | 101 | .TP |
|
| 102 | 102 | .B Mod1-Shift-space |
|
| 103 | - | Toggle focused window between versatile and non-versatile state (tiling layout only). |
|
| 103 | + | Toggle focused window between untiled and non-untiled state (tiled layout only). |
|
| 104 | 104 | .TP |
|
| 105 | 105 | .B Mod1-[1..n] |
|
| 106 | 106 | View all windows with |
|
| 120 | 120 | .SS Mouse commands |
|
| 121 | 121 | .TP |
|
| 122 | 122 | .B Mod1-Button1 |
|
| 123 | - | Move current window while dragging (versatile layout only). |
|
| 123 | + | Move current window while dragging (untiled layout only). |
|
| 124 | 124 | .TP |
|
| 125 | 125 | .B Mod1-Button2 |
|
| 126 | - | Zooms/cycles current window to/from master area (tiling layout only). |
|
| 126 | + | Zooms/cycles current window to/from master area (tiled layout only). |
|
| 127 | 127 | .TP |
|
| 128 | 128 | .B Mod1-Button3 |
|
| 129 | - | Resize current window while dragging (versatile layout only). |
|
| 129 | + | Resize current window while dragging (untiled layout only). |
|
| 130 | 130 | .SH CUSTOMIZATION |
|
| 131 | 131 | dwm is customized by creating a custom config.h and (re)compiling the source |
|
| 132 | 132 | code. This keeps it fast, secure and simple. |
|
| 67 | 67 | int minax, minay, maxax, maxay; |
|
| 68 | 68 | long flags; |
|
| 69 | 69 | unsigned int border; |
|
| 70 | - | Bool isbanned, isfixed, ismax, isversatile; |
|
| 70 | + | Bool isbanned, isfixed, ismax, isuntiled; |
|
| 71 | 71 | Bool *tags; |
|
| 72 | 72 | Client *next; |
|
| 73 | 73 | Client *prev; |
|
| 105 | 105 | extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ |
|
| 106 | 106 | extern void resize(Client *c, int x, int y, |
|
| 107 | 107 | int w, int h, Bool sizehints); /* resize with given coordinates c*/ |
|
| 108 | - | extern void toggleversatile(const char *arg); /* toggles focused client between versatile/and non-versatile state */ |
|
| 108 | + | extern void toggletiled(const char *arg); /* toggles focused client between tiled/untiled state */ |
|
| 109 | 109 | extern void updatesizehints(Client *c); /* update the size hint variables of c */ |
|
| 110 | 110 | extern void updatetitle(Client *c); /* update the name of c */ |
|
| 111 | 111 | extern void unmanage(Client *c); /* destroy c */ |
|
| 126 | 126 | extern Client *nexttiled(Client *c); /* returns tiled successor of c */ |
|
| 127 | 127 | extern void restack(void); /* restores z layers of all clients */ |
|
| 128 | 128 | extern void setlayout(const char *arg); /* sets layout, -1 toggles */ |
|
| 129 | - | extern void togglemax(const char *arg); /* toggles maximization of versatile client */ |
|
| 130 | - | extern void versatile(void); /* arranges all windows versatile */ |
|
| 129 | + | extern void togglemax(const char *arg); /* toggles maximization of untiled client */ |
|
| 130 | + | extern void untile(void); /* arranges all windows untiled */ |
|
| 131 | 131 | extern void zoom(const char *arg); /* zooms the focused client to master area, arg is ignored */ |
|
| 132 | 132 | ||
| 133 | 133 | /* main.c */ |
|
| 151 | 151 | focus(c); |
|
| 152 | 152 | if(CLEANMASK(ev->state) != MODKEY) |
|
| 153 | 153 | return; |
|
| 154 | - | if(ev->button == Button1 && (lt->arrange == versatile || c->isversatile)) { |
|
| 154 | + | if(ev->button == Button1 && (lt->arrange == untile || c->isuntiled)) { |
|
| 155 | 155 | restack(); |
|
| 156 | 156 | movemouse(c); |
|
| 157 | 157 | } |
|
| 158 | 158 | else if(ev->button == Button2) |
|
| 159 | 159 | zoom(NULL); |
|
| 160 | 160 | else if(ev->button == Button3 |
|
| 161 | - | && (lt->arrange == versatile || c->isversatile) && !c->isfixed) |
|
| 161 | + | && (lt->arrange == untile || c->isuntiled) && !c->isfixed) |
|
| 162 | 162 | { |
|
| 163 | 163 | restack(); |
|
| 164 | 164 | resizemouse(c); |
|
| 176 | 176 | c->ismax = False; |
|
| 177 | 177 | if(ev->value_mask & CWBorderWidth) |
|
| 178 | 178 | c->border = ev->border_width; |
|
| 179 | - | if(c->isfixed || c->isversatile || (lt->arrange == versatile)) { |
|
| 179 | + | if(c->isfixed || c->isuntiled || (lt->arrange == untile)) { |
|
| 180 | 180 | if(ev->value_mask & CWX) |
|
| 181 | 181 | c->x = ev->x; |
|
| 182 | 182 | if(ev->value_mask & CWY) |
|
| 304 | 304 | default: break; |
|
| 305 | 305 | case XA_WM_TRANSIENT_FOR: |
|
| 306 | 306 | XGetTransientForHint(dpy, c->win, &trans); |
|
| 307 | - | if(!c->isversatile && (c->isversatile = (getclient(trans) != NULL))) |
|
| 307 | + | if(!c->isuntiled && (c->isuntiled = (getclient(trans) != NULL))) |
|
| 308 | 308 | lt->arrange(); |
|
| 309 | 309 | break; |
|
| 310 | 310 | case XA_WM_NORMAL_HINTS: |
|
| 31 | 31 | if(c->isbanned) |
|
| 32 | 32 | XMoveWindow(dpy, c->win, c->x, c->y); |
|
| 33 | 33 | c->isbanned = False; |
|
| 34 | - | if(c->isversatile) |
|
| 34 | + | if(c->isuntiled) |
|
| 35 | 35 | continue; |
|
| 36 | 36 | c->ismax = False; |
|
| 37 | 37 | nx = wax; |
|
| 148 | 148 | ||
| 149 | 149 | Client * |
|
| 150 | 150 | nexttiled(Client *c) { |
|
| 151 | - | for(; c && (c->isversatile || !isvisible(c)); c = c->next); |
|
| 151 | + | for(; c && (c->isuntiled || !isvisible(c)); c = c->next); |
|
| 152 | 152 | return c; |
|
| 153 | 153 | } |
|
| 154 | 154 | ||
| 160 | 160 | drawstatus(); |
|
| 161 | 161 | if(!sel) |
|
| 162 | 162 | return; |
|
| 163 | - | if(sel->isversatile || lt->arrange == versatile) |
|
| 163 | + | if(sel->isuntiled || lt->arrange == untile) |
|
| 164 | 164 | XRaiseWindow(dpy, sel->win); |
|
| 165 | - | if(lt->arrange != versatile) { |
|
| 166 | - | if(!sel->isversatile) |
|
| 165 | + | if(lt->arrange != untile) { |
|
| 166 | + | if(!sel->isuntiled) |
|
| 167 | 167 | XLowerWindow(dpy, sel->win); |
|
| 168 | 168 | for(c = nexttiled(clients); c; c = nexttiled(c->next)) { |
|
| 169 | 169 | if(c == sel) |
|
| 202 | 202 | togglemax(const char *arg) { |
|
| 203 | 203 | XEvent ev; |
|
| 204 | 204 | ||
| 205 | - | if(!sel || (lt->arrange != versatile && !sel->isversatile) || sel->isfixed) |
|
| 205 | + | if(!sel || (lt->arrange != untile && !sel->isuntiled) || sel->isfixed) |
|
| 206 | 206 | return; |
|
| 207 | 207 | if((sel->ismax = !sel->ismax)) { |
|
| 208 | 208 | sel->rx = sel->x; |
|
| 218 | 218 | } |
|
| 219 | 219 | ||
| 220 | 220 | void |
|
| 221 | - | versatile(void) { |
|
| 221 | + | untile(void) { |
|
| 222 | 222 | Client *c; |
|
| 223 | 223 | ||
| 224 | 224 | for(c = clients; c; c = c->next) { |
|
| 245 | 245 | unsigned int n; |
|
| 246 | 246 | Client *c; |
|
| 247 | 247 | ||
| 248 | - | if(!sel || lt->arrange != tile || sel->isversatile) |
|
| 248 | + | if(!sel || lt->arrange != tile || sel->isuntiled) |
|
| 249 | 249 | return; |
|
| 250 | 250 | for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) |
|
| 251 | 251 | n++; |
|
| 12 | 12 | typedef struct { |
|
| 13 | 13 | const char *prop; |
|
| 14 | 14 | const char *tags; |
|
| 15 | - | Bool isversatile; |
|
| 15 | + | Bool isuntiled; |
|
| 16 | 16 | } Rule; |
|
| 17 | 17 | ||
| 18 | 18 | typedef struct { |
|
| 83 | 83 | ch.res_name ? ch.res_name : "", c->name); |
|
| 84 | 84 | for(i = 0; i < nrules; i++) |
|
| 85 | 85 | if(regs[i].propregex && !regexec(regs[i].propregex, prop, 1, &tmp, 0)) { |
|
| 86 | - | c->isversatile = rule[i].isversatile; |
|
| 86 | + | c->isuntiled = rule[i].isuntiled; |
|
| 87 | 87 | for(j = 0; regs[i].tagregex && j < ntags; j++) { |
|
| 88 | 88 | if(!regexec(regs[i].tagregex, tags[j], 1, &tmp, 0)) { |
|
| 89 | 89 | matched = True; |
|