Kaynağa Gözat

rm tatami layout

siduck76 3 yıl önce
ebeveyn
işleme
fad2a3a6c2
6 değiştirilmiş dosya ile 7 ekleme ve 167 silme
  1. 0 1
      README.md
  2. 5 5
      chadwm/config.def.h
  3. 0 1
      chadwm/dwm.c
  4. 0 1
      chadwm/functions.h
  5. 0 157
      chadwm/tatami.c
  6. 2 2
      chadwm/themes/gruvchad.h

+ 0 - 1
README.md

@@ -49,6 +49,5 @@ https://user-images.githubusercontent.com/59060246/128050994-17f46934-6604-4430-
 - colorful tags
 - statuspadding 
 - status2d
-- tatami 
 - underline tags
 - notitle

+ 5 - 5
chadwm/config.def.h

@@ -36,12 +36,12 @@ static const char dmenufont[]       = "monospace:size=10";
 static const int colorfultag        = 1;  /* 0 means use SchemeSel for selected non vacant tag */
 
 // theme
-#include "themes/onedark.h"
+#include "themes/gruvchad.h"
 
 static const char *colors[][3]      = {
     /*               fg         bg         border   */
     [SchemeNorm]       = { gray3, black, gray2 },
-    [SchemeSel]        = { gray4, blue,  blue  },
+    [SchemeSel]        = { gray4, blue,  gray4  },
     [TabSel]           = { blue, gray2,  black  },
     [TabNorm]          = { gray3, black, black },
     [SchemeTag]        = { gray3, black, black },
@@ -88,6 +88,7 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
 #define FORCE_VSPLIT 1  /* nrowgrid layout: force two clients to always split vertically */
 #include "functions.h"
 
+
 static const Layout layouts[] = {
     /* symbol     arrange function */
     { "[]=",      tile },    /* first entry is default */
@@ -103,7 +104,6 @@ static const Layout layouts[] = {
     { ":::",      gaplessgrid },
     { "|M|",      centeredmaster },
     { ">M>",      centeredfloatingmaster },
-    { "|+|",      tatami },
     { "><>",      NULL },    /* no layout function means floating behavior */
 };
 
@@ -131,8 +131,8 @@ static Key keys[] = {
     { MODKEY,                       XK_c,      spawn,          {.v = rofi } },
 
     // if you dont use st and this script my rm this and uncomment line below it!
-    //{ MODKEY,                       XK_Return, spawn,   SHCMD("~/.local/bin/./st_settings && st")}, 
-    { MODKEY,                       XK_Return, spawn,    {.v = termcmd }},  
+    { MODKEY,                       XK_Return, spawn,   SHCMD("~/.local/bin/./st_settings && st")}, 
+    /* { MODKEY,                       XK_Return, spawn,    {.v = termcmd }},   */
 
     {MODKEY | ControlMask, XK_u, spawn, SHCMD("maim | xclip -selection clipboard -t image/png")},
     {MODKEY, XK_u, spawn,   SHCMD("maim --select | xclip -selection clipboard -t image/png")},

+ 0 - 1
chadwm/dwm.c

@@ -427,7 +427,6 @@ struct Monitor {
 
 #include "vanitygaps.c"
 #include "movestack.c"
-#include "tatami.c"
 
 struct Pertag {
 	unsigned int curtag, prevtag; /* current and previous tag */

+ 0 - 1
chadwm/functions.h

@@ -28,4 +28,3 @@ static void getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int
 static void setgaps(int oh, int ov, int ih, int iv);
 
 static void movestack(const Arg *arg);
-static void tatami(Monitor *m);

+ 0 - 157
chadwm/tatami.c

@@ -1,157 +0,0 @@
-void 
-tatami(Monitor *m) {
-	unsigned int i, n, nx, ny, nw, nh,
-				 mats, tc,
-				 tnx, tny, tnw, tnh;
-	Client *c;
-
-	for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), ++n);
-	if(n == 0)
-		return;
-	
-	nx = m->wx;
-	ny = 0;
-	nw = m->ww;
-	nh = m->wh;
-	
-	c = nexttiled(m->clients);
-	
-	if(n != 1)  nw = m->ww * m->mfact;
-				ny = m->wy;
-				
-	resize(c, nx, ny, nw - 2 * c->bw, nh - 2 * c->bw, False);
-	
-	c = nexttiled(c->next);
-	
-	nx += nw;
-	nw = m->ww - nw;
-	
-	if(n>1)
-	{
-	
-	tc = n-1;
-	mats = tc/5;
-	
-	nh/=(mats + (tc % 5 > 0));
-	
-	for(i = 0; c && (i < (tc % 5)); c = nexttiled(c->next))
-	{
-		tnw=nw;
-		tnx=nx;
-		tnh=nh;
-		tny=ny;
-		switch(tc - (mats*5))
-				{
-					case 1://fill
-						break;
-					case 2://up and down
-						if((i % 5) == 0) //up
-						tnh/=2;
-						else if((i % 5) == 1) //down
-						{
-							tnh/=2;
-							tny += nh/2;
-						}
-						break;
-					case 3://bottom, up-left and up-right
-						if((i % 5) == 0) //up-left
-						{
-						tnw = nw/2;
-						tnh = (2*nh)/3;
-						}
-						else if((i % 5) == 1)//up-right
-						{
-							tnx += nw/2;
-							tnw = nw/2;
-							tnh = (2*nh)/3;
-						}
-						else if((i % 5) == 2)//bottom
-						{
-							tnh = nh/3;
-							tny += (2*nh)/3;	
-						}
-						break;
-					case 4://bottom, left, right and top
-						if((i % 5) == 0) //top
-						{
-							tnh = (nh)/4;
-						}
-						else if((i % 5) == 1)//left
-						{
-							tnw = nw/2;
-							tny += nh/4;
-							tnh = (nh)/2;
-						}
-						else if((i % 5) == 2)//right
-						{
-							tnx += nw/2;
-							tnw = nw/2;
-							tny += nh/4;
-							tnh = (nh)/2;
-						}
-						else if((i % 5) == 3)//bottom
-						{
-							tny += (3*nh)/4;
-							tnh = (nh)/4;
-						}
-						break;
-				}
-		++i;
-		resize(c, tnx, tny, tnw - 2 * c->bw, tnh - 2 * c->bw, False);
-	}
-	
-	++mats;
-	
-	for(i = 0; c && (mats>0); c = nexttiled(c->next)) {
-
-			if((i%5)==0)
-			{
-			--mats;
-			if(((tc % 5) > 0)||(i>=5))
-			ny+=nh;
-			}
-			
-			tnw=nw;
-			tnx=nx;
-			tnh=nh;
-			tny=ny;
-			
-
-			switch(i % 5)
-			{
-				case 0: //top-left-vert
-					tnw = (nw)/3;
-					tnh = (nh*2)/3;
-					break;
-				case 1: //top-right-hor
-					tnx += (nw)/3;
-					tnw = (nw*2)/3;
-					tnh = (nh)/3;
-					break;
-				case 2: //center
-					tnx += (nw)/3;
-					tnw = (nw)/3;
-					tny += (nh)/3;
-					tnh = (nh)/3;
-					break;
-				case 3: //bottom-right-vert
-					tnx += (nw*2)/3;
-					tnw = (nw)/3;
-					tny += (nh)/3;
-					tnh = (nh*2)/3;
-					break;
-				case 4: //(oldest) bottom-left-hor
-					tnw = (2*nw)/3;
-					tny += (2*nh)/3;
-					tnh = (nh)/3;
-					break;
-				default:
-					break;
-			}
-			
-			++i;
-			//i%=5;
-		resize(c, tnx, tny, tnw - 2 * c->bw, tnh - 2 * c->bw, False);
-		}
-	}
-}

+ 2 - 2
chadwm/themes/gruvchad.h

@@ -1,7 +1,7 @@
 static const char black[]       = "#222526";
-static const char gray2[]       = "#3b3e3f"; // unfocused window border
+static const char gray2[]       = "#282b2c"; // unfocused window border
 static const char gray3[]       = "#5d6061";
-static const char gray4[]       = "#6d8dad";
+static const char gray4[]       = "#282b2c";
 static const char blue[]        = "#6f8faf";  // focused window border
 static const char green[]       = "#89b482";
 static const char red[]         = "#ec6b64";