Compare commits
2 commits
3e790f67f4
...
146d90c9cc
Author | SHA1 | Date | |
---|---|---|---|
Alexis Jhon Gaspar | 146d90c9cc | ||
Alexis Jhon Gaspar | 2334e4219d |
|
@ -1,73 +0,0 @@
|
||||||
# dwm version
|
|
||||||
VERSION = 6.4
|
|
||||||
|
|
||||||
# Customize below to fit your system
|
|
||||||
|
|
||||||
# paths
|
|
||||||
PREFIX = /usr/local
|
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
|
||||||
X11LIB = /usr/X11R6/lib
|
|
||||||
|
|
||||||
# FreeBSD (uncomment)
|
|
||||||
#X11INC = /usr/local/include
|
|
||||||
#X11LIB = /usr/local/lib
|
|
||||||
|
|
||||||
# Xinerama, comment if you don't want it
|
|
||||||
XINERAMALIBS = -lXinerama
|
|
||||||
XINERAMAFLAGS = -DXINERAMA
|
|
||||||
|
|
||||||
# freetype
|
|
||||||
FREETYPELIBS = -lfontconfig -lXft
|
|
||||||
FREETYPEINC = /usr/include/freetype2
|
|
||||||
# FreeBSD (uncomment)
|
|
||||||
#FREETYPEINC = /usr/local/include/freetype2
|
|
||||||
# OpenBSD (uncomment)
|
|
||||||
#FREETYPEINC = ${X11INC}/freetype2
|
|
||||||
# OpenBSD - Uncomment this for the swallow patch / SWALLOW_PATCH
|
|
||||||
#KVMLIB = -lkvm
|
|
||||||
|
|
||||||
# Uncomment this for the alpha patch and the winicon patch (BAR_ALPHA_PATCH, BAR_WINICON_PATCH)
|
|
||||||
XRENDER = -lXrender
|
|
||||||
|
|
||||||
# Uncomment this for the mdpcontrol patch / MDPCONTROL_PATCH
|
|
||||||
MPDCLIENT = -lmpdclient
|
|
||||||
|
|
||||||
# Uncomment for the pango patch / BAR_PANGO_PATCH
|
|
||||||
#PANGOINC = `pkg-config --cflags xft pango pangoxft`
|
|
||||||
#PANGOLIB = `pkg-config --libs xft pango pangoxft`
|
|
||||||
|
|
||||||
# Uncomment for the ipc patch / IPC_PATCH
|
|
||||||
YAJLLIBS = -lyajl
|
|
||||||
YAJLINC = -I/usr/include/yajl
|
|
||||||
|
|
||||||
# Uncomment this for the rounded corners patch / ROUNDED_CORNERS_PATCH
|
|
||||||
XEXTLIB = -lXext
|
|
||||||
|
|
||||||
# Uncomment this for the swallow patch / SWALLOW_PATCH
|
|
||||||
XCBLIBS = -lX11-xcb -lxcb -lxcb-res
|
|
||||||
|
|
||||||
# This is needed for the winicon and tagpreview patches / BAR_WINICON_PATCH / BAR_TAGPREVIEW_PATCH
|
|
||||||
IMLIB2LIBS = -lImlib2
|
|
||||||
|
|
||||||
# Uncomment for the bidi patch
|
|
||||||
#BDINC = `pkg-config --cflags fribidi`
|
|
||||||
#BDLIBS = `pkg-config --libs fribidi`
|
|
||||||
|
|
||||||
# includes and libs
|
|
||||||
INCS = -I${X11INC} -I${FREETYPEINC} ${YAJLINC} ${PANGOINC} ${BDINC}
|
|
||||||
LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ${XRENDER} ${MPDCLIENT} ${XEXTLIB} ${XCBLIBS} ${KVMLIB} ${PANGOLIB} ${YAJLLIBS} ${IMLIB2LIBS} $(BDLIBS)
|
|
||||||
|
|
||||||
# flags
|
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
|
||||||
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
|
|
||||||
CFLAGS = -std=c99 -pedantic -Wall -Wno-unused-function -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
|
|
||||||
LDFLAGS = ${LIBS}
|
|
||||||
|
|
||||||
# Solaris
|
|
||||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
|
||||||
#LDFLAGS = ${LIBS}
|
|
||||||
|
|
||||||
# compiler and linker
|
|
||||||
CC = cc
|
|
|
@ -557,6 +557,7 @@ static const BarRule barrules[] = {
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton2, draw_stbutton2, click_stbutton2, NULL, "statusbutton2" },
|
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton2, draw_stbutton2, click_stbutton2, NULL, "statusbutton2" },
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton3, draw_stbutton3, click_stbutton3, NULL, "statusbutton3" },
|
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton3, draw_stbutton3, click_stbutton3, NULL, "statusbutton3" },
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton4, draw_stbutton4, click_stbutton4, NULL, "statusbutton4" },
|
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton4, draw_stbutton4, click_stbutton4, NULL, "statusbutton4" },
|
||||||
|
{ -1, 1, BAR_ALIGN_RIGHT, width_stbutton5, draw_stbutton5, click_stbutton5, NULL, "statusbutton5" },
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
#endif // BAR_STATUSBUTTON_PATCH
|
||||||
#if BAR_POWERLINE_TAGS_PATCH
|
#if BAR_POWERLINE_TAGS_PATCH
|
||||||
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, NULL, "powerline_tags" },
|
{ 0, 0, BAR_ALIGN_LEFT, width_pwrl_tags, draw_pwrl_tags, click_pwrl_tags, NULL, "powerline_tags" },
|
||||||
|
@ -565,7 +566,7 @@ static const BarRule barrules[] = {
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_tags, draw_tags, click_tags, hover_tags, "tags" },
|
||||||
#endif // BAR_TAGS_PATCH
|
#endif // BAR_TAGS_PATCH
|
||||||
#if BAR_TAGLABELS_PATCH
|
#if BAR_TAGLABELS_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, NULL, "taglabels" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, hover_taglabels, "taglabels" },
|
||||||
#endif // BAR_TAGLABELS_PATCH
|
#endif // BAR_TAGLABELS_PATCH
|
||||||
#if BAR_TAGGRID_PATCH
|
#if BAR_TAGGRID_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, NULL, "taggrid" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, NULL, "taggrid" },
|
||||||
|
@ -573,9 +574,6 @@ static const BarRule barrules[] = {
|
||||||
#if BAR_SYSTRAY_PATCH
|
#if BAR_SYSTRAY_PATCH
|
||||||
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
|
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
|
||||||
#endif // BAR_SYSTRAY_PATCH
|
#endif // BAR_SYSTRAY_PATCH
|
||||||
#if BAR_STATUSBUTTON_PATCH
|
|
||||||
{ -1, 1, BAR_ALIGN_RIGHT, width_stbutton5, draw_stbutton5, click_stbutton5, NULL, "statusbutton5" },
|
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
|
||||||
#if BAR_LTSYMBOL_PATCH
|
#if BAR_LTSYMBOL_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_ltsymbol, draw_ltsymbol, click_ltsymbol, NULL, "layout" },
|
||||||
#endif // BAR_LTSYMBOL_PATCH
|
#endif // BAR_LTSYMBOL_PATCH
|
||||||
|
|
|
@ -62,7 +62,7 @@ LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} ${XRENDER} ${MPDCLIENT
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
||||||
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
|
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
|
||||||
CFLAGS = -std=c99 -pedantic -Wall -Wno-unused-function -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-unused-function -Wno-deprecated-declarations -O3 -march=native ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS = ${LIBS}
|
LDFLAGS = ${LIBS}
|
||||||
|
|
||||||
# Solaris
|
# Solaris
|
||||||
|
|
|
@ -89,3 +89,57 @@ click_taglabels(Bar *bar, Arg *arg, BarArg *a)
|
||||||
}
|
}
|
||||||
return ClkTagBar;
|
return ClkTagBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
hover_taglabels(Bar *bar, BarArg *a, XMotionEvent *ev)
|
||||||
|
{
|
||||||
|
#if BAR_TAGPREVIEW_PATCH
|
||||||
|
int i = 0, x = lrpad / 2;
|
||||||
|
int px, py;
|
||||||
|
Monitor *m = bar->mon;
|
||||||
|
#if VANITYGAPS_PATCH
|
||||||
|
int ov = gappov;
|
||||||
|
int oh = gappoh;
|
||||||
|
#else
|
||||||
|
int ov = 0;
|
||||||
|
int oh = 0;
|
||||||
|
#endif // VANITYGAPS_PATCH
|
||||||
|
|
||||||
|
#if BAR_HIDEVACANTTAGS_PATCH
|
||||||
|
Client *c;
|
||||||
|
unsigned int occ = 0;
|
||||||
|
for (c = bar->mon->clients; c; c = c->next)
|
||||||
|
occ |= c->tags == 255 ? 0 : c->tags;
|
||||||
|
#endif // BAR_HIDEVACANTTAGS_PATCH
|
||||||
|
|
||||||
|
do {
|
||||||
|
#if BAR_HIDEVACANTTAGS_PATCH
|
||||||
|
if (!(occ & 1 << i || bar->mon->tagset[bar->mon->seltags] & 1 << i))
|
||||||
|
continue;
|
||||||
|
#endif // BAR_HIDEVACANTTAGS_PATCH
|
||||||
|
x += TEXTW(m->taglabel[i]);
|
||||||
|
} while (a->x >= x && ++i < NUMTAGS);
|
||||||
|
|
||||||
|
if (i < NUMTAGS) {
|
||||||
|
if ((i + 1) != selmon->previewshow && !(selmon->tagset[selmon->seltags] & 1 << i)) {
|
||||||
|
if (bar->by > m->my + m->mh / 2) // bottom bar
|
||||||
|
py = bar->by - m->mh / scalepreview - oh;
|
||||||
|
else // top bar
|
||||||
|
py = bar->by + bar->bh + oh;
|
||||||
|
px = bar->bx + ev->x - m->mw / scalepreview / 2;
|
||||||
|
if (px + m->mw / scalepreview > m->mx + m->mw)
|
||||||
|
px = m->wx + m->ww - m->mw / scalepreview - ov;
|
||||||
|
else if (px < bar->bx)
|
||||||
|
px = m->wx + ov;
|
||||||
|
selmon->previewshow = i + 1;
|
||||||
|
showtagpreview(i, px, py);
|
||||||
|
} else if (selmon->tagset[selmon->seltags] & 1 << i) {
|
||||||
|
hidetagpreview(selmon);
|
||||||
|
}
|
||||||
|
} else if (selmon->previewshow != 0) {
|
||||||
|
hidetagpreview(selmon);
|
||||||
|
}
|
||||||
|
#endif // BAR_TAGPREVIEW_PATCH
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
static int width_taglabels(Bar *bar, BarArg *a);
|
static int width_taglabels(Bar *bar, BarArg *a);
|
||||||
static int draw_taglabels(Bar *bar, BarArg *a);
|
static int draw_taglabels(Bar *bar, BarArg *a);
|
||||||
static int click_taglabels(Bar *bar, Arg *arg, BarArg *a);
|
static int click_taglabels(Bar *bar, Arg *arg, BarArg *a);
|
||||||
|
static int hover_taglabels(Bar *bar, BarArg *a, XMotionEvent *ev);
|
||||||
|
|
|
@ -660,7 +660,7 @@
|
||||||
/* Switch focus only by mouse click and not sloppy (focus follows mouse pointer).
|
/* Switch focus only by mouse click and not sloppy (focus follows mouse pointer).
|
||||||
* https://dwm.suckless.org/patches/focusonclick/
|
* https://dwm.suckless.org/patches/focusonclick/
|
||||||
*/
|
*/
|
||||||
#define FOCUSONCLICK_PATCH 1
|
#define FOCUSONCLICK_PATCH 0
|
||||||
|
|
||||||
/* Selects the next window having the urgent flag regardless of the tag it is on.
|
/* Selects the next window having the urgent flag regardless of the tag it is on.
|
||||||
* The urgent flag can be artificially set with the following xdotool command on any window:
|
* The urgent flag can be artificially set with the following xdotool command on any window:
|
||||||
|
|
Loading…
Reference in a new issue