myvxwm

[fork] my vxwm config (optimised for my T480)
git clone https://git.lukeonline.net/repos/myvxwm
Log | Files | Refs | README | LICENSE

commit c5f2420f812f69437971dee6ecdf0027f342ddbf
parent 7f81c2f231499f6aae6e5baede8bb0d7c45e7549
Author: wh1tepearl <wh1tepearl@gmail.com>
Date:   Sat, 31 Jan 2026 22:25:51 +0000

Add occuped tags decorations support and updated readme

Diffstat:
M.gitignore | 3---
MREADME.md | 17+++++++++++++++--
Mconfig.def.h | 4++++
Mmodules.def.h | 2+-
Mrvx | 6+++---
Mvxwm.c | 28++++++++++++++++++++++++++--
6 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,7 +2,4 @@ config.h modules.h vxwm -README -dwm.png -dwm.1 backups/ diff --git a/README.md b/README.md @@ -1,4 +1,10 @@ -# vxwm - Versatile X Window Manager for x11 +# vxwm - Versatile X Window Manager for x11 forked from dwm + +# Features +vxwm is dwm on steroids, it can be as lightweight as you want. +It has some patches for dwm pre installed that can be enabled/disabled by switching 0 to 1 or vice versa. (like in dwm-flexipatch) +It also has some unique features like 8 sided resize, enchanced toggle floating, warp cursor and more! (They also can be toggled) +Check modules.def.h for full list of features. ## Requirements @@ -31,7 +37,7 @@ or for hot configuration reload, add something like this to your .xinitrc: vxwm & exec sleep infinity -And then for restarting vxwm just kill vxwm's process and start it again. +And then for restarting vxwm just kill vxwm's process and start it again or use rvx utility. In order to connect vxwm to a specific display, make sure that the DISPLAY environment variable is set correctly, e.g.: @@ -54,3 +60,10 @@ like this in your .xinitrc: The configuration of vxwm is done by editing config.h and modules.h to match your preferences and (re)compiling the source code. + + + + +## Acknowledgements + +vxwm was made in solo by a linux enthusiast wh1tepearl, many thanks to suckless.org and the [dwm] developers for making dwm in first place. diff --git a/config.def.h b/config.def.h @@ -48,6 +48,10 @@ static const int sidepad = 5; /* horizontal padding of bar */ /* tagging */ static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; +#if OCCUPIED_TAGS_DECORATION +static const char *occupiedtags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; +#endif + static const Rule rules[] = { /* xprop(1): * WM_CLASS(STRING) = instance, class diff --git a/modules.def.h b/modules.def.h @@ -20,7 +20,7 @@ #define ALT_CENTER_OF_BAR_COLOR 0 // changes center of bar color to a dark color. #define BAR_HEIGHT 0 // Support for changing bar height. #define BAR_PADDING 0 // Support for changing the bar padding. - +#define OCCUPIED_TAGS_DECORATION 0 // This provides the ability to use an alternative text for tags which contain at least one window aka occupied tags. /* Misc */ diff --git a/rvx b/rvx @@ -7,12 +7,12 @@ fi if [ $arg = "-d" ]; then killall vxwm 2>/dev/null - vxwm + dbus-run-session vxwm elif [ $arg = "-h" ]; then echo "rvx: A tool designed for quickly restarting vxwm" - echo "rvx -d: Restarts vxwm without dbus-run-session" + echo "rvx -d: Restarts vxwm with dbus-run-session" echo "rvx -h: Show this message" else killall vxwm 2>/dev/null - dbus-run-session vxwm + vxwm fi diff --git a/vxwm.c b/vxwm.c @@ -433,7 +433,11 @@ attachstack(Client *c) void buttonpress(XEvent *e) { +#if !OCCUPIED_TAGS_DECORATION unsigned int i, x, click; +#else + unsigned int i, x, click, occ; +#endif Arg arg = {0}; Client *c; Monitor *m; @@ -447,9 +451,20 @@ buttonpress(XEvent *e) focus(NULL); } if (ev->window == selmon->barwin) { +#if !OCCUPIED_TAGS_DECORATION i = x = 0; +#else + i = x = occ = 0; + /* Bitmask of occupied tags */ + for (c = m->clients; c; c = c->next) + occ |= c->tags; +#endif do +#if !OCCUPIED_TAGS_DECORATION x += TEXTW(tags[i]); +#else + x += TEXTW(occ & 1 << i ? occupiedtags[i] : tags[i]); +#endif while (ev->x >= x && ++i < LENGTH(tags)); if (i < LENGTH(tags)) { click = ClkTagBar; @@ -724,8 +739,10 @@ drawbar(Monitor *m) int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; unsigned int i, occ = 0, urg = 0; - Client *c; - +#if OCCUPIED_TAGS_DECORATION + const char *tagtext; +#endif + Client *c; if (!m->showbar) return; @@ -748,6 +765,7 @@ drawbar(Monitor *m) } x = 0; for (i = 0; i < LENGTH(tags); i++) { +#if !OCCUPIED_TAGS_DECORATION w = TEXTW(tags[i]); drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); @@ -755,6 +773,12 @@ drawbar(Monitor *m) drw_rect(drw, x + boxs, boxs, boxw, boxw, m == selmon && selmon->sel && selmon->sel->tags & 1 << i, urg & 1 << i); +#else + tagtext = occ & 1 << i ? occupiedtags[i] : tags[i]; + w = TEXTW(tagtext); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i); +#endif x += w; } w = TEXTW(m->ltsymbol);