Compare commits

...

17 commits

Author SHA1 Message Date
b580d631eb config.h: update 2024-07-01 07:50:13 +09:00
6bdf768759 config.h: update rules 2024-07-01 07:50:13 +09:00
d717ea7bee dwm.c: current desktop 2024-07-01 07:50:13 +09:00
7133f6b3e9 config.h: add dwls, scratchpad 2024-07-01 07:50:13 +09:00
729133ff34 config.h: add deck layout 2024-07-01 07:50:13 +09:00
fe25e52d0b dwm.c: focus on _NET_ACTIVE_WINDOW 2024-07-01 07:50:13 +09:00
b570321c0a config.h: update 2024-07-01 07:50:13 +09:00
40476cc254 update colors, keys, float rules 2024-07-01 07:50:13 +09:00
e24b12a8bf Update keybinds 2024-07-01 07:50:13 +09:00
002db4dfed update config; switch between tile and monocle by setlayout 2024-07-01 07:50:13 +09:00
36438a32b7 config update 2024-07-01 07:50:13 +09:00
260027814f update: better adjtag 2024-07-01 07:50:13 +09:00
haz
72520fc0d6 my config 2024-07-01 07:50:13 +09:00
haz
1849f00209 patch: focusonclick 2024-07-01 07:50:13 +09:00
Pontus Stenetorp
5687f46964 Add missing void to updateclientlist definition
Caught by -pedantic implying -Wstrict-prototypes for OpenBSD's 16.0.6 Clang.
2024-06-08 18:21:00 +02:00
Hiltjo Posthuma
061e9fe9a7 bump version to 6.5 2024-03-19 12:13:16 +01:00
Hiltjo Posthuma
9f8855343c Makefile: remove the options target
The Makefile used to suppress output (by using @), so this target made sense at
the time.

But the Makefile should be simple and make debugging with less abstractions or
fancy printing.  The Makefile was made verbose and doesn't hide the build
output, so remove this target.

Prompted by a question on the mailing list about the options target.
2023-09-22 15:13:29 +02:00
5 changed files with 302 additions and 57 deletions

View file

@ -6,13 +6,7 @@ include config.mk
SRC = drw.c dwm.c util.c
OBJ = ${SRC:.c=.o}
all: options dwm
options:
@echo dwm build options:
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
all: dwm
.c.o:
${CC} -c ${CFLAGS} $<
@ -48,4 +42,4 @@ uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/dwm\
${DESTDIR}${MANPREFIX}/man1/dwm.1
.PHONY: all options clean dist install uninstall
.PHONY: all clean dist install uninstall

View file

@ -5,6 +5,7 @@ static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int focusonwheel = 0;
static const char *fonts[] = { "monospace:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";

249
config.h Normal file
View file

@ -0,0 +1,249 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int focusonwheel = 0;
static const char *fonts[] = { "monospace:size=10", "IPAGothic:size=10", "Symbola:size=10" };
static const char dmenufont[] = "monospace:size=10";
static const char col_gray1[] = "#222222";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#005577";
static const char col_black[] = "#000000";
static const char col_white[] = "#ffffff";
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = { col_gray3, col_black, col_gray2 },
[SchemeSel] = { col_gray4, col_gray2, col_gray3 },
};
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* xprop(1):
* WM_CLASS(STRING) = instance, class
* WM_NAME(STRING) = title
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
{ NULL, "float", NULL, 0, 1, -1 },
{ "Dragon-drop", NULL, NULL, ~0, 1, -1 },
{ NULL, NULL, "Event Tester", 0, 1, -1 },
{ "Minecraft 1.8.9", NULL, NULL, 0, 1, -1 },
{ "Minecraft 1.12.2", NULL, NULL, 0, 1, -1 },
{ "Minecraft* 1.20.4", NULL, NULL, 0, 1, -1 },
{ NULL, "Godot_Engine", NULL, 0, 1, -1 },
};
/* layout(s) */
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
/* custom layout declarations */
static void deck(Monitor *m);
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
{ "[D]", deck },
};
/* custom functions declarations */
static unsigned int adjtag(const Arg *arg);
static void viewadj(const Arg *arg);
static void tagadj(const Arg *arg);
static void toggletagadj(const Arg *arg);
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_black, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
#define EXEC(...) { .v = (const char*[]){ __VA_ARGS__, NULL } }
#include <X11/XF86keysym.h>
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_t, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ControlMask|ShiftMask, XK_i, incnmaster, {.i = +1 } },
{ MODKEY|ControlMask|ShiftMask, XK_u, incnmaster, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ControlMask|ShiftMask, XK_h, setmfact, {.f = -0.025} },
{ MODKEY|ControlMask|ShiftMask, XK_l, setmfact, {.f = +0.025} },
{ MODKEY, XK_z, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY|ShiftMask, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY|ShiftMask, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
/* { MODKEY, XK_comma, focusmon, {.i = -1 } }, */
/* { MODKEY, XK_period, focusmon, {.i = +1 } }, */
/* { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, */
/* { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, */
{ MODKEY, XK_comma, viewadj, {.i = -1 } },
{ MODKEY, XK_period, viewadj, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagadj, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagadj, {.i = +1 } },
{ MODKEY|ControlMask|ShiftMask, XK_comma, toggletagadj, {.i = -1 } },
{ MODKEY|ControlMask|ShiftMask, XK_period, toggletagadj, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
{ MODKEY|ControlMask|ShiftMask, XK_q, quit, {0} },
{ 0, XF86XK_AudioMute, spawn, EXEC("vol", "mute") },
{ 0, XF86XK_AudioRaiseVolume, spawn, EXEC("vol", "up") },
{ 0, XF86XK_AudioLowerVolume, spawn, EXEC("vol", "down") },
{ MODKEY, XK_i, spawn, EXEC("vol", "up") },
{ MODKEY, XK_u, spawn, EXEC("vol", "down") },
{ MODKEY, XK_m, spawn, EXEC("vol", "mute") },
{ MODKEY|ShiftMask, XK_i, spawn, EXEC("bri", "up") },
{ MODKEY|ShiftMask, XK_u, spawn, EXEC("bri", "down") },
/* { MODKEY|ControlMask, XK_space, spawn, EXEC("togglepad") }, */
{ MODKEY, XF86XK_PowerOff, spawn, EXEC("sysact") },
{ MODKEY, XK_Delete, spawn, EXEC("sysact") },
{ 0, XF86XK_PowerOff, spawn, EXEC("xset", "dpms", "force", "off") },
{ MODKEY, XK_Escape, spawn, EXEC("slock") },
{ MODKEY, XK_a, spawn, EXEC("menu_a") },
{ MODKEY, XK_x, spawn, EXEC("menu_x") },
{ MODKEY, XK_semicolon, spawn, EXEC("menu_semi") },
{ MODKEY, XK_s, spawn, EXEC("ddic") },
{ MODKEY|ShiftMask, XK_w, spawn, EXEC("web") },
{ MODKEY|ShiftMask, XK_w, view, {.ui = 1 << 8 } },
{ MODKEY, XK_g, spawn, EXEC("dgen") },
{ MODKEY, XK_apostrophe, spawn, EXEC("dsnip") },
{ MODKEY|ShiftMask, XK_apostrophe, spawn, EXEC("duni") },
{ MODKEY|ShiftMask, XK_p, spawn, EXEC("mpvc", "toggle") },
{ MODKEY|ShiftMask, XK_h, spawn, EXEC("mpvc", "backward") },
{ MODKEY|ShiftMask, XK_l, spawn, EXEC("mpvc", "forward") },
{ MODKEY, XK_Pause, spawn, EXEC("mpvc", "stop") },
{ 0, XF86XK_AudioPlay, spawn, EXEC("mpvc", "toggle") },
{ 0, XF86XK_AudioStop, spawn, EXEC("mpvc", "stop") },
{ 0, XF86XK_AudioNext, spawn, EXEC("mpvc", "next") },
{ MODKEY, XK_n, spawn, EXEC("mpvc", "next") },
{ 0, XF86XK_AudioPrev, spawn, EXEC("mpvc", "prev") },
{ MODKEY, XF86XK_Forward, spawn, EXEC("mpvc", "forward") },
{ MODKEY, XF86XK_Back, spawn, EXEC("mpvc", "backward") },
{ 0, XF86XK_Display, spawn, EXEC("ddisplaycon") },
{ MODKEY|ShiftMask, XK_Pause, spawn, EXEC("W") },
{ MODKEY, XK_9, spawn, EXEC("W", "c") },
{ MODKEY, XK_slash, spawn, EXEC("dwls") },
{ MODKEY, XK_backslash, spawn, EXEC("scratchpad") },
{ MODKEY, XK_F1, spawn, EXEC("univ-menu") },
{ MODKEY, XK_F2, spawn, EXEC("mpvc", "playlist") },
{ MODKEY, XK_F3, spawn, EXEC("dmpvc") },
{ 0, XK_Print, spawn, EXEC("sshot") },
{ MODKEY, XK_Print, spawn, EXEC("sshot", "-s") },
};
/* button definitions */
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
/* { ClkWinTitle, 0, Button1, spawn, EXEC("togglepad") }, */
};
/* custom functions */
unsigned int
adjtag(const Arg *arg)
{
unsigned int seltag = selmon->tagset[selmon->seltags];
if (arg->i > 0)
return seltag == (1 << (LENGTH(tags) - 1)) ? 1 : seltag << 1;
else
return seltag == 1 ? (1 << (LENGTH(tags) - 1)) : seltag >> 1;
}
void
viewadj(const Arg *arg)
{
view(&(const Arg){.ui = adjtag(arg)});
}
void
tagadj(const Arg *arg)
{
if (selmon->sel == NULL)
return;
tag(&(const Arg){.ui = adjtag(arg)});
}
void
toggletagadj(const Arg *arg)
{
if (selmon->sel == NULL)
return;
toggletag(&(const Arg){.ui = adjtag(arg)});
}
void
deck(Monitor *m) {
unsigned int i, n, h, mw, my;
Client *c;
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if(n == 0)
return;
if(n > m->nmaster) {
mw = m->nmaster ? m->ww * m->mfact : 0;
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n - m->nmaster);
}
else
mw = m->ww;
for(i = my = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if(i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), False);
my += HEIGHT(c);
}
else
resize(c, m->wx + mw, m->wy, m->ww - mw - (2*c->bw), m->wh - (2*c->bw), False);
}

View file

@ -1,5 +1,5 @@
# dwm version
VERSION = 6.4
VERSION = 6.5
# Customize below to fit your system

97
dwm.c
View file

@ -62,7 +62,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { SchemeNorm, SchemeSel }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
NetWMWindowTypeDialog, NetClientList, NetNumberOfDesktops, NetCurrentDesktop, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
@ -163,7 +163,6 @@ static void detachstack(Client *c);
static Monitor *dirtomon(int dir);
static void drawbar(Monitor *m);
static void drawbars(void);
static void enternotify(XEvent *e);
static void expose(XEvent *e);
static void focus(Client *c);
static void focusin(XEvent *e);
@ -182,7 +181,6 @@ static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e);
static void monocle(Monitor *m);
static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
static void pop(Client *c);
@ -202,6 +200,7 @@ static void setfocus(Client *c);
static void setfullscreen(Client *c, int fullscreen);
static void setlayout(const Arg *arg);
static void setmfact(const Arg *arg);
static void setnumbdesktops(void);
static void setup(void);
static void seturgent(Client *c, int urg);
static void showhide(Client *c);
@ -219,6 +218,7 @@ static void unmapnotify(XEvent *e);
static void updatebarpos(Monitor *m);
static void updatebars(void);
static void updateclientlist(void);
static void updatecurrenddesktop(void);
static int updategeom(void);
static void updatenumlockmask(void);
static void updatesizehints(Client *c);
@ -249,13 +249,11 @@ static void (*handler[LASTEvent]) (XEvent *) = {
[ConfigureRequest] = configurerequest,
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
[EnterNotify] = enternotify,
[Expose] = expose,
[FocusIn] = focusin,
[KeyPress] = keypress,
[MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[MotionNotify] = motionnotify,
[PropertyNotify] = propertynotify,
[UnmapNotify] = unmapnotify
};
@ -426,7 +424,8 @@ buttonpress(XEvent *e)
click = ClkRootWin;
/* focus monitor if necessary */
if ((m = wintomon(ev->window)) && m != selmon) {
if ((m = wintomon(ev->window)) && m != selmon
&& (focusonwheel || (ev->button != Button4 && ev->button != Button5))) {
unfocus(selmon->sel, 1);
selmon = m;
focus(NULL);
@ -446,8 +445,8 @@ buttonpress(XEvent *e)
else
click = ClkWinTitle;
} else if ((c = wintoclient(ev->window))) {
focus(c);
restack(selmon);
if (focusonwheel || (ev->button != Button4 && ev->button != Button5))
focus(c);
XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin;
}
@ -517,6 +516,7 @@ clientmessage(XEvent *e)
{
XClientMessageEvent *cme = &e->xclient;
Client *c = wintoclient(cme->window);
unsigned int i;
if (!c)
return;
@ -526,8 +526,14 @@ clientmessage(XEvent *e)
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
} else if (cme->message_type == netatom[NetActiveWindow]) {
if (c != selmon->sel && !c->isurgent)
seturgent(c, 1);
for (i = 0; i < LENGTH(tags) && !((1 << i) & c->tags); i++);
if (i < LENGTH(tags)) {
const Arg a = {.ui = 1 << i};
selmon = c->mon;
view(&a);
focus(c);
restack(selmon);
}
}
}
@ -642,7 +648,7 @@ createmon(void)
m->showbar = showbar;
m->topbar = topbar;
m->lt[0] = &layouts[0];
m->lt[1] = &layouts[1 % LENGTH(layouts)];
m->lt[1] = &layouts[2 % LENGTH(layouts)];
strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol);
return m;
}
@ -757,25 +763,6 @@ drawbars(void)
drawbar(m);
}
void
enternotify(XEvent *e)
{
Client *c;
Monitor *m;
XCrossingEvent *ev = &e->xcrossing;
if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
return;
c = wintoclient(ev->window);
m = c ? c->mon : wintomon(ev->window);
if (m != selmon) {
unfocus(selmon->sel, 1);
selmon = m;
} else if (!c || c == selmon->sel)
return;
focus(c);
}
void
expose(XEvent *e)
{
@ -1125,23 +1112,6 @@ monocle(Monitor *m)
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
}
void
motionnotify(XEvent *e)
{
static Monitor *mon = NULL;
Monitor *m;
XMotionEvent *ev = &e->xmotion;
if (ev->window != root)
return;
if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) {
unfocus(selmon->sel, 1);
selmon = m;
focus(NULL);
}
mon = m;
}
void
movemouse(const Arg *arg)
{
@ -1433,6 +1403,13 @@ sendmon(Client *c, Monitor *m)
arrange(NULL);
}
void
setcurrentdesktop(void){
long data[] = { 0 };
XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)data, 1);
}
void
setclientstate(Client *c, long state)
{
@ -1536,6 +1513,13 @@ setmfact(const Arg *arg)
arrange(selmon);
}
void
setnumbdesktops(void){
long data[] = { TAGMASK };
XChangeProperty(dpy, root, netatom[NetNumberOfDesktops], XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)data, 1);
}
void
setup(void)
{
@ -1579,6 +1563,9 @@ setup(void)
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
netatom[NetNumberOfDesktops] = XInternAtom(dpy, "_NET_NUMBER_OF_DESKTOPS", False);
netatom[NetCurrentDesktop] = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False);
/* init cursors */
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
@ -1602,6 +1589,10 @@ setup(void)
XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32,
PropModeReplace, (unsigned char *) netatom, NetLast);
XDeleteProperty(dpy, root, netatom[NetClientList]);
/* set EWMH NUMBER_OF_DESKTOPS */
setnumbdesktops();
/* initialize EWMH CURRENT_DESKTOP */
setcurrentdesktop();
/* select events */
wa.cursor = cursor[CurNormal]->cursor;
wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
@ -1760,6 +1751,7 @@ toggleview(const Arg *arg)
focus(NULL);
arrange(selmon);
}
updatecurrenddesktop();
}
void
@ -1851,7 +1843,7 @@ updatebarpos(Monitor *m)
}
void
updateclientlist()
updateclientlist(void)
{
Client *c;
Monitor *m;
@ -1864,6 +1856,14 @@ updateclientlist()
(unsigned char *) &(c->win), 1);
}
void
updatecurrenddesktop(void)
{
long data[] = { selmon->tagset[selmon->seltags] };
XChangeProperty(dpy, root, netatom[NetCurrentDesktop], XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)data, 1);
}
int
updategeom(void)
{
@ -2060,6 +2060,7 @@ view(const Arg *arg)
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
focus(NULL);
arrange(selmon);
updatecurrenddesktop();
}
Client *