made Xinerama screen index customizable
e3838e85
2 file(s) · +12 −8
| 8 | 8 | #define SELBORDERCOLOR "#0066ff" |
|
| 9 | 9 | #define SELBGCOLOR "#0066ff" |
|
| 10 | 10 | #define SELFGCOLOR "#ffffff" |
|
| 11 | - | static uint borderpx = 1; /* border pixel of windows */ |
|
| 12 | - | static uint snap = 32; /* snap pixel */ |
|
| 13 | - | static Bool showbar = True; /* False means no bar */ |
|
| 14 | - | static Bool topbar = True; /* False means bottom bar */ |
|
| 11 | + | static uint borderpx = 1; /* border pixel of windows */ |
|
| 12 | + | static uint snap = 32; /* snap pixel */ |
|
| 13 | + | static Bool showbar = True; /* False means no bar */ |
|
| 14 | + | static Bool topbar = True; /* False means bottom bar */ |
|
| 15 | + | ||
| 16 | + | #ifdef XINERAMA |
|
| 17 | + | static uint xidx = 0; /* Xinerama screen index to use */ |
|
| 18 | + | #endif |
|
| 15 | 19 | ||
| 16 | 20 | /* tagging */ |
|
| 17 | 21 | static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; |
| 1554 | 1554 | /* window area geometry */ |
|
| 1555 | 1555 | if(XineramaIsActive(dpy)) { |
|
| 1556 | 1556 | info = XineramaQueryScreens(dpy, &i); |
|
| 1557 | - | wx = info[0].x_org; |
|
| 1558 | - | wy = showbar && topbar ? info[0].y_org + bh : info[0].y_org; |
|
| 1559 | - | ww = info[0].width; |
|
| 1560 | - | wh = showbar ? info[0].height - bh : info[0].height; |
|
| 1557 | + | wx = info[xidx].x_org; |
|
| 1558 | + | wy = showbar && topbar ? info[xidx].y_org + bh : info[xidx].y_org; |
|
| 1559 | + | ww = info[xidx].width; |
|
| 1560 | + | wh = showbar ? info[xidx].height - bh : info[xidx].height; |
|
| 1561 | 1561 | XFree(info); |
|
| 1562 | 1562 | } |
|
| 1563 | 1563 | else |