mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Further bar renaming
This commit is contained in:
parent
903b32ac8b
commit
f2da4d20d9
@ -8,6 +8,12 @@
|
||||
#if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH
|
||||
#include "bar_dwmblocks.c"
|
||||
#endif
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
#include "bar_ewmhtags.c"
|
||||
#endif
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
#include "bar_holdbar.c"
|
||||
#endif
|
||||
#if BAR_LTSYMBOL_PATCH
|
||||
#include "bar_ltsymbol.c"
|
||||
#endif
|
||||
@ -26,6 +32,9 @@
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
#include "bar_statuscmd.c"
|
||||
#endif
|
||||
#if BAR_STATUSCOLORS_PATCH
|
||||
#include "bar_statuscolors.c"
|
||||
#endif
|
||||
#if BAR_TAGS_PATCH
|
||||
#include "bar_tags.c"
|
||||
#endif
|
||||
@ -44,6 +53,9 @@
|
||||
#if BAR_SYSTRAY_PATCH
|
||||
#include "bar_systray.c"
|
||||
#endif
|
||||
#if BAR_VTCOLORS_PATCH
|
||||
#include "bar_vtcolors.c"
|
||||
#endif
|
||||
|
||||
/* Other patches */
|
||||
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
|
||||
@ -72,9 +84,6 @@
|
||||
#elif FSIGNAL_PATCH
|
||||
#include "fsignal.c"
|
||||
#endif
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
#include "ewmhtags.c"
|
||||
#endif
|
||||
#if EXRESIZE_PATCH
|
||||
#include "exresize.c"
|
||||
#endif
|
||||
@ -93,9 +102,6 @@
|
||||
#if FULLSCREEN_PATCH
|
||||
#include "fullscreen.c"
|
||||
#endif
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
#include "holdbar.c"
|
||||
#endif
|
||||
#if INPLACEROTATE_PATCH
|
||||
#include "inplacerotate.c"
|
||||
#endif
|
||||
@ -166,9 +172,6 @@
|
||||
#if STACKER_PATCH
|
||||
#include "stacker.c"
|
||||
#endif
|
||||
#if BAR_STATUSCOLORS_PATCH
|
||||
#include "statuscolors.c"
|
||||
#endif
|
||||
#if STICKY_PATCH
|
||||
#include "sticky.c"
|
||||
#endif
|
||||
@ -190,9 +193,6 @@
|
||||
#if TAGALLMON_PATCH
|
||||
#include "tagallmon.c"
|
||||
#endif
|
||||
#if TAGGRID_PATCH
|
||||
#include "taggrid.c"
|
||||
#endif
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
#include "tagothermonitor.c"
|
||||
#endif
|
||||
@ -214,9 +214,6 @@
|
||||
#if VANITYGAPS_PATCH
|
||||
#include "vanitygaps.c"
|
||||
#endif
|
||||
#if BAR_VTCOLORS_PATCH
|
||||
#include "vtcolors.c"
|
||||
#endif
|
||||
#if WARP_PATCH
|
||||
#include "warp.c"
|
||||
#endif
|
||||
|
@ -8,6 +8,12 @@
|
||||
#if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH
|
||||
#include "bar_dwmblocks.h"
|
||||
#endif
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
#include "bar_ewmhtags.h"
|
||||
#endif
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
#include "bar_holdbar.h"
|
||||
#endif
|
||||
#if BAR_LTSYMBOL_PATCH
|
||||
#include "bar_ltsymbol.h"
|
||||
#endif
|
||||
@ -44,6 +50,9 @@
|
||||
#if BAR_SYSTRAY_PATCH
|
||||
#include "bar_systray.h"
|
||||
#endif
|
||||
#if BAR_VTCOLORS_PATCH
|
||||
#include "bar_vtcolors.h"
|
||||
#endif
|
||||
|
||||
/* Other patches */
|
||||
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
|
||||
@ -75,9 +84,6 @@
|
||||
#elif FSIGNAL_PATCH
|
||||
#include "fsignal.h"
|
||||
#endif
|
||||
#if BAR_EWMHTAGS_PATCH
|
||||
#include "ewmhtags.h"
|
||||
#endif
|
||||
#if EXRESIZE_PATCH
|
||||
#include "exresize.h"
|
||||
#endif
|
||||
@ -96,9 +102,6 @@
|
||||
#if FULLSCREEN_PATCH
|
||||
#include "fullscreen.h"
|
||||
#endif
|
||||
#if BAR_HOLDBAR_PATCH
|
||||
#include "holdbar.h"
|
||||
#endif
|
||||
#if INPLACEROTATE_PATCH
|
||||
#include "inplacerotate.h"
|
||||
#endif
|
||||
@ -190,9 +193,6 @@
|
||||
#if TAGALLMON_PATCH
|
||||
#include "tagallmon.h"
|
||||
#endif
|
||||
#if TAGGRID_PATCH
|
||||
#include "taggrid.h"
|
||||
#endif
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
#include "tagothermonitor.h"
|
||||
#endif
|
||||
@ -214,9 +214,6 @@
|
||||
#if VANITYGAPS_PATCH
|
||||
#include "vanitygaps.h"
|
||||
#endif
|
||||
#if BAR_VTCOLORS_PATCH
|
||||
#include "vtcolors.h"
|
||||
#endif
|
||||
#if WARP_PATCH
|
||||
#include "warp.h"
|
||||
#endif
|
||||
|
@ -1,18 +0,0 @@
|
||||
#if !DWMBLOCKS_PATCH
|
||||
static const char statusexport[] = "export BUTTON=-;";
|
||||
static int statuscmdn;
|
||||
static int lastbutton;
|
||||
#endif // DWMBLOCKS_PATCH
|
||||
|
||||
void
|
||||
copyvalidchars(char *text, char *rawtext)
|
||||
{
|
||||
int i = -1, j = 0;
|
||||
|
||||
while (rawtext[++i]) {
|
||||
if ((unsigned char)rawtext[i] >= ' ') {
|
||||
text[j++] = rawtext[i];
|
||||
}
|
||||
}
|
||||
text[j] = '\0';
|
||||
}
|
@ -1 +0,0 @@
|
||||
static void copyvalidchars(char *text, char *rawtext);
|
118
patch/taggrid.c
118
patch/taggrid.c
@ -1,118 +0,0 @@
|
||||
void drawtaggrid(Monitor *m, int *x_pos, unsigned int occ)
|
||||
{
|
||||
unsigned int x, y, h, max_x, columns;
|
||||
int invert, i,j, k;
|
||||
|
||||
h = bh / tagrows;
|
||||
x = max_x = *x_pos;
|
||||
y = 0;
|
||||
columns = LENGTH(tags) / tagrows + ((LENGTH(tags) % tagrows > 0) ? 1 : 0);
|
||||
|
||||
/* Firstly we will fill the borders of squares */
|
||||
|
||||
XSetForeground(drw->dpy, drw->gc, scheme[SchemeNorm][ColBorder].pixel);
|
||||
XFillRectangle(dpy, drw->drawable, drw->gc, x, y, h*columns + 1, bh);
|
||||
|
||||
/* We will draw LENGTH(tags) squares in tagraws raws. */
|
||||
for (j = 0, i= 0; j < tagrows; j++) {
|
||||
x = *x_pos;
|
||||
for (k = 0; k < columns && i < LENGTH(tags); k++, i++) {
|
||||
invert = m->tagset[m->seltags] & 1 << i ? 0 : 1;
|
||||
|
||||
/* Select active color for current square */
|
||||
XSetForeground(drw->dpy, drw->gc, !invert ? scheme[SchemeSel][ColBg].pixel :
|
||||
scheme[SchemeNorm][ColFg].pixel);
|
||||
XFillRectangle(dpy, drw->drawable, drw->gc, x+1, y+1, h-1, h-1);
|
||||
|
||||
/* Mark square if tag has client */
|
||||
if (occ & 1 << i) {
|
||||
XSetForeground(drw->dpy, drw->gc, !invert ? scheme[SchemeSel][ColFg].pixel :
|
||||
scheme[SchemeNorm][ColBg].pixel);
|
||||
XFillRectangle(dpy, drw->drawable, drw->gc, x + 1, y + 1,
|
||||
h / 2, h / 2);
|
||||
}
|
||||
x += h;
|
||||
if (x > max_x) {
|
||||
max_x = x;
|
||||
}
|
||||
}
|
||||
y += h;
|
||||
}
|
||||
*x_pos = max_x + 1;
|
||||
}
|
||||
|
||||
void switchtag(const Arg *arg)
|
||||
{
|
||||
unsigned int columns;
|
||||
unsigned int new_tagset = 0;
|
||||
unsigned int pos, i;
|
||||
int col, row;
|
||||
Arg new_arg;
|
||||
|
||||
columns = LENGTH(tags) / tagrows + ((LENGTH(tags) % tagrows > 0) ? 1 : 0);
|
||||
|
||||
for (i = 0; i < LENGTH(tags); ++i) {
|
||||
if (!(selmon->tagset[selmon->seltags] & 1 << i)) {
|
||||
continue;
|
||||
}
|
||||
pos = i;
|
||||
row = pos / columns;
|
||||
col = pos % columns;
|
||||
if (arg->ui & SWITCHTAG_UP) { /* UP */
|
||||
row --;
|
||||
if (row < 0) {
|
||||
row = tagrows - 1;
|
||||
}
|
||||
do {
|
||||
pos = row * columns + col;
|
||||
row --;
|
||||
} while (pos >= LENGTH(tags));
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_DOWN) { /* DOWN */
|
||||
row ++;
|
||||
if (row >= tagrows) {
|
||||
row = 0;
|
||||
}
|
||||
pos = row * columns + col;
|
||||
if (pos >= LENGTH(tags)) {
|
||||
row = 0;
|
||||
}
|
||||
pos = row * columns + col;
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_LEFT) { /* LEFT */
|
||||
col --;
|
||||
if (col < 0) {
|
||||
col = columns - 1;
|
||||
}
|
||||
do {
|
||||
pos = row * columns + col;
|
||||
col --;
|
||||
} while (pos >= LENGTH(tags));
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_RIGHT) { /* RIGHT */
|
||||
col ++;
|
||||
if (col >= columns) {
|
||||
col = 0;
|
||||
}
|
||||
pos = row * columns + col;
|
||||
if (pos >= LENGTH(tags)) {
|
||||
col = 0;
|
||||
pos = row * columns + col;
|
||||
}
|
||||
}
|
||||
new_tagset |= 1 << pos;
|
||||
}
|
||||
new_arg.ui = new_tagset;
|
||||
if (arg->ui & SWITCHTAG_TOGGLETAG) {
|
||||
toggletag(&new_arg);
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_TAG) {
|
||||
tag(&new_arg);
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_VIEW) {
|
||||
view (&new_arg);
|
||||
}
|
||||
if (arg->ui & SWITCHTAG_TOGGLEVIEW) {
|
||||
toggleview (&new_arg);
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
static void drawtaggrid(Monitor *m, int *x_pos, unsigned int occ);
|
||||
static void switchtag(const Arg *arg);
|
Loading…
Reference in New Issue
Block a user