dwm.h
author Anselm R. Garbe <arg@suckless.org>
Mon, 19 Feb 2007 18:33:15 +0100
changeset 788 a61fcdf7b4c1
parent 786 d9198e713310
child 790 48e7c3b45250
permissions -rw-r--r--
replaced togglelayout with setlayout
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
644
1ed8c40dde36 corrections
arg@mig29
parents: 643
diff changeset
     1
/* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     2
 * See LICENSE file for license details.
457
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
     3
 *
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
     4
 * dynamic window manager is designed like any other X client as well. It is
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
     5
 * driven through handling X events. In contrast to other X clients, a window
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
     6
 * manager selects for SubstructureRedirectMask on the root window, to receive
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
     7
 * events about window (dis-)appearance.  Only one X connection at a time is
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
     8
 * allowed to select for this event mask.
457
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
     9
 *
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    10
 * Calls to fetch an X event from the event queue are blocking.  Due reading
469
a2cc7adf9d4d improved intro comment in dwm.h, updated config.mk
arg@mmvi
parents: 468
diff changeset
    11
 * status text from standard input, a select()-driven main loop has been
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    12
 * implemented which selects for reads on the X connection and STDIN_FILENO to
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    13
 * handle all data smoothly. The event handlers of dwm are organized in an
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    14
 * array which is accessed whenever a new event has been fetched. This allows
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    15
 * event dispatching in O(1) time.
457
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
    16
 *
460
ab4b08d49d24 some more simplifications of intro comment in dwm.h, this should suffice for comments in dwm
Anselm R. Garbe <arg@10kloc.org>
parents: 459
diff changeset
    17
 * Each child of the root window is called a client, except windows which have
ab4b08d49d24 some more simplifications of intro comment in dwm.h, this should suffice for comments in dwm
Anselm R. Garbe <arg@10kloc.org>
parents: 459
diff changeset
    18
 * set the override_redirect flag.  Clients are organized in a global
ab4b08d49d24 some more simplifications of intro comment in dwm.h, this should suffice for comments in dwm
Anselm R. Garbe <arg@10kloc.org>
parents: 459
diff changeset
    19
 * doubly-linked client list, the focus history is remembered through a global
ab4b08d49d24 some more simplifications of intro comment in dwm.h, this should suffice for comments in dwm
Anselm R. Garbe <arg@10kloc.org>
parents: 459
diff changeset
    20
 * stack list. Each client contains an array of Bools of the same size as the
ab4b08d49d24 some more simplifications of intro comment in dwm.h, this should suffice for comments in dwm
Anselm R. Garbe <arg@10kloc.org>
parents: 459
diff changeset
    21
 * global tags array to indicate the tags of a client.  For each client dwm
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    22
 * creates a small title window, which is resized whenever the (_NET_)WM_NAME
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    23
 * properties are updated or the client is moved/resized.
457
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
    24
 *
459
3c3f429dca99 made introduction comment in dwm.h shorter
Anselm R. Garbe <arg@10kloc.org>
parents: 457
diff changeset
    25
 * Keys and tagging rules are organized as arrays and defined in the config.h
3c3f429dca99 made introduction comment in dwm.h shorter
Anselm R. Garbe <arg@10kloc.org>
parents: 457
diff changeset
    26
 * file. These arrays are kept static in event.o and tag.o respectively,
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    27
 * because no other part of dwm needs access to them.  The current layout is
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    28
 * represented by the lt pointer.
457
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
    29
 *
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    30
 * To understand everything else, start reading main.c:main().
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    31
 */
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    32
166
e0535db04dfe removed the CONFIG variable from config.mk, renamed config.h into config.default.h, after first clone/extract one needs to copy config.default.h to config.h, that is easier than always heavy typing make CONFIG=blafasel
arg@10ksloc.org
parents: 164
diff changeset
    33
#include "config.h"
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    34
#include <X11/Xlib.h>
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    35
143
36cabfe408cd applied Sanders patches
arg@10ksloc.org
parents: 142
diff changeset
    36
/* mask shorthands, used in event.c and client.c */
150
a26b32ff8911 cleaned config.*h to prevent some confusion
arg@10ksloc.org
parents: 148
diff changeset
    37
#define BUTTONMASK		(ButtonPressMask | ButtonReleaseMask)
143
36cabfe408cd applied Sanders patches
arg@10ksloc.org
parents: 142
diff changeset
    38
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    39
enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
725
d99be681d502 handling WM_STATE seems to make DnD in gtk/qt apps working, well let's handle this in dwm as well
Anselm R. Garbe <arg@suckless.org>
parents: 716
diff changeset
    40
enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    41
enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
689
cbec08a54a15 implemented new color scheme accordingly to Sanders proposal
Anselm R. Garbe <arg@suckless.org>
parents: 688
diff changeset
    42
enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    43
333
827f8f6c9e97 separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents: 327
diff changeset
    44
typedef union {
189
523df4a3c1c4 using execl now, argv changed, using cmd and const char defs directly in the KEYS struct
arg@10ksloc.org
parents: 178
diff changeset
    45
	const char *cmd;
49
466591c2f967 implemented tagging a client
Anselm R. Garbe <garbeam@wmii.de>
parents: 46
diff changeset
    46
	int i;
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    47
} Arg; /* argument type */
99
a19556fe83b5 applied Sanders resize patch, fixed lower bug
arg@10ksloc.org
parents: 95
diff changeset
    48
333
827f8f6c9e97 separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents: 327
diff changeset
    49
typedef struct {
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    50
	int ascent;
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    51
	int descent;
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    52
	int height;
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    53
	XFontSet set;
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    54
	XFontStruct *xfont;
333
827f8f6c9e97 separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents: 327
diff changeset
    55
} Fnt;
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    56
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    57
typedef struct {
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    58
	int x, y, w, h;
353
8a06efe5b563 new color stuff/new rendering stuff
Anselm R. Garbe <arg@10kloc.org>
parents: 352
diff changeset
    59
	unsigned long norm[ColLast];
8a06efe5b563 new color stuff/new rendering stuff
Anselm R. Garbe <arg@10kloc.org>
parents: 352
diff changeset
    60
	unsigned long sel[ColLast];
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    61
	Drawable drawable;
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    62
	Fnt font;
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    63
	GC gc;
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    64
} DC; /* draw context */
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    65
333
827f8f6c9e97 separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents: 327
diff changeset
    66
typedef struct Client Client;
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    67
struct Client {
31
386649deb651 before leaning things up
Anselm R. Garbe <garbeam@wmii.de>
parents: 29
diff changeset
    68
	char name[256];
115
329fd7dae530 removed c->f{x,y,w,h} and c->t{x,y,w,h} in favor for the new rule handling remembering two kinds of geometries is unnecessary, removed the randomized (x,y) setting on dofloat startup, was kind too random und unpredictable
arg@10ksloc.org
parents: 114
diff changeset
    69
	int x, y, w, h;
480
680aca428830 small change to achieve Jukka's last proposal
arg@mmvi
parents: 479
diff changeset
    70
	int rx, ry, rw, rh; /* revert geometry */
20
4560e0882c1d made code more readable
Anselm R. Garbe <garbeam@wmii.de>
parents: 19
diff changeset
    71
	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
731
29c9b557ed95 implemented aspect ratio support of windows
Anselm R. Garbe <arg@suckless.org>
parents: 725
diff changeset
    72
	int minax, minay, maxax, maxay;
164
21071ae1fe68 made fullscreen apps working fine in floating mode (there is no sane way to make them work in tiled mode, thus I switch to floating mode if I run such kind of app), also fixed the xterm issue reported by Sander
arg@10ksloc.org
parents: 157
diff changeset
    73
	long flags; 
573
797e27162b43 fififif
arg@mig29
parents: 565
diff changeset
    74
	unsigned int border;
786
d9198e713310 renamed Client->versatile and Rule->versatile into Client->isversatile resp. Rule->isversatile
Anselm R. Garbe <arg@suckless.org>
parents: 785
diff changeset
    75
	Bool isbanned, isfixed, ismax, isversatile;
178
e848966a1ac6 removed TLast tag enum, now tags is simple defined as char *[] array, the rest is calculated correctly, rules take an int array for the tags
arg@10ksloc.org
parents: 173
diff changeset
    76
	Bool *tags;
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    77
	Client *next;
127
1480e19f6377 using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents: 125
diff changeset
    78
	Client *prev;
446
a2e587651c79 using a global stack for focus recovery on arrange() - seems to work great
Anselm R. Garbe <arg@10kloc.org>
parents: 431
diff changeset
    79
	Client *snext;
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    80
	Window win;
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    81
};
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    82
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    83
typedef struct {
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    84
	const char *symbol;
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    85
	void (*arrange)(void);
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    86
} Layout;
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    87
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    88
extern const char *tags[];			/* all tags */
688
39fa5308d73f removed mode label stuff
Anselm R. Garbe <arg@suckless.org>
parents: 687
diff changeset
    89
extern char stext[256];				/* status text */
524
1a9a0877650c keep master ratio on resizecol -> arrange
Anselm R. Garbe <arg@10kloc.org>
parents: 522
diff changeset
    90
extern int screen, sx, sy, sw, sh;		/* screen geometry */
565
fe766305eed1 applied Gottox' windowarea patch
arg@mig29
parents: 559
diff changeset
    91
extern int wax, way, wah, waw;			/* windowarea geometry */
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    92
extern unsigned int bh, blw;			/* bar height, bar layout label width */
650
f3b8c71a69d4 experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents: 649
diff changeset
    93
extern unsigned int master, nmaster;		/* master percent, number of master clients */
f3b8c71a69d4 experimental version which allows master clients being increased/decreased
Anselm R. Garbe <arg@suckless.org>
parents: 649
diff changeset
    94
extern unsigned int ntags, numlockmask;		/* number of tags, dynamic lock mask */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    95
extern void (*handler[LASTEvent])(XEvent *);	/* event handler */
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    96
extern Atom wmatom[WMLast], netatom[NetLast];
716
4ce65f61f01b renamed activescreen into selscreen
Anselm R. Garbe <arg@suckless.org>
parents: 714
diff changeset
    97
extern Bool running, selscreen, *seltag;	/* seltag is array of Bool */
488
0d2559f46b9e applied sanders jukka patch
arg@mmvi
parents: 487
diff changeset
    98
extern Client *clients, *sel, *stack;		/* global client list and stack */
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    99
extern Cursor cursor[CurLast];
454
ffb462fb7903 small change to comments, renamed two set* functions in client.c into update*
Anselm R. Garbe <arg@10kloc.org>
parents: 453
diff changeset
   100
extern DC dc;					/* global draw context */
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
   101
extern Display *dpy;
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
   102
extern Layout *lt;
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
   103
extern Window root, barwin;
3
e969f3575b7a several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents: 2
diff changeset
   104
5
e5018cae273f added several other stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 3
diff changeset
   105
/* client.c */
491
12395ef46d97 added configure(), but this doesn't really fix those frking broken SDL apps
arg@mmvi
parents: 488
diff changeset
   106
extern void configure(Client *c);		/* send synthetic configure event */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   107
extern void focus(Client *c);			/* focus c, c may be NULL */
775
920b51271fc8 renamed manage.c to view.c
Anselm R. Garbe <arg@suckless.org>
parents: 773
diff changeset
   108
extern void focusnext(Arg *arg);		/* focuses next visible client, arg is ignored  */
920b51271fc8 renamed manage.c to view.c
Anselm R. Garbe <arg@suckless.org>
parents: 773
diff changeset
   109
extern void focusprev(Arg *arg);		/* focuses previous visible client, arg is ignored */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   110
extern void killclient(Arg *arg);		/* kill c nicely */
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   111
extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
780
6dc7578a5107 forgot an extern declaration
Anselm R. Garbe <arg@suckless.org>
parents: 778
diff changeset
   112
extern Client *nexttiled(Client *c);		/* returns tiled successor of c */
762
140bcd4782d8 removed ugly ban(), extended resize() that it only resets the size if necessary, added border_width commit to manage()
Anselm R. Garbe <arg@suckless.org>
parents: 761
diff changeset
   113
extern void resize(Client *c, int x, int y,
777
469dc170f833 draw.c is useless (belongs to main.c now)
Anselm R. Garbe <arg@suckless.org>
parents: 776
diff changeset
   114
		int w, int h, Bool sizehints);	/* resize with given coordinates c*/
640
9cd88c168f41 changed comment of updatesizehints
arg@mig29
parents: 639
diff changeset
   115
extern void updatesizehints(Client *c);		/* update the size hint variables of c */
454
ffb462fb7903 small change to comments, renamed two set* functions in client.c into update*
Anselm R. Garbe <arg@10kloc.org>
parents: 453
diff changeset
   116
extern void updatetitle(Client *c);		/* update the name of c */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   117
extern void unmanage(Client *c);		/* destroy c */
776
be103ae46dbc renamed view.c into screen.c
Anselm R. Garbe <arg@suckless.org>
parents: 775
diff changeset
   118
extern void zoom(Arg *arg);			/* zooms the focused client to master area, arg is ignored */
13
5cc5e55a132d added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 10
diff changeset
   119
75
f08271b7cb20 rearranged several stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 74
diff changeset
   120
/* event.c */
487
be4f90c03582 applied Jukkas patch
arg@mmvi
parents: 480
diff changeset
   121
extern void grabkeys(void);			/* grab all keys defined in config.h */
18
1efa34c6e1b6 added mouse-based resizals
Anselm R. Garbe <garbeam@wmii.de>
parents: 16
diff changeset
   122
43
989178822938 changed default colors
Anselm R. Garbe <garbeam@wmii.de>
parents: 42
diff changeset
   123
/* main.c */
777
469dc170f833 draw.c is useless (belongs to main.c now)
Anselm R. Garbe <arg@suckless.org>
parents: 776
diff changeset
   124
extern void drawstatus(void);			/* draw the bar */
469dc170f833 draw.c is useless (belongs to main.c now)
Anselm R. Garbe <arg@suckless.org>
parents: 776
diff changeset
   125
extern unsigned int textw(const char *text);	/* return the width of text in px*/
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   126
extern void quit(Arg *arg);			/* quit dwm nicely */
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   127
extern void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   128
extern int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
43
989178822938 changed default colors
Anselm R. Garbe <garbeam@wmii.de>
parents: 42
diff changeset
   129
776
be103ae46dbc renamed view.c into screen.c
Anselm R. Garbe <arg@suckless.org>
parents: 775
diff changeset
   130
/* screen.c */
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
   131
extern void compileregs(void);			/* initialize regexps of rules defined in config.h */
773
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   132
extern void incnmaster(Arg *arg);		/* increments nmaster with arg's index value */
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
   133
extern void initlayouts(void);			/* initialize layout array */
773
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   134
extern Bool isvisible(Client *c);		/* returns True if client is visible */
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   135
extern void resizemaster(Arg *arg);		/* resizes the master percent with arg's index value */
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   136
extern void restack(void);			/* restores z layers of all clients */
788
a61fcdf7b4c1 replaced togglelayout with setlayout
Anselm R. Garbe <arg@suckless.org>
parents: 786
diff changeset
   137
extern void setlayout(Arg *arg);		/* sets layout, -1 toggles */
454
ffb462fb7903 small change to comments, renamed two set* functions in client.c into update*
Anselm R. Garbe <arg@10kloc.org>
parents: 453
diff changeset
   138
extern void settags(Client *c, Client *trans);	/* sets tags of c */
456
d11d739ad9df some other simplifications
Anselm R. Garbe <arg@10kloc.org>
parents: 454
diff changeset
   139
extern void tag(Arg *arg);			/* tags c with arg's index */
785
179a71394e49 renames swim[ming] into versatile
Anselm R. Garbe <arg@suckless.org>
parents: 784
diff changeset
   140
extern void toggleversatile(Arg *arg);		/* toggles focusesd client between versatile/and non-versatile state */
456
d11d739ad9df some other simplifications
Anselm R. Garbe <arg@10kloc.org>
parents: 454
diff changeset
   141
extern void toggletag(Arg *arg);		/* toggles c tags with arg's index */
773
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   142
extern void toggleview(Arg *arg);		/* toggles the tag with arg's index (in)visible */
785
179a71394e49 renames swim[ming] into versatile
Anselm R. Garbe <arg@suckless.org>
parents: 784
diff changeset
   143
extern void versatile(void);			/* arranges all windows versatile */
773
81c5237a53b8 merged tag.c, view.c and tile.c to manage.c
Anselm R. Garbe <arg@suckless.org>
parents: 772
diff changeset
   144
extern void view(Arg *arg);			/* views the tag with arg's index */
769
dc60583894e0 introduced tile.c, some refactoring of functions
Anselm R. Garbe <arg@suckless.org>
parents: 762
diff changeset
   145
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
   146
/* util.c */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
   147
extern void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
456
d11d739ad9df some other simplifications
Anselm R. Garbe <arg@10kloc.org>
parents: 454
diff changeset
   148
extern void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
d11d739ad9df some other simplifications
Anselm R. Garbe <arg@10kloc.org>
parents: 454
diff changeset
   149
extern void spawn(Arg *arg);			/* forks a new subprocess with to arg's cmd */
776
be103ae46dbc renamed view.c into screen.c
Anselm R. Garbe <arg@suckless.org>
parents: 775
diff changeset
   150