Compare commits

..

10 commits

4 changed files with 2215 additions and 2243 deletions

View file

@ -46,6 +46,7 @@ static const unsigned int alphas[][3] = {
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *alttags[] = { "<01>", "<02>", "<03>", "<04>", "<05>" };
static const Rule rules[] = {
/* xprop(1):

View file

@ -1,10 +1,12 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const char center_command[] = "/home/aselimov/bin/title_text.sh";
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int gappih = 10; /* horiz inner gap between windows */
static const unsigned int gappiv = 10; /* vert inner gap between windows */
static const unsigned int gappih = 15; /* horiz inner gap between windows */
static const unsigned int gappiv = 15; /* vert inner gap between windows */
static const int vertpadbar = 5; /* vertical padding for statusbar */
static const unsigned int gappoh =
10; /* horiz outer gap between windows and screen edge */
static const unsigned int gappov =
@ -17,26 +19,26 @@ static int smartgaps =
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = {
"FiraCode Nerd Font:size=11:antialias=true:autohint=true"};
"IosevkaTermSlab Nerd Font Propo:size=13:antialias=true:autohint=true"};
static const char dmenufont[] =
"SauceCodePro Nerd Font:size=10:antialias=true:autohint=true";
static const char col_gray1[] = "#282828";
static const char col_gray2[] = "#444444";
static const char col_gray3[] = "#ebdbb2";
static const char col_gray4[] = "#928374";
static const char col_cyan[] = "#458588";
static const char col_green[] = "#98971a";
static const char col_red[] = "#fb4934";
static const char col_yellow[] = "#fabd2f";
static const char col_gray1[] = "#191919";
static const char col_gray2[] = "#3d3839";
static const char col_gray3[] = "#B4bdc3";
static const char col_gray4[] = "#3d3839";
static const char col_cyan[] = "#6099C0";
static const char col_green[] = "#819b69";
static const char col_red[] = "#de6e76";
static const char col_yellow[] = "#d68c67";
static const char col_teal[] = "#8ec07c";
static const char col_purple[] = "#b16286";
static const unsigned int baralpha = 175;
static const unsigned int baralpha = OPAQUE;
static const unsigned int borderalpha = OPAQUE;
static const char *colors[][3] = {
/* fg bg border */
[SchemeNorm] = {col_gray3, col_gray1, "#000000"},
[SchemeSel] = {col_gray3, col_cyan, col_cyan},
[SchemeStatus] = {col_gray4, col_gray1, "#000000"},
[SchemeNorm] = {col_gray3, col_gray1, col_gray1},
[SchemeSel] = {col_gray3, col_cyan, col_gray2},
[SchemeStatus] = {col_gray3, col_gray1, col_gray1},
[SchemeTagsSel] = {col_gray3, col_gray1, col_gray1},
// Tagbar left unselected {text,background,not used but cannot be empty}
[SchemeTagsNorm] = {col_gray4, col_gray1, col_gray1},
@ -50,7 +52,7 @@ static const char *colors[][3] = {
static const unsigned int alphas[][3] = {
/* fg bg border */
[SchemeNorm] = {OPAQUE, baralpha, borderalpha},
[SchemeNorm] = {OPAQUE, baralpha, 0},
[SchemeSel] = {OPAQUE, baralpha, borderalpha},
[SchemeStatus] = {OPAQUE, baralpha, borderalpha},
[SchemeTagsSel] = {OPAQUE, baralpha, borderalpha},
@ -61,7 +63,12 @@ static const unsigned int alphas[][3] = {
[SchemeUrgent] = {OPAQUE, baralpha, borderalpha}};
/* tagging */
static const char *tags[] = {"󰭹", "", "󰈙", "󰏘", "", ""};
static const char *tags[] = {
"", "", "", "", "",
};
static const char *alttags[] = {
"", "", "", "", "",
};
static const Rule rules[] = {
/* xprop(1):
@ -71,13 +78,12 @@ static const Rule rules[] = {
/* class instance title tags mask isfloating isterminal
noswallow, monitor */
{"Gimp", NULL, NULL, 0, 1, 0, 0, -1},
{"Brave-browser", NULL, NULL, 0, 0, 0, 0, 1},
{"mpv", NULL, NULL, 0, 1, 0, 0, -1},
{"sxiv", NULL, NULL, 0, 1, 0, 1, -1},
{"Sxiv", NULL, NULL, 0, 1, 0, 1, -1},
{"matplotlib", NULL, NULL, 0, 1, 0, 1, -1},
{"Matplotlib", NULL, NULL, 0, 1, 0, 1, -1},
{"inscryption.exe", NULL, NULL, 0, 1, 0, 1, -1},
{"xcom2.exe", NULL, NULL, 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 1", 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 2", 0, 1, 0, 1, -1},
{NULL, NULL, "Figure 3", 0, 1, 0, 1, -1},
@ -93,7 +99,9 @@ static const Rule rules[] = {
{"Python3", NULL, NULL, 0, 1, 0, 1, -1},
//{ "" , NULL , NULL , 0 , 1 , 0 , 1 , -1 } ,
{"St", NULL, NULL, 0, 0, 1, 0, -1},
{"Firefox", NULL, NULL, 1 << 5, 0, 0, 0, -1},
{"Firefox", NULL, NULL, 1 << 4, 0, 0, 0, -1},
{"Navigator", NULL, NULL, 1 << 4, 0, 0, 0, -1},
{"zen", NULL, NULL, 1 << 4, 0, 0, 0, -1},
{"dragon", NULL, NULL, 0, 1, 0, 1, -1},
{"Dragon", NULL, NULL, 0, 1, 0, 1, -1},
{"zbar", NULL, NULL, 0, 1, 0, 1, -1},
@ -103,7 +111,7 @@ static const Rule rules[] = {
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
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 */
@ -113,14 +121,14 @@ static const int resizehints =
static const Layout layouts[] = {
/* symbol arrange function */
{"[]=", tile}, /* first entry is default */
{"><>", NULL}, /* no layout function means floating behavior */
{"[M]", monocle},
{"H[]", deck},
{"󰋁", tile}, /* first entry is default */
{"", NULL}, /* no layout function means floating behavior */
{"", monocle},
{"󰘹", deck},
};
/* key definitions */
#define MODKEY Mod4Mask
#define MODKEY Mod1Mask
#define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
@ -152,8 +160,10 @@ static Key keys[] = {
{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_h, setmfact, {.f = -0.05}},
{MODKEY | ShiftMask, XK_l, setmfact, {.f = +0.05}},
{MODKEY, XK_h, viewtoleft, {0}},
{MODKEY, XK_l, viewtoright, {0}},
{MODKEY, XK_Return, zoom, {0}},
{MODKEY, XK_Tab, view, {0}},
{MODKEY | ShiftMask, XK_c, killclient, {0}},

4348
dwm.c

File diff suppressed because it is too large Load diff

37
util.c
View file

@ -6,30 +6,27 @@
#include "util.h"
void *
ecalloc(size_t nmemb, size_t size)
{
void *p;
void *ecalloc(size_t nmemb, size_t size) {
void *p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
if (!(p = calloc(nmemb, size)))
die("calloc:");
return p;
}
void
die(const char *fmt, ...) {
va_list ap;
void die(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
fputc(' ', stderr);
perror(NULL);
} else {
fputc('\n', stderr);
}
if (fmt[0] && fmt[strlen(fmt) - 1] == ':') {
fputc(' ', stderr);
perror(NULL);
} else {
fputc('\n', stderr);
}
exit(1);
exit(1);
}