From 1757ff83cb47bd2158b056b2de5c85dc24aff26a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 22 Apr 2024 17:24:14 +0530 Subject: Added a README, other small changes --- .dir-locals.el | 4 ++-- README.org | 41 +++++++++++++++++++++++++++++++++++++++++ config.h | 9 ++++----- dwm.c | 2 +- 4 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 README.org diff --git a/.dir-locals.el b/.dir-locals.el index 7ad1da6..f7ea9f8 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -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))))) diff --git a/README.org b/README.org new file mode 100644 index 0000000..643dafd --- /dev/null +++ b/README.org @@ -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 diff --git a/config.h b/config.h index a27da91..15a0033 100644 --- a/config.h +++ b/config.h @@ -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); } diff --git a/dwm.c b/dwm.c index 9d2f368..c02a701 100644 --- a/dwm.c +++ b/dwm.c @@ -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. */ -- cgit v1.2.3-13-gbd6f