diff --git a/patches/dwm-dwmblocks-6.3.diff b/patches/dwm-dwmblocks-6.3.diff new file mode 100644 index 0000000..b27db63 --- /dev/null +++ b/patches/dwm-dwmblocks-6.3.diff @@ -0,0 +1,1217 @@ +diff -ruN dwm-6.3-ori/config.def.h dwm-6.3/config.def.h +--- dwm-6.3-ori/config.def.h 2020-12-27 19:45:35.127385861 +0530 ++++ dwm-6.3/config.def.h 2022-02-15 22:58:57.494413995 +0530 +@@ -51,6 +51,7 @@ + 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 */ ++static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ + + static const Layout layouts[] = { + /* symbol arrange function */ +diff -ruN dwm-6.3-ori/config.h dwm-6.3/config.h +--- dwm-6.3-ori/config.h 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/config.h 2021-10-09 15:26:53.510270950 +0530 +@@ -0,0 +1,116 @@ ++/* 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 */ ++static const char *fonts[] = { "monospace:size=10" }; ++static const char dmenufont[] = "monospace:size=10"; ++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_cyan[] = "#005577"; ++static const char *colors[][3] = { ++ /* fg bg border */ ++ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, ++ [SchemeSel] = { col_gray4, col_cyan, col_cyan }, ++}; ++ ++/* 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 */ ++ { "Gimp", NULL, NULL, 0, 1, -1 }, ++ { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, ++}; ++ ++/* layout(s) */ ++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 */ ++static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ ++ ++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 Mod1Mask ++#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", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; ++static const char *termcmd[] = { "st", NULL }; ++ ++static Key keys[] = { ++ /* modifier key function argument */ ++ { MODKEY, XK_p, spawn, {.v = dmenucmd } }, ++ { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, ++ { MODKEY, XK_b, togglebar, {0} }, ++ { MODKEY, XK_j, focusstack, {.i = +1 } }, ++ { 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, XK_Return, zoom, {0} }, ++ { MODKEY, XK_Tab, view, {0} }, ++ { MODKEY|ShiftMask, XK_c, killclient, {0} }, ++ { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, ++ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, ++ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, ++ { MODKEY, XK_space, setlayout, {0} }, ++ { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, ++ { 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 } }, ++ 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_q, quit, {0} }, ++}; ++ ++/* button definitions */ ++/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ ++static 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, Button3, resizemouse, {0} }, ++ { ClkTagBar, 0, Button1, view, {0} }, ++ { ClkTagBar, 0, Button3, toggleview, {0} }, ++ { ClkTagBar, MODKEY, Button1, tag, {0} }, ++ { ClkTagBar, MODKEY, Button3, toggletag, {0} }, ++}; ++ +diff -ruN dwm-6.3-ori/config.mk dwm-6.3/config.mk +--- dwm-6.3-ori/config.mk 2019-02-02 18:25:28.000000000 +0530 ++++ dwm-6.3/config.mk 2022-01-08 00:07:39.168466190 +0530 +@@ -1,5 +1,5 @@ + # dwm version +-VERSION = 6.2 ++VERSION = 6.3 + + # Customize below to fit your system + +@@ -25,7 +25,7 @@ + LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} + + # flags +-CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} ++CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -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} +diff -ruN dwm-6.3-ori/drw.c dwm-6.3/drw.c +--- dwm-6.3-ori/drw.c 2019-02-02 18:25:28.000000000 +0530 ++++ dwm-6.3/drw.c 2021-08-21 12:16:54.979744439 +0530 +@@ -95,6 +95,7 @@ + { + XFreePixmap(drw->dpy, drw->drawable); + XFreeGC(drw->dpy, drw->gc); ++ drw_fontset_free(drw->fonts); + free(drw); + } + +diff -ruN dwm-6.3-ori/dwm.1 dwm-6.3/dwm.1 +--- dwm-6.3-ori/dwm.1 2019-02-02 18:25:28.000000000 +0530 ++++ dwm-6.3/dwm.1 2020-07-28 14:30:56.476612159 +0530 +@@ -33,7 +33,7 @@ + .SH OPTIONS + .TP + .B \-v +-prints version information to standard output, then exits. ++prints version information to stderr, then exits. + .SH USAGE + .SS Status bar + .TP +diff -ruN dwm-6.3-ori/dwm.c dwm-6.3/dwm.c +--- dwm-6.3-ori/dwm.c 2021-08-20 21:02:59.150583765 +0530 ++++ dwm-6.3/dwm.c 2022-02-15 23:02:46.767469027 +0530 +@@ -177,6 +177,7 @@ + static void focusin(XEvent *e); + static void focusmon(const Arg *arg); + static void focusstack(const Arg *arg); ++static Atom getatomprop(Client *c, Atom prop); + static int getrootptr(int *x, int *y); + static long getstate(Window w); + static int gettextprop(Window w, Atom atom, char *text, unsigned int size); +@@ -718,6 +719,9 @@ + unsigned int i, occ = 0, urg = 0; + Client *c; + ++ if (!m->showbar) ++ return; ++ + /* draw status first so it can be overdrawn by tags later */ + if (m == selmon) { /* status is only drawn on selected monitor */ + char *stc = stextc; +@@ -880,7 +884,7 @@ + { + Client *c = NULL, *i; + +- if (!selmon->sel) ++ if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen)) + return; + if (arg->i > 0) { + for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); +@@ -1573,7 +1577,7 @@ + if (!arg || !selmon->lt[selmon->sellt]->arrange) + return; + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; +- if (f < 0.1 || f > 0.9) ++ if (f < 0.05 || f > 0.95) + return; + selmon->mfact = f; + arrange(selmon); +@@ -1773,11 +1777,13 @@ + if (i < m->nmaster) { + h = (m->wh - my) / (MIN(n, m->nmaster) - i); + resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); +- my += HEIGHT(c); ++ if (my + HEIGHT(c) < m->wh) ++ my += HEIGHT(c); + } else { + h = (m->wh - ty) / (n - i); + resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); +- ty += HEIGHT(c); ++ if (ty + HEIGHT(c) < m->wh) ++ ty += HEIGHT(c); + } + } + +diff -ruN dwm-6.3-ori/.git/config dwm-6.3/.git/config +--- dwm-6.3-ori/.git/config 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/config 2020-07-28 14:30:56.473278811 +0530 +@@ -0,0 +1,11 @@ ++[core] ++ repositoryformatversion = 0 ++ filemode = true ++ bare = false ++ logallrefupdates = true ++[remote "origin"] ++ url = git://git.suckless.org/dwm ++ fetch = +refs/heads/*:refs/remotes/origin/* ++[branch "master"] ++ remote = origin ++ merge = refs/heads/master +diff -ruN dwm-6.3-ori/.git/description dwm-6.3/.git/description +--- dwm-6.3-ori/.git/description 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/description 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1 @@ ++Unnamed repository; edit this file 'description' to name the repository. +diff -ruN dwm-6.3-ori/.git/FETCH_HEAD dwm-6.3/.git/FETCH_HEAD +--- dwm-6.3-ori/.git/FETCH_HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/FETCH_HEAD 2022-02-10 15:12:40.068459600 +0530 +@@ -0,0 +1 @@ ++d39e2f3441fe18aba8d1a62c08918a411ec6f237 branch 'master' of git://git.suckless.org/dwm +diff -ruN dwm-6.3-ori/.git/HEAD dwm-6.3/.git/HEAD +--- dwm-6.3-ori/.git/HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/HEAD 2020-07-28 14:30:56.469945463 +0530 +@@ -0,0 +1 @@ ++ref: refs/heads/master +diff -ruN dwm-6.3-ori/.git/hooks/applypatch-msg.sample dwm-6.3/.git/hooks/applypatch-msg.sample +--- dwm-6.3-ori/.git/hooks/applypatch-msg.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/applypatch-msg.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,15 @@ ++#!/bin/sh ++# ++# An example hook script to check the commit log message taken by ++# applypatch from an e-mail message. ++# ++# The hook should exit with non-zero status after issuing an ++# appropriate message if it wants to stop the commit. The hook is ++# allowed to edit the commit message file. ++# ++# To enable this hook, rename this file to "applypatch-msg". ++ ++. git-sh-setup ++commitmsg="$(git rev-parse --git-path hooks/commit-msg)" ++test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} ++: +diff -ruN dwm-6.3-ori/.git/hooks/commit-msg.sample dwm-6.3/.git/hooks/commit-msg.sample +--- dwm-6.3-ori/.git/hooks/commit-msg.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/commit-msg.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,24 @@ ++#!/bin/sh ++# ++# An example hook script to check the commit log message. ++# Called by "git commit" with one argument, the name of the file ++# that has the commit message. The hook should exit with non-zero ++# status after issuing an appropriate message if it wants to stop the ++# commit. The hook is allowed to edit the commit message file. ++# ++# To enable this hook, rename this file to "commit-msg". ++ ++# Uncomment the below to add a Signed-off-by line to the message. ++# Doing this in a hook is a bad idea in general, but the prepare-commit-msg ++# hook is more suited to it. ++# ++# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') ++# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" ++ ++# This example catches duplicate Signed-off-by lines. ++ ++test "" = "$(grep '^Signed-off-by: ' "$1" | ++ sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { ++ echo >&2 Duplicate Signed-off-by lines. ++ exit 1 ++} +diff -ruN dwm-6.3-ori/.git/hooks/fsmonitor-watchman.sample dwm-6.3/.git/hooks/fsmonitor-watchman.sample +--- dwm-6.3-ori/.git/hooks/fsmonitor-watchman.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/fsmonitor-watchman.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,173 @@ ++#!/usr/bin/perl ++ ++use strict; ++use warnings; ++use IPC::Open2; ++ ++# An example hook script to integrate Watchman ++# (https://facebook.github.io/watchman/) with git to speed up detecting ++# new and modified files. ++# ++# The hook is passed a version (currently 2) and last update token ++# formatted as a string and outputs to stdout a new update token and ++# all files that have been modified since the update token. Paths must ++# be relative to the root of the working tree and separated by a single NUL. ++# ++# To enable this hook, rename this file to "query-watchman" and set ++# 'git config core.fsmonitor .git/hooks/query-watchman' ++# ++my ($version, $last_update_token) = @ARGV; ++ ++# Uncomment for debugging ++# print STDERR "$0 $version $last_update_token\n"; ++ ++# Check the hook interface version ++if ($version ne 2) { ++ die "Unsupported query-fsmonitor hook version '$version'.\n" . ++ "Falling back to scanning...\n"; ++} ++ ++my $git_work_tree = get_working_dir(); ++ ++my $retry = 1; ++ ++my $json_pkg; ++eval { ++ require JSON::XS; ++ $json_pkg = "JSON::XS"; ++ 1; ++} or do { ++ require JSON::PP; ++ $json_pkg = "JSON::PP"; ++}; ++ ++launch_watchman(); ++ ++sub launch_watchman { ++ my $o = watchman_query(); ++ if (is_work_tree_watched($o)) { ++ output_result($o->{clock}, @{$o->{files}}); ++ } ++} ++ ++sub output_result { ++ my ($clockid, @files) = @_; ++ ++ # Uncomment for debugging watchman output ++ # open (my $fh, ">", ".git/watchman-output.out"); ++ # binmode $fh, ":utf8"; ++ # print $fh "$clockid\n@files\n"; ++ # close $fh; ++ ++ binmode STDOUT, ":utf8"; ++ print $clockid; ++ print "\0"; ++ local $, = "\0"; ++ print @files; ++} ++ ++sub watchman_clock { ++ my $response = qx/watchman clock "$git_work_tree"/; ++ die "Failed to get clock id on '$git_work_tree'.\n" . ++ "Falling back to scanning...\n" if $? != 0; ++ ++ return $json_pkg->new->utf8->decode($response); ++} ++ ++sub watchman_query { ++ my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') ++ or die "open2() failed: $!\n" . ++ "Falling back to scanning...\n"; ++ ++ # In the query expression below we're asking for names of files that ++ # changed since $last_update_token but not from the .git folder. ++ # ++ # To accomplish this, we're using the "since" generator to use the ++ # recency index to select candidate nodes and "fields" to limit the ++ # output to file names only. Then we're using the "expression" term to ++ # further constrain the results. ++ if (substr($last_update_token, 0, 1) eq "c") { ++ $last_update_token = "\"$last_update_token\""; ++ } ++ my $query = <<" END"; ++ ["query", "$git_work_tree", { ++ "since": $last_update_token, ++ "fields": ["name"], ++ "expression": ["not", ["dirname", ".git"]] ++ }] ++ END ++ ++ # Uncomment for debugging the watchman query ++ # open (my $fh, ">", ".git/watchman-query.json"); ++ # print $fh $query; ++ # close $fh; ++ ++ print CHLD_IN $query; ++ close CHLD_IN; ++ my $response = do {local $/; }; ++ ++ # Uncomment for debugging the watch response ++ # open ($fh, ">", ".git/watchman-response.json"); ++ # print $fh $response; ++ # close $fh; ++ ++ die "Watchman: command returned no output.\n" . ++ "Falling back to scanning...\n" if $response eq ""; ++ die "Watchman: command returned invalid output: $response\n" . ++ "Falling back to scanning...\n" unless $response =~ /^\{/; ++ ++ return $json_pkg->new->utf8->decode($response); ++} ++ ++sub is_work_tree_watched { ++ my ($output) = @_; ++ my $error = $output->{error}; ++ if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { ++ $retry--; ++ my $response = qx/watchman watch "$git_work_tree"/; ++ die "Failed to make watchman watch '$git_work_tree'.\n" . ++ "Falling back to scanning...\n" if $? != 0; ++ $output = $json_pkg->new->utf8->decode($response); ++ $error = $output->{error}; ++ die "Watchman: $error.\n" . ++ "Falling back to scanning...\n" if $error; ++ ++ # Uncomment for debugging watchman output ++ # open (my $fh, ">", ".git/watchman-output.out"); ++ # close $fh; ++ ++ # Watchman will always return all files on the first query so ++ # return the fast "everything is dirty" flag to git and do the ++ # Watchman query just to get it over with now so we won't pay ++ # the cost in git to look up each individual file. ++ my $o = watchman_clock(); ++ $error = $output->{error}; ++ ++ die "Watchman: $error.\n" . ++ "Falling back to scanning...\n" if $error; ++ ++ output_result($o->{clock}, ("/")); ++ $last_update_token = $o->{clock}; ++ ++ eval { launch_watchman() }; ++ return 0; ++ } ++ ++ die "Watchman: $error.\n" . ++ "Falling back to scanning...\n" if $error; ++ ++ return 1; ++} ++ ++sub get_working_dir { ++ my $working_dir; ++ if ($^O =~ 'msys' || $^O =~ 'cygwin') { ++ $working_dir = Win32::GetCwd(); ++ $working_dir =~ tr/\\/\//; ++ } else { ++ require Cwd; ++ $working_dir = Cwd::cwd(); ++ } ++ ++ return $working_dir; ++} +diff -ruN dwm-6.3-ori/.git/hooks/post-update.sample dwm-6.3/.git/hooks/post-update.sample +--- dwm-6.3-ori/.git/hooks/post-update.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/post-update.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,8 @@ ++#!/bin/sh ++# ++# An example hook script to prepare a packed repository for use over ++# dumb transports. ++# ++# To enable this hook, rename this file to "post-update". ++ ++exec git update-server-info +diff -ruN dwm-6.3-ori/.git/hooks/pre-applypatch.sample dwm-6.3/.git/hooks/pre-applypatch.sample +--- dwm-6.3-ori/.git/hooks/pre-applypatch.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-applypatch.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,14 @@ ++#!/bin/sh ++# ++# An example hook script to verify what is about to be committed ++# by applypatch from an e-mail message. ++# ++# The hook should exit with non-zero status after issuing an ++# appropriate message if it wants to stop the commit. ++# ++# To enable this hook, rename this file to "pre-applypatch". ++ ++. git-sh-setup ++precommit="$(git rev-parse --git-path hooks/pre-commit)" ++test -x "$precommit" && exec "$precommit" ${1+"$@"} ++: +diff -ruN dwm-6.3-ori/.git/hooks/pre-commit.sample dwm-6.3/.git/hooks/pre-commit.sample +--- dwm-6.3-ori/.git/hooks/pre-commit.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-commit.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,49 @@ ++#!/bin/sh ++# ++# An example hook script to verify what is about to be committed. ++# Called by "git commit" with no arguments. The hook should ++# exit with non-zero status after issuing an appropriate message if ++# it wants to stop the commit. ++# ++# To enable this hook, rename this file to "pre-commit". ++ ++if git rev-parse --verify HEAD >/dev/null 2>&1 ++then ++ against=HEAD ++else ++ # Initial commit: diff against an empty tree object ++ against=$(git hash-object -t tree /dev/null) ++fi ++ ++# If you want to allow non-ASCII filenames set this variable to true. ++allownonascii=$(git config --type=bool hooks.allownonascii) ++ ++# Redirect output to stderr. ++exec 1>&2 ++ ++# Cross platform projects tend to avoid non-ASCII filenames; prevent ++# them from being added to the repository. We exploit the fact that the ++# printable range starts at the space character and ends with tilde. ++if [ "$allownonascii" != "true" ] && ++ # Note that the use of brackets around a tr range is ok here, (it's ++ # even required, for portability to Solaris 10's /usr/bin/tr), since ++ # the square bracket bytes happen to fall in the designated range. ++ test $(git diff --cached --name-only --diff-filter=A -z $against | ++ LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 ++then ++ cat <<\EOF ++Error: Attempt to add a non-ASCII file name. ++ ++This can cause problems if you want to work with people on other platforms. ++ ++To be portable it is advisable to rename the file. ++ ++If you know what you are doing you can disable this check using: ++ ++ git config hooks.allownonascii true ++EOF ++ exit 1 ++fi ++ ++# If there are whitespace errors, print the offending file names and fail. ++exec git diff-index --check --cached $against -- +diff -ruN dwm-6.3-ori/.git/hooks/pre-merge-commit.sample dwm-6.3/.git/hooks/pre-merge-commit.sample +--- dwm-6.3-ori/.git/hooks/pre-merge-commit.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-merge-commit.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,13 @@ ++#!/bin/sh ++# ++# An example hook script to verify what is about to be committed. ++# Called by "git merge" with no arguments. The hook should ++# exit with non-zero status after issuing an appropriate message to ++# stderr if it wants to stop the merge commit. ++# ++# To enable this hook, rename this file to "pre-merge-commit". ++ ++. git-sh-setup ++test -x "$GIT_DIR/hooks/pre-commit" && ++ exec "$GIT_DIR/hooks/pre-commit" ++: +diff -ruN dwm-6.3-ori/.git/hooks/prepare-commit-msg.sample dwm-6.3/.git/hooks/prepare-commit-msg.sample +--- dwm-6.3-ori/.git/hooks/prepare-commit-msg.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/prepare-commit-msg.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,42 @@ ++#!/bin/sh ++# ++# An example hook script to prepare the commit log message. ++# Called by "git commit" with the name of the file that has the ++# commit message, followed by the description of the commit ++# message's source. The hook's purpose is to edit the commit ++# message file. If the hook fails with a non-zero status, ++# the commit is aborted. ++# ++# To enable this hook, rename this file to "prepare-commit-msg". ++ ++# This hook includes three examples. The first one removes the ++# "# Please enter the commit message..." help message. ++# ++# The second includes the output of "git diff --name-status -r" ++# into the message, just before the "git status" output. It is ++# commented because it doesn't cope with --amend or with squashed ++# commits. ++# ++# The third example adds a Signed-off-by line to the message, that can ++# still be edited. This is rarely a good idea. ++ ++COMMIT_MSG_FILE=$1 ++COMMIT_SOURCE=$2 ++SHA1=$3 ++ ++/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" ++ ++# case "$COMMIT_SOURCE,$SHA1" in ++# ,|template,) ++# /usr/bin/perl -i.bak -pe ' ++# print "\n" . `git diff --cached --name-status -r` ++# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; ++# *) ;; ++# esac ++ ++# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') ++# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" ++# if test -z "$COMMIT_SOURCE" ++# then ++# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" ++# fi +diff -ruN dwm-6.3-ori/.git/hooks/pre-push.sample dwm-6.3/.git/hooks/pre-push.sample +--- dwm-6.3-ori/.git/hooks/pre-push.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-push.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,53 @@ ++#!/bin/sh ++ ++# An example hook script to verify what is about to be pushed. Called by "git ++# push" after it has checked the remote status, but before anything has been ++# pushed. If this script exits with a non-zero status nothing will be pushed. ++# ++# This hook is called with the following parameters: ++# ++# $1 -- Name of the remote to which the push is being done ++# $2 -- URL to which the push is being done ++# ++# If pushing without using a named remote those arguments will be equal. ++# ++# Information about the commits which are being pushed is supplied as lines to ++# the standard input in the form: ++# ++# ++# ++# This sample shows how to prevent push of commits where the log message starts ++# with "WIP" (work in progress). ++ ++remote="$1" ++url="$2" ++ ++z40=0000000000000000000000000000000000000000 ++ ++while read local_ref local_sha remote_ref remote_sha ++do ++ if [ "$local_sha" = $z40 ] ++ then ++ # Handle delete ++ : ++ else ++ if [ "$remote_sha" = $z40 ] ++ then ++ # New branch, examine all commits ++ range="$local_sha" ++ else ++ # Update to existing branch, examine new commits ++ range="$remote_sha..$local_sha" ++ fi ++ ++ # Check for WIP commit ++ commit=`git rev-list -n 1 --grep '^WIP' "$range"` ++ if [ -n "$commit" ] ++ then ++ echo >&2 "Found WIP commit in $local_ref, not pushing" ++ exit 1 ++ fi ++ fi ++done ++ ++exit 0 +diff -ruN dwm-6.3-ori/.git/hooks/pre-rebase.sample dwm-6.3/.git/hooks/pre-rebase.sample +--- dwm-6.3-ori/.git/hooks/pre-rebase.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-rebase.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,169 @@ ++#!/bin/sh ++# ++# Copyright (c) 2006, 2008 Junio C Hamano ++# ++# The "pre-rebase" hook is run just before "git rebase" starts doing ++# its job, and can prevent the command from running by exiting with ++# non-zero status. ++# ++# The hook is called with the following parameters: ++# ++# $1 -- the upstream the series was forked from. ++# $2 -- the branch being rebased (or empty when rebasing the current branch). ++# ++# This sample shows how to prevent topic branches that are already ++# merged to 'next' branch from getting rebased, because allowing it ++# would result in rebasing already published history. ++ ++publish=next ++basebranch="$1" ++if test "$#" = 2 ++then ++ topic="refs/heads/$2" ++else ++ topic=`git symbolic-ref HEAD` || ++ exit 0 ;# we do not interrupt rebasing detached HEAD ++fi ++ ++case "$topic" in ++refs/heads/??/*) ++ ;; ++*) ++ exit 0 ;# we do not interrupt others. ++ ;; ++esac ++ ++# Now we are dealing with a topic branch being rebased ++# on top of master. Is it OK to rebase it? ++ ++# Does the topic really exist? ++git show-ref -q "$topic" || { ++ echo >&2 "No such branch $topic" ++ exit 1 ++} ++ ++# Is topic fully merged to master? ++not_in_master=`git rev-list --pretty=oneline ^master "$topic"` ++if test -z "$not_in_master" ++then ++ echo >&2 "$topic is fully merged to master; better remove it." ++ exit 1 ;# we could allow it, but there is no point. ++fi ++ ++# Is topic ever merged to next? If so you should not be rebasing it. ++only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` ++only_next_2=`git rev-list ^master ${publish} | sort` ++if test "$only_next_1" = "$only_next_2" ++then ++ not_in_topic=`git rev-list "^$topic" master` ++ if test -z "$not_in_topic" ++ then ++ echo >&2 "$topic is already up to date with master" ++ exit 1 ;# we could allow it, but there is no point. ++ else ++ exit 0 ++ fi ++else ++ not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` ++ /usr/bin/perl -e ' ++ my $topic = $ARGV[0]; ++ my $msg = "* $topic has commits already merged to public branch:\n"; ++ my (%not_in_next) = map { ++ /^([0-9a-f]+) /; ++ ($1 => 1); ++ } split(/\n/, $ARGV[1]); ++ for my $elem (map { ++ /^([0-9a-f]+) (.*)$/; ++ [$1 => $2]; ++ } split(/\n/, $ARGV[2])) { ++ if (!exists $not_in_next{$elem->[0]}) { ++ if ($msg) { ++ print STDERR $msg; ++ undef $msg; ++ } ++ print STDERR " $elem->[1]\n"; ++ } ++ } ++ ' "$topic" "$not_in_next" "$not_in_master" ++ exit 1 ++fi ++ ++<<\DOC_END ++ ++This sample hook safeguards topic branches that have been ++published from being rewound. ++ ++The workflow assumed here is: ++ ++ * Once a topic branch forks from "master", "master" is never ++ merged into it again (either directly or indirectly). ++ ++ * Once a topic branch is fully cooked and merged into "master", ++ it is deleted. If you need to build on top of it to correct ++ earlier mistakes, a new topic branch is created by forking at ++ the tip of the "master". This is not strictly necessary, but ++ it makes it easier to keep your history simple. ++ ++ * Whenever you need to test or publish your changes to topic ++ branches, merge them into "next" branch. ++ ++The script, being an example, hardcodes the publish branch name ++to be "next", but it is trivial to make it configurable via ++$GIT_DIR/config mechanism. ++ ++With this workflow, you would want to know: ++ ++(1) ... if a topic branch has ever been merged to "next". Young ++ topic branches can have stupid mistakes you would rather ++ clean up before publishing, and things that have not been ++ merged into other branches can be easily rebased without ++ affecting other people. But once it is published, you would ++ not want to rewind it. ++ ++(2) ... if a topic branch has been fully merged to "master". ++ Then you can delete it. More importantly, you should not ++ build on top of it -- other people may already want to ++ change things related to the topic as patches against your ++ "master", so if you need further changes, it is better to ++ fork the topic (perhaps with the same name) afresh from the ++ tip of "master". ++ ++Let's look at this example: ++ ++ o---o---o---o---o---o---o---o---o---o "next" ++ / / / / ++ / a---a---b A / / ++ / / / / ++ / / c---c---c---c B / ++ / / / \ / ++ / / / b---b C \ / ++ / / / / \ / ++ ---o---o---o---o---o---o---o---o---o---o---o "master" ++ ++ ++A, B and C are topic branches. ++ ++ * A has one fix since it was merged up to "next". ++ ++ * B has finished. It has been fully merged up to "master" and "next", ++ and is ready to be deleted. ++ ++ * C has not merged to "next" at all. ++ ++We would want to allow C to be rebased, refuse A, and encourage ++B to be deleted. ++ ++To compute (1): ++ ++ git rev-list ^master ^topic next ++ git rev-list ^master next ++ ++ if these match, topic has not merged in next at all. ++ ++To compute (2): ++ ++ git rev-list master..topic ++ ++ if this is empty, it is fully merged to "master". ++ ++DOC_END +diff -ruN dwm-6.3-ori/.git/hooks/pre-receive.sample dwm-6.3/.git/hooks/pre-receive.sample +--- dwm-6.3-ori/.git/hooks/pre-receive.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/pre-receive.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,24 @@ ++#!/bin/sh ++# ++# An example hook script to make use of push options. ++# The example simply echoes all push options that start with 'echoback=' ++# and rejects all pushes when the "reject" push option is used. ++# ++# To enable this hook, rename this file to "pre-receive". ++ ++if test -n "$GIT_PUSH_OPTION_COUNT" ++then ++ i=0 ++ while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" ++ do ++ eval "value=\$GIT_PUSH_OPTION_$i" ++ case "$value" in ++ echoback=*) ++ echo "echo from the pre-receive-hook: ${value#*=}" >&2 ++ ;; ++ reject) ++ exit 1 ++ esac ++ i=$((i + 1)) ++ done ++fi +diff -ruN dwm-6.3-ori/.git/hooks/update.sample dwm-6.3/.git/hooks/update.sample +--- dwm-6.3-ori/.git/hooks/update.sample 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/hooks/update.sample 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,128 @@ ++#!/bin/sh ++# ++# An example hook script to block unannotated tags from entering. ++# Called by "git receive-pack" with arguments: refname sha1-old sha1-new ++# ++# To enable this hook, rename this file to "update". ++# ++# Config ++# ------ ++# hooks.allowunannotated ++# This boolean sets whether unannotated tags will be allowed into the ++# repository. By default they won't be. ++# hooks.allowdeletetag ++# This boolean sets whether deleting tags will be allowed in the ++# repository. By default they won't be. ++# hooks.allowmodifytag ++# This boolean sets whether a tag may be modified after creation. By default ++# it won't be. ++# hooks.allowdeletebranch ++# This boolean sets whether deleting branches will be allowed in the ++# repository. By default they won't be. ++# hooks.denycreatebranch ++# This boolean sets whether remotely creating branches will be denied ++# in the repository. By default this is allowed. ++# ++ ++# --- Command line ++refname="$1" ++oldrev="$2" ++newrev="$3" ++ ++# --- Safety check ++if [ -z "$GIT_DIR" ]; then ++ echo "Don't run this script from the command line." >&2 ++ echo " (if you want, you could supply GIT_DIR then run" >&2 ++ echo " $0 )" >&2 ++ exit 1 ++fi ++ ++if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then ++ echo "usage: $0 " >&2 ++ exit 1 ++fi ++ ++# --- Config ++allowunannotated=$(git config --type=bool hooks.allowunannotated) ++allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) ++denycreatebranch=$(git config --type=bool hooks.denycreatebranch) ++allowdeletetag=$(git config --type=bool hooks.allowdeletetag) ++allowmodifytag=$(git config --type=bool hooks.allowmodifytag) ++ ++# check for no description ++projectdesc=$(sed -e '1q' "$GIT_DIR/description") ++case "$projectdesc" in ++"Unnamed repository"* | "") ++ echo "*** Project description file hasn't been set" >&2 ++ exit 1 ++ ;; ++esac ++ ++# --- Check types ++# if $newrev is 0000...0000, it's a commit to delete a ref. ++zero="0000000000000000000000000000000000000000" ++if [ "$newrev" = "$zero" ]; then ++ newrev_type=delete ++else ++ newrev_type=$(git cat-file -t $newrev) ++fi ++ ++case "$refname","$newrev_type" in ++ refs/tags/*,commit) ++ # un-annotated tag ++ short_refname=${refname##refs/tags/} ++ if [ "$allowunannotated" != "true" ]; then ++ echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 ++ echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 ++ exit 1 ++ fi ++ ;; ++ refs/tags/*,delete) ++ # delete tag ++ if [ "$allowdeletetag" != "true" ]; then ++ echo "*** Deleting a tag is not allowed in this repository" >&2 ++ exit 1 ++ fi ++ ;; ++ refs/tags/*,tag) ++ # annotated tag ++ if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 ++ then ++ echo "*** Tag '$refname' already exists." >&2 ++ echo "*** Modifying a tag is not allowed in this repository." >&2 ++ exit 1 ++ fi ++ ;; ++ refs/heads/*,commit) ++ # branch ++ if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then ++ echo "*** Creating a branch is not allowed in this repository" >&2 ++ exit 1 ++ fi ++ ;; ++ refs/heads/*,delete) ++ # delete branch ++ if [ "$allowdeletebranch" != "true" ]; then ++ echo "*** Deleting a branch is not allowed in this repository" >&2 ++ exit 1 ++ fi ++ ;; ++ refs/remotes/*,commit) ++ # tracking branch ++ ;; ++ refs/remotes/*,delete) ++ # delete tracking branch ++ if [ "$allowdeletebranch" != "true" ]; then ++ echo "*** Deleting a tracking branch is not allowed in this repository" >&2 ++ exit 1 ++ fi ++ ;; ++ *) ++ # Anything else (is there anything else?) ++ echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 ++ exit 1 ++ ;; ++esac ++ ++# --- Finished ++exit 0 +Binary files dwm-6.3-ori/.git/index and dwm-6.3/.git/index differ +diff -ruN dwm-6.3-ori/.git/info/exclude dwm-6.3/.git/info/exclude +--- dwm-6.3-ori/.git/info/exclude 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/info/exclude 2020-07-28 14:30:43.166552830 +0530 +@@ -0,0 +1,6 @@ ++# git ls-files --others --exclude-from=.git/info/exclude ++# Lines that start with '#' are comments. ++# For a project mostly in C, the following would be a good set of ++# exclude patterns (uncomment them if you want to use them): ++# *.[oa] ++# *~ +diff -ruN dwm-6.3-ori/.git/logs/HEAD dwm-6.3/.git/logs/HEAD +--- dwm-6.3-ori/.git/logs/HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/logs/HEAD 2022-01-08 00:07:39.185133025 +0530 +@@ -0,0 +1,8 @@ ++0000000000000000000000000000000000000000 bb2e7222baeec7776930354d0e9f210cc2aaad5f Ashish Kumar Yadav 1595926856 +0530 clone: from git://git.suckless.org/dwm ++bb2e7222baeec7776930354d0e9f210cc2aaad5f 61bb8b2241d4db08bea4261c82e27cd9797099e7 Ashish Kumar Yadav 1598031632 +0530 pull: Fast-forward ++61bb8b2241d4db08bea4261c82e27cd9797099e7 67d76bdc68102df976177de351f65329d8683064 Ashish Kumar Yadav 1617127459 +0530 pull: Fast-forward ++67d76bdc68102df976177de351f65329d8683064 138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 Ashish Kumar Yadav 1626257290 +0530 pull: Fast-forward ++138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 716233534b35f74dba5a46ade8f1a6f8cc72fea4 Ashish Kumar Yadav 1628538506 +0530 pull: Fast-forward ++716233534b35f74dba5a46ade8f1a6f8cc72fea4 a786211d6cb794fba0ea406d86002c7618998afc Ashish Kumar Yadav 1629528414 +0530 pull: Fast-forward ++a786211d6cb794fba0ea406d86002c7618998afc 8657affa2a61e85ca8df76b62e43cb02897d1d80 Ashish Kumar Yadav 1640678664 +0530 pull: Fast-forward ++8657affa2a61e85ca8df76b62e43cb02897d1d80 d39e2f3441fe18aba8d1a62c08918a411ec6f237 Ashish Kumar Yadav 1641580659 +0530 pull: Fast-forward +diff -ruN dwm-6.3-ori/.git/logs/refs/heads/master dwm-6.3/.git/logs/refs/heads/master +--- dwm-6.3-ori/.git/logs/refs/heads/master 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/logs/refs/heads/master 2022-01-08 00:07:39.185133025 +0530 +@@ -0,0 +1,8 @@ ++0000000000000000000000000000000000000000 bb2e7222baeec7776930354d0e9f210cc2aaad5f Ashish Kumar Yadav 1595926856 +0530 clone: from git://git.suckless.org/dwm ++bb2e7222baeec7776930354d0e9f210cc2aaad5f 61bb8b2241d4db08bea4261c82e27cd9797099e7 Ashish Kumar Yadav 1598031632 +0530 pull: Fast-forward ++61bb8b2241d4db08bea4261c82e27cd9797099e7 67d76bdc68102df976177de351f65329d8683064 Ashish Kumar Yadav 1617127459 +0530 pull: Fast-forward ++67d76bdc68102df976177de351f65329d8683064 138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 Ashish Kumar Yadav 1626257290 +0530 pull: Fast-forward ++138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 716233534b35f74dba5a46ade8f1a6f8cc72fea4 Ashish Kumar Yadav 1628538506 +0530 pull: Fast-forward ++716233534b35f74dba5a46ade8f1a6f8cc72fea4 a786211d6cb794fba0ea406d86002c7618998afc Ashish Kumar Yadav 1629528414 +0530 pull: Fast-forward ++a786211d6cb794fba0ea406d86002c7618998afc 8657affa2a61e85ca8df76b62e43cb02897d1d80 Ashish Kumar Yadav 1640678664 +0530 pull: Fast-forward ++8657affa2a61e85ca8df76b62e43cb02897d1d80 d39e2f3441fe18aba8d1a62c08918a411ec6f237 Ashish Kumar Yadav 1641580659 +0530 pull: Fast-forward +diff -ruN dwm-6.3-ori/.git/logs/refs/remotes/origin/HEAD dwm-6.3/.git/logs/refs/remotes/origin/HEAD +--- dwm-6.3-ori/.git/logs/refs/remotes/origin/HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/logs/refs/remotes/origin/HEAD 2020-07-28 14:30:56.469945463 +0530 +@@ -0,0 +1 @@ ++0000000000000000000000000000000000000000 bb2e7222baeec7776930354d0e9f210cc2aaad5f Ashish Kumar Yadav 1595926856 +0530 clone: from git://git.suckless.org/dwm +diff -ruN dwm-6.3-ori/.git/logs/refs/remotes/origin/master dwm-6.3/.git/logs/refs/remotes/origin/master +--- dwm-6.3-ori/.git/logs/refs/remotes/origin/master 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/logs/refs/remotes/origin/master 2022-01-08 00:07:39.115132318 +0530 +@@ -0,0 +1,7 @@ ++bb2e7222baeec7776930354d0e9f210cc2aaad5f 61bb8b2241d4db08bea4261c82e27cd9797099e7 Ashish Kumar Yadav 1598031632 +0530 pull: fast-forward ++61bb8b2241d4db08bea4261c82e27cd9797099e7 67d76bdc68102df976177de351f65329d8683064 Ashish Kumar Yadav 1617127459 +0530 pull: fast-forward ++67d76bdc68102df976177de351f65329d8683064 138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 Ashish Kumar Yadav 1626257290 +0530 pull: fast-forward ++138b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 716233534b35f74dba5a46ade8f1a6f8cc72fea4 Ashish Kumar Yadav 1628538506 +0530 pull: fast-forward ++716233534b35f74dba5a46ade8f1a6f8cc72fea4 a786211d6cb794fba0ea406d86002c7618998afc Ashish Kumar Yadav 1629528414 +0530 pull: fast-forward ++a786211d6cb794fba0ea406d86002c7618998afc 8657affa2a61e85ca8df76b62e43cb02897d1d80 Ashish Kumar Yadav 1640678664 +0530 pull: fast-forward ++8657affa2a61e85ca8df76b62e43cb02897d1d80 d39e2f3441fe18aba8d1a62c08918a411ec6f237 Ashish Kumar Yadav 1641580659 +0530 pull: fast-forward +Binary files dwm-6.3-ori/.git/objects/13/8b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 and dwm-6.3/.git/objects/13/8b405f0c8aa24d8a040cc1a1cf6e3eb5a0ebc7 differ +Binary files dwm-6.3-ori/.git/objects/27/8fac042ed0989747aea5a80b8f1f5e92db4efa and dwm-6.3/.git/objects/27/8fac042ed0989747aea5a80b8f1f5e92db4efa differ +Binary files dwm-6.3-ori/.git/objects/3d/0da7fda5f02f341383dfe3161f4c9625070cca and dwm-6.3/.git/objects/3d/0da7fda5f02f341383dfe3161f4c9625070cca differ +Binary files dwm-6.3-ori/.git/objects/46/86918cd9beeb6920b1e93462d312cacd81f5aa and dwm-6.3/.git/objects/46/86918cd9beeb6920b1e93462d312cacd81f5aa differ +Binary files dwm-6.3-ori/.git/objects/5e/4d49484e8e7bd3ff8c00b6b422af93502e5802 and dwm-6.3/.git/objects/5e/4d49484e8e7bd3ff8c00b6b422af93502e5802 differ +diff -ruN dwm-6.3-ori/.git/objects/61/bb8b2241d4db08bea4261c82e27cd9797099e7 dwm-6.3/.git/objects/61/bb8b2241d4db08bea4261c82e27cd9797099e7 +--- dwm-6.3-ori/.git/objects/61/bb8b2241d4db08bea4261c82e27cd9797099e7 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/objects/61/bb8b2241d4db08bea4261c82e27cd9797099e7 2020-08-21 23:10:32.276205227 +0530 +@@ -0,0 +1 @@ ++x5AK0`s%4MI&db#M)w]5'|MJ=h';i1C jR:, CąD97yQ+f$`@G_kw*)9o_x '5)5^ֿ+|ԽG&85HPd ?+Q!<*kR.QO@*ri|Vl +\ No newline at end of file +Binary files dwm-6.3-ori/.git/objects/66/4c527f21f852967ba41739fda440429277df84 and dwm-6.3/.git/objects/66/4c527f21f852967ba41739fda440429277df84 differ +Binary files dwm-6.3-ori/.git/objects/67/d76bdc68102df976177de351f65329d8683064 and dwm-6.3/.git/objects/67/d76bdc68102df976177de351f65329d8683064 differ +diff -ruN dwm-6.3-ori/.git/objects/71/6233534b35f74dba5a46ade8f1a6f8cc72fea4 dwm-6.3/.git/objects/71/6233534b35f74dba5a46ade8f1a6f8cc72fea4 +--- dwm-6.3-ori/.git/objects/71/6233534b35f74dba5a46ade8f1a6f8cc72fea4 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/objects/71/6233534b35f74dba5a46ade8f1a6f8cc72fea4 2021-08-10 01:18:26.522035884 +0530 +@@ -0,0 +1,3 @@ ++xMN0 9)|₴JZB7XJ[Ig ++Ι uS]Hu۵%UJ] PN "[0 ny3r!Zwk@Ɩ*4[</R6ETp Z5M 7\rΊ[2Ex26x )'/AMv!N:س[b8HCA=:-4$3XS)1V,l5 ++_q!,0|LEr1e Lӟ xF` 1~7`L6]\v %*X!Oڱ/S +\ No newline at end of file +Binary files dwm-6.3-ori/.git/objects/86/57affa2a61e85ca8df76b62e43cb02897d1d80 and dwm-6.3/.git/objects/86/57affa2a61e85ca8df76b62e43cb02897d1d80 differ +Binary files dwm-6.3-ori/.git/objects/91/6ae3ca84f31fc7d07ca272033986acbd28c861 and dwm-6.3/.git/objects/91/6ae3ca84f31fc7d07ca272033986acbd28c861 differ +Binary files dwm-6.3-ori/.git/objects/9c/3908646eb39e36ac5f03defe0b03653446d85a and dwm-6.3/.git/objects/9c/3908646eb39e36ac5f03defe0b03653446d85a differ +Binary files dwm-6.3-ori/.git/objects/a2/ac963acc73a1224ef8ceb47d08da454a43bce5 and dwm-6.3/.git/objects/a2/ac963acc73a1224ef8ceb47d08da454a43bce5 differ +Binary files dwm-6.3-ori/.git/objects/a7/86211d6cb794fba0ea406d86002c7618998afc and dwm-6.3/.git/objects/a7/86211d6cb794fba0ea406d86002c7618998afc differ +Binary files dwm-6.3-ori/.git/objects/a9/6f33c1fe009c16c8ca4b2ebac5fb511437e347 and dwm-6.3/.git/objects/a9/6f33c1fe009c16c8ca4b2ebac5fb511437e347 differ +Binary files dwm-6.3-ori/.git/objects/b0/b3466881b84872a6b261cc1ed42afed08ac3bd and dwm-6.3/.git/objects/b0/b3466881b84872a6b261cc1ed42afed08ac3bd differ +diff -ruN dwm-6.3-ori/.git/objects/b6/eb7e03ff326fc6e478f92d8937017b8df489ac dwm-6.3/.git/objects/b6/eb7e03ff326fc6e478f92d8937017b8df489ac +--- dwm-6.3-ori/.git/objects/b6/eb7e03ff326fc6e478f92d8937017b8df489ac 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/objects/b6/eb7e03ff326fc6e478f92d8937017b8df489ac 2022-01-08 00:07:39.095132117 +0530 +@@ -0,0 +1,4 @@ ++xuok0Zh`"/R7 vdP-bd,e! ;9NN^=L'sJ͕$~5!ڨegB(ȸ:OڰVԼjeE{Х+TB\JKT׊0n\.qHͅ{{KVҜ~D9xf]AgGjw +? ++2mj[~V2fN#m`&Q2/FӀR&H\L rd/2'DeC@e ++ؿ&X^[:8**w<{S0nuVR ټ g~"q^Yv5;hc4 ySYWW=!x{jΒx< ++zb;5YCTNʊ%԰%5516t7X6j>j Z; V6,x_$ # +\ No newline at end of file +Binary files dwm-6.3-ori/.git/objects/b8/e8e4f2b92a529fcd8d635f7146d30927f0e9bc and dwm-6.3/.git/objects/b8/e8e4f2b92a529fcd8d635f7146d30927f0e9bc differ +Binary files dwm-6.3-ori/.git/objects/d3/9e2f3441fe18aba8d1a62c08918a411ec6f237 and dwm-6.3/.git/objects/d3/9e2f3441fe18aba8d1a62c08918a411ec6f237 differ +Binary files dwm-6.3-ori/.git/objects/d4/fd1e77e5ef492c1ef5658d25371c82fc72e9bc and dwm-6.3/.git/objects/d4/fd1e77e5ef492c1ef5658d25371c82fc72e9bc differ +Binary files dwm-6.3-ori/.git/objects/pack/pack-a802abc080dafe1a37c0b48aa14cf9881310033a.idx and dwm-6.3/.git/objects/pack/pack-a802abc080dafe1a37c0b48aa14cf9881310033a.idx differ +Binary files dwm-6.3-ori/.git/objects/pack/pack-a802abc080dafe1a37c0b48aa14cf9881310033a.pack and dwm-6.3/.git/objects/pack/pack-a802abc080dafe1a37c0b48aa14cf9881310033a.pack differ +diff -ruN dwm-6.3-ori/.git/ORIG_HEAD dwm-6.3/.git/ORIG_HEAD +--- dwm-6.3-ori/.git/ORIG_HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/ORIG_HEAD 2022-01-09 22:33:52.855609475 +0530 +@@ -0,0 +1 @@ ++d39e2f3441fe18aba8d1a62c08918a411ec6f237 +diff -ruN dwm-6.3-ori/.git/packed-refs dwm-6.3/.git/packed-refs +--- dwm-6.3-ori/.git/packed-refs 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/packed-refs 2020-07-28 14:30:56.466612114 +0530 +@@ -0,0 +1,77 @@ ++# pack-refs with: peeled fully-peeled sorted ++bb2e7222baeec7776930354d0e9f210cc2aaad5f refs/remotes/origin/master ++7faa8a904208578672160d7b57a4b8df6520581e refs/tags/0.1 ++b706893e0aadf5e9141b52d09e9ca12b261739f1 refs/tags/0.2 ++d34b4c7b9aaa4c8abadee6bc562ce4aef689e1f7 refs/tags/0.3 ++01b151f5f85b7b488ab6859e0404b64926df16ad refs/tags/0.4 ++db98a7d60fc17ebb37f1c4711116daa282044c45 refs/tags/0.5 ++0f8249f2629543c66ffa7b684a772fda08250a5d refs/tags/0.6 ++f777d218995e774b6af91d17db25308f1f976916 refs/tags/0.7 ++0680c76a6fca2a285e2a561192774906d121e2c1 refs/tags/0.8 ++a1682b8927919a443427b0160bab22e9762fe783 refs/tags/0.9 ++a039d51d5f6c3085a1a1a05360d8560e38ff7731 refs/tags/1.0 ++a50b15a9e9663b1a7ee11d39ddf246427aecaeef refs/tags/1.1 ++140be1b4b3aa1665631d81e18afa29749636e2f2 refs/tags/1.2 ++01d13b0c4932ed38d44b312ceb4908317bb939bb refs/tags/1.3 ++57c49fe867b4c31a518bd12f32fda060cbb9d088 refs/tags/1.4 ++0925dd588c6879916c8a9ded1e680963b093b068 refs/tags/1.5 ++2511b5c6756e10fb29153559fee95bd493451e72 refs/tags/1.6 ++e87bed6df228844f130eff6f1ab63b386b88a34b refs/tags/1.7 ++6092aa977e9cc87bcf72713af8e7c698ddea4b56 refs/tags/1.7.1 ++69408d384d55b69f66ea52f8767eb577a34d9ae2 refs/tags/1.8 ++5983c00b9508d48331b2c57f2c88ea09a8feb291 refs/tags/1.9 ++04b633ddf394fccf5a3125ea17239bad6997c8df refs/tags/2.0 ++4b5b3d90af58f860569178e554604717ef51152d refs/tags/2.1 ++52a8cc8d4691eba01eded12bcddefef2394544ae refs/tags/2.2 ++4606d218c3755f0d0da1fe74fb686d520def5e35 refs/tags/2.3 ++683dabe5e61ab0111ef72e0b12e69a637ebadb05 refs/tags/2.4 ++c53d9d516a871661414ff8110cd3c17c3dc525ec refs/tags/2.5 ++7009ebfa6907b4355bc83310065d86dba4ad129d refs/tags/2.5.1 ++a3319c6f8e82522ce118b9a62124548d6f9cba09 refs/tags/2.6 ++c7da1241490e782bc8d6b7578d7f03f843d27c72 refs/tags/2.7 ++b5d297f02fb545c421468398cabca56c61bab36c refs/tags/2.8 ++c95fe6e24b86f0a9e9db5f7e8aac0f57f445583c refs/tags/2.9 ++f679125206ae28b38f77e9620a67365d310ddff3 refs/tags/3.0 ++9715ba82aa4d256a43b3a166c88f3409b873eb32 refs/tags/3.1 ++87836d79ef90e6c764d94c229183179a36eb699a refs/tags/3.2 ++55be4d613767cd997c48637feff88c4be009cb76 refs/tags/3.2.1 ++2c1db7ed354f303c2a2aa7eb6b7de3a0dac5d022 refs/tags/3.2.2 ++042297b27b64aa1ff3a7da12f5b07268ba2f11eb refs/tags/3.3 ++9ed5de00b686ab872caab8525c6845892a1a1ac1 refs/tags/3.4 ++2d7f59424c1b3974c3093cb800326437df7caa94 refs/tags/3.5 ++ad4962c7eb5f62400c762fea90d9be0e85f5c33d refs/tags/3.6 ++7541f1ad4980bf1c917f4fec59353f79306fdf5c refs/tags/3.6.1 ++12280f0253407827c9eba288df29ca669d2053bd refs/tags/3.7 ++a686c9ccd293efd543b84c137d91fbeb0f95a621 refs/tags/3.8 ++93aeaa53c920cd5f19751c6815a022f2d95059c1 refs/tags/3.9 ++22399a3bc05406a89f6ad717800b4d9ba41f6e0a refs/tags/4.0 ++fa32f02a43482b54c33aeb1d0b269761db151994 refs/tags/4.1 ++2c6be7239f932121b9e4526b01b957fcefc8345a refs/tags/4.2 ++c31648d15d7a9bd0c7915989212d9cf0d75cdf1f refs/tags/4.3 ++67a1141f44bc19afeda19fb6544270a65419b3b3 refs/tags/4.4 ++a92cf496c18189f9cbc7c1d7f8edcebbd1d7ff99 refs/tags/4.4.1 ++24dae7d7e35c9c52115ec4bf5f30fe1cc4a5c296 refs/tags/4.5 ++13577b15e5ef15fb151d4a1444f6d07a689f967c refs/tags/4.6 ++68ff133857244347cc6c8512040f1eb32fe2ed2f refs/tags/4.7 ++1380569133c986a5ddfab2c280f2e993f7803c48 refs/tags/4.8 ++0e21794e02069ae71a1e70f8d0c2c22c4d1050bc refs/tags/4.9 ++d8fad9bf7afd7438b0f3e82adf7132524bfedd0a refs/tags/5.0 ++4a2902efe49571432544f356a946170ff9e6f415 refs/tags/5.1 ++53cac176928b67db4eb551295291ab09650927eb refs/tags/5.2 ++2b047e460b5c4ddb0a72eac1bbe292539bc9049e refs/tags/5.3 ++fbce733532f90c0f6af23c0216fe47b3d40fb5c3 refs/tags/5.3.1 ++76d7e80fc47f869f177ce694c45d4c8f2e86bdc7 refs/tags/5.4 ++90687482ad880358fce3f023633ebe68f5e96cdb refs/tags/5.4.1 ++3632d7132fc212a50e62327858a3d15c0e81e030 refs/tags/5.5 ++450b08dde2409846201175e226158ad4e2c61ea1 refs/tags/5.6 ++244addb3f4253e1cd35dc9af504b3172aaccd576 refs/tags/5.6.1 ++91e902f7fe0c88933b1f8b85f1b8748b832a4d3c refs/tags/5.7 ++9e8dd3479da9f484c9aa37adcd327989149e89ef refs/tags/5.7.1 ++210378f19833c739f3d2e4acaca55fccb29c57f7 refs/tags/5.7.2 ++f83d61dfe8f24c9a50ccf7e4b903b8844367ccb7 refs/tags/5.8 ++5c6545adf5e2fc7011bd53735910f66998cade64 refs/tags/5.8.1 ++ee734fae6b35cfbeeb810e637c4f458b55c29fce refs/tags/5.8.2 ++cd8bb06af514ed9a30c0786b70c1d6ee6afb68c8 refs/tags/5.9 ++26445a0dc95cd5efe3dce247e49d40b851561a84 refs/tags/6.0 ++5ed9c481968a45f5032f1011d92ab8d5237aeba1 refs/tags/6.1 ++cb3f58ad06993f7ef3a7d8f61468012e2b786cab refs/tags/6.2 +diff -ruN dwm-6.3-ori/.git/refs/heads/master dwm-6.3/.git/refs/heads/master +--- dwm-6.3-ori/.git/refs/heads/master 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/refs/heads/master 2022-01-08 00:07:39.185133025 +0530 +@@ -0,0 +1 @@ ++d39e2f3441fe18aba8d1a62c08918a411ec6f237 +diff -ruN dwm-6.3-ori/.git/refs/remotes/origin/HEAD dwm-6.3/.git/refs/remotes/origin/HEAD +--- dwm-6.3-ori/.git/refs/remotes/origin/HEAD 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/refs/remotes/origin/HEAD 2020-07-28 14:30:56.469945463 +0530 +@@ -0,0 +1 @@ ++ref: refs/remotes/origin/master +diff -ruN dwm-6.3-ori/.git/refs/remotes/origin/master dwm-6.3/.git/refs/remotes/origin/master +--- dwm-6.3-ori/.git/refs/remotes/origin/master 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/refs/remotes/origin/master 2022-01-08 00:07:39.108465584 +0530 +@@ -0,0 +1 @@ ++d39e2f3441fe18aba8d1a62c08918a411ec6f237 +diff -ruN dwm-6.3-ori/.git/refs/tags/6.3 dwm-6.3/.git/refs/tags/6.3 +--- dwm-6.3-ori/.git/refs/tags/6.3 1970-01-01 05:30:00.000000000 +0530 ++++ dwm-6.3/.git/refs/tags/6.3 2022-01-08 00:07:39.115132318 +0530 +@@ -0,0 +1 @@ ++d39e2f3441fe18aba8d1a62c08918a411ec6f237 diff --git a/patches/dwm-systray-dwmblocks-6.3.diff b/patches/dwm-systray-dwmblocks-6.3.diff new file mode 100644 index 0000000..76cb374 --- /dev/null +++ b/patches/dwm-systray-dwmblocks-6.3.diff @@ -0,0 +1,472 @@ +diff -ruN dwm-6.3-ori/config.def.h dwm-6.3/config.def.h +--- dwm-6.3-ori/config.def.h 2022-02-16 00:26:13.967478771 +0530 ++++ dwm-6.3/config.def.h 2022-02-16 00:39:47.033030382 +0530 +@@ -4,7 +4,6 @@ + static const unsigned int borderpx = 1; /* border pixel of windows */ + static const unsigned int snap = 32; /* snap pixel */ + static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ +-static const unsigned int systrayonleft = 0; /* 0: systray in the right corner, >0: systray on left of status text */ + static const unsigned int systrayspacing = 2; /* systray spacing */ + static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ + static const int showsystray = 1; /* 0 means no systray */ +@@ -17,10 +16,26 @@ + static const char col_gray3[] = "#bbbbbb"; + static const char col_gray4[] = "#eeeeee"; + static const char col_cyan[] = "#005577"; ++static const char col1[] = "#ffffff"; ++static const char col2[] = "#ffffff"; ++static const char col3[] = "#ffffff"; ++static const char col4[] = "#ffffff"; ++static const char col5[] = "#ffffff"; ++static const char col6[] = "#ffffff"; ++ ++enum { SchemeNorm, SchemeCol1, SchemeCol2, SchemeCol3, SchemeCol4, ++ SchemeCol5, SchemeCol6, SchemeSel }; /* color schemes */ ++ + static const char *colors[][3] = { + /* fg bg border */ +- [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, +- [SchemeSel] = { col_gray4, col_cyan, col_cyan }, ++ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, ++ [SchemeCol1] = { col1, col_gray1, col_gray2 }, ++ [SchemeCol2] = { col2, col_gray1, col_gray2 }, ++ [SchemeCol3] = { col3, col_gray1, col_gray2 }, ++ [SchemeCol4] = { col4, col_gray1, col_gray2 }, ++ [SchemeCol5] = { col5, col_gray1, col_gray2 }, ++ [SchemeCol6] = { col6, col_gray1, col_gray2 }, ++ [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + }; + + /* tagging */ +@@ -109,7 +124,9 @@ + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, + { ClkWinTitle, 0, Button2, zoom, {0} }, +- { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, ++ { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1} }, ++ { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2} }, ++ { ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3} }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, +diff -ruN dwm-6.3-ori/dwm.c dwm-6.3/dwm.c +--- dwm-6.3-ori/dwm.c 2022-02-16 00:26:13.970812142 +0530 ++++ dwm-6.3/dwm.c 2022-02-16 00:40:50.847058491 +0530 +@@ -40,6 +40,7 @@ + #include + #endif /* XINERAMA */ + #include ++#include + + #include "drw.h" + #include "util.h" +@@ -56,6 +57,13 @@ + #define HEIGHT(X) ((X)->h + 2 * (X)->bw) + #define TAGMASK ((1 << LENGTH(tags)) - 1) + #define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad) ++#define TTEXTW(X) (drw_fontset_getwidth(drw, (X))) ++ ++#define STATUSLENGTH 256 ++#define DWMBLOCKSLOCKFILE "/var/local/dwmblocks/dwmblocks.pid" ++#define DELIMITERENDCHAR 10 ++#define LSPAD (lrpad / 2) /* padding on left side of status text */ ++#define RSPAD (lrpad / 2) /* padding on right side of status text */ + + #define SYSTEM_TRAY_REQUEST_DOCK 0 + /* XEMBED messages */ +@@ -71,8 +79,7 @@ + #define XEMBED_EMBEDDED_VERSION (VERSION_MAJOR << 16) | VERSION_MINOR + + /* enums */ +-enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ +-enum { SchemeNorm, SchemeSel }; /* color schemes */ ++enum { CurNormal, CurHand, CurResize, CurMove, CurLast }; /* cursor */ + enum { NetSupported, NetWMName, NetWMState, NetWMCheck, + NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetSystemTrayOrientationHorz, + NetWMFullscreen, NetActiveWindow, NetWMWindowType, +@@ -139,6 +146,7 @@ + unsigned int tagset[2]; + int showbar; + int topbar; ++ int statushandcursor; + Client *clients; + Client *sel; + Client *stack; +@@ -231,6 +239,7 @@ + static void seturgent(Client *c, int urg); + static void showhide(Client *c); + static void sigchld(int unused); ++static void sigdwmblocks(const Arg *arg); + static void spawn(const Arg *arg); + static Monitor *systraytomon(Monitor *m); + static void tag(const Arg *arg); +@@ -246,6 +255,7 @@ + static void updatebarpos(Monitor *m); + static void updatebars(void); + static void updateclientlist(void); ++static void updatedwmblockssig(int x); + static int updategeom(void); + static void updatenumlockmask(void); + static void updatesizehints(Client *c); +@@ -266,14 +276,17 @@ + static void zoom(const Arg *arg); + + /* variables */ +-static Systray *systray = NULL; + static const char broken[] = "broken"; +-static char stext[256]; ++static char stextc[STATUSLENGTH]; ++static char stexts[STATUSLENGTH]; + static int screen; + static int sw, sh; /* X display screen geometry width, height */ +-static int bh, blw = 0; /* bar geometry */ ++static int bh, blw, ble; /* bar geometry */ ++static int wsbar; /* width of selmon bar */ ++static int wstext; /* width of status text */ + static int lrpad; /* sum of left and right padding for text */ + static int (*xerrorxlib)(Display *, XErrorEvent *); ++static unsigned int dwmblockssig; + static unsigned int numlockmask = 0; + static void (*handler[LASTEvent]) (XEvent *) = { + [ButtonPress] = buttonpress, +@@ -300,6 +313,7 @@ + static Drw *drw; + static Monitor *mons, *selmon; + static Window root, wmcheckwin; ++static Systray *systray = NULL; + + /* configuration, allows nested code to access above variables */ + #include "config.h" +@@ -449,13 +463,13 @@ + void + buttonpress(XEvent *e) + { +- unsigned int i, x, click; ++ int i, x; ++ unsigned int click; + Arg arg = {0}; + Client *c; + Monitor *m; + XButtonPressedEvent *ev = &e->xbutton; + +- click = ClkRootWin; + /* focus monitor if necessary */ + if ((m = wintomon(ev->window)) && m != selmon) { + unfocus(selmon->sel, 1); +@@ -463,25 +477,29 @@ + focus(NULL); + } + if (ev->window == selmon->barwin) { +- i = x = 0; +- do +- x += TEXTW(tags[i]); +- while (ev->x >= x && ++i < LENGTH(tags)); +- if (i < LENGTH(tags)) { +- click = ClkTagBar; +- arg.ui = 1 << i; +- } else if (ev->x < x + blw) +- click = ClkLtSymbol; +- else if (ev->x > selmon->ww - (int)TEXTW(stext) - getsystraywidth()) +- click = ClkStatusText; +- else +- click = ClkWinTitle; ++ if (ev->x < ble - blw) { ++ i = -1, x = -ev->x; ++ do ++ x += TEXTW(tags[++i]); ++ while (x <= 0); ++ click = ClkTagBar; ++ arg.ui = 1 << i; ++ } else if (ev->x < ble) ++ click = ClkLtSymbol; ++ else if (ev->x < wsbar - wstext) ++ click = ClkWinTitle; ++ else if ((x = wsbar - RSPAD - ev->x) > 0 && (x -= wstext - LSPAD - RSPAD) <= 0) { ++ updatedwmblockssig(x); ++ click = ClkStatusText; ++ } else ++ return; + } else if ((c = wintoclient(ev->window))) { + focus(c); + restack(selmon); + XAllowEvents(dpy, ReplayPointer, CurrentTime); + click = ClkClientWin; +- } ++ } else ++ click = ClkRootWin; + for (i = 0; i < LENGTH(buttons); i++) + if (click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button + && CLEANMASK(buttons[i].mask) == CLEANMASK(ev->state)) +@@ -789,7 +807,8 @@ + void + drawbar(Monitor *m) + { +- int x, w, tw = 0, stw = 0; ++ int x, w; ++ int wbar = m->ww; + int boxs = drw->fonts->h / 9; + int boxw = drw->fonts->h / 6 + 2; + unsigned int i, occ = 0, urg = 0; +@@ -798,17 +817,40 @@ + if (!m->showbar) + return; + +- if(showsystray && m == systraytomon(m) && !systrayonleft) +- stw = getsystraywidth(); ++ if (showsystray && m == systraytomon(m)) ++ wbar -= getsystraywidth(); + + /* draw status first so it can be overdrawn by tags later */ + if (m == selmon) { /* status is only drawn on selected monitor */ +- drw_setscheme(drw, scheme[SchemeNorm]); +- tw = TEXTW(stext) - lrpad / 2 + 2; /* 2px extra right padding */ +- drw_text(drw, m->ww - tw - stw, 0, tw, bh, lrpad / 2 - 2, stext, 0); ++ char *stc = stextc; ++ char *stp = stextc; ++ char tmp; ++ ++ wsbar = wbar; ++ drw_setscheme(drw, scheme[SchemeNorm]); ++ x = wbar - wstext; ++ drw_rect(drw, x, 0, LSPAD, bh, 1, 1); x += LSPAD; /* to keep left padding clean */ ++ for (;;) { ++ if ((unsigned char)*stc >= ' ') { ++ stc++; ++ continue; ++ } ++ tmp = *stc; ++ if (stp != stc) { ++ *stc = '\0'; ++ x = drw_text(drw, x, 0, TTEXTW(stp), bh, 0, stp, 0); ++ } ++ if (tmp == '\0') ++ break; ++ if (tmp - DELIMITERENDCHAR - 1 < LENGTH(colors)) ++ drw_setscheme(drw, scheme[tmp - DELIMITERENDCHAR - 1]); ++ *stc = tmp; ++ stp = ++stc; ++ } ++ drw_setscheme(drw, scheme[SchemeNorm]); ++ drw_rect(drw, x, 0, wbar - x, bh, 1, 1); /* to keep right padding clean */ + } + +- resizebarwin(m); + for (c = m->clients; c; c = c->next) { + occ |= c->tags; + if (c->isurgent) +@@ -825,11 +867,17 @@ + urg & 1 << i); + x += w; + } +- w = blw = TEXTW(m->ltsymbol); ++ 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 - stw - x) > bh) { ++ if (m == selmon) { ++ blw = w, ble = x; ++ w = wbar - wstext - x; ++ } else ++ w = wbar - x; ++ ++ if (w > bh) { + if (m->sel) { + drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); +@@ -840,7 +888,9 @@ + drw_rect(drw, x, 0, w, bh, 1, 1); + } + } +- drw_map(drw, m->barwin, 0, 0, m->ww - stw, bh); ++ ++ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, wbar, bh); ++ drw_map(drw, m->barwin, 0, 0, wbar, bh); + } + + void +@@ -1249,17 +1299,24 @@ + motionnotify(XEvent *e) + { + static Monitor *mon = NULL; ++ int x; + Monitor *m; + XMotionEvent *ev = &e->xmotion; + +- if (ev->window != root) +- return; +- if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) { +- unfocus(selmon->sel, 1); +- selmon = m; +- focus(NULL); +- } +- mon = m; ++ if (ev->window == root) { ++ if ((m = recttomon(ev->x_root, ev->y_root, 1, 1)) != mon && mon) { ++ unfocus(selmon->sel, 1); ++ selmon = m; ++ focus(NULL); ++ } ++ mon = m; ++ } else if (ev->window == selmon->barwin && (x = wsbar - RSPAD - ev->x) > 0 ++ && (x -= wstext - LSPAD - RSPAD) <= 0) ++ updatedwmblockssig(x); ++ else if (selmon->statushandcursor) { ++ selmon->statushandcursor = 0; ++ XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor); ++ } + } + + void +@@ -1429,7 +1486,7 @@ + void + resizebarwin(Monitor *m) { + unsigned int w = m->ww; +- if (showsystray && m == systraytomon(m) && !systrayonleft) ++ if (showsystray && m == systraytomon(m)) + w -= getsystraywidth(); + XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, w, bh); + } +@@ -1757,6 +1814,7 @@ + xatom[XembedInfo] = XInternAtom(dpy, "_XEMBED_INFO", False); + /* init cursors */ + cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); ++ cursor[CurHand] = drw_cur_create(drw, XC_hand2); + cursor[CurResize] = drw_cur_create(drw, XC_sizing); + cursor[CurMove] = drw_cur_create(drw, XC_fleur); + /* init appearance */ +@@ -1832,6 +1890,37 @@ + } + + void ++sigdwmblocks(const Arg *arg) ++{ ++ static int fd = -1; ++ struct flock fl; ++ union sigval sv; ++ ++ if (!dwmblockssig) ++ return; ++ fl.l_type = F_WRLCK; ++ fl.l_whence = SEEK_SET; ++ fl.l_start = 0; ++ fl.l_len = 0; ++ if (fd != -1) { ++ if (fcntl(fd, F_GETLK, &fl) != -1 && fl.l_type == F_WRLCK) ++ goto signal; ++ close(fd); ++ fl.l_type = F_WRLCK; ++ } ++ if ((fd = open(DWMBLOCKSLOCKFILE, O_RDONLY | O_CLOEXEC)) == -1) ++ return; ++ if (fcntl(fd, F_GETLK, &fl) == -1 || fl.l_type != F_WRLCK) { ++ close(fd); ++ fd = -1; ++ return; ++ } ++signal: ++ sv.sival_int = (dwmblockssig << 8) | arg->i; ++ sigqueue(fl.l_pid, SIGRTMIN, sv); ++} ++ ++void + spawn(const Arg *arg) + { + if (arg->v == dmenucmd) +@@ -2020,7 +2109,7 @@ + XSetWindowAttributes wa = { + .override_redirect = True, + .background_pixmap = ParentRelative, +- .event_mask = ButtonPressMask|ExposureMask ++ .event_mask = ButtonPressMask|ExposureMask|PointerMotionMask + }; + XClassHint ch = {"dwm", "dwm"}; + for (m = mons; m; m = m->next) { +@@ -2067,6 +2156,41 @@ + (unsigned char *) &(c->win), 1); + } + ++void ++updatedwmblockssig(int x) ++{ ++ char *sts = stexts; ++ char *stp = stexts; ++ char tmp; ++ ++ while (*sts != '\0') { ++ if ((unsigned char)*sts >= ' ') { ++ sts++; ++ continue; ++ } ++ tmp = *sts; ++ *sts = '\0'; ++ x += TTEXTW(stp); ++ *sts = tmp; ++ if (x > 0) { ++ if (tmp == DELIMITERENDCHAR) ++ break; ++ if (!selmon->statushandcursor) { ++ selmon->statushandcursor = 1; ++ XDefineCursor(dpy, selmon->barwin, cursor[CurHand]->cursor); ++ } ++ dwmblockssig = tmp; ++ return; ++ } ++ stp = ++sts; ++ } ++ if (selmon->statushandcursor) { ++ selmon->statushandcursor = 0; ++ XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor); ++ } ++ dwmblockssig = 0; ++} ++ + int + updategeom(void) + { +@@ -2207,10 +2331,27 @@ + void + updatestatus(void) + { +- if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) +- strcpy(stext, "dwm-"VERSION); +- drawbar(selmon); +- updatesystray(); ++ char rawstext[STATUSLENGTH]; ++ ++ if (gettextprop(root, XA_WM_NAME, rawstext, sizeof rawstext)) { ++ char stextp[STATUSLENGTH]; ++ char *stp = stextp, *stc = stextc, *sts = stexts; ++ ++ for (char *rst = rawstext; *rst != '\0'; rst++) ++ if ((unsigned char)*rst >= ' ') ++ *(stp++) = *(stc++) = *(sts++) = *rst; ++ else if ((unsigned char)*rst > DELIMITERENDCHAR) ++ *(stc++) = *rst; ++ else ++ *(sts++) = *rst; ++ *stp = *stc = *sts = '\0'; ++ wstext = TTEXTW(stextp) + LSPAD + RSPAD; ++ } else { ++ strcpy(stextc, "dwm-"VERSION); ++ strcpy(stexts, stextc); ++ wstext = TTEXTW(stextc) + LSPAD + RSPAD; ++ } ++ drawbar(selmon); + } + + +@@ -2273,13 +2414,10 @@ + Client *i; + Monitor *m = systraytomon(NULL); + unsigned int x = m->mx + m->mw; +- unsigned int sw = TEXTW(stext) - lrpad + systrayspacing; + unsigned int w = 1; + + if (!showsystray) + return; +- if (systrayonleft) +- x -= sw + lrpad / 2; + if (!systray) { + /* init systray */ + if (!(systray = (Systray *)calloc(1, sizeof(Systray))))