Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update

  • Loading branch information...
commit 1768bcd1f354b2e8f7cd5df82bd4ffc5a33e7f76 1 parent 085231e
@rootednode authored
Showing with 173 additions and 157 deletions.
  1. +90 −90 bitmaps.h
  2. +37 −37 config.h
  3. +1 −1  config.mk
  4. +44 −28 cthuluwm.c
  5. +1 −1  layouts/nbstack.c
View
180 bitmaps.h
@@ -167,98 +167,98 @@ Bitmap bitmaps[] = {
*/
- int bitmap_ntile[15][15] = { {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
- {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,} };
+ int bitmap_ntile[15][23] = { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,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,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,1,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,},
- {1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,} };
+ int bitmap_bstackh[15][23] = { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,},
+ {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,},
+ {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1} };
View
74 config.h
@@ -5,6 +5,7 @@ static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-
static const char normbordercolor[] = "#262626";
static const char normbgcolor[] = "#161616";
static const char normfgcolor[] = "#9d9d9d";
+
static const char selbordercolor[] = "#44ddff";
static const char selbgcolor[] = "#262626";
static const char selfgcolor[] = "#44ddff";
@@ -14,6 +15,8 @@ static const char alertbgcolor[] = "#161616";
static const char alertfgcolor[] = "#ff6600";
+static const char testcolor[] = "#ff6600";
+
static const char* colors[][ColLast] = {
/* border foreground background use */
{ normbordercolor, normfgcolor, normbgcolor }, /* normal */
@@ -35,16 +38,11 @@ static const Bool topbar = True; /* False means bottom bar */
static const Bool monobar = True; /* Draw selected window title not inverse */
static const Bool barline = False;/* Draw a single line below the statusbar */
static const int nmaster = 1; /* default number of clients in the master area */
-
-
static const Bool systray_enable = True; /* Provide a Systray */
static const int systray_spacing = 2; /* Pixel between Systray Symbols */
-
static const int margin_bottom = 0;
-
static const Bool autostart = True;
-
-static const Bool mousefocus = True;
+static const Bool mousefocus = True;
#include "bitmaps.h"
@@ -56,30 +54,31 @@ char sstrings[][30] = {
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor opacity panel scratchpad */
- { "DWM-TAG1", NULL, NULL, 1 << 0, False, -1, -1, False, False },
- { "DWM-TAG2", NULL, NULL, 1 << 1, False, -1, -1, False, False },
- { "DWM-TAG3", NULL, NULL, 1 << 2, False, -1, -1, False, False },
- { "DWM-TAG4", NULL, NULL, 1 << 3, False, -1, -1, False, False },
- { "DWM-TAG5", NULL, NULL, 1 << 4, False, -1, -1, False, False },
- { "DWM-TAG6", NULL, NULL, 1 << 5, False, -1, -1, False, False },
- { "DWM-TAG7", NULL, NULL, 1 << 6, False, -1, -1, False, False },
- { "DWM-TAG8", NULL, NULL, 1 << 7, False, -1, -1, False, False },
- { "DWM-TAG9", NULL, NULL, 1 << 8, False, -1, -1, False, False },
-
- { "Gimp", NULL, NULL, 0, True, -1, -1, False, False },
- { "URxvt", NULL, NULL, 0, False, -1, -1, False, False }, /* opacity between 0 and 1 overrides default maximum */
-
- { "Geany", NULL, NULL, 1 << 2, False, -1, -1, False, False },
- { "Firefox", NULL, NULL, 1 << 3, False, -1, -1, False, False },
- { "Thunderbird", NULL, NULL, 1 << 4, False, -1, -1, False, False },
- { "Pidgin", NULL, NULL, 1 << 5, True, -1, -1, False, False },
- { "VirtualBox", NULL, NULL, 1 << 6, False, -1, -1, False, False },
- { "gnome-alsamixer",NULL, NULL, 0, True, -1, -1, False, False },
- { "wicd-client.py" ,NULL, NULL, 0, True, -1, -1, False, False },
-
- { NULL, "dwm-scratchpad", NULL, ~0, True, -1, 0.8, False, 1 } /* multiple scratchpads are possible, just number them */
+ { "DWM-TAG1", NULL, NULL, 1 << 0, False, -1, -1, False, False },
+ { "DWM-TAG2", NULL, NULL, 1 << 1, False, -1, -1, False, False },
+ { "DWM-TAG3", NULL, NULL, 1 << 2, False, -1, -1, False, False },
+ { "DWM-TAG4", NULL, NULL, 1 << 3, False, -1, -1, False, False },
+ { "DWM-TAG5", NULL, NULL, 1 << 4, False, -1, -1, False, False },
+ { "DWM-TAG6", NULL, NULL, 1 << 5, False, -1, -1, False, False },
+ { "DWM-TAG7", NULL, NULL, 1 << 6, False, -1, -1, False, False },
+ { "DWM-TAG8", NULL, NULL, 1 << 7, False, -1, -1, False, False },
+ { "DWM-TAG9", NULL, NULL, 1 << 8, False, -1, -1, False, False },
+
+ { "Gimp", NULL, NULL, 0, True, -1, -1, False, False },
+ { "URxvt", NULL, NULL, 0, False, -1, -1, False, False }, /* opacity between 0 and 1 overrides default maximum */
+
+ { "Geany", NULL, NULL, 1 << 2, False, -1, -1, False, False },
+ { "Firefox", NULL, NULL, 1 << 3, False, -1, -1, False, False },
+ { "Thunderbird", NULL, NULL, 1 << 4, False, -1, -1, False, False },
+ { "Pidgin", NULL, NULL, 1 << 5, True, -1, -1, False, False },
+ { "VirtualBox", NULL, NULL, 1 << 6, False, -1, -1, False, False },
+ { "gnome-alsamixer", NULL, NULL, 0, True, -1, -1, False, False },
+ { "wicd-client.py", NULL, NULL, 0, True, -1, -1, False, False },
+
+ { NULL, "dwm-scratchpad", NULL, ~0, True, -1, 0.8, False, 1 } /* multiple scratchpads are possible, just number them */
};
+
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
@@ -94,13 +93,13 @@ static const float attachmode = AttAsFirst; /* Attach Mode */
static const Layout layouts[] = {
/* symbol gap? arrange */
- { "a", True, ntile }, /* Tiled (first entry is default) */ //problem
+ { "a", False, ntile }, /* Tiled (first entry is default) */ //problem
{ "b", False, NULL }, /* Floating */
{ "c", False, monocle }, /* Monocle */ // problem
- { "d", True, nbstack }, /* Bottom Stack */ // problem
- { "e", True, grid }, /* Regular Grid */
- { "f", True, bstackhoriz }, /* Bottom Stack with horizontal Stack */
- //{ NULL, True, NULL }, /* End of layouts is null */
+ { "d", False, nbstack }, /* Bottom Stack */ // problem
+ { "e", False, grid }, /* Regular Grid */
+ { "f", False, bstackhoriz }, /* Bottom Stack with horizontal Stack */
+ { NULL, True, NULL }, /* End of layouts is null */
};
/* tagging */
@@ -184,12 +183,13 @@ static Key keys[] = {
/* -- b,h,l; C-q,m,1,a,w */
/* stack */
- { MODKEY, XK_j, focusstack, {.i = +1 } },
- { MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_Page_Up, togglemax, {0} },
- { MODKEY|ControlMask, XK_j, pushdown, {0} },
- { MODKEY|ControlMask, XK_k, pushup, {0} },
+
+ { MODKEY, XK_Left, focusstack, {.i = +1 } },
+ { MODKEY, XK_Right, focusstack, {.i = -1 } },
+ { MODKEY|ControlMask, XK_Left, pushdown, {0} },
+ { MODKEY|ControlMask, XK_Right, pushup, {0} },
/* -- j,k,RET,PGUP; C-j,k */
/* tab */
View
2  config.mk
@@ -21,7 +21,7 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -g -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
#LDFLAGS = -g ${LIBS}
LDFLAGS = -s ${LIBS}
View
72 cthuluwm.c
@@ -139,7 +139,7 @@ typedef struct {
struct Monitor {
- char ltsymbol[16];
+ char ltsymbol[32];
float mfact;
int num;
int by; /* bar geometry */
@@ -238,7 +238,7 @@ static void drawbar(Monitor *m);
static void drawbars(void);
static void drawsquare(Bool filled, Bool empty, Bool invert, unsigned long col[ColLast]);
static void drawtext(const char *text, unsigned long col[ColLast], Bool invert, Bool pad);
-static void drawsymbol(const char *text, unsigned long col[ColLast], Bool invert, Bool pad, int drawbitmap[15][15] );
+static void drawsymbol(const char *text, unsigned long col[ColLast], Bool invert, Bool pad, int drawbitmap[15][23] );
static void drawvline(unsigned long col[ColLast]);
static void drawhline(unsigned long col[ColLast], Monitor *m);
static void drawbox(int x, int y, int w, int h, unsigned long col);
@@ -334,7 +334,7 @@ static void nextlayout(const Arg *arg);
/* variables */
static const char broken[] = "broken";
-static char stext[512];
+static char stext[1024];
static int screen;
static int sw, sh; /* X display screen geometry width, height */
static int bh, blw = 0; /* bar geometry */
@@ -1006,29 +1006,33 @@ drawbar(Monitor *m) {
for(i = 0; i < LENGTH(tags); i++) {
dc.w = TEXTW(tags[i].name);
col = m->tagset[m->seltags] & 1 << i ? dc.sel : dc.norm;
+
+ /* draw tags */
drawtext(tags[i].name, col, urg & 1 << i, True);
drawsquare(m == selmon && (selmon->sel && !selmon->sel->ispanel && !selmon->sel->isscratch) && selmon->sel->tags & 1 << i, occ & 1 << i, urg & 1 << i, col);
dc.x += dc.w;
}
- dc.w = blw = TEXTW(m->ltsymbol);
+
+ /* get width of ltsymbol text */
+ //dc.w = blw = TEXTW(m->ltsymbol);
/* draw the arrangment type used on this tag */
- drawtext(m->ltsymbol, dc.alert, False, True);
- dc.x += dc.w;
+ //drawtext(m->ltsymbol, dc.alert, False, True);
+ //dc.x += dc.w;
/* draw symbol based on tag type */
- if( strcmp(m->ltsymbol, "1") == 0)
+ if( strcmp(m->ltsymbol, "a") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_ntile);
- if( strcmp(m->ltsymbol, "2") == 0)
+ if( strcmp(m->ltsymbol, "b") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_float);
- if( strcmp(m->ltsymbol, "3") == 0)
+ if( strcmp(m->ltsymbol, "c") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_monocle);
- if( strcmp(m->ltsymbol, "4") == 0)
+ if( strcmp(m->ltsymbol, "d") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_nbstack);
- if( strcmp(m->ltsymbol, "5") == 0)
+ if( strcmp(m->ltsymbol, "e") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_grid);
- if( strcmp(m->ltsymbol, "6") == 0)
+ if( strcmp(m->ltsymbol, "f") == 0)
drawsymbol(m->ltsymbol, dc.alert, False, True, bitmap_bstackh);
@@ -1045,10 +1049,10 @@ drawbar(Monitor *m) {
s = a;
if(!s && a)
s = a;
- snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a);
- dc.w= TEXTW(posbuf);
- drawtext(posbuf, dc.norm, False, True);
- x= dc.x + dc.w;
+ //snprintf(posbuf, LENGTH(posbuf), "[%d/%d]", s, a);
+ //dc.w= TEXTW(posbuf);
+ //drawtext(posbuf, dc.norm, False, True);
+ //x= dc.x + dc.w;
}
dc.w = coloredtextw(stext);
@@ -1058,6 +1062,8 @@ drawbar(Monitor *m) {
dc.w = m->ww - x;
}
m->titlebarend=dc.x;
+
+ /* draw status text on active monitor */
drawcoloredtext(m, stext);
}
else {
@@ -1073,9 +1079,6 @@ drawbar(Monitor *m) {
dc.x = x;
-
-
-
/* Show all clients in taskbar */
if(n > 0) {
mw = dc.w / n;
@@ -1166,6 +1169,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert, Bool pad) {
XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]);
XFillRectangle(dpy, dc.drawable, dc.gc, dc.x, dc.y, dc.w, dc.h);
+
if(!text)
return;
olen = strlen(text);
@@ -1173,14 +1177,18 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert, Bool pad) {
ph = pad ? h : 0;
y = dc.y + (dc.h / 2) - (h / 2) + dc.font.ascent;
x = dc.x + (ph / 2);
+
/* shorten text if necessary */
for(len = MIN(olen, sizeof buf); len && textnw(text, len) > dc.w - ph; len--);
if(!len)
return;
+
memcpy(buf, text, len);
+
if(len < olen)
for(i = len; i && i > len - 3; buf[--i] = '.');
XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
+
if(dc.font.set)
XmbDrawString(dpy, dc.drawable, dc.font.set, dc.gc, x, y, buf, len);
else
@@ -1188,7 +1196,7 @@ drawtext(const char *text, unsigned long col[ColLast], Bool invert, Bool pad) {
}
void
-drawsymbol(const char *text, unsigned long col[ColLast], Bool invert, Bool pad, int drawbitmap[15][15] ) {
+drawsymbol(const char *text, unsigned long col[ColLast], Bool invert, Bool pad, int drawbitmap[15][23] ) {
XSetForeground(dpy, dc.gc, col[invert ? ColFG : ColBG]);
@@ -1196,16 +1204,15 @@ drawsymbol(const char *text, unsigned long col[ColLast], Bool invert, Bool pad,
XSetForeground(dpy, dc.gc, col[invert ? ColBG : ColFG]);
/* will draw icon from bitmap */
-
int ix;
int iy;
for(iy = 0; iy < 15; iy++)
{
- for(ix = 0; ix < 15; ix++)
+ for(ix = 0; ix < 23; ix++)
{
if(drawbitmap[iy][ix] == 1)
- XDrawPoint(dpy, dc.drawable, dc.gc, dc.x + ix, dc.y + iy + 1);
+ XDrawPoint(dpy, dc.drawable, dc.gc, dc.x + ix, dc.y + iy);
}
}
@@ -1331,6 +1338,8 @@ drawcoloredtext(Monitor *m, char *text) {
for(i=0; i<ColLast; i++)
col[i]=barcolors[i];
+
+
while( *ptr || rptr ) {
for( i = 0; *ptr && ( *ptr!='^' || ptr[1]!='[' ); i++, ptr++ );
if( !*ptr && !rptr ) break;
@@ -1347,10 +1356,12 @@ drawcoloredtext(Monitor *m, char *text) {
} else if( first ) {
ox = dc.x += textnw(&c,1);
}
+
if( !*ptr ) {
buf = ptr = rptr;
rptr = 0;
}
+
if(*ptr=='^' && ptr[1]=='[') {
ptr+=2;
for( i = 0; ptr[i] && ( ptr[i]!=';' ); i++ );
@@ -1995,8 +2006,9 @@ monocle(Monitor *m) {
for(c = m->clients; c; c = c->next)
if(ISVISIBLE(c))
n++;
- if(n > 0) /* override layout symbol */
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
+ //if(n > 0) /* override layout symbol */
+ // snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
+
for(c = nexttiled(m->clients); c; c = nexttiled(c->next))
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, False);
}
@@ -2377,6 +2389,7 @@ setup(void) {
sh = DisplayHeight(dpy, screen);
bh = dc.h = dc.font.height + 3;
updategeom();
+
/* init atoms */
wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
@@ -2389,10 +2402,12 @@ setup(void) {
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
netatom[NetSystemTray] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_S0", False);
+
/* init cursors */
cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
cursor[CurMove] = XCreateFontCursor(dpy, XC_fleur);
+
/* init appearance */
barcolors = malloc(LENGTH(colors)*sizeof(unsigned long)*ColLast);
for(i=0; i<LENGTH(colors); i++) {
@@ -2592,7 +2607,7 @@ int systray_get_width(void) {
if(!systray_enable) return 0;
for(i = trayicons; i; i = i->next)
- w += i->geo.width + systray_spacing + 1;
+ w += i->geo.width + systray_spacing;
return w;
}
@@ -2712,7 +2727,7 @@ ntile(Monitor *m) {
unsigned int i, n;
Client *c;
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "=%d]", m->nmasters[m->curtag]);
+ //snprintf(m->ltsymbol, sizeof m->ltsymbol, "=%d]", m->nmasters[m->curtag]);
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
c = nexttiled(m->clients);
nmax = m->nmasters[m->curtag];
@@ -3060,7 +3075,7 @@ updatetitle(Client *c) {
void
updatestatus(void) {
if(!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
- strcpy(stext, "dwm-"VERSION);
+ strcpy(stext, "cthuluwm");
drawbar(selmon);
}
@@ -3177,6 +3192,7 @@ xerrordummy(Display *dpy, XErrorEvent *ee) {
* is already running. */
int
xerrorstart(Display *dpy, XErrorEvent *ee) {
+ printf("testtesttest\n");
die("dwm: another window manager is already running\n");
return -1;
}
View
2  layouts/nbstack.c
@@ -5,7 +5,7 @@ nbstack(Monitor *m) {
Client *c;
/* override layout symbol */
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "T%dT", m->nmasters[m->curtag]);
+ //snprintf(m->ltsymbol, sizeof m->ltsymbol, "T%dT", m->nmasters[m->curtag]);
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
c = nexttiled(m->clients);
nmax = m->nmasters[m->curtag];
Please sign in to comment.
Something went wrong with that request. Please try again.