Added a README, other small changes

This commit is contained in:
2024-04-22 17:24:14 +05:30
parent aabccefea1
commit 1757ff83cb
4 changed files with 48 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
;;; Directory Local Variables -*- no-byte-compile: t; -*-
;;; For more information see (info "(emacs) Directory Variables")
((c-mode . ((clang-format-mode . nil)
((c-mode . ((indent-tabs-mode . t)
(flycheck-mode . nil)
(eval . (remove-hook 'c-mode-hook #'clang-format-mode)))))
(eval . (clang-format-mode 0)))))

41
README.org Normal file
View File

@@ -0,0 +1,41 @@
* Key layout
Notation:
+ S = Super
+ C = Control
+ ^k = Shift-k
S-b = toggle bar
S-grave = toggle scratch terminal
S-j = focus next on the stack
S-k = focus prev on the stack
** Gaps
S-period = Increase gaps
S-comma = Decrease gaps
S-slash = Turn gaps off and on
S-^slash = Print current gaps (notify-send)
** Master manipulation
S-h = Decrease size of master
S-l = Increase size of master
S-c = Set current focused client to master
S-C-period = Decrease number of master clients
S-C-comma = Increase number of master clients
** Layouts
S-^t = Tiling
S-^f = Floating
S-^m = Monocle
S-^u = Centred monocle
S-^o = Centred floating monocle
S-^s = Spiral fibonacci
S-^d = Dwindle fibonacci
S-^g = 2 row grid
S-^i = Deck
S-^space = Toggle between current and previous layout
S-space = Toggle floating on currently focused client
** Monitors
S-m = Focus on the next monitor (wraps around)
S-^comma = Send to previous monitor
S-^period = Send to next monitor
** Tags and quit
S-Tab = Go to previously viewed tag
S-q = killclient
S-^q = quit

View File

@@ -37,7 +37,8 @@ static const char *colors[][3] = {
};
/* tagging */
static const char *tags[] = { "", "", "", "", "", "6", "7", "8", "9" };
static const char *tags[] = { "", "", "", "", "", "6", "7", "8", "9" };
/* Custom functions */
static void togglegaps(const Arg *arg);
@@ -132,9 +133,6 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY, XK_Tab, view, {.ui = 0} }, \
{ MODKEY|ShiftMask, XK_Tab, tag, {.ui = 0} }, \
{ MODKEY|ControlMask, XK_Tab, toggleview, {.ui = 0} }, \
{ MODKEY|ControlMask|ShiftMask, XK_Tab, toggletag, {.ui = 0} },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
@@ -185,7 +183,8 @@ printgaps(const Arg *arg)
{
if (!selmon)
return;
char *cmd = malloc(sizeof(*cmd) * 24);
char *cmd = malloc(sizeof(*cmd) * 38);
sprintf(cmd, "notify-send -u low \"Gaps=%d\"", selmon->gappx);
system(cmd);
free(cmd);
}

2
dwm.c
View File

@@ -296,7 +296,7 @@ struct Pertag {
int showbars[LENGTH(tags) + 1]; /* display bar for the current tag */
};
static unsigned int scratchtag = 1 << LENGTH(tags);
/* compile-time check if all tags fit into an unsigned int bit array. */