dwm: actualizado a 6.4
This commit is contained in:
parent
559ce1c9c9
commit
4d7e58b592
16 changed files with 1068 additions and 157 deletions
210
Plantillas/dwm-custom/bak/6.2/config.h_6.2
Normal file
210
Plantillas/dwm-custom/bak/6.2/config.h_6.2
Normal file
|
@ -0,0 +1,210 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <X11/XF86keysym.h>
|
||||
#include <X11/keysymdef.h>
|
||||
|
||||
/* Apariencia */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 8; /* snap pixel */
|
||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||
static const unsigned int systrayspacing = 1; /* systray spacing */
|
||||
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
|
||||
static const int showsystray = 1; /* 0 means no systray */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "Hack:style=Regular:size=6:antialias=true:autohint=true", };
|
||||
static const char dmenufont[] = "Source Code Pro:style=Bold:size=10";
|
||||
static const char col_01[] = "#1c1f22"; /* Color de la barra de estado en reposo*/
|
||||
static const char col_02[] = "#1c1f22"; /* Color del borde de pantalla desenfocada */
|
||||
static const char col_03[] = "#ffffff"; /* Color de las letras de la barra de estado */
|
||||
static const char col_04[] = "#02ff00"; /* Color del nombre y etiqueta que está en uso */
|
||||
static const char col_05[] = "#ffffff"; /* Color del borde de la ventana enfocada */
|
||||
static const char col_06[] = "#1c1f22"; /* Color barra de estado cuando está en uso */
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_03, col_01, col_02 },
|
||||
[SchemeSel] = { col_04, col_06, col_05 },
|
||||
};
|
||||
|
||||
/* Etiquetas */
|
||||
//static const char *tags[] = { "", "", "切", "輸", "", "", "" };
|
||||
static const char *tags[] = {"[Home]", "[Web]", "[Social]", "[Multimedia]", "[Shell]", "[Office]", "[Others]" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ "URxvt", NULL, "Administrador de archivos", 1 << 0, 0, -1 },
|
||||
{ "URxvt", NULL, "Agenda", 1 << 0, 0, -1 },
|
||||
{ "Firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
{ "Google-chrome", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Pale moon", "Navigator", NULL, 1 << 6, 0, -1 },
|
||||
{ "URxvt", "urxvt", "Telegram", 1 << 2, 0, -1 },
|
||||
{ "Telegram", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Gimp", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Openshot-qt", NULL, NULL, 1 << 3, 0, -1 }, // Editor de videos
|
||||
{ "MPlayer", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Arandr", NULL, NULL, 1 << 4, 0, -1 },
|
||||
{ NULL, NULL, "LibreOffice", 1 << 5, 0, -1 },
|
||||
{ "libreoffice-writer", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-calc", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-impress", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "DesktopEditors", "DesktopEditors", NULL, 1 << 5, 0, -1 },
|
||||
{ "Galculator", NULL, NULL, 0, 1, -1 },
|
||||
{ "Lxappearance", NULL, NULL, 0, 1, -1 },
|
||||
{ "LibreOffice 7.1", NULL, "Abrir", 0, 1, -1 },
|
||||
{ "URxvt", "urxvt", "warning", 0, 1, -1 },
|
||||
{ "Soffice", "soffice", "El documento es de solo lectura", 1 << 1, 0, -1 },
|
||||
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "F", NULL }, /* no layout function means floating behavior */
|
||||
{ "M", monocle },
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_01, "-nf", col_03, "-sb", col_06, "-sf", col_04, NULL };
|
||||
static const char *termcmd[] = { "dterm", NULL }; /* Script custom para la terminal */
|
||||
|
||||
/* Comandos personalizados */
|
||||
static const char *menucmd[] = { "menu-apagar", NULL };
|
||||
static const char *nnncmd[] = { "urxvtc", "-title", "Administrador de archivos", "-e", "nnn", "-QUErxe", "-s", "trabajo", NULL };
|
||||
static const char *calcursecmd[] = { "urxvtc", "-title", "Agenda", "-e", "calcurse", NULL };
|
||||
static const char *scratchpadcmd[] = { "urxvtc", "-title", "scratchpad", "-geometry", "140x40-255-125", NULL };
|
||||
static const char *tgcmd[] = { "urxvtc", "-title", "Telegram", "-e", "tg", NULL };
|
||||
static const char *mocpcmd[] = { "urxvtc", "-e", "mocp", "-T", "yellow_red_theme", NULL };
|
||||
static const char *firefoxcmd[] = { "firefox", "-no-remote", "-P", "skynet", NULL };
|
||||
static const char *gimpcmd[] = { "gimp", NULL };
|
||||
static const char *screencastcmd[] = { "gvideo", NULL };
|
||||
static const char *mocp_play[] = { "mocp", "-p", "-t", "shuffle", NULL };
|
||||
static const char scratchpadname[] = "scratchpad";
|
||||
//static const char *scratchpadcmd[] = { "st", "-t", "scratchpad", "-g", "140x40+400+220", NULL };
|
||||
static const char *chromecmd[] = { "glibc", "chrome", NULL };
|
||||
static const char *telegramcmd[] = { "glibc","telegram", NULL };
|
||||
static const char *officecmd[] = { "glibc","onlyoffice", NULL };
|
||||
static const char *openshotcmd[] = { "glibc", "openshot-qt", NULL };
|
||||
|
||||
/* Control de volumen ALSA */
|
||||
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5%+", NULL };
|
||||
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5%-", NULL };
|
||||
static const char *mutecmd[] = { "amixer", "-q", "-D", "default", "sset", "Master", "toggle", NULL }; /* Alternar silencio/sonido */
|
||||
|
||||
/* Control del brillo de pantalla */
|
||||
//static const char *brightnessup[] = { "light", "-A", "2.5"};
|
||||
//static const char *brightnessdown[] = { "light", "-U", "2.5"};
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ 0, XK_F12, togglescratch, {.v = scratchpadcmd} },
|
||||
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_u, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
|
||||
/* Atajos personalizados */
|
||||
{ MODKEY, XK_F1, spawn, {.v = nnncmd } },
|
||||
{ ControlMask, XK_F1, spawn, {.v = calcursecmd } },
|
||||
{ MODKEY, XK_F2, spawn, {.v = firefoxcmd } },
|
||||
{ ControlMask, XK_F2, spawn, {.v = chromecmd } },
|
||||
{ MODKEY, XK_F3, spawn, {.v = tgcmd } }, // Telegram CLI
|
||||
{ ControlMask, XK_F3, spawn, {.v = telegramcmd } },
|
||||
{ MODKEY, XK_F4, spawn, {.v = gimpcmd } },
|
||||
{ ControlMask, XK_F4, spawn, {.v = openshotcmd } },
|
||||
{ MODKEY, XK_x, spawn, {.v = menucmd } }, // Atajo menú Apagar
|
||||
{ MODKEY, XK_v, spawn, {.v = screencastcmd } },// Grabar pantalla
|
||||
{ ControlMask, XK_m, spawn, SHCMD("usb -m") }, // Montar usb
|
||||
{ ControlMask, XK_u, spawn, SHCMD("usb -u") }, // Desmontar usb
|
||||
{ MODKEY|ShiftMask, XK_u, spawn, SHCMD("usb -U") }, // Desmontar último usb
|
||||
{ MODKEY, XK_F10, spawn, {.v = mocpcmd } },
|
||||
{ ControlMask, XK_F10, spawn, {.v = mocp_play } },
|
||||
{ ControlMask, XK_F12, spawn, SHCMD("net wlan0") },
|
||||
{ MODKEY, XK_F5, spawn, {.v = officecmd } },
|
||||
|
||||
/* Modos de captura de pantalla */
|
||||
{ 0, XK_Print, spawn, SHCMD("image_ss -p") }, // Captura de pantalla en el portapapeles
|
||||
{ ShiftMask, XK_Print, spawn, SHCMD("image_ss -s") }, // Captura de área seleccionada en el portapapeles
|
||||
{ ControlMask, XK_Print, spawn, SHCMD("image_ss -g") }, // Guardar captura de pantalla
|
||||
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("image_ss -S")}, // Guardar área seleccionada
|
||||
|
||||
/* Atajos multimedia */
|
||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mocp -G") },
|
||||
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mocp -r") },
|
||||
{ 0, XF86XK_AudioNext, spawn, SHCMD("mocp -f") },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } },
|
||||
|
||||
/* Ajustar brillo de la pantalla */
|
||||
// { 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup} },
|
||||
// { 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown} },
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
TAGKEYS( XK_4, 3)
|
||||
TAGKEYS( XK_5, 4)
|
||||
TAGKEYS( XK_6, 5)
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
static Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
|
114
Plantillas/dwm-custom/bak/6.4/1.dwm-fibonacci-6.4.diff
Normal file
114
Plantillas/dwm-custom/bak/6.4/1.dwm-fibonacci-6.4.diff
Normal file
|
@ -0,0 +1,114 @@
|
|||
From ec9f55b6005cfa3b025b3d700c61af3ce539d057 Mon Sep 17 00:00:00 2001
|
||||
From: Niki Yoshiuchi <nyoshiuchi@gmail.com>
|
||||
Date: Sat, 18 Apr 2020 09:55:26 -0700
|
||||
Subject: [PATCH] Adding the fibonacci layout patch
|
||||
|
||||
---
|
||||
config.def.h | 5 ++++
|
||||
fibonacci.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 71 insertions(+)
|
||||
create mode 100644 fibonacci.c
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1c0b587..5708487 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -36,11 +36,14 @@ static const float mfact = 0.55; /* factor of master area size [0.05..0.95]
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
||||
|
||||
+#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
+ { "[@]", spiral },
|
||||
+ { "[\\]", dwindle },
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
@@ -76,6 +79,8 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
+ { MODKEY, XK_r, setlayout, {.v = &layouts[3]} },
|
||||
+ { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
diff --git a/fibonacci.c b/fibonacci.c
|
||||
new file mode 100644
|
||||
index 0000000..fce0a57
|
||||
--- /dev/null
|
||||
+++ b/fibonacci.c
|
||||
@@ -0,0 +1,66 @@
|
||||
+void
|
||||
+fibonacci(Monitor *mon, int s) {
|
||||
+ unsigned int i, n, nx, ny, nw, nh;
|
||||
+ Client *c;
|
||||
+
|
||||
+ for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++);
|
||||
+ if(n == 0)
|
||||
+ return;
|
||||
+
|
||||
+ nx = mon->wx;
|
||||
+ ny = 0;
|
||||
+ nw = mon->ww;
|
||||
+ nh = mon->wh;
|
||||
+
|
||||
+ for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) {
|
||||
+ if((i % 2 && nh / 2 > 2 * c->bw)
|
||||
+ || (!(i % 2) && nw / 2 > 2 * c->bw)) {
|
||||
+ if(i < n - 1) {
|
||||
+ if(i % 2)
|
||||
+ nh /= 2;
|
||||
+ else
|
||||
+ nw /= 2;
|
||||
+ if((i % 4) == 2 && !s)
|
||||
+ nx += nw;
|
||||
+ else if((i % 4) == 3 && !s)
|
||||
+ ny += nh;
|
||||
+ }
|
||||
+ if((i % 4) == 0) {
|
||||
+ if(s)
|
||||
+ ny += nh;
|
||||
+ else
|
||||
+ ny -= nh;
|
||||
+ }
|
||||
+ else if((i % 4) == 1)
|
||||
+ nx += nw;
|
||||
+ else if((i % 4) == 2)
|
||||
+ ny += nh;
|
||||
+ else if((i % 4) == 3) {
|
||||
+ if(s)
|
||||
+ nx += nw;
|
||||
+ else
|
||||
+ nx -= nw;
|
||||
+ }
|
||||
+ if(i == 0)
|
||||
+ {
|
||||
+ if(n != 1)
|
||||
+ nw = mon->ww * mon->mfact;
|
||||
+ ny = mon->wy;
|
||||
+ }
|
||||
+ else if(i == 1)
|
||||
+ nw = mon->ww - nw;
|
||||
+ i++;
|
||||
+ }
|
||||
+ resize(c, nx, ny, nw - 2 * c->bw, nh - 2 * c->bw, False);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+dwindle(Monitor *mon) {
|
||||
+ fibonacci(mon, 1);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+spiral(Monitor *mon) {
|
||||
+ fibonacci(mon, 0);
|
||||
+}
|
||||
--
|
||||
2.20.1
|
||||
|
30
Plantillas/dwm-custom/bak/6.4/2.dwm-noborder-6.4.diff
Normal file
30
Plantillas/dwm-custom/bak/6.4/2.dwm-noborder-6.4.diff
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 9102fdb9c670218373bbe83c891c8e8138d6a6f4 Mon Sep 17 00:00:00 2001
|
||||
From: redacted <redacted@example.com>
|
||||
Date: Tue, 23 Apr 2019 00:39:27 +0100
|
||||
Subject: [PATCH] added noborder patch
|
||||
|
||||
---
|
||||
dwm.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..685eca1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -1282,6 +1282,13 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
||||
c->oldw = c->w; c->w = wc.width = w;
|
||||
c->oldh = c->h; c->h = wc.height = h;
|
||||
wc.border_width = c->bw;
|
||||
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|
||||
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
|
||||
+ && !c->isfullscreen && !c->isfloating) {
|
||||
+ c->w = wc.width += c->bw * 2;
|
||||
+ c->h = wc.height += c->bw * 2;
|
||||
+ wc.border_width = 0;
|
||||
+ }
|
||||
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
||||
configure(c);
|
||||
XSync(dpy, False);
|
||||
--
|
||||
2.21.0
|
||||
|
80
Plantillas/dwm-custom/bak/6.4/3.dwm-scratchpad-6.4.diff
Normal file
80
Plantillas/dwm-custom/bak/6.4/3.dwm-scratchpad-6.4.diff
Normal file
|
@ -0,0 +1,80 @@
|
|||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -58,11 +58,14 @@
|
||||
/* commands */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
+static const char scratchpadname[] = "scratchpad";
|
||||
+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
+ { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -212,6 +212,7 @@
|
||||
static void tile(Monitor *m);
|
||||
static void togglebar(const Arg *arg);
|
||||
static void togglefloating(const Arg *arg);
|
||||
+static void togglescratch(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void unfocus(Client *c, int setfocus);
|
||||
@@ -272,6 +273,8 @@
|
||||
/* configuration, allows nested code to access above variables */
|
||||
#include "config.h"
|
||||
|
||||
+static unsigned int scratchtag = 1 << LENGTH(tags);
|
||||
+
|
||||
/* compile-time check if all tags fit into an unsigned int bit array. */
|
||||
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
|
||||
|
||||
@@ -1052,6 +1055,14 @@
|
||||
c->y = MAX(c->y, c->mon->wy);
|
||||
c->bw = borderpx;
|
||||
|
||||
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
|
||||
+ if (!strcmp(c->name, scratchpadname)) {
|
||||
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
|
||||
+ c->isfloating = True;
|
||||
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
|
||||
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
|
||||
+ }
|
||||
+
|
||||
wc.border_width = c->bw;
|
||||
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
|
||||
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
|
||||
@@ -1715,6 +1729,28 @@
|
||||
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
|
||||
selmon->sel->w, selmon->sel->h, 0);
|
||||
arrange(selmon);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+togglescratch(const Arg *arg)
|
||||
+{
|
||||
+ Client *c;
|
||||
+ unsigned int found = 0;
|
||||
+
|
||||
+ for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next);
|
||||
+ if (found) {
|
||||
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag;
|
||||
+ if (newtagset) {
|
||||
+ selmon->tagset[selmon->seltags] = newtagset;
|
||||
+ focus(NULL);
|
||||
+ arrange(selmon);
|
||||
+ }
|
||||
+ if (ISVISIBLE(c)) {
|
||||
+ focus(c);
|
||||
+ restack(selmon);
|
||||
+ }
|
||||
+ } else
|
||||
+ spawn(arg);
|
||||
}
|
||||
|
||||
void
|
|
@ -0,0 +1,34 @@
|
|||
From be8b8d6a0b864a7c6ca7e37a1df9f53ddd87916b Mon Sep 17 00:00:00 2001
|
||||
From: explosion-mental <explosion0mental@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 12:10:14 -0500
|
||||
Subject: [PATCH] [PATCH][truecenteredtitle]Center the title with proportion to
|
||||
the area that the title has, unlike the [other center title](../centretitle)
|
||||
patch that center proportion to the screen size width (`m->ww`), which on
|
||||
smaller monitors doesn't get the effect.
|
||||
|
||||
If the title name is to long (title area too small for the title string)
|
||||
it will back up to the default behaviour, which is to truncate the
|
||||
title.
|
||||
---
|
||||
dwm.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index a96f33c..6198b29 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -735,7 +735,10 @@ drawbar(Monitor *m)
|
||||
if ((w = m->ww - tw - x) > bh) {
|
||||
if (m->sel) {
|
||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
+ if (TEXTW(m->sel->name) > w) /* title is bigger than the width of the title rectangle, don't center */
|
||||
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
+ else /* center window title */
|
||||
+ drw_text(drw, x, 0, w, bh, (w - TEXTW(m->sel->name)) / 2, m->sel->name, 0);
|
||||
if (m->sel->isfloating)
|
||||
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
|
||||
} else {
|
||||
--
|
||||
2.35.1
|
||||
|
190
Plantillas/dwm-custom/bak/6.4/config.h_6.4
Normal file
190
Plantillas/dwm-custom/bak/6.4/config.h_6.4
Normal file
|
@ -0,0 +1,190 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <X11/XF86keysym.h>
|
||||
#include <X11/keysymdef.h>
|
||||
|
||||
/* Apariencia */
|
||||
static const unsigned int borderpx = 1; /* Pixel del borde de ventanas */
|
||||
static const unsigned int snap = 8; /* Ajustar pixel */
|
||||
static const int showbar = 1; /* 0 siginifica que no hay barra */
|
||||
static const int topbar = 1; /* 0 significa barra inferior */
|
||||
static const char *fonts[] = { "Hack:style=Regular:size=6:antialias=true:autohint=true", };
|
||||
static const char dmenufont[] = "Source Code Pro:style=Bold:size=10";
|
||||
static const char col_01[] = "#1c1f22"; /* Color de la barra de estado en reposo*/
|
||||
static const char col_02[] = "#1c1f22"; /* Color del borde de pantalla desenfocada */
|
||||
static const char col_03[] = "#ffffff"; /* Color de las letras de la barra de estado */
|
||||
static const char col_04[] = "#02ff00"; /* Color del nombre y etiqueta que está en uso */
|
||||
static const char col_05[] = "#ffffff"; /* Color del borde de la ventana enfocada */
|
||||
static const char col_06[] = "#1c1f22"; /* Color barra de estado cuando está en uso */
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_03, col_01, col_02 },
|
||||
[SchemeSel] = { col_04, col_06, col_05 },
|
||||
};
|
||||
|
||||
/* Etiquetado */
|
||||
static const char *tags[] = {"[Home]", "[Web]", "[Social]", "[Multimedia]", "[Shell]", "[Office]", "[Others]" };
|
||||
static const Rule rules[] = {
|
||||
/* class instance title tag mask isfloating monitor */
|
||||
{ "URxvt", NULL, "Administrador de archivos", 1 << 0, 0, -1 },
|
||||
{ "URxvt", NULL, "Agenda", 1 << 0, 0, -1 },
|
||||
{ "Firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
{ "Google-chrome", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Pale moon", "Navigator", NULL, 1 << 6, 0, -1 },
|
||||
{ "URxvt", "urxvt", "Telegram", 1 << 2, 0, -1 },
|
||||
{ "Telegram", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Gimp", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Openshot-qt", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "MPlayer", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Arandr", NULL, NULL, 1 << 4, 0, -1 },
|
||||
{ "libreoffice-writer", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-calc", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-impress", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "DesktopEditors", "DesktopEditors", NULL, 1 << 5, 0, -1 },
|
||||
{ "Galculator", NULL, NULL, 0, 1, -1 } ,
|
||||
{ "Lxappearance", NULL, NULL, 0, 1, -1 },
|
||||
{ "LibreOffice 7.1", NULL, "Abrir", 0, 1, -1 },
|
||||
{ "URxvt", "urxvt", "warning", 0, 1, -1 },
|
||||
{ NULL, NULL, "LibreOffice", 1 << 5, 0, -1 },
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.50; /* r del tamaño del área maestra */
|
||||
static const int nmaster = 1; /* número de clientes en el área maestra */
|
||||
static const int resizehints = 0; /* 1 significa respetar las sugerencias de tamaño en los cambios de tamaño en mosaico */
|
||||
static const int lockfullscreen = 1; /* 1 forzará el enfoque en la ventana de pantalla completa */
|
||||
|
||||
#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* símbolo función de distribución */
|
||||
{ "[\\]", dwindle }, /* la primera entrada es la predeterminada */
|
||||
{ "M", monocle },
|
||||
{ "@", spiral },
|
||||
{ "T", tile },
|
||||
{ "F", NULL }, /* in función de diseño significa comportamiento flotante */
|
||||
};
|
||||
|
||||
/* Definiciones de teclas */
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||
|
||||
/* asistente para generar comandos de shell al estilo anterior a dwm-5.0 */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* Comandos */
|
||||
/* static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_01, "-nf", col_03, "-sb", col_06, "-sf", col_04, NULL };
|
||||
static const char *termcmd[] = { "dterm", NULL }; /* Script custom para la terminal */
|
||||
static const char scratchpadname[] = "scratchpad";
|
||||
static const char *scratchpadcmd[] = { "urxvtc", "-title", "scratchpad", "-geometry", "140x40-255-125", NULL };
|
||||
/* static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; */
|
||||
|
||||
/* Comandos personalizados */
|
||||
static const char *menu[] = { "menu-apagar", NULL };
|
||||
static const char *nnn[] = { "urxvtc", "-title", "Administrador de archivos", "-e", "nnn", "-QUErxe", "-s", "trabajo", NULL };
|
||||
static const char *calcurse[] = { "urxvtc", "-title", "Agenda", "-e", "calcurse", NULL };
|
||||
static const char *tg[] = { "urxvtc", "-title", "Telegram", "-e", "tg", NULL };
|
||||
static const char *mocp[] = { "urxvtc", "-e", "mocp", "-T", "yellow_red_theme", NULL };
|
||||
static const char *firefox[] = { "firefox", "-no-remote", "-P", "skynet", NULL };
|
||||
static const char *gimp[] = { "gimp", NULL };
|
||||
static const char *screencast[] = { "gvideo", NULL };
|
||||
static const char *mocp_play[] = { "mocp", "-p", "-t", "shuffle", NULL };
|
||||
static const char *chrome[] = { "glibc", "chrome", NULL };
|
||||
static const char *openshot[] = { "glibc", "openshot-qt", NULL };
|
||||
|
||||
/* Control de volumen ALSA */
|
||||
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5%+", NULL };
|
||||
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5%-", NULL };
|
||||
static const char *mutecmd[] = { "amixer", "-q", "-D", "default", "sset", "Master", "toggle", NULL }; /* Alternar silencio/sonido */
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ 0, XK_F12, togglescratch, {.v = scratchpadcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_r, setlayout, {.v = &layouts[0]} }, /* Fibonacci invertido */
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[1]} }, /* Monóculo */
|
||||
{ MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[2]} }, /* Fibonacci */
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[3]} }, /* Mosaico */
|
||||
{ MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[4]} }, /* Flotante */
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
TAGKEYS( XK_4, 3)
|
||||
TAGKEYS( XK_5, 4)
|
||||
TAGKEYS( XK_6, 5)
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
|
||||
/* Atajos personalizados */
|
||||
{ MODKEY, XK_F1, spawn, {.v = nnn } },
|
||||
{ ControlMask, XK_F1, spawn, {.v = calcurse } },
|
||||
{ MODKEY, XK_F2, spawn, {.v = firefox } },
|
||||
{ ControlMask, XK_F2, spawn, {.v = chrome } },
|
||||
{ MODKEY, XK_F3, spawn, {.v = tg } }, // Telegram CLI
|
||||
{ MODKEY, XK_F4, spawn, {.v = gimp } },
|
||||
{ ControlMask, XK_F4, spawn, {.v = openshot } },
|
||||
{ MODKEY, XK_x, spawn, {.v = menu } }, // Atajo menú Apagar
|
||||
{ MODKEY, XK_v, spawn, {.v = screencast } },// Grabar pantalla
|
||||
{ ControlMask, XK_m, spawn, SHCMD("usb -m") }, // Montar usb
|
||||
{ ControlMask, XK_u, spawn, SHCMD("usb -u") }, // Desmontar usb
|
||||
{ MODKEY|ShiftMask, XK_u, spawn, SHCMD("usb -U") }, // Desmontar último usb
|
||||
{ MODKEY, XK_F10, spawn, {.v = mocp } },
|
||||
{ ControlMask, XK_F10, spawn, {.v = mocp_play } },
|
||||
{ ControlMask, XK_F12, spawn, SHCMD("net wlan0") },
|
||||
|
||||
/* Modos de captura de pantalla */
|
||||
{ 0, XK_Print, spawn, SHCMD("image_ss -p") }, // Captura de pantalla en el portapapeles
|
||||
{ ShiftMask, XK_Print, spawn, SHCMD("image_ss -s") }, // Captura de área seleccionada en el portapapeles
|
||||
{ ControlMask, XK_Print, spawn, SHCMD("image_ss -g") }, // Guardar captura de pantalla
|
||||
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("image_ss -S")}, // Guardar área seleccionada
|
||||
|
||||
/* Atajos multimedia */
|
||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mocp -G") },
|
||||
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mocp -r") },
|
||||
{ 0, XF86XK_AudioNext, spawn, SHCMD("mocp -f") },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
static const Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||
{ ClkWinTitle, 0, Button2, zoom, {0} },
|
||||
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
|
||||
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
|
||||
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
|
||||
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
|
|
@ -2,69 +2,68 @@
|
|||
#include <X11/XF86keysym.h>
|
||||
#include <X11/keysymdef.h>
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 8; /* snap pixel */
|
||||
static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */
|
||||
static const unsigned int systrayspacing = 1; /* systray spacing */
|
||||
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
|
||||
static const int showsystray = 1; /* 0 means no systray */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
static const char *fonts[] = { "Ubuntu Mono:size=8",
|
||||
"Font Awesome 5 Free Solid:size=8:antialias=true:autohint=true",
|
||||
"Font Awesome 5 Free Regular:size=8:antialias=true:autohint=true",
|
||||
"Font Awesome 5 Brands Regular:size=8:antialias=true:autohint=true", };
|
||||
static const char dmenufont[] = "Ubuntu Condensed:size=13";
|
||||
static const char col_01[] = "#1c1f22"; /* Color de la barra de estado en reposo*/
|
||||
static const char col_02[] = "#1c1f22"; /* Color del borde de pantalla desenfocada */
|
||||
static const char col_03[] = "#ffffff"; /* Color de las letras de la barra de estado */
|
||||
static const char col_04[] = "#02ff00"; /* Color del nombre y etiqueta que está en uso */
|
||||
static const char col_05[] = "#ffffff"; /* Color del borde de la ventana enfocada */
|
||||
static const char col_06[] = "#1c1f22"; /* Color barra de estado cuando está en uso */
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_03, col_01, col_02 },
|
||||
[SchemeSel] = { col_04, col_06, col_05 },
|
||||
/* Apariencia */
|
||||
static const unsigned int borderpx = 1; /* Pixel del borde de ventanas */
|
||||
static const unsigned int snap = 8; /* Ajustar pixel */
|
||||
static const int showbar = 1; /* 0 siginifica que no hay barra */
|
||||
static const int topbar = 1; /* 0 significa barra inferior */
|
||||
static const char *fonts[] = { "Hack:style=Regular:size=6:antialias=true:autohint=true", };
|
||||
static const char dmenufont[] = "Source Code Pro:style=Bold:size=10";
|
||||
static const char col_01[] = "#1c1f22"; /* Color de la barra de estado en reposo*/
|
||||
static const char col_02[] = "#1c1f22"; /* Color del borde de pantalla desenfocada */
|
||||
static const char col_03[] = "#ffffff"; /* Color de las letras de la barra de estado */
|
||||
static const char col_04[] = "#02ff00"; /* Color del nombre y etiqueta que está en uso */
|
||||
static const char col_05[] = "#ffffff"; /* Color del borde de la ventana enfocada */
|
||||
static const char col_06[] = "#1c1f22"; /* Color barra de estado cuando está en uso */
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_03, col_01, col_02 },
|
||||
[SchemeSel] = { col_04, col_06, col_05 },
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
//static const char *tags[] = { "", "", "", "", "", "", "" };
|
||||
static const char *tags[] = { "", "", "", "", "", "" };
|
||||
|
||||
/* Etiquetado */
|
||||
static const char *tags[] = {"[Home]", "[Web]", "[Social]", "[Multimedia]", "[Shell]", "[Office]", "[Others]" };
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ "URxvt", NULL, "Administrador de archivos", 1 << 0, 0, -1 },
|
||||
{ "Gimp", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
{ "Google-chrome", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Galculator", NULL, NULL, 0, 1, -1 },
|
||||
{ "Openshot-qt", NULL, NULL, 1 << 3, 0, -1 }, // Editor de videos
|
||||
{ "Telegram", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Lxappearance", NULL, NULL, 0, 1, -1 },
|
||||
{ "LibreOffice 7.1", NULL, "Abrir", 0, 1, -1 },
|
||||
{ "URxvt", NULL, "warning", 0, 1, -1 },
|
||||
{ "st-256color", "st-256color", "tg", 1 << 2, 0, -1 },
|
||||
|
||||
/* class instance title tag mask isfloating monitor */
|
||||
{ "URxvt", NULL, "Administrador de archivos", 1 << 0, 0, -1 },
|
||||
{ "URxvt", NULL, "Agenda", 1 << 0, 0, -1 },
|
||||
{ "Firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
{ "Google-chrome", NULL, NULL, 1 << 6, 0, -1 },
|
||||
{ "Pale moon", "Navigator", NULL, 1 << 6, 0, -1 },
|
||||
{ "URxvt", "urxvt", "Telegram", 1 << 2, 0, -1 },
|
||||
{ "Telegram", NULL, NULL, 1 << 2, 0, -1 },
|
||||
{ "Gimp", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Openshot-qt", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "MPlayer", NULL, NULL, 1 << 3, 0, -1 },
|
||||
{ "Arandr", NULL, NULL, 1 << 4, 0, -1 },
|
||||
{ "libreoffice-writer", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-calc", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "libreoffice-impress", "libreoffice", NULL, 1 << 5, 0, -1 },
|
||||
{ "DesktopEditors", "DesktopEditors", NULL, 1 << 5, 0, -1 },
|
||||
{ "Galculator", NULL, NULL, 0, 1, -1 } ,
|
||||
{ "Lxappearance", NULL, NULL, 0, 1, -1 },
|
||||
{ "LibreOffice 7.1", NULL, "Abrir", 0, 1, -1 },
|
||||
{ "URxvt", "urxvt", "warning", 0, 1, -1 },
|
||||
{ NULL, NULL, "LibreOffice", 1 << 5, 0, -1 },
|
||||
};
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.50; /* factor of master area size [0.05..0.95] */
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
static const int resizehints = 0; /* 1 means respect size hints in tiled resizals */
|
||||
static const float mfact = 0.50; /* r del tamaño del área maestra */
|
||||
static const int nmaster = 1; /* número de clientes en el área maestra */
|
||||
static const int resizehints = 0; /* 1 significa respetar las sugerencias de tamaño en los cambios de tamaño en mosaico */
|
||||
static const int lockfullscreen = 1; /* 1 forzará el enfoque en la ventana de pantalla completa */
|
||||
|
||||
#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "T", tile }, /* first entry is default */
|
||||
{ "F", NULL }, /* no layout function means floating behavior */
|
||||
{ "M", monocle },
|
||||
/* símbolo función de distribución */
|
||||
{ "[\\]", dwindle }, /* la primera entrada es la predeterminada */
|
||||
{ "M", monocle },
|
||||
{ "@", spiral },
|
||||
{ "T", tile },
|
||||
{ "F", NULL }, /* in función de diseño significa comportamiento flotante */
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
/* Definiciones de teclas */
|
||||
#define MODKEY Mod4Mask
|
||||
#define TAGKEYS(KEY,TAG) \
|
||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||
|
@ -72,121 +71,109 @@ static const Layout layouts[] = {
|
|||
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
|
||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
/* asistente para generar comandos de shell al estilo anterior a dwm-5.0 */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_01, "-nf", col_03, "-sb", col_06, "-sf", col_04, NULL };
|
||||
//static const char *termcmd[] = { "st", "-t", "Enter the Void", NULL }; /* Terminal */
|
||||
/* Comandos */
|
||||
/* static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_01, "-nf", col_03, "-sb", col_06, "-sf", col_04, NULL };
|
||||
static const char *termcmd[] = { "dterm", NULL }; /* Script custom para la terminal */
|
||||
static const char scratchpadname[] = "scratchpad";
|
||||
static const char *scratchpadcmd[] = { "urxvtc", "-title", "scratchpad", "-geometry", "140x40-255-125", NULL };
|
||||
/* static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL }; */
|
||||
|
||||
/* Comandos personalizados */
|
||||
static const char *menucmd[] = { "menu-apagar", NULL };
|
||||
static const char *screencastcmd[] = { "gvideo", NULL };
|
||||
//static const char *nnncmd[] = { "st", "-T", "Administrador de archivos", "-e", "nnn", NULL };
|
||||
static const char *nnncmd[] = { "urxvtc", "-title", "Administrador de archivos", "-e", "nnn", "-QUErxe", "-s", "trabajo", NULL };
|
||||
static const char *firefoxcmd[] = { "firefox", NULL };
|
||||
static const char *chrome[] = { "glibc", "google-chrome", NULL };
|
||||
static const char *telegramcmd[] = { "glibc","telegram", NULL };
|
||||
static const char *gimpcmd[] = { "gimp", NULL };
|
||||
static const char *openshotcmd[] = { "glibc", "openshot-qt", NULL };
|
||||
static const char *mocpcmd[] = { "st", "-e", "mocp", "-T", "yellow_red_theme", NULL };
|
||||
static const char *mocp_play[] = { "mocp", "-p", "-t", "shuffle", NULL };
|
||||
static const char scratchpadname[] = "scratchpad";
|
||||
static const char *scratchpadcmd[] = { "st", "-t", "scratchpad", "-g", "140x40+400+220", NULL };
|
||||
static const char *dropboxcmd[] = { "tbox", "--toggle", NULL };
|
||||
static const char *wificmd[] = { "wifi", "--toggle", NULL };
|
||||
static const char *tgcmd[] = { "st", "-e", "tg", NULL };
|
||||
static const char *menu[] = { "menu-apagar", NULL };
|
||||
static const char *nnn[] = { "urxvtc", "-title", "Administrador de archivos", "-e", "nnn", "-QUErxe", "-s", "trabajo", NULL };
|
||||
static const char *calcurse[] = { "urxvtc", "-title", "Agenda", "-e", "calcurse", NULL };
|
||||
static const char *tg[] = { "urxvtc", "-title", "Telegram", "-e", "tg", NULL };
|
||||
static const char *mocp[] = { "urxvtc", "-e", "mocp", "-T", "yellow_red_theme", NULL };
|
||||
static const char *firefox[] = { "firefox", "-no-remote", "-P", "skynet", NULL };
|
||||
static const char *gimp[] = { "gimp", NULL };
|
||||
static const char *screencast[] = { "gvideo", NULL };
|
||||
static const char *mocp_play[] = { "mocp", "-p", "-t", "shuffle", NULL };
|
||||
static const char *chrome[] = { "glibc", "chrome", NULL };
|
||||
static const char *openshot[] = { "glibc", "openshot-qt", NULL };
|
||||
|
||||
/* Control de volumen ALSA */
|
||||
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5%+", NULL };
|
||||
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5%-", NULL };
|
||||
static const char *mutecmd[] = { "amixer", "-q", "-D", "default", "sset", "Master", "toggle", NULL }; /* Alternar silencio/sonido */
|
||||
/* Control de volumen ALSA */
|
||||
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5%+", NULL };
|
||||
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5%-", NULL };
|
||||
static const char *mutecmd[] = { "amixer", "-q", "-D", "default", "sset", "Master", "toggle", NULL }; /* Alternar silencio/sonido */
|
||||
|
||||
/* Control del brillo de pantalla */
|
||||
static const char *brightnessup[] = { "light", "-A", "2.5"};
|
||||
static const char *brightnessdown[] = { "light", "-U", "2.5"};
|
||||
|
||||
static Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ 0, XK_F12, togglescratch, {.v = scratchpadcmd} },
|
||||
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_u, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ 0, XK_F12, togglescratch, {.v = scratchpadcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
|
||||
{ MODKEY, XK_Tab, view, {0} },
|
||||
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
|
||||
{ MODKEY, XK_r, setlayout, {.v = &layouts[0]} }, /* Fibonacci invertido */
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[1]} }, /* Monóculo */
|
||||
{ MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[2]} }, /* Fibonacci */
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[3]} }, /* Mosaico */
|
||||
{ MODKEY|ShiftMask, XK_f, setlayout, {.v = &layouts[4]} }, /* Flotante */
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
|
||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
TAGKEYS( XK_4, 3)
|
||||
TAGKEYS( XK_5, 4)
|
||||
TAGKEYS( XK_6, 5)
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
|
||||
/* Atajos personalizados */
|
||||
{ MODKEY, XK_F1, spawn, {.v = nnncmd } },
|
||||
{ ControlMask, XK_F1, spawn, {.v = chrome } },
|
||||
{ MODKEY, XK_F2, spawn, {.v = firefoxcmd } },
|
||||
{ ControlMask, XK_F3, spawn, {.v = telegramcmd } },
|
||||
{ MODKEY, XK_F3, spawn, {.v = tgcmd } }, // Telegram CLI
|
||||
{ MODKEY, XK_F4, spawn, {.v = gimpcmd } },
|
||||
{ ControlMask, XK_F4, spawn, {.v = openshotcmd } },
|
||||
{ MODKEY, XK_x, spawn, {.v = menucmd } }, // Atajo menú Apagar
|
||||
{ MODKEY, XK_v, spawn, {.v = screencastcmd } }, // Grabar pantalla
|
||||
{ ControlMask, XK_m, spawn, SHCMD("usb -m") }, // Montar usb
|
||||
{ ControlMask, XK_u, spawn, SHCMD("usb -u") }, // Desmontar usb
|
||||
{ MODKEY|ShiftMask, XK_u, spawn, SHCMD("usb -U") }, // Desmontar último usb
|
||||
{ MODKEY, XK_F10, spawn, {.v = mocpcmd } },
|
||||
{ ControlMask, XK_F10, spawn, {.v = mocp_play } },
|
||||
{ MODKEY, XK_F11, spawn, {.v = dropboxcmd } },
|
||||
{ ControlMask, XK_F12, spawn, {.v = wificmd } },
|
||||
{ MODKEY, XK_F1, spawn, {.v = nnn } },
|
||||
{ ControlMask, XK_F1, spawn, {.v = calcurse } },
|
||||
{ MODKEY, XK_F2, spawn, {.v = firefox } },
|
||||
{ ControlMask, XK_F2, spawn, {.v = chrome } },
|
||||
{ MODKEY, XK_F3, spawn, {.v = tg } }, // Telegram CLI
|
||||
{ MODKEY, XK_F4, spawn, {.v = gimp } },
|
||||
{ ControlMask, XK_F4, spawn, {.v = openshot } },
|
||||
{ MODKEY, XK_x, spawn, {.v = menu } }, // Atajo menú Apagar
|
||||
{ MODKEY, XK_v, spawn, {.v = screencast } },// Grabar pantalla
|
||||
{ ControlMask, XK_m, spawn, SHCMD("usb -m") }, // Montar usb
|
||||
{ ControlMask, XK_u, spawn, SHCMD("usb -u") }, // Desmontar usb
|
||||
{ MODKEY|ShiftMask, XK_u, spawn, SHCMD("usb -U") }, // Desmontar último usb
|
||||
{ MODKEY, XK_F10, spawn, {.v = mocp } },
|
||||
{ ControlMask, XK_F10, spawn, {.v = mocp_play } },
|
||||
{ ControlMask, XK_F12, spawn, SHCMD("net wlan0") },
|
||||
|
||||
/* Modos de captura de pantalla */
|
||||
{ 0, XK_Print, spawn, SHCMD("ss_void -P") }, // Captura de pantalla en el portapapeles
|
||||
{ ShiftMask, XK_Print, spawn, SHCMD("ss_void -S") }, // Captura de área seleccionada en el portapapeles
|
||||
{ ControlMask, XK_Print, spawn, SHCMD("ss_void -g") }, // Guardar captura de pantalla
|
||||
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("ss_void -s")}, // Guardar área seleccionada
|
||||
|
||||
{ 0, XK_Print, spawn, SHCMD("image_ss -p") }, // Captura de pantalla en el portapapeles
|
||||
{ ShiftMask, XK_Print, spawn, SHCMD("image_ss -s") }, // Captura de área seleccionada en el portapapeles
|
||||
{ ControlMask, XK_Print, spawn, SHCMD("image_ss -g") }, // Guardar captura de pantalla
|
||||
{ MODKEY|ShiftMask, XK_Print, spawn, SHCMD("image_ss -S")}, // Guardar área seleccionada
|
||||
|
||||
/* Atajos multimedia */
|
||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mocp -G") },
|
||||
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mocp -r") },
|
||||
{ 0, XF86XK_AudioNext, spawn, SHCMD("mocp -f") },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } },
|
||||
|
||||
/* Ajustar brillo de la pantalla */
|
||||
{ 0, XF86XK_MonBrightnessUp, spawn, {.v = brightnessup} },
|
||||
{ 0, XF86XK_MonBrightnessDown, spawn, {.v = brightnessdown} },
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
TAGKEYS( XK_4, 3)
|
||||
TAGKEYS( XK_5, 4)
|
||||
TAGKEYS( XK_6, 5)
|
||||
TAGKEYS( XK_7, 6)
|
||||
TAGKEYS( XK_8, 7)
|
||||
TAGKEYS( XK_9, 8)
|
||||
{ MODKEY|ShiftMask, XK_q, quit, {0} },
|
||||
{ 0, XF86XK_AudioPlay, spawn, SHCMD("mocp -G") },
|
||||
{ 0, XF86XK_AudioPrev, spawn, SHCMD("mocp -r") },
|
||||
{ 0, XF86XK_AudioNext, spawn, SHCMD("mocp -f") },
|
||||
{ 0, XF86XK_AudioMute, spawn, {.v = mutecmd } },
|
||||
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } },
|
||||
{ 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } },
|
||||
};
|
||||
|
||||
/* button definitions */
|
||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||
static Button buttons[] = {
|
||||
static const Button buttons[] = {
|
||||
/* click event mask button function argument */
|
||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
|
||||
|
|
7
Plantillas/dwm-custom/files/dwm.desktop
Normal file
7
Plantillas/dwm-custom/files/dwm.desktop
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Dwm
|
||||
Comment=Dynamic window manager
|
||||
Exec=dwm
|
||||
Icon=dwm
|
||||
Type=XSession
|
114
Plantillas/dwm-custom/patches/1.dwm-fibonacci-6.4.diff
Normal file
114
Plantillas/dwm-custom/patches/1.dwm-fibonacci-6.4.diff
Normal file
|
@ -0,0 +1,114 @@
|
|||
From ec9f55b6005cfa3b025b3d700c61af3ce539d057 Mon Sep 17 00:00:00 2001
|
||||
From: Niki Yoshiuchi <nyoshiuchi@gmail.com>
|
||||
Date: Sat, 18 Apr 2020 09:55:26 -0700
|
||||
Subject: [PATCH] Adding the fibonacci layout patch
|
||||
|
||||
---
|
||||
config.def.h | 5 ++++
|
||||
fibonacci.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 71 insertions(+)
|
||||
create mode 100644 fibonacci.c
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1c0b587..5708487 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -36,11 +36,14 @@ static const float mfact = 0.55; /* factor of master area size [0.05..0.95]
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */
|
||||
|
||||
+#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
+ { "[@]", spiral },
|
||||
+ { "[\\]", dwindle },
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
@@ -76,6 +79,8 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
|
||||
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
|
||||
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
|
||||
+ { MODKEY, XK_r, setlayout, {.v = &layouts[3]} },
|
||||
+ { MODKEY|ShiftMask, XK_r, setlayout, {.v = &layouts[4]} },
|
||||
{ MODKEY, XK_space, setlayout, {0} },
|
||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||
diff --git a/fibonacci.c b/fibonacci.c
|
||||
new file mode 100644
|
||||
index 0000000..fce0a57
|
||||
--- /dev/null
|
||||
+++ b/fibonacci.c
|
||||
@@ -0,0 +1,66 @@
|
||||
+void
|
||||
+fibonacci(Monitor *mon, int s) {
|
||||
+ unsigned int i, n, nx, ny, nw, nh;
|
||||
+ Client *c;
|
||||
+
|
||||
+ for(n = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next), n++);
|
||||
+ if(n == 0)
|
||||
+ return;
|
||||
+
|
||||
+ nx = mon->wx;
|
||||
+ ny = 0;
|
||||
+ nw = mon->ww;
|
||||
+ nh = mon->wh;
|
||||
+
|
||||
+ for(i = 0, c = nexttiled(mon->clients); c; c = nexttiled(c->next)) {
|
||||
+ if((i % 2 && nh / 2 > 2 * c->bw)
|
||||
+ || (!(i % 2) && nw / 2 > 2 * c->bw)) {
|
||||
+ if(i < n - 1) {
|
||||
+ if(i % 2)
|
||||
+ nh /= 2;
|
||||
+ else
|
||||
+ nw /= 2;
|
||||
+ if((i % 4) == 2 && !s)
|
||||
+ nx += nw;
|
||||
+ else if((i % 4) == 3 && !s)
|
||||
+ ny += nh;
|
||||
+ }
|
||||
+ if((i % 4) == 0) {
|
||||
+ if(s)
|
||||
+ ny += nh;
|
||||
+ else
|
||||
+ ny -= nh;
|
||||
+ }
|
||||
+ else if((i % 4) == 1)
|
||||
+ nx += nw;
|
||||
+ else if((i % 4) == 2)
|
||||
+ ny += nh;
|
||||
+ else if((i % 4) == 3) {
|
||||
+ if(s)
|
||||
+ nx += nw;
|
||||
+ else
|
||||
+ nx -= nw;
|
||||
+ }
|
||||
+ if(i == 0)
|
||||
+ {
|
||||
+ if(n != 1)
|
||||
+ nw = mon->ww * mon->mfact;
|
||||
+ ny = mon->wy;
|
||||
+ }
|
||||
+ else if(i == 1)
|
||||
+ nw = mon->ww - nw;
|
||||
+ i++;
|
||||
+ }
|
||||
+ resize(c, nx, ny, nw - 2 * c->bw, nh - 2 * c->bw, False);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+dwindle(Monitor *mon) {
|
||||
+ fibonacci(mon, 1);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+spiral(Monitor *mon) {
|
||||
+ fibonacci(mon, 0);
|
||||
+}
|
||||
--
|
||||
2.20.1
|
||||
|
30
Plantillas/dwm-custom/patches/2.dwm-noborder-6.4.diff
Normal file
30
Plantillas/dwm-custom/patches/2.dwm-noborder-6.4.diff
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 9102fdb9c670218373bbe83c891c8e8138d6a6f4 Mon Sep 17 00:00:00 2001
|
||||
From: redacted <redacted@example.com>
|
||||
Date: Tue, 23 Apr 2019 00:39:27 +0100
|
||||
Subject: [PATCH] added noborder patch
|
||||
|
||||
---
|
||||
dwm.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..685eca1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -1282,6 +1282,13 @@ resizeclient(Client *c, int x, int y, int w, int h)
|
||||
c->oldw = c->w; c->w = wc.width = w;
|
||||
c->oldh = c->h; c->h = wc.height = h;
|
||||
wc.border_width = c->bw;
|
||||
+ if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
|
||||
+ || &monocle == c->mon->lt[c->mon->sellt]->arrange)
|
||||
+ && !c->isfullscreen && !c->isfloating) {
|
||||
+ c->w = wc.width += c->bw * 2;
|
||||
+ c->h = wc.height += c->bw * 2;
|
||||
+ wc.border_width = 0;
|
||||
+ }
|
||||
XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
|
||||
configure(c);
|
||||
XSync(dpy, False);
|
||||
--
|
||||
2.21.0
|
||||
|
80
Plantillas/dwm-custom/patches/3.dwm-scratchpad-6.4.diff
Normal file
80
Plantillas/dwm-custom/patches/3.dwm-scratchpad-6.4.diff
Normal file
|
@ -0,0 +1,80 @@
|
|||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -58,11 +58,14 @@
|
||||
/* commands */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
+static const char scratchpadname[] = "scratchpad";
|
||||
+static const char *scratchpadcmd[] = { "st", "-t", scratchpadname, "-g", "120x34", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||
+ { MODKEY, XK_grave, togglescratch, {.v = scratchpadcmd } },
|
||||
{ MODKEY, XK_b, togglebar, {0} },
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -212,6 +212,7 @@
|
||||
static void tile(Monitor *m);
|
||||
static void togglebar(const Arg *arg);
|
||||
static void togglefloating(const Arg *arg);
|
||||
+static void togglescratch(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
static void toggleview(const Arg *arg);
|
||||
static void unfocus(Client *c, int setfocus);
|
||||
@@ -272,6 +273,8 @@
|
||||
/* configuration, allows nested code to access above variables */
|
||||
#include "config.h"
|
||||
|
||||
+static unsigned int scratchtag = 1 << LENGTH(tags);
|
||||
+
|
||||
/* compile-time check if all tags fit into an unsigned int bit array. */
|
||||
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
|
||||
|
||||
@@ -1052,6 +1055,14 @@
|
||||
c->y = MAX(c->y, c->mon->wy);
|
||||
c->bw = borderpx;
|
||||
|
||||
+ selmon->tagset[selmon->seltags] &= ~scratchtag;
|
||||
+ if (!strcmp(c->name, scratchpadname)) {
|
||||
+ c->mon->tagset[c->mon->seltags] |= c->tags = scratchtag;
|
||||
+ c->isfloating = True;
|
||||
+ c->x = c->mon->wx + (c->mon->ww / 2 - WIDTH(c) / 2);
|
||||
+ c->y = c->mon->wy + (c->mon->wh / 2 - HEIGHT(c) / 2);
|
||||
+ }
|
||||
+
|
||||
wc.border_width = c->bw;
|
||||
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
|
||||
XSetWindowBorder(dpy, w, scheme[SchemeNorm][ColBorder].pixel);
|
||||
@@ -1715,6 +1729,28 @@
|
||||
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
|
||||
selmon->sel->w, selmon->sel->h, 0);
|
||||
arrange(selmon);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+togglescratch(const Arg *arg)
|
||||
+{
|
||||
+ Client *c;
|
||||
+ unsigned int found = 0;
|
||||
+
|
||||
+ for (c = selmon->clients; c && !(found = c->tags & scratchtag); c = c->next);
|
||||
+ if (found) {
|
||||
+ unsigned int newtagset = selmon->tagset[selmon->seltags] ^ scratchtag;
|
||||
+ if (newtagset) {
|
||||
+ selmon->tagset[selmon->seltags] = newtagset;
|
||||
+ focus(NULL);
|
||||
+ arrange(selmon);
|
||||
+ }
|
||||
+ if (ISVISIBLE(c)) {
|
||||
+ focus(c);
|
||||
+ restack(selmon);
|
||||
+ }
|
||||
+ } else
|
||||
+ spawn(arg);
|
||||
}
|
||||
|
||||
void
|
|
@ -0,0 +1,34 @@
|
|||
From be8b8d6a0b864a7c6ca7e37a1df9f53ddd87916b Mon Sep 17 00:00:00 2001
|
||||
From: explosion-mental <explosion0mental@gmail.com>
|
||||
Date: Tue, 12 Apr 2022 12:10:14 -0500
|
||||
Subject: [PATCH] [PATCH][truecenteredtitle]Center the title with proportion to
|
||||
the area that the title has, unlike the [other center title](../centretitle)
|
||||
patch that center proportion to the screen size width (`m->ww`), which on
|
||||
smaller monitors doesn't get the effect.
|
||||
|
||||
If the title name is to long (title area too small for the title string)
|
||||
it will back up to the default behaviour, which is to truncate the
|
||||
title.
|
||||
---
|
||||
dwm.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index a96f33c..6198b29 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -735,7 +735,10 @@ drawbar(Monitor *m)
|
||||
if ((w = m->ww - tw - x) > bh) {
|
||||
if (m->sel) {
|
||||
drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
+ if (TEXTW(m->sel->name) > w) /* title is bigger than the width of the title rectangle, don't center */
|
||||
+ drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0);
|
||||
+ else /* center window title */
|
||||
+ drw_text(drw, x, 0, w, bh, (w - TEXTW(m->sel->name)) / 2, m->sel->name, 0);
|
||||
if (m->sel->isfloating)
|
||||
drw_rect(drw, x + boxs, boxs, boxw, boxw, m->sel->isfixed, 0);
|
||||
} else {
|
||||
--
|
||||
2.35.1
|
||||
|
|
@ -1,15 +1,16 @@
|
|||
# Template file for 'dwm'
|
||||
pkgname=dwm
|
||||
version=6.2
|
||||
revision=2
|
||||
version=6.4
|
||||
#version=6.2
|
||||
revision=1
|
||||
makedepends="libXinerama-devel libXft-devel freetype-devel"
|
||||
short_desc="Dynamic window manager for X"
|
||||
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
|
||||
maintainer="O. Sánchez <o-sanchez@linuxmail.org>"
|
||||
license="MIT"
|
||||
homepage="http://dwm.suckless.org"
|
||||
distfiles="https://dl.suckless.org/dwm/dwm-${version}.tar.gz"
|
||||
checksum=97902e2e007aaeaa3c6e3bed1f81785b817b7413947f1db1d3b62b8da4cd110e
|
||||
patch_args="-Np1"
|
||||
checksum=fa9c0d69a584485076cfc18809fd705e5c2080dafb13d5e729a3646ca7703a6e
|
||||
#checksum=97902e2e007aaeaa3c6e3bed1f81785b817b7413947f1db1d3b62b8da4cd110e
|
||||
|
||||
do_build() {
|
||||
[ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h
|
||||
|
|
Loading…
Reference in a new issue