summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozpv <39195175+ozpv@users.noreply.github.com>2026-05-20 21:11:58 +0000
committerGitHub <noreply@github.com>2026-05-20 21:11:58 +0000
commitf5b0a6779bddeb2a7c736694f11e149533706aed (patch)
tree69ef3071cc06993bcee3aefa0cc0b413bdc06e82
parente0ad50fd3a954192d97e89524c68f37eeffdba9a (diff)
remove unused
-rw-r--r--config.def.h3
-rw-r--r--dwm.c66
2 files changed, 3 insertions, 66 deletions
diff --git a/config.def.h b/config.def.h
index 4c6d87c..e341155 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,5 +1,7 @@
/* See LICENSE file for copyright and license details. */
+#include <X11/XF86keysym.h>
+
/* appearance */
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int gappx = 12; /* gaps between windows */
@@ -37,6 +39,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 int refreshrate = 120; /* refresh rate (per second) for client move/resize */
static const Layout layouts[] = {
/* symbol arrange function */
diff --git a/dwm.c b/dwm.c
index c6ac2a3..2e04d06 100644
--- a/dwm.c
+++ b/dwm.c
@@ -167,15 +167,12 @@ static void enternotify(XEvent *e);
static void expose(XEvent *e);
static void focus(Client *c);
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);
static void grabbuttons(Client *c, int focused);
static void grabkeys(void);
-static void incnmaster(const Arg *arg);
static void keypress(XEvent *e);
static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa);
@@ -202,7 +199,6 @@ static void setfocus(Client *c);
static void setfullscreen(Client *c, int fullscreen);
static void setgaps(const Arg *arg);
static void setlayout(const Arg *arg);
-static void setmfact(const Arg *arg);
static void setup(void);
static void seturgent(Client *c, int urg);
static void showhide(Client *c);
@@ -824,46 +820,6 @@ focusin(XEvent *e)
setfocus(selmon->sel);
}
-void
-focusmon(const Arg *arg)
-{
- Monitor *m;
-
- if (!mons->next)
- return;
- if ((m = dirtomon(arg->i)) == selmon)
- return;
- unfocus(selmon->sel, 0);
- selmon = m;
- focus(NULL);
-}
-
-void
-focusstack(const Arg *arg)
-{
- Client *c = NULL, *i;
-
- if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen))
- return;
- if (arg->i > 0) {
- for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next);
- if (!c)
- for (c = selmon->clients; c && !ISVISIBLE(c); c = c->next);
- } else {
- for (i = selmon->clients; i != selmon->sel; i = i->next)
- if (ISVISIBLE(i))
- c = i;
- if (!c)
- for (; i; i = i->next)
- if (ISVISIBLE(i))
- c = i;
- }
- if (c) {
- focus(c);
- restack(selmon);
- }
-}
-
Atom
getatomprop(Client *c, Atom prop)
{
@@ -981,13 +937,6 @@ grabkeys(void)
}
}
-void
-incnmaster(const Arg *arg)
-{
- selmon->nmaster = MAX(selmon->nmaster + arg->i, 0);
- arrange(selmon);
-}
-
#ifdef XINERAMA
static int
isuniquegeom(XineramaScreenInfo *unique, size_t n, XineramaScreenInfo *info)
@@ -1537,21 +1486,6 @@ setlayout(const Arg *arg)
drawbar(selmon);
}
-/* arg > 1.0 will set mfact absolutely */
-void
-setmfact(const Arg *arg)
-{
- float f;
-
- if (!arg || !selmon->lt[selmon->sellt]->arrange)
- return;
- f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
- if (f < 0.05 || f > 0.95)
- return;
- selmon->mfact = f;
- arrange(selmon);
-}
-
void
setup(void)
{