Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ofarges-dwm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FARGES Olivier
ofarges-dwm
Commits
901b3ed9
Commit
901b3ed9
authored
18 years ago
by
Anselm R. Garbe
Browse files
Options
Downloads
Patches
Plain Diff
several additions in mouse handling ;)
parent
e6cbe9c1
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
client.c
+7
-6
7 additions, 6 deletions
client.c
dwm.1
+20
-43
20 additions, 43 deletions
dwm.1
dwm.h
+2
-2
2 additions, 2 deletions
dwm.h
event.c
+26
-10
26 additions, 10 deletions
event.c
tag.c
+4
-4
4 additions, 4 deletions
tag.c
with
59 additions
and
65 deletions
client.c
+
7
−
6
View file @
901b3ed9
...
...
@@ -192,7 +192,7 @@ lower(Client *c)
void
manage
(
Window
w
,
XWindowAttributes
*
wa
)
{
Client
*
c
,
**
l
;
Client
*
c
;
XSetWindowAttributes
twa
;
Window
trans
;
...
...
@@ -223,10 +223,11 @@ manage(Window w, XWindowAttributes *wa)
settitle
(
c
);
settags
(
c
);
for
(
l
=
&
clients
;
*
l
;
l
=
&
(
*
l
)
->
next
);
c
->
next
=
*
l
;
/* *l == nil */
*
l
=
c
;
c
->
next
=
clients
;
clients
=
c
;
XGrabButton
(
dpy
,
Button1
,
ControlMask
,
c
->
win
,
False
,
ButtonPressMask
,
GrabModeAsync
,
GrabModeSync
,
None
,
None
);
XGrabButton
(
dpy
,
Button1
,
Mod1Mask
,
c
->
win
,
False
,
ButtonPressMask
,
GrabModeAsync
,
GrabModeSync
,
None
,
None
);
XGrabButton
(
dpy
,
Button2
,
Mod1Mask
,
c
->
win
,
False
,
ButtonPressMask
,
...
...
@@ -234,8 +235,8 @@ manage(Window w, XWindowAttributes *wa)
XGrabButton
(
dpy
,
Button3
,
Mod1Mask
,
c
->
win
,
False
,
ButtonPressMask
,
GrabModeAsync
,
GrabModeSync
,
None
,
None
);
if
(
!
c
->
do
float
)
c
->
do
float
=
trans
if
(
!
c
->
is
float
)
c
->
is
float
=
trans
||
((
c
->
maxw
==
c
->
minw
)
&&
(
c
->
maxh
==
c
->
minh
));
arrange
(
NULL
);
...
...
This diff is collapsed.
Click to expand it.
dwm.1
+
20
−
43
View file @
901b3ed9
...
...
@@ -5,63 +5,44 @@ dwm \- dynamic window manager
.B dwm
.RB [ \-v ]
.SH DESCRIPTION
.SS Overview
.B dwm
is a dynamic window manager for X11. It consists of a small status bar a
t the
top of the screen and
arranges windows in either a tiled or floating mode.
is a dynamic window manager for X11. It consists of a small status bar a
nd
arranges windows in either a tiled or floating mode.
.P
I
f
I
n tiled mode
.B dwm
is in tiled mode, it consists of two columns. The left master column
contains only one window per time, the right column contains all other windows
in a stack. In tiled mode
.B dwm
.B don't
handles incremental resizals, some terminal programs like
.B xterm
may not work correctly with this in tiled mode.
manages all windows in a left master column and a right stacking column. The
master column contains a single window, the left stacking column all other
windows. Dialog windows are treated floating.
.P
If
.B dwm
is in floating mode, it arranges all windows with the reqyested geometry and
allows the user to move or resize them. Some windows, like
dialog windows, are treated floating even if
In floating mode
.B dwm
is in tiled mode. In floating mode
.B dwm
handles incremental resizals.
manages all windows in a conventional way. They can be resized and moved freely
with the mouse.
.P
Windows are grouped by tags. You can view all windows with a specific tag per
time. However, each window is allowed to contain more than one tag, which
allows to make windows visible in all views.
.P
.B dwm
reads from
.I stdin
to display status text, if written.
reads from standard input to display status text, if written.
.P
.B dwm
draws 1-pixel borders around windows to indicate the focus state and
save
as
draws 1-pixel borders around windows to indicate the focus state and
providing
as
much screen real estate as possible. Unfocused windows contain a small bar
in front of the window indicating the tags and the window title.
.S
S
O
ptions
.S
H
O
PTIONS
.TP
.B \-v
prints version information to
.I stdout
, then exits.
.SS Customization
prints version information to standard output, then exits.
.SH CUSTOMIZATION
.B dwm
is customized through editing its source code. It is assumed that
dwm users are high experienced users who know how a window manager works
and who are able to patch
.B dwm
for their needs. This keeps
.B dwm
fast, secure and simple, because it does not process any input data, except
window properties and the status text read from
.I stdin
.
.SS
Default Key Bindings
users know to patch it for their needs. This keeps it fast, secure and simple,
because it does not process any input data, except window properties and
the status text read from standard input
.
.SS
Keyboard Control
.TP 16
.I Key
.I Action
...
...
@@ -71,7 +52,7 @@ Zoom
.B window
to the
.B master
track
column
.TP
.B Mod1-k
Focus previous
...
...
@@ -127,7 +108,7 @@ Append
.B nth
tag to cureent
.B window
.SS
Default Mouse Bindings
.SS
Mouse Control
.TP
.B Mod1-Button1
Moves current
...
...
@@ -142,7 +123,3 @@ Lowers current
Resizes current
.B window
while dragging
.SH BUGS
Some terminal programs do not behave correctly in tiled mode, because
incremental resizals are ignored to use maximum screen real estate. You can
patch the code to fix this.
This diff is collapsed.
Click to expand it.
dwm.h
+
2
−
2
View file @
901b3ed9
...
...
@@ -71,7 +71,7 @@ struct Client {
int
grav
;
unsigned
int
border
;
long
flags
;
Bool
do
float
;
Bool
is
float
;
Window
win
;
Window
title
;
Client
*
next
;
...
...
@@ -82,7 +82,7 @@ struct Rule {
const
char
*
class
;
const
char
*
instance
;
char
*
tags
[
TLast
];
Bool
do
float
;
Bool
is
float
;
};
struct
Key
{
...
...
This diff is collapsed.
Click to expand it.
event.c
+
26
−
10
View file @
901b3ed9
...
...
@@ -14,8 +14,8 @@
/********** CUSTOMIZE **********/
const
char
*
term
[]
=
{
"urxvtc"
,
"-tr"
,
"+sb"
,
"-bg"
,
"black"
,
"-fg"
,
"white"
,
"-
fn
"
,
"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
,
NULL
"urxvtc"
,
"-tr"
,
"+sb"
,
"-bg"
,
"black"
,
"-fg"
,
"white"
,
"-
cr"
,
"white
"
,
"-fn"
,
"-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*"
,
NULL
};
const
char
*
browse
[]
=
{
"firefox"
,
NULL
};
const
char
*
xlock
[]
=
{
"xlock"
,
NULL
};
...
...
@@ -128,18 +128,34 @@ buttonpress(XEvent *e)
Client
*
c
;
if
(
barwin
==
ev
->
window
)
{
x
=
0
;
for
(
a
.
i
=
0
;
a
.
i
<
TLast
;
a
.
i
++
)
{
x
+=
textw
(
tags
[
a
.
i
]);
if
(
ev
->
x
<
x
)
{
view
(
&
a
);
break
;
switch
(
ev
->
button
)
{
default:
x
=
0
;
for
(
a
.
i
=
0
;
a
.
i
<
TLast
;
a
.
i
++
)
{
x
+=
textw
(
tags
[
a
.
i
]);
if
(
ev
->
x
<
x
)
{
view
(
&
a
);
break
;
}
}
break
;
case
Button4
:
a
.
i
=
(
tsel
+
1
<
TLast
)
?
tsel
+
1
:
0
;
view
(
&
a
);
break
;
case
Button5
:
a
.
i
=
(
tsel
-
1
>=
0
)
?
tsel
-
1
:
TLast
-
1
;
view
(
&
a
);
break
;
}
}
else
if
((
c
=
getclient
(
ev
->
window
)))
{
if
(
arrange
==
dotile
&&
!
c
->
dofloat
)
if
(
arrange
==
dotile
&&
!
c
->
isfloat
)
{
if
((
ev
->
state
&
ControlMask
)
&&
(
ev
->
button
==
Button1
))
zoom
(
NULL
);
return
;
}
/* floating windows */
higher
(
c
);
switch
(
ev
->
button
)
{
default:
...
...
@@ -297,7 +313,7 @@ propertynotify(XEvent *e)
default:
break
;
case
XA_WM_TRANSIENT_FOR
:
XGetTransientForHint
(
dpy
,
c
->
win
,
&
trans
);
if
(
!
c
->
do
float
&&
(
c
->
do
float
=
(
trans
!=
0
)))
if
(
!
c
->
is
float
&&
(
c
->
is
float
=
(
trans
!=
0
)))
arrange
(
NULL
);
break
;
case
XA_WM_NORMAL_HINTS
:
...
...
This diff is collapsed.
Click to expand it.
tag.c
+
4
−
4
View file @
901b3ed9
...
...
@@ -17,7 +17,7 @@ char *tags[TLast] = {
};
static
Rule
rule
[]
=
{
/* class instance tags
do
float */
/* class instance tags
is
float */
{
"Firefox-bin"
,
"Gecko"
,
{
[
Twww
]
=
"www"
},
False
},
};
...
...
@@ -67,7 +67,7 @@ dotile(Arg *arg)
w
=
sw
-
mw
;
arrange
=
dotile
;
for
(
n
=
0
,
c
=
clients
;
c
;
c
=
c
->
next
)
if
(
c
->
tags
[
tsel
]
&&
!
c
->
do
float
)
if
(
c
->
tags
[
tsel
]
&&
!
c
->
is
float
)
n
++
;
if
(
n
>
1
)
...
...
@@ -77,7 +77,7 @@ dotile(Arg *arg)
for
(
i
=
0
,
c
=
clients
;
c
;
c
=
c
->
next
)
{
if
(
c
->
tags
[
tsel
])
{
if
(
c
->
do
float
)
{
if
(
c
->
is
float
)
{
higher
(
c
);
resize
(
c
,
True
);
continue
;
...
...
@@ -155,7 +155,7 @@ settags(Client *c)
{
for
(
j
=
0
;
j
<
TLast
;
j
++
)
c
->
tags
[
j
]
=
rule
[
i
].
tags
[
j
];
c
->
do
float
=
rule
[
i
].
do
float
;
c
->
is
float
=
rule
[
i
].
is
float
;
matched
=
True
;
break
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment