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
4f8b08d3
Commit
4f8b08d3
authored
19 years ago
by
Anselm R. Garbe
Browse files
Options
Downloads
Patches
Plain Diff
added heretag command which allows to tag a client of a foreign tag with current tag
parent
849e6315
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
client.c
+4
-4
4 additions, 4 deletions
client.c
draw.c
+1
-1
1 addition, 1 deletion
draw.c
dwm.1
+8
-0
8 additions, 0 deletions
dwm.1
dwm.h
+2
-1
2 additions, 1 deletion
dwm.h
event.c
+4
-0
4 additions, 0 deletions
event.c
tag.c
+23
-4
23 additions, 4 deletions
tag.c
with
42 additions
and
10 deletions
client.c
+
4
−
4
View file @
4f8b08d3
...
@@ -66,8 +66,8 @@ focusnext(Arg *arg)
...
@@ -66,8 +66,8 @@ focusnext(Arg *arg)
if
(
!
sel
)
if
(
!
sel
)
return
;
return
;
if
(
!
(
c
=
getnext
(
sel
->
next
)))
if
(
!
(
c
=
getnext
(
sel
->
next
,
tsel
)))
c
=
getnext
(
clients
);
c
=
getnext
(
clients
,
tsel
);
if
(
c
)
{
if
(
c
)
{
higher
(
c
);
higher
(
c
);
c
->
revert
=
sel
;
c
->
revert
=
sel
;
...
@@ -410,8 +410,8 @@ zoom(Arg *arg)
...
@@ -410,8 +410,8 @@ zoom(Arg *arg)
if
(
!
sel
)
if
(
!
sel
)
return
;
return
;
if
(
sel
==
getnext
(
clients
)
&&
sel
->
next
)
{
if
(
sel
==
getnext
(
clients
,
tsel
)
&&
sel
->
next
)
{
if
((
c
=
getnext
(
sel
->
next
)))
if
((
c
=
getnext
(
sel
->
next
,
tsel
)))
sel
=
c
;
sel
=
c
;
}
}
...
...
This diff is collapsed.
Click to expand it.
draw.c
+
1
−
1
View file @
4f8b08d3
...
@@ -97,7 +97,7 @@ drawall()
...
@@ -97,7 +97,7 @@ drawall()
{
{
Client
*
c
;
Client
*
c
;
for
(
c
=
clients
;
c
;
c
=
getnext
(
c
->
next
))
for
(
c
=
clients
;
c
;
c
=
getnext
(
c
->
next
,
tsel
))
drawtitle
(
c
);
drawtitle
(
c
);
drawstatus
();
drawstatus
();
}
}
...
...
This diff is collapsed.
Click to expand it.
dwm.1
+
8
−
0
View file @
4f8b08d3
...
@@ -93,6 +93,14 @@ Append
...
@@ -93,6 +93,14 @@ Append
tag to current
tag to current
.B window
.B window
.TP
.TP
.B Control-Shift-[0..n]
Replace current
.B window
of
.B nth
tag with current tag.
.B window
.TP
.B Control-Button1
.B Control-Button1
Zooms the clicked
Zooms the clicked
.B window
.B window
...
...
This diff is collapsed.
Click to expand it.
dwm.h
+
2
−
1
View file @
4f8b08d3
...
@@ -145,7 +145,8 @@ extern int xerror(Display *dsply, XErrorEvent *ee);
...
@@ -145,7 +145,8 @@ extern int xerror(Display *dsply, XErrorEvent *ee);
extern
void
appendtag
(
Arg
*
arg
);
extern
void
appendtag
(
Arg
*
arg
);
extern
void
dofloat
(
Arg
*
arg
);
extern
void
dofloat
(
Arg
*
arg
);
extern
void
dotile
(
Arg
*
arg
);
extern
void
dotile
(
Arg
*
arg
);
extern
Client
*
getnext
(
Client
*
c
);
extern
Client
*
getnext
(
Client
*
c
,
unsigned
int
t
);
extern
void
heretag
(
Arg
*
arg
);
extern
void
replacetag
(
Arg
*
arg
);
extern
void
replacetag
(
Arg
*
arg
);
extern
void
settags
(
Client
*
c
);
extern
void
settags
(
Client
*
c
);
extern
void
view
(
Arg
*
arg
);
extern
void
view
(
Arg
*
arg
);
...
...
This diff is collapsed.
Click to expand it.
event.c
+
4
−
0
View file @
4f8b08d3
...
@@ -35,6 +35,10 @@ Key key[] = {
...
@@ -35,6 +35,10 @@ Key key[] = {
{
Mod1Mask
,
XK_m
,
maximize
,
{
0
}
},
{
Mod1Mask
,
XK_m
,
maximize
,
{
0
}
},
{
Mod1Mask
,
XK_space
,
dotile
,
{
0
}
},
{
Mod1Mask
,
XK_space
,
dotile
,
{
0
}
},
{
Mod1Mask
,
XK_Return
,
zoom
,
{
0
}
},
{
Mod1Mask
,
XK_Return
,
zoom
,
{
0
}
},
{
ControlMask
|
ShiftMask
,
XK_0
,
heretag
,
{
.
i
=
Tscratch
}
},
{
ControlMask
|
ShiftMask
,
XK_1
,
heretag
,
{
.
i
=
Tdev
}
},
{
ControlMask
|
ShiftMask
,
XK_2
,
heretag
,
{
.
i
=
Twww
}
},
{
ControlMask
|
ShiftMask
,
XK_3
,
heretag
,
{
.
i
=
Twork
}
},
{
Mod1Mask
|
ShiftMask
,
XK_0
,
replacetag
,
{
.
i
=
Tscratch
}
},
{
Mod1Mask
|
ShiftMask
,
XK_0
,
replacetag
,
{
.
i
=
Tscratch
}
},
{
Mod1Mask
|
ShiftMask
,
XK_1
,
replacetag
,
{
.
i
=
Tdev
}
},
{
Mod1Mask
|
ShiftMask
,
XK_1
,
replacetag
,
{
.
i
=
Tdev
}
},
{
Mod1Mask
|
ShiftMask
,
XK_2
,
replacetag
,
{
.
i
=
Twww
}
},
{
Mod1Mask
|
ShiftMask
,
XK_2
,
replacetag
,
{
.
i
=
Twww
}
},
...
...
This diff is collapsed.
Click to expand it.
tag.c
+
23
−
4
View file @
4f8b08d3
...
@@ -49,7 +49,7 @@ dofloat(Arg *arg)
...
@@ -49,7 +49,7 @@ dofloat(Arg *arg)
ban
(
c
);
ban
(
c
);
}
}
if
(
sel
&&
!
sel
->
tags
[
tsel
])
{
if
(
sel
&&
!
sel
->
tags
[
tsel
])
{
if
((
sel
=
getnext
(
clients
)))
{
if
((
sel
=
getnext
(
clients
,
tsel
)))
{
higher
(
sel
);
higher
(
sel
);
focus
(
sel
);
focus
(
sel
);
}
}
...
@@ -106,7 +106,7 @@ dotile(Arg *arg)
...
@@ -106,7 +106,7 @@ dotile(Arg *arg)
ban
(
c
);
ban
(
c
);
}
}
if
(
!
sel
||
(
sel
&&
!
sel
->
tags
[
tsel
]))
{
if
(
!
sel
||
(
sel
&&
!
sel
->
tags
[
tsel
]))
{
if
((
sel
=
getnext
(
clients
)))
{
if
((
sel
=
getnext
(
clients
,
tsel
)))
{
higher
(
sel
);
higher
(
sel
);
focus
(
sel
);
focus
(
sel
);
}
}
...
@@ -115,12 +115,31 @@ dotile(Arg *arg)
...
@@ -115,12 +115,31 @@ dotile(Arg *arg)
}
}
Client
*
Client
*
getnext
(
Client
*
c
)
getnext
(
Client
*
c
,
unsigned
int
t
)
{
{
for
(;
c
&&
!
c
->
tags
[
t
sel
];
c
=
c
->
next
);
for
(;
c
&&
!
c
->
tags
[
t
];
c
=
c
->
next
);
return
c
;
return
c
;
}
}
void
heretag
(
Arg
*
arg
)
{
int
i
;
Client
*
c
;
if
(
arg
->
i
==
tsel
)
return
;
if
(
!
(
c
=
getnext
(
clients
,
arg
->
i
)))
return
;
for
(
i
=
0
;
i
<
TLast
;
i
++
)
c
->
tags
[
i
]
=
NULL
;
c
->
tags
[
tsel
]
=
tags
[
tsel
];
arrange
(
NULL
);
focus
(
c
);
}
void
void
replacetag
(
Arg
*
arg
)
replacetag
(
Arg
*
arg
)
{
{
...
...
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