update: dwmblocks icons; add: correct versions
This commit is contained in:
+2
-5
@@ -1,8 +1,8 @@
|
|||||||
# dmenu version
|
# dmenu version
|
||||||
VERSION = 5.4
|
VERSION = 5.4-odweta
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
@@ -15,9 +15,6 @@ XINERAMAFLAGS = -DXINERAMA
|
|||||||
# freetype
|
# freetype
|
||||||
FREETYPELIBS = -lfontconfig -lXft
|
FREETYPELIBS = -lfontconfig -lXft
|
||||||
FREETYPEINC = /usr/include/freetype2
|
FREETYPEINC = /usr/include/freetype2
|
||||||
# OpenBSD (uncomment)
|
|
||||||
#FREETYPEINC = $(X11INC)/freetype2
|
|
||||||
#MANPREFIX = ${PREFIX}/man
|
|
||||||
|
|
||||||
# includes and libs
|
# includes and libs
|
||||||
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
INCS = -I$(X11INC) -I$(FREETYPEINC)
|
||||||
|
|||||||
+1
-1
@@ -158,7 +158,7 @@ drawmenu(void)
|
|||||||
{
|
{
|
||||||
unsigned int curpos;
|
unsigned int curpos;
|
||||||
struct item *item;
|
struct item *item;
|
||||||
int x = 0, y = 0, w;
|
int x = 0, y = 0, w = (lines > 0 || !matches) ? mw - x : inputw;
|
||||||
|
|
||||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||||
drw_rect(drw, 0, 0, mw, mh, 1, 1);
|
drw_rect(drw, 0, 0, mw, mh, 1, 1);
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ clean:
|
|||||||
dist: clean
|
dist: clean
|
||||||
mkdir -p dwm-${VERSION}
|
mkdir -p dwm-${VERSION}
|
||||||
cp -R LICENSE Makefile README config.def.h config.mk\
|
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}
|
tar -cf dwm-${VERSION}.tar dwm-${VERSION}
|
||||||
gzip dwm-${VERSION}.tar
|
gzip dwm-${VERSION}.tar
|
||||||
rm -rf dwm-${VERSION}
|
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
|
Afterwards enter the following command to build and install dwm (if
|
||||||
necessary as root):
|
necessary as root):
|
||||||
|
|
||||||
make clean install
|
make install clean
|
||||||
|
|
||||||
|
|
||||||
Running dwm
|
Running dwm
|
||||||
|
|||||||
+14
-137
@@ -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 },
|
|
||||||
};
|
|
||||||
|
|
||||||
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 },
|
|
||||||
{ "st-256color", NULL, NULL, 1 << 0, 0, -1 },
|
|
||||||
{ "firefox", NULL, NULL, 1 << 1, 0, -1 },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* layout(s) */
|
#include "config/appearance.h"
|
||||||
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"
|
#include "config/scratchpads.h"
|
||||||
static const Layout layouts[] = {
|
|
||||||
/* symbol arrange function */
|
|
||||||
{ "[\\]", dwindle },
|
|
||||||
{ "[]=", tile }, /* first entry is default */
|
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
|
||||||
{ "[M]", monocle },
|
|
||||||
{ "[@]", spiral },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* key definitions */
|
#include "config/tags.h"
|
||||||
#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 */
|
#include "config/rules.h"
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
|
||||||
|
|
||||||
/* commands */
|
#include "config/layouts.h"
|
||||||
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[] = {
|
#include "config/key_definitions.h"
|
||||||
/* 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 */
|
#include "config/dmenumon.h"
|
||||||
/* 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/commands.h"
|
||||||
|
|
||||||
|
#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 } },
|
|
||||||
+14
-137
@@ -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 },
|
|
||||||
};
|
|
||||||
|
|
||||||
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 },
|
|
||||||
{ "st-256color", NULL, NULL, 1 << 0, 0, -1 },
|
|
||||||
{ "firefox", NULL, NULL, 1 << 1, 0, -1 },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* layout(s) */
|
#include "config/appearance.h"
|
||||||
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"
|
#include "config/scratchpads.h"
|
||||||
static const Layout layouts[] = {
|
|
||||||
/* symbol arrange function */
|
|
||||||
{ "[\\]", dwindle },
|
|
||||||
{ "[]=", tile }, /* first entry is default */
|
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
|
||||||
{ "[M]", monocle },
|
|
||||||
{ "[@]", spiral },
|
|
||||||
};
|
|
||||||
|
|
||||||
/* key definitions */
|
#include "config/tags.h"
|
||||||
#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 */
|
#include "config/rules.h"
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
|
||||||
|
|
||||||
/* commands */
|
#include "config/layouts.h"
|
||||||
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[] = {
|
#include "config/key_definitions.h"
|
||||||
/* 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 */
|
#include "config/dmenumon.h"
|
||||||
/* 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/commands.h"
|
||||||
|
|
||||||
|
#include "config/keybinds.h"
|
||||||
|
|
||||||
|
#include "config/mousebinds.h"
|
||||||
|
|||||||
+2
-14
@@ -1,25 +1,18 @@
|
|||||||
# dwm version
|
# dwm version
|
||||||
VERSION = 6.8
|
VERSION = 6.8-odweta
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
X11LIB = /usr/X11R6/lib
|
X11LIB = /usr/X11R6/lib
|
||||||
|
|
||||||
# Xinerama, comment if you don't want it
|
|
||||||
XINERAMALIBS = -lXinerama
|
|
||||||
XINERAMAFLAGS = -DXINERAMA
|
|
||||||
|
|
||||||
# freetype
|
# freetype
|
||||||
FREETYPELIBS = -lfontconfig -lXft
|
FREETYPELIBS = -lfontconfig -lXft
|
||||||
FREETYPEINC = /usr/include/freetype2
|
FREETYPEINC = /usr/include/freetype2
|
||||||
# OpenBSD (uncomment)
|
|
||||||
#FREETYPEINC = ${X11INC}/freetype2
|
|
||||||
#MANPREFIX = ${PREFIX}/man
|
|
||||||
|
|
||||||
# includes and libs
|
# includes and libs
|
||||||
INCS = -I${X11INC} -I${FREETYPEINC}
|
INCS = -I${X11INC} -I${FREETYPEINC}
|
||||||
@@ -27,13 +20,8 @@ LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS}
|
|||||||
|
|
||||||
# flags
|
# flags
|
||||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
|
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}
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS}
|
||||||
LDFLAGS = ${LIBS}
|
LDFLAGS = ${LIBS}
|
||||||
|
|
||||||
# Solaris
|
|
||||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
|
|
||||||
#LDFLAGS = ${LIBS}
|
|
||||||
|
|
||||||
# compiler and linker
|
# compiler and linker
|
||||||
CC = cc
|
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);
|
urg & 1 << i);
|
||||||
x += w;
|
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 ((w = m->ww - tw - x) > bh) {
|
||||||
if (m->sel) {
|
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);
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
PREFIX := /usr/local
|
PREFIX := /usr
|
||||||
CC := cc
|
CC := cc
|
||||||
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
CFLAGS := -pedantic -Wall -Wno-deprecated-declarations -Os
|
||||||
LDFLAGS := -lX11
|
LDFLAGS := -lX11
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
#define MODULE_ROOT "$HOME/.config/suckless/dwmblocks/modules/"
|
#define MODULE_ROOT "$HOME/.config/suckless/dwmblocks/modules/"
|
||||||
static const Block blocks[] = {
|
static const Block blocks[] = {
|
||||||
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
||||||
{" ", MODULE_ROOT "status-music", 0, 1},
|
{" ", MODULE_ROOT "status-music", 0, 1},
|
||||||
{"net:", MODULE_ROOT "status-network", 10, 0},
|
{" ", MODULE_ROOT "status-network", 10, 0},
|
||||||
{"bat:", MODULE_ROOT "status-battery", 60, 0},
|
{" ", MODULE_ROOT "status-battery", 60, 0},
|
||||||
{"vol:", MODULE_ROOT "status-volume", 0, 2},
|
{" ", MODULE_ROOT "status-volume", 0, 2},
|
||||||
{"", MODULE_ROOT "status-datetime", 60, 0},
|
{" ", MODULE_ROOT "status-datetime", 60, 0},
|
||||||
};
|
};
|
||||||
|
|
||||||
//sets delimiter between status commands. NULL character ('\0') means no delimiter.
|
//sets delimiter between status commands. NULL character ('\0') means no delimiter.
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#define CMDLENGTH 50
|
#define CMDLENGTH 50
|
||||||
#define MIN( a, b ) ( ( a < b) ? a : b )
|
#define MIN( a, b ) ( ( a < b) ? a : b )
|
||||||
#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)
|
#define STATUSLENGTH (LENGTH(blocks) * CMDLENGTH + 1)
|
||||||
|
#define DWMBLOCKS_VERSION "1.0-odweta"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char* icon;
|
char* icon;
|
||||||
@@ -53,7 +54,6 @@ static void (*writestatus) () = pstdout;
|
|||||||
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
|
static char statusbar[LENGTH(blocks)][CMDLENGTH] = {0};
|
||||||
static char statusstr[2][STATUSLENGTH];
|
static char statusstr[2][STATUSLENGTH];
|
||||||
static int statusContinue = 1;
|
static int statusContinue = 1;
|
||||||
static int returnStatus = 0;
|
|
||||||
|
|
||||||
//opens process *cmd and stores output in *output
|
//opens process *cmd and stores output in *output
|
||||||
void getcmd(const Block *block, char *output)
|
void getcmd(const Block *block, char *output)
|
||||||
@@ -190,10 +190,17 @@ void termhandler()
|
|||||||
statusContinue = 0;
|
statusContinue = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void version() {
|
||||||
|
printf("dwmblocks " DWMBLOCKS_VERSION "\n");
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < argc; i++) {//Handle command line arguments
|
for (int i = 0; i < argc; i++) {//Handle command line arguments
|
||||||
if (!strcmp("-d",argv[i]))
|
if (!strcmp("-v",argv[i])) {
|
||||||
|
version();
|
||||||
|
return 0;
|
||||||
|
} else if (!strcmp("-d",argv[i]))
|
||||||
strncpy(delim, argv[++i], delimLen);
|
strncpy(delim, argv[++i], delimLen);
|
||||||
else if (!strcmp("-p",argv[i]))
|
else if (!strcmp("-p",argv[i]))
|
||||||
writestatus = pstdout;
|
writestatus = pstdout;
|
||||||
|
|||||||
@@ -1,3 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
mpc status | head -1
|
STATUS=$(mpc status | head -1)
|
||||||
|
STATUS_TAIL=$(mpc status | tail -1)
|
||||||
|
NAME=$STATUS
|
||||||
|
ICON=""
|
||||||
|
|
||||||
|
if [[ "$(echo $STATUS | awk -F ": " '{print $1}')" == "volume" ]]; then
|
||||||
|
NAME="silence"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# random
|
||||||
|
if [[ "$(echo $STATUS_TAIL | awk -F " " '{print $6}')" == "on" ]]; then
|
||||||
|
ICON="$ICON "
|
||||||
|
fi
|
||||||
|
|
||||||
|
# repeat
|
||||||
|
if [[ "$(echo $STATUS_TAIL | awk -F " " '{print $4}')" == "on" ]]; then
|
||||||
|
ICON="$ICON "
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -n "$ICON$NAME"
|
||||||
|
|||||||
+3
-9
@@ -1,10 +1,10 @@
|
|||||||
# slock version
|
# slock version
|
||||||
VERSION = 1.6
|
VERSION = 1.6-odweta
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
@@ -20,10 +20,4 @@ CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
|
|||||||
LDFLAGS = -s ${LIBS}
|
LDFLAGS = -s ${LIBS}
|
||||||
COMPATSRC = explicit_bzero.c
|
COMPATSRC = explicit_bzero.c
|
||||||
|
|
||||||
# On OpenBSD and Darwin remove -lcrypt from LIBS
|
CC = cc
|
||||||
#LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr
|
|
||||||
# On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS
|
|
||||||
# On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS
|
|
||||||
#CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE
|
|
||||||
# On OpenBSD set COMPATSRC to empty
|
|
||||||
#COMPATSRC =
|
|
||||||
|
|||||||
+3
-10
@@ -1,10 +1,10 @@
|
|||||||
# st version
|
# st version
|
||||||
VERSION = 0.9.3
|
VERSION = 0.9.3-odweta
|
||||||
|
|
||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
MANPREFIX = $(PREFIX)/share/man
|
MANPREFIX = $(PREFIX)/share/man
|
||||||
|
|
||||||
X11INC = /usr/X11R6/include
|
X11INC = /usr/X11R6/include
|
||||||
@@ -25,12 +25,5 @@ STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
|||||||
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
||||||
STLDFLAGS = $(LIBS) $(LDFLAGS)
|
STLDFLAGS = $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
# OpenBSD:
|
|
||||||
#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
|
||||||
#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \
|
|
||||||
# `$(PKG_CONFIG) --libs fontconfig` \
|
|
||||||
# `$(PKG_CONFIG) --libs freetype2`
|
|
||||||
#MANPREFIX = ${PREFIX}/man
|
|
||||||
|
|
||||||
# compiler and linker
|
# compiler and linker
|
||||||
# CC = c99
|
CC = cc
|
||||||
|
|||||||
Reference in New Issue
Block a user