diff options
Diffstat (limited to '')
| -rw-r--r-- | config.mk | 11 | ||||
| -rw-r--r-- | dwm.1 | 3 | ||||
| -rw-r--r-- | dwm.c | 39 |
3 files changed, 37 insertions, 16 deletions
| @@ -10,14 +10,19 @@ MANPREFIX = ${PREFIX}/share/man | |||
| 10 | X11INC = /usr/X11R6/include | 10 | X11INC = /usr/X11R6/include |
| 11 | X11LIB = /usr/X11R6/lib | 11 | X11LIB = /usr/X11R6/lib |
| 12 | 12 | ||
| 13 | # Xinerama, uncomment if you don't want it | ||
| 14 | XINERAMALIBS = -L${X11LIB} -lXinerama | ||
| 15 | XINERAMAFLAGS = -DXINERAMA | ||
| 16 | |||
| 13 | # includes and libs | 17 | # includes and libs |
| 14 | INCS = -I. -I/usr/include -I${X11INC} | 18 | INCS = -I. -I/usr/include -I${X11INC} |
| 15 | LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 | 19 | LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS} |
| 16 | 20 | ||
| 17 | # flags | 21 | # flags |
| 18 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" | 22 | CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} |
| 23 | CFLAGS = -Os ${INCS} ${CPPFLAGS} | ||
| 19 | LDFLAGS = -s ${LIBS} | 24 | LDFLAGS = -s ${LIBS} |
| 20 | #CFLAGS = -g -std=c99 -pedantic -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" | 25 | #CFLAGS = -g -std=c99 -pedantic -Wall -O2 ${INCS} ${CPPFLAGS} |
| 21 | #LDFLAGS = -g ${LIBS} | 26 | #LDFLAGS = -g ${LIBS} |
| 22 | 27 | ||
| 23 | # Solaris | 28 | # Solaris |
| @@ -57,6 +57,9 @@ click on a tag label adds/removes that tag to/from the focused window. | |||
| 57 | Start | 57 | Start |
| 58 | .BR xterm. | 58 | .BR xterm. |
| 59 | .TP | 59 | .TP |
| 60 | .B Mod1\-b | ||
| 61 | Toggles bar on and off. | ||
| 62 | .TP | ||
| 60 | .B Mod1\-space | 63 | .B Mod1\-space |
| 61 | Toggles between layouts. | 64 | Toggles between layouts. |
| 62 | .TP | 65 | .TP |
| @@ -39,6 +39,9 @@ | |||
| 39 | #include <X11/Xlib.h> | 39 | #include <X11/Xlib.h> |
| 40 | #include <X11/Xproto.h> | 40 | #include <X11/Xproto.h> |
| 41 | #include <X11/Xutil.h> | 41 | #include <X11/Xutil.h> |
| 42 | #ifdef XINERAMA | ||
| 43 | #include <X11/extensions/Xinerama.h> | ||
| 44 | #endif | ||
| 42 | 45 | ||
| 43 | /* macros */ | 46 | /* macros */ |
| 44 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) | 47 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) |
| @@ -1579,22 +1582,32 @@ updatebar(void) { | |||
| 1579 | 1582 | ||
| 1580 | void | 1583 | void |
| 1581 | updategeom(void) { | 1584 | updategeom(void) { |
| 1582 | unsigned int i; | 1585 | int i; |
| 1583 | 1586 | #ifdef XINERAMA | |
| 1584 | #ifdef CUSTOMGEOM /* define your own if you are Xinerama user */ | 1587 | XineramaScreenInfo *info = NULL; |
| 1585 | CUSTOMGEOM | ||
| 1586 | #else | ||
| 1587 | /* bar geometry*/ | ||
| 1588 | bx = 0; | ||
| 1589 | by = showbar ? (topbar ? 0 : sh - bh) : -bh; | ||
| 1590 | bw = sw; | ||
| 1591 | 1588 | ||
| 1592 | /* window area geometry */ | 1589 | /* window area geometry */ |
| 1593 | wx = sx; | 1590 | if(XineramaIsActive(dpy)) { |
| 1594 | wy = showbar && topbar ? sy + bh : sy; | 1591 | info = XineramaQueryScreens(dpy, &i); |
| 1595 | ww = sw; | 1592 | wx = info[0].x_org; |
| 1596 | wh = showbar ? sh - bh : sh; | 1593 | wy = showbar && topbar ? info[0].y_org + info[0].height + bh : info[0].y_org; |
| 1594 | ww = info[0].width; | ||
| 1595 | wh = showbar ? info[0].height - bh : info[0].height; | ||
| 1596 | XFree(info); | ||
| 1597 | } | ||
| 1598 | else | ||
| 1597 | #endif | 1599 | #endif |
| 1600 | { | ||
| 1601 | wx = sx; | ||
| 1602 | wy = showbar && topbar ? sy + bh : sy; | ||
| 1603 | ww = sw; | ||
| 1604 | wh = showbar ? sh - bh : sh; | ||
| 1605 | } | ||
| 1606 | |||
| 1607 | /* bar geometry*/ | ||
| 1608 | bx = wx; | ||
| 1609 | by = showbar ? (topbar ? 0 : wy + wh) : -bh; | ||
| 1610 | bw = ww; | ||
| 1598 | 1611 | ||
| 1599 | /* update layout geometries */ | 1612 | /* update layout geometries */ |
| 1600 | for(i = 0; i < LENGTH(layouts); i++) | 1613 | for(i = 0; i < LENGTH(layouts); i++) |
