dwm.h
author Anselm R. Garbe <arg@suckless.org>
Wed, 16 May 2007 22:05:02 +0200
changeset 889 00f4180df72b
parent 878 d2ae55f83f9f
child 895 b461240ba625
permissions -rw-r--r--
no that change breaks fullscreen apps
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
858
b797071ebbd4 yet another fix of copyright compactisition
Anselm R. Garbe <arg@suckless.org>
parents: 849
diff changeset
     1
/* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
b797071ebbd4 yet another fix of copyright compactisition
Anselm R. Garbe <arg@suckless.org>
parents: 849
diff changeset
     2
 * © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
     3
 * 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
     4
 *
e97ad13f04dc added a general comment to dwm.h how dwm is basically organized
Anselm R. Garbe <arg@10kloc.org>
parents: 456
diff changeset
     5
 * 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
     6
 * 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
     7
 * manager selects for SubstructureRedirectMask on the root window, to receive
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
     8
 * 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
     9
 * 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
    10
 *
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    11
 * 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
    12
 * 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
    13
 * 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
    14
 * 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
    15
 * 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
    16
 * 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
    17
 *
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
    18
 * 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
    19
 * 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
    20
 * 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
    21
 * 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
    22
 * 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
    23
 * 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
    24
 * 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
    25
 *
459
3c3f429dca99 made introduction comment in dwm.h shorter
Anselm R. Garbe <arg@10kloc.org>
parents: 457
diff changeset
    26
 * 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
    27
 * 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
    28
 * 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
    29
 * 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
    30
 *
468
210a99f18657 some simplifications to intro in dwm.h
arg@mmvi
parents: 460
diff changeset
    31
 * To understand everything else, start reading main.c:main().
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    32
 */
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    33
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
    34
#include "config.h"
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    35
#include <X11/Xlib.h>
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
    36
143
36cabfe408cd applied Sanders patches
arg@10ksloc.org
parents: 142
diff changeset
    37
/* 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
    38
#define BUTTONMASK		(ButtonPressMask | ButtonReleaseMask)
143
36cabfe408cd applied Sanders patches
arg@10ksloc.org
parents: 142
diff changeset
    39
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
    40
enum { BarTop, BarBot, BarOff };			/* bar position */
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
    41
enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
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
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
    44
enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
452
026aba558fdf added some comments
Anselm R. Garbe <arg@10kloc.org>
parents: 446
diff changeset
    45
333
827f8f6c9e97 separated setup stuff into main.c:setup() - this makes main() more readable
Anselm R. Garbe <arg@10kloc.org>
parents: 327
diff changeset
    46
typedef struct Client Client;
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    47
struct Client {
31
386649deb651 before leaning things up
Anselm R. Garbe <garbeam@wmii.de>
parents: 29
diff changeset
    48
	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
    49
	int x, y, w, h;
480
680aca428830 small change to achieve Jukka's last proposal
arg@mmvi
parents: 479
diff changeset
    50
	int rx, ry, rw, rh; /* revert geometry */
20
4560e0882c1d made code more readable
Anselm R. Garbe <garbeam@wmii.de>
parents: 19
diff changeset
    51
	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
849
4f1ff9e068d3 some changes to updatesizehints, I don't change the aspect ratio algorithm now - I can't think, it is a mess
Anselm R. Garbe <arg@suckless.org>
parents: 848
diff changeset
    52
	int minax, maxax, minay, 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
    53
	long flags; 
865
018c38468422 fixed the border issue for mplayer, ff is definately broken when using F11 (fullscreen mode)
Anselm R. Garbe <arg@suckless.org>
parents: 858
diff changeset
    54
	unsigned int border, oldborder;
837
123231b9eb87 renamed untiled into floating, keeping tiled instead of tiling (afaik tiled sounds more correct) - English speakers convinced me
Anselm R. Garbe <arg@suckless.org>
parents: 835
diff changeset
    55
	Bool isbanned, isfixed, ismax, isfloating;
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
    56
	Bool *tags;
84
052fe7498930 ordered variables in structs and source files alphabetically
Anselm R. Garbe <garbeam@wmii.de>
parents: 80
diff changeset
    57
	Client *next;
127
1480e19f6377 using double-linked list in order to get correct prev focus handling
arg@10ksloc.org
parents: 125
diff changeset
    58
	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
    59
	Client *snext;
0
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    60
	Window win;
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    61
};
491f34c11291 initial import
Anselm R. Garbe <garbeam@wmii.de>
parents:
diff changeset
    62
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    63
typedef struct {
835
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    64
	int x, y, w, h;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    65
	unsigned long norm[ColLast];
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    66
	unsigned long sel[ColLast];
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    67
	Drawable drawable;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    68
	GC gc;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    69
	struct {
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    70
		int ascent;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    71
		int descent;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    72
		int height;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    73
		XFontSet set;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    74
		XFontStruct *xfont;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    75
	} font;
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    76
} DC; /* draw context */
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    77
93ecc09cd1ad made Fnt an anonymous inner struct
Anselm R. Garbe <arg@suckless.org>
parents: 834
diff changeset
    78
typedef struct {
782
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    79
	const char *symbol;
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    80
	void (*arrange)(void);
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    81
} Layout;
92862ab407d5 introduced Layout struct
Anselm R. Garbe <arg@suckless.org>
parents: 780
diff changeset
    82
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    83
extern const char *tags[];		/* all tags */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    84
char stext[256];			/* status text */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    85
int screen, sx, sy, sw, sh;		/* screen geometry */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    86
int wax, way, wah, waw;			/* windowarea geometry */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
    87
unsigned int bh, blw, bpos;		/* bar height, bar layout label width, bar position */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    88
unsigned int ntags, numlockmask;	/* number of tags, dynamic lock mask */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    89
void (*handler[LASTEvent])(XEvent *);	/* event handler */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    90
Atom wmatom[WMLast], netatom[NetLast];
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    91
Bool selscreen, *seltag;		/* seltag is array of Bool */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    92
Client *clients, *sel, *stack;		/* global client list and stack */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    93
Cursor cursor[CurLast];
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    94
DC dc;					/* global draw context */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    95
Display *dpy;
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    96
Layout *lt;
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
    97
Window root, barwin;
3
e969f3575b7a several new changes, made gridmenu working
Anselm R. Garbe <garbeam@wmii.de>
parents: 2
diff changeset
    98
5
e5018cae273f added several other stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 3
diff changeset
    99
/* client.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   100
void attach(Client *c);			/* attaches c to global client list */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   101
void configure(Client *c);		/* send synthetic configure event */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   102
void detach(Client *c);			/* detaches c from global client list */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   103
void focus(Client *c);			/* focus c, c may be NULL */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   104
void focustopvisible(void);		/* focus top visible window on stack */
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   105
void killclient(const char *arg);	/* kill sel  nicely */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   106
void manage(Window w, XWindowAttributes *wa);	/* manage new client */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   107
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
   108
		int w, int h, Bool sizehints);	/* resize with given coordinates c*/
875
73cd10af065a applied dfenze cleanups, fixed some comments in dwm.h
Anselm R. Garbe <arg@suckless.org>
parents: 865
diff changeset
   109
void togglefloating(const char *arg);	/* toggles sel between floating/tiled state */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   110
void updatesizehints(Client *c);	/* update the size hint variables of c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   111
void updatetitle(Client *c);		/* update the name of c */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   112
void unmanage(Client *c);		/* destroy c */
13
5cc5e55a132d added protocol killing stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 10
diff changeset
   113
793
79cb72e82b21 added draw.c again (except getcolor and setfont which are helpers in main.c)
Anselm R. Garbe <arg@suckless.org>
parents: 792
diff changeset
   114
/* draw.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   115
void drawstatus(void);			/* draw the bar */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   116
void drawtext(const char *text, unsigned long col[ColLast]);	/* draw text */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   117
unsigned int textw(const char *text);	/* return the width of text in px*/
793
79cb72e82b21 added draw.c again (except getcolor and setfont which are helpers in main.c)
Anselm R. Garbe <arg@suckless.org>
parents: 792
diff changeset
   118
75
f08271b7cb20 rearranged several stuff
Anselm R. Garbe <garbeam@wmii.de>
parents: 74
diff changeset
   119
/* event.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   120
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
   121
790
48e7c3b45250 split screen.c into layout.c and tag.c (because the view is an implicit mixture of both)
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
   122
/* layout.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   123
void floating(void);			/* arranges all windows floating */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   124
void focusclient(const char *arg);	/* focuses next(1)/previous(-1) visible client */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   125
void incmasterw(const char *arg);	/* increments the master width with arg's index value */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   126
void incnmaster(const char *arg);	/* increments nmaster with arg's index value */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   127
void initlayouts(void);			/* initialize layout array */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   128
Client *nexttiled(Client *c);		/* returns tiled successor of c */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   129
void restack(void);			/* restores z layers of all clients */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   130
void setlayout(const char *arg);	/* sets layout, -1 toggles */
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   131
void togglebar(const char *arg);	/* shows/hides the bar */
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   132
void togglemax(const char *arg);	/* toggles maximization of floating client */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   133
void zoom(const char *arg);		/* zooms the focused client to master area, arg is ignored */
790
48e7c3b45250 split screen.c into layout.c and tag.c (because the view is an implicit mixture of both)
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
   134
43
989178822938 changed default colors
Anselm R. Garbe <garbeam@wmii.de>
parents: 42
diff changeset
   135
/* main.c */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   136
void updatebarpos(void);		/* updates the bar position */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   137
void quit(const char *arg);		/* quit dwm nicely */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   138
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
   139
790
48e7c3b45250 split screen.c into layout.c and tag.c (because the view is an implicit mixture of both)
Anselm R. Garbe <arg@suckless.org>
parents: 788
diff changeset
   140
/* tag.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   141
void compileregs(void);			/* initialize regexps of rules defined in config.h */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   142
Bool isvisible(Client *c);		/* returns True if client is visible */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   143
void settags(Client *c, Client *trans);	/* sets tags of c */
875
73cd10af065a applied dfenze cleanups, fixed some comments in dwm.h
Anselm R. Garbe <arg@suckless.org>
parents: 865
diff changeset
   144
void tag(const char *arg);		/* tags sel with arg's index */
878
d2ae55f83f9f made bar togglalble
Anselm R. Garbe <arg@suckless.org>
parents: 875
diff changeset
   145
void toggletag(const char *arg);	/* toggles sel tags with arg's index */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   146
void toggleview(const char *arg);	/* toggles the tag with arg's index (in)visible */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   147
void view(const char *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
   148
32
082c75b937b5 removed unnecessary crap
Anselm R. Garbe <garbeam@wmii.de>
parents: 31
diff changeset
   149
/* util.c */
843
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   150
void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   151
void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
e1fb60cca902 removed superfluous externs (except for tags, because tags is defined in the source)
Anselm R. Garbe <arg@suckless.org>
parents: 837
diff changeset
   152
void spawn(const char *arg);		/* forks a new subprocess with arg's cmd */