274 lines
9.4 KiB
Diff
274 lines
9.4 KiB
Diff
diff --git a/config.def.h b/config.def.h
|
|
index 061ad66..5c548df 100644
|
|
--- a/config.def.h
|
|
+++ b/config.def.h
|
|
@@ -48,9 +48,7 @@ static const Layout layouts[] = {
|
|
#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 } }
|
|
@@ -63,23 +61,15 @@ static const 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 } },
|
|
@@ -108,8 +98,6 @@ static const Button buttons[] = {
|
|
{ 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 --git a/dwm.1 b/dwm.1
|
|
index ddc8321..b8ced05 100644
|
|
--- a/dwm.1
|
|
+++ b/dwm.1
|
|
@@ -5,8 +5,8 @@ dwm \- dynamic window manager
|
|
.B dwm
|
|
.RB [ \-v ]
|
|
.SH DESCRIPTION
|
|
-dwm is a dynamic window manager for X. It manages windows in tiled, monocle
|
|
-and floating layouts. Either layout can be applied dynamically, optimising the
|
|
+dwm is a dynamic window manager for X. It manages windows in tiled, monocle and
|
|
+floating layouts. Either layout can be applied dynamically, optimising the
|
|
environment for the application in use and the task performed.
|
|
.P
|
|
In tiled layouts windows are managed in a master and stacking area. The master
|
|
@@ -17,17 +17,17 @@ maximised to the screen size. In floating layout windows can be resized and
|
|
moved freely. Dialog windows are always managed floating, regardless of the
|
|
layout applied.
|
|
.P
|
|
-Windows are grouped by tags. Each window can be tagged with one or multiple
|
|
-tags. Selecting certain tags displays all windows with these tags.
|
|
+Windows are grouped by tags. Each window can be tagged with one tag. Selecting
|
|
+a tag displays all windows with this tag.
|
|
.P
|
|
Each screen contains a small status bar which displays all available tags, the
|
|
layout, the title of the focused window, and the text read from the root window
|
|
name property, if the screen is focused. A floating window is indicated with an
|
|
empty square and a maximised floating window is indicated with a filled square
|
|
-before the windows title. The selected tags are indicated with a different
|
|
-color. The tags of the focused window are indicated with a filled square in the
|
|
-top left corner. The tags which are applied to one or more windows are
|
|
-indicated with an empty square in the top left corner.
|
|
+before the windows title. The selected tag is indicated with a different color.
|
|
+The tag of the focused window is indicated with a filled square in the top left
|
|
+corner. The tags which are applied to one or more windows are indicated with an
|
|
+empty square in the top left corner.
|
|
.P
|
|
dwm draws a small border around windows to indicate the focus state.
|
|
.SH OPTIONS
|
|
@@ -43,17 +43,7 @@ is read and displayed in the status text area. It can be set with the
|
|
command.
|
|
.TP
|
|
.B Button1
|
|
-click on a tag label to display all windows with that tag, click on the layout
|
|
-label toggles between tiled and floating layout.
|
|
-.TP
|
|
-.B Button3
|
|
-click on a tag label adds/removes all windows with that tag to/from the view.
|
|
-.TP
|
|
-.B Mod1\-Button1
|
|
-click on a tag label applies that tag to the focused window.
|
|
-.TP
|
|
-.B Mod1\-Button3
|
|
-click on a tag label adds/removes that tag to/from the focused window.
|
|
+click on a tag label to display all windows with that tag.
|
|
.SS Keyboard commands
|
|
.TP
|
|
.B Mod1\-Shift\-Return
|
|
@@ -77,9 +67,6 @@ Send focused window to previous screen, if any.
|
|
.B Mod1\-Shift\-.
|
|
Send focused window to next screen, if any.
|
|
.TP
|
|
-.B Mod1\-b
|
|
-Toggles bar on and off.
|
|
-.TP
|
|
.B Mod1\-t
|
|
Sets tiled layout.
|
|
.TP
|
|
@@ -98,18 +85,6 @@ Focus next window.
|
|
.B Mod1\-k
|
|
Focus previous window.
|
|
.TP
|
|
-.B Mod1\-i
|
|
-Increase number of windows in master area.
|
|
-.TP
|
|
-.B Mod1\-d
|
|
-Decrease number of windows in master area.
|
|
-.TP
|
|
-.B Mod1\-l
|
|
-Increase master area size.
|
|
-.TP
|
|
-.B Mod1\-h
|
|
-Decrease master area size.
|
|
-.TP
|
|
.B Mod1\-Return
|
|
Zooms/cycles focused window to/from master area (tiled layouts only).
|
|
.TP
|
|
@@ -125,21 +100,9 @@ Toggles to the previously selected tags.
|
|
.B Mod1\-Shift\-[1..n]
|
|
Apply nth tag to focused window.
|
|
.TP
|
|
-.B Mod1\-Shift\-0
|
|
-Apply all tags to focused window.
|
|
-.TP
|
|
-.B Mod1\-Control\-Shift\-[1..n]
|
|
-Add/remove nth tag to/from focused window.
|
|
-.TP
|
|
.B Mod1\-[1..n]
|
|
View all windows with nth tag.
|
|
.TP
|
|
-.B Mod1\-0
|
|
-View all windows with any tag.
|
|
-.TP
|
|
-.B Mod1\-Control\-[1..n]
|
|
-Add/remove all windows with nth tag to/from the view.
|
|
-.TP
|
|
.B Mod1\-Shift\-q
|
|
Quit dwm.
|
|
.SS Mouse commands
|
|
diff --git a/dwm.c b/dwm.c
|
|
index e5efb6a..8f63c64 100644
|
|
--- a/dwm.c
|
|
+++ b/dwm.c
|
|
@@ -175,7 +175,6 @@ 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);
|
|
@@ -201,7 +200,6 @@ static void setclientstate(Client *c, long state);
|
|
static void setfocus(Client *c);
|
|
static void setfullscreen(Client *c, int fullscreen);
|
|
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);
|
|
@@ -210,10 +208,7 @@ static void spawn(const Arg *arg);
|
|
static void tag(const Arg *arg);
|
|
static void tagmon(const Arg *arg);
|
|
static void tile(Monitor *m);
|
|
-static void togglebar(const Arg *arg);
|
|
static void togglefloating(const Arg *arg);
|
|
-static void toggletag(const Arg *arg);
|
|
-static void toggleview(const Arg *arg);
|
|
static void unfocus(Client *c, int setfocus);
|
|
static void unmanage(Client *c, int destroyed);
|
|
static void unmapnotify(XEvent *e);
|
|
@@ -968,13 +963,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)
|
|
@@ -1512,21 +1500,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)
|
|
{
|
|
@@ -1694,15 +1667,6 @@ tile(Monitor *m)
|
|
}
|
|
}
|
|
|
|
-void
|
|
-togglebar(const Arg *arg)
|
|
-{
|
|
- selmon->showbar = !selmon->showbar;
|
|
- updatebarpos(selmon);
|
|
- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
|
|
- arrange(selmon);
|
|
-}
|
|
-
|
|
void
|
|
togglefloating(const Arg *arg)
|
|
{
|
|
@@ -1717,33 +1681,6 @@ togglefloating(const Arg *arg)
|
|
arrange(selmon);
|
|
}
|
|
|
|
-void
|
|
-toggletag(const Arg *arg)
|
|
-{
|
|
- unsigned int newtags;
|
|
-
|
|
- if (!selmon->sel)
|
|
- return;
|
|
- newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
|
|
- if (newtags) {
|
|
- selmon->sel->tags = newtags;
|
|
- focus(NULL);
|
|
- arrange(selmon);
|
|
- }
|
|
-}
|
|
-
|
|
-void
|
|
-toggleview(const Arg *arg)
|
|
-{
|
|
- unsigned int newtagset = selmon->tagset[selmon->seltags] ^ (arg->ui & TAGMASK);
|
|
-
|
|
- if (newtagset) {
|
|
- selmon->tagset[selmon->seltags] = newtagset;
|
|
- focus(NULL);
|
|
- arrange(selmon);
|
|
- }
|
|
-}
|
|
-
|
|
void
|
|
unfocus(Client *c, int setfocus)
|
|
{
|