added hide_vacant_tags patch
This commit is contained in:
parent
0620b27469
commit
b14bbd00d4
4 changed files with 3752 additions and 23 deletions
|
@ -20,6 +20,7 @@ philosophy. Like dwm, dwl is:
|
||||||
- [barheight](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/barheight)
|
- [barheight](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/barheight)
|
||||||
- [cursortheme](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/cursortheme)
|
- [cursortheme](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/cursortheme)
|
||||||
- [genericgaps](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/genericgaps/)
|
- [genericgaps](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/genericgaps/)
|
||||||
|
- [hide_vacant_tags](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/hide_vacant_tags)
|
||||||
- [setupenv](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/setupenv)
|
- [setupenv](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/setupenv)
|
||||||
- [sticky](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/sticky)
|
- [sticky](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/sticky)
|
||||||
|
|
||||||
|
|
32
config.h
32
config.h
|
@ -10,8 +10,8 @@ static const unsigned int gappih = 4; /* horiz inner gap between windo
|
||||||
static const unsigned int gappiv = 4; /* vert inner gap between windows */
|
static const unsigned int gappiv = 4; /* vert inner gap between windows */
|
||||||
static const unsigned int gappoh = 1; /* horiz outer gap between windows and screen edge */
|
static const unsigned int gappoh = 1; /* horiz outer gap between windows and screen edge */
|
||||||
static const unsigned int gappov = 1; /* vert outer gap between windows and screen edge */
|
static const unsigned int gappov = 1; /* vert outer gap between windows and screen edge */
|
||||||
static const char *cursor_theme = "Adwaita";
|
static const char *cursor_theme = "macOS";
|
||||||
static const char cursor_size[] = "24"; /* Make sure it's a valid integer, otherwise things will break */
|
static const char cursor_size[] = "28"; /* Make sure it's a valid integer, otherwise things will break */
|
||||||
static const int user_bh = 30; /* 0 means that dwl will calculate barheight, >= 1 means dwl will use user_bh as the bar height. */
|
static const int user_bh = 30; /* 0 means that dwl will calculate barheight, >= 1 means dwl will use user_bh as the bar height. */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
|
@ -35,7 +35,7 @@ static const Env envs[] = {
|
||||||
|
|
||||||
/* Autostart */
|
/* Autostart */
|
||||||
static const char *const autostart[] = {
|
static const char *const autostart[] = {
|
||||||
"wbg", "/home/amolinae/Pictures/Wallpapers/highsierra-grey.jpg", NULL,
|
"wbg", WALLPAPER, NULL,
|
||||||
"foot", "--server", NULL,
|
"foot", "--server", NULL,
|
||||||
"swayidle", NULL,
|
"swayidle", NULL,
|
||||||
"mako", NULL,
|
"mako", NULL,
|
||||||
|
@ -146,12 +146,13 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
static const char *termcmd[] = { "footclient", NULL }; // Terminal
|
static const char *termcmd[] = { "footclient", NULL }; // Terminal
|
||||||
static const char *menucmd[] = { "tofi-drun", NULL }; // Application launcher
|
static const char *menucmd[] = { "tofi-drun", NULL }; // Application launcher
|
||||||
static const char *fmgrcmd[] = { "footclient", "lf", NULL }; // File manager
|
static const char *fmgrcmd[] = { "footclient", "--title", "lf", "lf", NULL }; // File manager
|
||||||
static const char *sptfcmd[] = { "footclient", "spotify_player", NULL}; // Spotify client
|
static const char *sptfcmd[] = { "footclient", "--title", "Spotify", "spotify_player", NULL }; // Spotify client
|
||||||
static const char *lockcmd[] = { "swaylock", NULL }; // Launch swaylock
|
static const char *ncmxcmd[] = { "footclient", "--title", "ncpamixer", "ncpamixer", NULL }; // Volume control
|
||||||
static const char *pwmncmd[] = { "powermenu", NULL }; // Launch powermenu
|
static const char *lockcmd[] = { "swaylock", NULL }; // Launch swaylock
|
||||||
static const char *emojcmd[] = { "tofiunicode",NULL }; // Launch emoji menu
|
static const char *pwmncmd[] = { "powermenu", NULL }; // Launch powermenu
|
||||||
|
static const char *emojcmd[] = { "tofiunicode", NULL }; // Launch emoji menu
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||||
|
@ -160,10 +161,11 @@ static const Key keys[] = {
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||||
{ MODKEY, XKB_KEY_e, spawn, {.v = fmgrcmd} },
|
{ MODKEY, XKB_KEY_e, spawn, {.v = fmgrcmd} },
|
||||||
{ MODKEY, XKB_KEY_s, spawn, {.v = sptfcmd} },
|
{ MODKEY, XKB_KEY_s, spawn, {.v = sptfcmd} },
|
||||||
|
{ MODKEY, XKB_KEY_v, spawn, {.v = ncmxcmd} },
|
||||||
{ MODKEY, XKB_KEY_l, spawn, {.v = lockcmd} },
|
{ MODKEY, XKB_KEY_l, spawn, {.v = lockcmd} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_E, spawn, {.v = emojcmd} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_E, spawn, {.v = emojcmd} },
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, spawn, {.v = pwmncmd} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, spawn, {.v = pwmncmd} },
|
||||||
{ 0, XKB_KEY_XF86AudioMicMute, spawn,SHCMD("setvol -m mute") },
|
{ 0, XKB_KEY_XF86AudioMicMute, spawn,SHCMD("setvol -m mute") },
|
||||||
{ WLR_MODIFIER_SHIFT, XKB_KEY_XF86AudioLowerVolume, spawn,SHCMD("setvol -m down") },
|
{ WLR_MODIFIER_SHIFT, XKB_KEY_XF86AudioLowerVolume, spawn,SHCMD("setvol -m down") },
|
||||||
{ WLR_MODIFIER_SHIFT, XKB_KEY_XF86AudioRaiseVolume, spawn,SHCMD("setvol -m up") },
|
{ WLR_MODIFIER_SHIFT, XKB_KEY_XF86AudioRaiseVolume, spawn,SHCMD("setvol -m up") },
|
||||||
{ 0, XKB_KEY_XF86AudioMute, spawn,SHCMD("setvol mute") },
|
{ 0, XKB_KEY_XF86AudioMute, spawn,SHCMD("setvol mute") },
|
||||||
|
@ -219,14 +221,14 @@ static const Key keys[] = {
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_colon, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_colon, tagmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
*/
|
*/
|
||||||
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
|
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
|
||||||
TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
|
TAGKEYS( XKB_KEY_2, XKB_KEY_quotedbl, 1),
|
||||||
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
|
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
|
||||||
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
|
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
|
||||||
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
|
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
|
||||||
TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
|
TAGKEYS( XKB_KEY_6, XKB_KEY_ampersand, 5),
|
||||||
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
TAGKEYS( XKB_KEY_7, XKB_KEY_slash, 6),
|
||||||
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
TAGKEYS( XKB_KEY_8, XKB_KEY_parenleft, 7),
|
||||||
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
TAGKEYS( XKB_KEY_9, XKB_KEY_parenright, 8),
|
||||||
/*
|
/*
|
||||||
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Q, quit, {0} },
|
||||||
*/
|
*/
|
||||||
|
|
21
dwl.c
21
dwl.c
|
@ -803,7 +803,7 @@ bufrelease(struct wl_listener *listener, void *data)
|
||||||
void
|
void
|
||||||
buttonpress(struct wl_listener *listener, void *data)
|
buttonpress(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
unsigned int i = 0, x = 0;
|
unsigned int i = 0, x = 0, occ = 0;
|
||||||
double cx;
|
double cx;
|
||||||
unsigned int click;
|
unsigned int click;
|
||||||
struct wlr_pointer_button_event *event = data;
|
struct wlr_pointer_button_event *event = data;
|
||||||
|
@ -833,9 +833,16 @@ buttonpress(struct wl_listener *listener, void *data)
|
||||||
(node = wlr_scene_node_at(&layers[LyrBottom]->node, cursor->x, cursor->y, NULL, NULL)) &&
|
(node = wlr_scene_node_at(&layers[LyrBottom]->node, cursor->x, cursor->y, NULL, NULL)) &&
|
||||||
(buffer = wlr_scene_buffer_from_node(node)) && buffer == selmon->scene_buffer) {
|
(buffer = wlr_scene_buffer_from_node(node)) && buffer == selmon->scene_buffer) {
|
||||||
cx = (cursor->x - selmon->m.x) * selmon->wlr_output->scale;
|
cx = (cursor->x - selmon->m.x) * selmon->wlr_output->scale;
|
||||||
do
|
wl_list_for_each(c, &clients, link) {
|
||||||
|
if (c->mon != selmon)
|
||||||
|
continue;
|
||||||
|
occ |= c->tags == TAGMASK ? 0 : c->tags;
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
if (!(occ & 1 << i || selmon->tagset[selmon->seltags] & 1 << i))
|
||||||
|
continue;
|
||||||
x += TEXTW(selmon, tags[i]);
|
x += TEXTW(selmon, tags[i]);
|
||||||
while (cx >= x && ++i < LENGTH(tags));
|
} while (cx >= x && ++i < LENGTH(tags));
|
||||||
if (i < LENGTH(tags)) {
|
if (i < LENGTH(tags)) {
|
||||||
click = ClkTagBar;
|
click = ClkTagBar;
|
||||||
arg.ui = 1 << i;
|
arg.ui = 1 << i;
|
||||||
|
@ -1633,20 +1640,18 @@ drawbar(Monitor *m)
|
||||||
wl_list_for_each(c, &clients, link) {
|
wl_list_for_each(c, &clients, link) {
|
||||||
if (c->mon != m)
|
if (c->mon != m)
|
||||||
continue;
|
continue;
|
||||||
occ |= c->tags;
|
occ |= c->tags == TAGMASK ? 0 : c->tags;
|
||||||
if (c->isurgent)
|
if (c->isurgent)
|
||||||
urg |= c->tags;
|
urg |= c->tags;
|
||||||
}
|
}
|
||||||
x = 0;
|
x = 0;
|
||||||
c = focustop(m);
|
c = focustop(m);
|
||||||
for (i = 0; i < LENGTH(tags); i++) {
|
for (i = 0; i < LENGTH(tags); i++) {
|
||||||
|
if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
|
||||||
|
continue;
|
||||||
w = TEXTW(m, tags[i]);
|
w = TEXTW(m, tags[i]);
|
||||||
drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
drwl_setscheme(m->drw, colors[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||||
drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i);
|
drwl_text(m->drw, x, 0, w, m->b.height, m->lrpad / 2, tags[i], urg & 1 << i);
|
||||||
if (occ & 1 << i)
|
|
||||||
drwl_rect(m->drw, x + boxs, boxs, boxw, boxw,
|
|
||||||
m == selmon && c && c->tags & 1 << i,
|
|
||||||
urg & 1 << i);
|
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
w = TEXTW(m, m->ltsymbol);
|
w = TEXTW(m, m->ltsymbol);
|
||||||
|
|
3721
dwl.c.orig
Normal file
3721
dwl.c.orig
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue