update: dwmblocks icons; add: correct versions
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ clean:
|
||||
dist: clean
|
||||
mkdir -p dwm-${VERSION}
|
||||
cp -R LICENSE Makefile README config.def.h config.mk\
|
||||
dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION}
|
||||
dwm.1 drw.h util.h ${SRC} dwm.png dwm-${VERSION}
|
||||
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
||||
gzip dwm-${VERSION}.tar
|
||||
rm -rf dwm-${VERSION}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ the /usr/local namespace by default).
|
||||
Afterwards enter the following command to build and install dwm (if
|
||||
necessary as root):
|
||||
|
||||
make clean install
|
||||
make install clean
|
||||
|
||||
|
||||
Running dwm
|
||||
|
||||
+13
-136
@@ -1,146 +1,23 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
/**
|
||||
* odweta's dwm rice
|
||||
*/
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
#define MAIN_FONT "JetBrainsMono Nerd Font Mono:size=14"
|
||||
static const char *fonts[] = { MAIN_FONT };
|
||||
static const char dmenufont[] = MAIN_FONT;
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_main[] = "#735e97";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_main, col_main },
|
||||
};
|
||||
#include "config/appearance.h"
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const void *cmd;
|
||||
} Sp;
|
||||
const char *spcmd0[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
|
||||
const char *spcmd1[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "lf", NULL };
|
||||
const char *spcmd2[] = {"keepassxc", NULL };
|
||||
const char *spcmd3[] = {"st", "-n", "spnmtui", "-g", "140x30", "-e", "nmtui", NULL };
|
||||
const char *spcmd4[] = {"st", "-n", "spmusic", "-g", "140x30", "-e", "ncmpcpp", NULL };
|
||||
static Sp scratchpads[] = {
|
||||
/* name cmd */
|
||||
{"spterm", spcmd0},
|
||||
{"spranger", spcmd1},
|
||||
{"spkeepassxc", spcmd2},
|
||||
{"spnmtui", spcmd3},
|
||||
{"spmusic", spcmd4},
|
||||
};
|
||||
#include "config/scratchpads.h"
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
#include "config/tags.h"
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
|
||||
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 },
|
||||
{ NULL, "keepassxc", NULL, SPTAG(2), 1, -1 },
|
||||
{ NULL, "spnmtui", NULL, SPTAG(3), 1, -1 },
|
||||
{ NULL, "spmusic", NULL, SPTAG(4), 1, -1 },
|
||||
{ "st-256color", NULL, NULL, 1 << 0, 0, -1 },
|
||||
{ "firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
};
|
||||
#include "config/rules.h"
|
||||
|
||||
/* 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||
#include "config/layouts.h"
|
||||
|
||||
#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[\\]", dwindle },
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
{ "[@]", spiral },
|
||||
};
|
||||
#include "config/key_definitions.h"
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod4Mask /* Mod4 = Hyper key */
|
||||
#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} },
|
||||
#include "config/dmenumon.h"
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
#include "config/commands.h"
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-np", "-l", "10", "-g", "2", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_main, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *djcmd[] = { "dj.sh", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
// essential apps
|
||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_m, spawn, {.v = djcmd } },
|
||||
// window management
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_q, killclient, {0} },
|
||||
{ MODKEY|ShiftMask, XK_f, togglefloating, {0} },
|
||||
// focus change (tags and monitors)
|
||||
{ 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 } },
|
||||
// scratchpads
|
||||
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, // ephemeral term
|
||||
{ MODKEY, XK_f, togglescratch, {.ui = 1 } }, // file manager
|
||||
{ MODKEY, XK_p, togglescratch, {.ui = 2 } }, // keepass
|
||||
{ MODKEY, XK_n, togglescratch, {.ui = 3 } }, // nmtui
|
||||
{ MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 4 } }, // music
|
||||
// tag movement
|
||||
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)
|
||||
// misc
|
||||
{ MODKEY|ShiftMask, XK_e, quit, {0} },
|
||||
};
|
||||
|
||||
/* 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, Button1, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
#include "config/keybinds.h"
|
||||
|
||||
#include "config/mousebinds.h"
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
#define MAIN_FONT "JetBrainsMono Nerd Font Mono:size=14"
|
||||
static const char *fonts[] = { MAIN_FONT };
|
||||
static const char dmenufont[] = MAIN_FONT;
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_main[] = "#735e97";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_main, col_main },
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const void *cmd;
|
||||
} Sp;
|
||||
const char *spcmd0[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
|
||||
const char *spcmd1[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "lf", NULL };
|
||||
const char *spcmd2[] = {"keepassxc", NULL };
|
||||
const char *spcmd3[] = {"st", "-n", "spnmtui", "-g", "140x30", "-e", "nmtui", NULL };
|
||||
const char *spcmd4[] = {"st", "-n", "spmusic", "-g", "140x30", "-e", "ncmpcpp", NULL };
|
||||
static Sp scratchpads[] = {
|
||||
/* name cmd */
|
||||
{"spterm", spcmd0},
|
||||
{"spranger", spcmd1},
|
||||
{"spkeepassxc", spcmd2},
|
||||
{"spnmtui", spcmd3},
|
||||
{"spmusic", spcmd4},
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
|
||||
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 },
|
||||
{ NULL, "keepassxc", NULL, SPTAG(2), 1, -1 },
|
||||
{ NULL, "spnmtui", NULL, SPTAG(3), 1, -1 },
|
||||
{ NULL, "spmusic", NULL, SPTAG(4), 1, -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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
};
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod4Mask /* Mod4 = Hyper key */
|
||||
#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", "-np", "-l", "10", "-g", "2", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_main, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *djcmd[] = { "dj.sh", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
// essential apps
|
||||
{ MODKEY, XK_d, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_m, spawn, {.v = djcmd } },
|
||||
// window management
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_q, killclient, {0} },
|
||||
{ MODKEY, XK_space, togglefloating, {0} },
|
||||
// focus change (tags and monitors)
|
||||
//{ 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 } },
|
||||
// scratchpads
|
||||
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, // ephemeral term
|
||||
{ MODKEY|ShiftMask, XK_f, togglescratch, {.ui = 1 } }, // file manager
|
||||
{ MODKEY, XK_p, togglescratch, {.ui = 2 } }, // keepass
|
||||
{ MODKEY, XK_n, togglescratch, {.ui = 3 } }, // nmtui
|
||||
{ MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 4 } }, // music
|
||||
// tag movement
|
||||
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_e, quit, {0} },
|
||||
};
|
||||
|
||||
/* 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, Button1, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--- config.def.h
|
||||
+++ 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 } },
|
||||
+13
-136
@@ -1,146 +1,23 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
/**
|
||||
* odweta's dwm rice
|
||||
*/
|
||||
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
#define MAIN_FONT "JetBrainsMono Nerd Font Mono:size=14"
|
||||
static const char *fonts[] = { MAIN_FONT };
|
||||
static const char dmenufont[] = MAIN_FONT;
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_main[] = "#735e97";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_main, col_main },
|
||||
};
|
||||
#include "config/appearance.h"
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const void *cmd;
|
||||
} Sp;
|
||||
const char *spcmd0[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
|
||||
const char *spcmd1[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "lf", NULL };
|
||||
const char *spcmd2[] = {"keepassxc", NULL };
|
||||
const char *spcmd3[] = {"st", "-n", "spnmtui", "-g", "140x30", "-e", "nmtui", NULL };
|
||||
const char *spcmd4[] = {"st", "-n", "spmusic", "-g", "140x30", "-e", "ncmpcpp", NULL };
|
||||
static Sp scratchpads[] = {
|
||||
/* name cmd */
|
||||
{"spterm", spcmd0},
|
||||
{"spranger", spcmd1},
|
||||
{"spkeepassxc", spcmd2},
|
||||
{"spnmtui", spcmd3},
|
||||
{"spmusic", spcmd4},
|
||||
};
|
||||
#include "config/scratchpads.h"
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
#include "config/tags.h"
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
|
||||
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 },
|
||||
{ NULL, "keepassxc", NULL, SPTAG(2), 1, -1 },
|
||||
{ NULL, "spnmtui", NULL, SPTAG(3), 1, -1 },
|
||||
{ NULL, "spmusic", NULL, SPTAG(4), 1, -1 },
|
||||
{ "st-256color", NULL, NULL, 1 << 0, 0, -1 },
|
||||
{ "firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
};
|
||||
#include "config/rules.h"
|
||||
|
||||
/* 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||
#include "config/layouts.h"
|
||||
|
||||
#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[\\]", dwindle },
|
||||
{ "[]=", tile }, /* first entry is default */
|
||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||
{ "[M]", monocle },
|
||||
{ "[@]", spiral },
|
||||
};
|
||||
#include "config/key_definitions.h"
|
||||
|
||||
/* key definitions */
|
||||
#define MODKEY Mod4Mask /* Mod4 = Hyper key */
|
||||
#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} },
|
||||
#include "config/dmenumon.h"
|
||||
|
||||
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||
#include "config/commands.h"
|
||||
|
||||
/* commands */
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
static const char *dmenucmd[] = { "dmenu_run", "-np", "-l", "10", "-g", "2", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_main, "-sf", col_gray4, NULL };
|
||||
static const char *termcmd[] = { "st", NULL };
|
||||
static const char *djcmd[] = { "dj.sh", NULL };
|
||||
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
// essential apps
|
||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_m, spawn, {.v = djcmd } },
|
||||
// window management
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_q, killclient, {0} },
|
||||
{ MODKEY|ShiftMask, XK_f, togglefloating, {0} },
|
||||
// focus change (tags and monitors)
|
||||
{ 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 } },
|
||||
// scratchpads
|
||||
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, // ephemeral term
|
||||
{ MODKEY, XK_f, togglescratch, {.ui = 1 } }, // file manager
|
||||
{ MODKEY, XK_p, togglescratch, {.ui = 2 } }, // keepass
|
||||
{ MODKEY, XK_n, togglescratch, {.ui = 3 } }, // nmtui
|
||||
{ MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 4 } }, // music
|
||||
// tag movement
|
||||
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)
|
||||
// misc
|
||||
{ MODKEY|ShiftMask, XK_e, quit, {0} },
|
||||
};
|
||||
|
||||
/* 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, Button1, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
#include "config/keybinds.h"
|
||||
|
||||
#include "config/mousebinds.h"
|
||||
|
||||
+2
-14
@@ -1,25 +1,18 @@
|
||||
# dwm version
|
||||
VERSION = 6.8
|
||||
VERSION = 6.8-odweta
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
# paths
|
||||
PREFIX = /usr/local
|
||||
PREFIX = /usr
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
|
||||
X11INC = /usr/X11R6/include
|
||||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# Xinerama, comment if you don't want it
|
||||
XINERAMALIBS = -lXinerama
|
||||
XINERAMAFLAGS = -DXINERAMA
|
||||
|
||||
# freetype
|
||||
FREETYPELIBS = -lfontconfig -lXft
|
||||
FREETYPEINC = /usr/include/freetype2
|
||||
# OpenBSD (uncomment)
|
||||
#FREETYPEINC = ${X11INC}/freetype2
|
||||
#MANPREFIX = ${PREFIX}/man
|
||||
|
||||
# includes and libs
|
||||
INCS = -I${X11INC} -I${FREETYPEINC}
|
||||
@@ -27,13 +20,8 @@ LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
||||
|
||||
# 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-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
|
||||
LDFLAGS = ${LIBS}
|
||||
|
||||
# Solaris
|
||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
||||
#LDFLAGS = ${LIBS}
|
||||
|
||||
# compiler and linker
|
||||
CC = cc
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* appearance */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int snap = 32; /* snap pixel */
|
||||
static const int showbar = 1; /* 0 means no bar */
|
||||
static const int topbar = 1; /* 0 means bottom bar */
|
||||
#define MAIN_FONT "JetBrainsMono Nerd Font Propo:size=14"
|
||||
static const char *fonts[] = { MAIN_FONT };
|
||||
static const char dmenufont[] = MAIN_FONT;
|
||||
static const char col_gray1[] = "#222222";
|
||||
static const char col_gray2[] = "#444444";
|
||||
static const char col_gray3[] = "#bbbbbb";
|
||||
static const char col_gray4[] = "#eeeeee";
|
||||
static const char col_main[] = "#735e97";
|
||||
static const char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
|
||||
[SchemeSel] = { col_gray4, col_main, col_main },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* commands */
|
||||
|
||||
static const char *dmenucmd[] =
|
||||
{ "dmenu_run", "-p", "launch an app:",
|
||||
"-l", "10", "-g", "2",
|
||||
"-m", dmenumon, "-fn", dmenufont,
|
||||
"-nb", col_gray1, "-nf", col_gray3,
|
||||
"-sb", col_main, "-sf", col_gray4,
|
||||
NULL };
|
||||
|
||||
static const char *termcmd[] =
|
||||
{ "st", NULL };
|
||||
|
||||
static const char *djcmd[] =
|
||||
{ "dj.sh", NULL };
|
||||
|
||||
static const char *webbrowsercmd[] =
|
||||
{ "firefox", NULL };
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* dmenumon */
|
||||
|
||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||
@@ -0,0 +1,11 @@
|
||||
/* key definitions */
|
||||
|
||||
#define MODKEY Mod4Mask /* Mod4 = Hyper key */
|
||||
#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 } }
|
||||
@@ -0,0 +1,51 @@
|
||||
/* keybinds */
|
||||
|
||||
/**
|
||||
* free keys:
|
||||
* a b c d e f g h i j k l m n o p q r s t u v w x y z space Return grave semicolon colon comma period slash backslash [0-9] minus equals
|
||||
* 2x with ShitMask
|
||||
* = 38 * 2 = 76 different actions can be bound
|
||||
* (+ however many Fn keys you have)
|
||||
*
|
||||
* taken keys:
|
||||
* space Return m w, h j k l q ShiftMask|f, comma ShiftMask|comma period ShiftMask|period, ShiftMask|Return f p n ShiftMask|m, [1-9], ShiftMask|e
|
||||
*/
|
||||
static const Key keys[] = {
|
||||
/* modifier key function argument */
|
||||
// essential apps
|
||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||
{ MODKEY, XK_m, spawn, {.v = djcmd } },
|
||||
{ MODKEY, XK_w, spawn, {.v = webbrowsercmd } },
|
||||
// window management
|
||||
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
|
||||
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
|
||||
{ MODKEY, XK_q, killclient, {0} },
|
||||
{ MODKEY|ShiftMask, XK_f, togglefloating, {0} },
|
||||
// focus change (tags and monitors)
|
||||
{ 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 } },
|
||||
// scratchpads
|
||||
{ MODKEY|ShiftMask, XK_Return, togglescratch, {.ui = 0 } }, // ephemeral term
|
||||
{ MODKEY, XK_f, togglescratch, {.ui = 1 } }, // file manager
|
||||
{ MODKEY, XK_p, togglescratch, {.ui = 2 } }, // keepass
|
||||
{ MODKEY, XK_n, togglescratch, {.ui = 3 } }, // nmtui
|
||||
{ MODKEY|ShiftMask, XK_m, togglescratch, {.ui = 4 } }, // music
|
||||
// tag movement
|
||||
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)
|
||||
// misc
|
||||
{ MODKEY|ShiftMask, XK_e, quit, {0} },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* 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 = 1; /* 1 means respect size hints in tiled resizals */
|
||||
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */
|
||||
static const int refreshrate = 120; /* refresh rate (per second) for client move/resize */
|
||||
|
||||
#include "fibonacci.c"
|
||||
static const Layout layouts[] = {
|
||||
/* symbol arrange function */
|
||||
{ "[\\]", dwindle },
|
||||
// { "[]=", tile }, /* first entry is default */
|
||||
// { "><>", NULL }, /* no layout function means floating behavior */
|
||||
// { "[M]", monocle },
|
||||
// { "[@]", spiral },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* mouse 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, Button1, resizemouse, {0} },
|
||||
{ ClkTagBar, 0, Button1, view, {0} },
|
||||
{ ClkTagBar, 0, Button3, toggleview, {0} },
|
||||
{ ClkTagBar, MODKEY, Button1, tag, {0} },
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* rules */
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
* WM_CLASS(STRING) = instance, class
|
||||
* WM_NAME(STRING) = title
|
||||
*/
|
||||
/* class instance title tags mask isfloating monitor */
|
||||
{ NULL, "spterm", NULL, SPTAG(0), 1, -1 },
|
||||
{ NULL, "spfm", NULL, SPTAG(1), 1, -1 },
|
||||
{ NULL, "keepassxc", NULL, SPTAG(2), 1, -1 },
|
||||
{ NULL, "spnmtui", NULL, SPTAG(3), 1, -1 },
|
||||
{ NULL, "spmusic", NULL, SPTAG(4), 1, -1 },
|
||||
{ "firefox", NULL, NULL, 1 << 1, 0, -1 },
|
||||
{ "jetbrains-studio", "jetbrains-studio", NULL, 1 << 0, 0, -1 },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* scratchpads */
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
const void *cmd;
|
||||
} Sp;
|
||||
|
||||
const char *spcmd0[] = {"st", "-n", "spterm", "-g", "120x34", NULL };
|
||||
const char *spcmd1[] = {"st", "-n", "spfm", "-g", "144x41", "-e", "lf", NULL };
|
||||
const char *spcmd2[] = {"keepassxc", NULL };
|
||||
const char *spcmd3[] = {"st", "-n", "spnmtui", "-g", "140x30", "-e", "nmtui", NULL };
|
||||
const char *spcmd4[] = {"st", "-n", "spmusic", "-g", "140x30", "-e", "ncmpcpp", NULL };
|
||||
|
||||
static Sp scratchpads[] = {
|
||||
/* name cmd */
|
||||
{"spterm", spcmd0},
|
||||
{"spranger", spcmd1},
|
||||
{"spkeepassxc", spcmd2},
|
||||
{"spnmtui", spcmd3},
|
||||
{"spmusic", spcmd4},
|
||||
};
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
/* tagging */
|
||||
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
@@ -738,9 +738,6 @@ drawbar(Monitor *m)
|
||||
urg & 1 << i);
|
||||
x += w;
|
||||
}
|
||||
w = TEXTW(m->ltsymbol);
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||
|
||||
if ((w = m->ww - tw - x) > bh) {
|
||||
if (m->sel) {
|
||||
|
||||
-2165
File diff suppressed because it is too large
Load Diff
@@ -1,42 +0,0 @@
|
||||
/* cc transient.c -o transient -lX11 */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
int main(void) {
|
||||
Display *d;
|
||||
Window r, f, t = None;
|
||||
XSizeHints h;
|
||||
XEvent e;
|
||||
|
||||
d = XOpenDisplay(NULL);
|
||||
if (!d)
|
||||
exit(1);
|
||||
r = DefaultRootWindow(d);
|
||||
|
||||
f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0);
|
||||
h.min_width = h.max_width = h.min_height = h.max_height = 400;
|
||||
h.flags = PMinSize | PMaxSize;
|
||||
XSetWMNormalHints(d, f, &h);
|
||||
XStoreName(d, f, "floating");
|
||||
XMapWindow(d, f);
|
||||
|
||||
XSelectInput(d, f, ExposureMask);
|
||||
while (1) {
|
||||
XNextEvent(d, &e);
|
||||
|
||||
if (t == None) {
|
||||
sleep(5);
|
||||
t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0);
|
||||
XSetTransientForHint(d, t, f);
|
||||
XStoreName(d, t, "transient");
|
||||
XMapWindow(d, t);
|
||||
XSelectInput(d, t, ExposureMask);
|
||||
}
|
||||
}
|
||||
|
||||
XCloseDisplay(d);
|
||||
exit(0);
|
||||
}
|
||||
Reference in New Issue
Block a user