Further bar renaming

This commit is contained in:
bakkeby 2020-07-15 09:26:16 +02:00
parent 903b32ac8b
commit f2da4d20d9
11 changed files with 21 additions and 166 deletions

View File

@ -8,6 +8,12 @@
#if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH #if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH
#include "bar_dwmblocks.c" #include "bar_dwmblocks.c"
#endif #endif
#if BAR_EWMHTAGS_PATCH
#include "bar_ewmhtags.c"
#endif
#if BAR_HOLDBAR_PATCH
#include "bar_holdbar.c"
#endif
#if BAR_LTSYMBOL_PATCH #if BAR_LTSYMBOL_PATCH
#include "bar_ltsymbol.c" #include "bar_ltsymbol.c"
#endif #endif
@ -26,6 +32,9 @@
#if BAR_STATUSCMD_PATCH #if BAR_STATUSCMD_PATCH
#include "bar_statuscmd.c" #include "bar_statuscmd.c"
#endif #endif
#if BAR_STATUSCOLORS_PATCH
#include "bar_statuscolors.c"
#endif
#if BAR_TAGS_PATCH #if BAR_TAGS_PATCH
#include "bar_tags.c" #include "bar_tags.c"
#endif #endif
@ -44,6 +53,9 @@
#if BAR_SYSTRAY_PATCH #if BAR_SYSTRAY_PATCH
#include "bar_systray.c" #include "bar_systray.c"
#endif #endif
#if BAR_VTCOLORS_PATCH
#include "bar_vtcolors.c"
#endif
/* Other patches */ /* Other patches */
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH #if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
@ -72,9 +84,6 @@
#elif FSIGNAL_PATCH #elif FSIGNAL_PATCH
#include "fsignal.c" #include "fsignal.c"
#endif #endif
#if BAR_EWMHTAGS_PATCH
#include "ewmhtags.c"
#endif
#if EXRESIZE_PATCH #if EXRESIZE_PATCH
#include "exresize.c" #include "exresize.c"
#endif #endif
@ -93,9 +102,6 @@
#if FULLSCREEN_PATCH #if FULLSCREEN_PATCH
#include "fullscreen.c" #include "fullscreen.c"
#endif #endif
#if BAR_HOLDBAR_PATCH
#include "holdbar.c"
#endif
#if INPLACEROTATE_PATCH #if INPLACEROTATE_PATCH
#include "inplacerotate.c" #include "inplacerotate.c"
#endif #endif
@ -166,9 +172,6 @@
#if STACKER_PATCH #if STACKER_PATCH
#include "stacker.c" #include "stacker.c"
#endif #endif
#if BAR_STATUSCOLORS_PATCH
#include "statuscolors.c"
#endif
#if STICKY_PATCH #if STICKY_PATCH
#include "sticky.c" #include "sticky.c"
#endif #endif
@ -190,9 +193,6 @@
#if TAGALLMON_PATCH #if TAGALLMON_PATCH
#include "tagallmon.c" #include "tagallmon.c"
#endif #endif
#if TAGGRID_PATCH
#include "taggrid.c"
#endif
#if TAGOTHERMONITOR_PATCH #if TAGOTHERMONITOR_PATCH
#include "tagothermonitor.c" #include "tagothermonitor.c"
#endif #endif
@ -214,9 +214,6 @@
#if VANITYGAPS_PATCH #if VANITYGAPS_PATCH
#include "vanitygaps.c" #include "vanitygaps.c"
#endif #endif
#if BAR_VTCOLORS_PATCH
#include "vtcolors.c"
#endif
#if WARP_PATCH #if WARP_PATCH
#include "warp.c" #include "warp.c"
#endif #endif

View File

@ -8,6 +8,12 @@
#if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH #if BAR_DWMBLOCKS_PATCH && BAR_STATUSCMD_PATCH
#include "bar_dwmblocks.h" #include "bar_dwmblocks.h"
#endif #endif
#if BAR_EWMHTAGS_PATCH
#include "bar_ewmhtags.h"
#endif
#if BAR_HOLDBAR_PATCH
#include "bar_holdbar.h"
#endif
#if BAR_LTSYMBOL_PATCH #if BAR_LTSYMBOL_PATCH
#include "bar_ltsymbol.h" #include "bar_ltsymbol.h"
#endif #endif
@ -44,6 +50,9 @@
#if BAR_SYSTRAY_PATCH #if BAR_SYSTRAY_PATCH
#include "bar_systray.h" #include "bar_systray.h"
#endif #endif
#if BAR_VTCOLORS_PATCH
#include "bar_vtcolors.h"
#endif
/* Other patches */ /* Other patches */
#if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH #if ATTACHABOVE_PATCH || ATTACHASIDE_PATCH || ATTACHBELOW_PATCH || ATTACHBOTTOM_PATCH
@ -75,9 +84,6 @@
#elif FSIGNAL_PATCH #elif FSIGNAL_PATCH
#include "fsignal.h" #include "fsignal.h"
#endif #endif
#if BAR_EWMHTAGS_PATCH
#include "ewmhtags.h"
#endif
#if EXRESIZE_PATCH #if EXRESIZE_PATCH
#include "exresize.h" #include "exresize.h"
#endif #endif
@ -96,9 +102,6 @@
#if FULLSCREEN_PATCH #if FULLSCREEN_PATCH
#include "fullscreen.h" #include "fullscreen.h"
#endif #endif
#if BAR_HOLDBAR_PATCH
#include "holdbar.h"
#endif
#if INPLACEROTATE_PATCH #if INPLACEROTATE_PATCH
#include "inplacerotate.h" #include "inplacerotate.h"
#endif #endif
@ -190,9 +193,6 @@
#if TAGALLMON_PATCH #if TAGALLMON_PATCH
#include "tagallmon.h" #include "tagallmon.h"
#endif #endif
#if TAGGRID_PATCH
#include "taggrid.h"
#endif
#if TAGOTHERMONITOR_PATCH #if TAGOTHERMONITOR_PATCH
#include "tagothermonitor.h" #include "tagothermonitor.h"
#endif #endif
@ -214,9 +214,6 @@
#if VANITYGAPS_PATCH #if VANITYGAPS_PATCH
#include "vanitygaps.h" #include "vanitygaps.h"
#endif #endif
#if BAR_VTCOLORS_PATCH
#include "vtcolors.h"
#endif
#if WARP_PATCH #if WARP_PATCH
#include "warp.h" #include "warp.h"
#endif #endif

View File

@ -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';
}

View File

@ -1 +0,0 @@
static void copyvalidchars(char *text, char *rawtext);

View File

@ -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);
}
}

View File

@ -1,2 +0,0 @@
static void drawtaggrid(Monitor *m, int *x_pos, unsigned int occ);
static void switchtag(const Arg *arg);