Skip to content

Commit 67b74e2

Browse files
committed
integration: add CSD and output sections
1 parent c9553a6 commit 67b74e2

File tree

2 files changed

+175
-14
lines changed

2 files changed

+175
-14
lines changed

integration.html

Lines changed: 95 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ <h1 id="integration">Integration</h1>
129129
<li><a href="#waybar">waybar</a></li>
130130
</ol></li>
131131
<li><a href="#menu-generators">Menu Generators</a></li>
132+
<li><a href="#csd">CSD</a></li>
133+
<li><a href="#output-management">Output Management</a></li>
132134
</ol>
133135
<h1 id="panels">1. Panels</h1>
134136
<h2 id="waybar">1.1 waybar</h2>
@@ -142,16 +144,100 @@ <h2 id="waybar">1.1 waybar</h2>
142144
<h1 id="menu-generators">2. Menu Generators</h1>
143145
<p>Several menu-generators exist to automatically create a menu.xml with
144146
system applications:</p>
145-
<ul>
146-
<li><a
147-
href="https://github.com/labwc/labwc-menu-gnome3">labwc-menu-gnome3</a></li>
148-
<li><a
149-
href="https://trizenx.blogspot.com/2012/02/obmenu-generator.html">obmenu-generator</a></li>
150-
<li><a
151-
href="http://fabrice.thiroux.free.fr/openbox-menu_en.html">openbox-menu</a></li>
152-
</ul>
147+
<table>
148+
<colgroup>
149+
<col style="width: 57%" />
150+
<col style="width: 23%" />
151+
<col style="width: 18%" />
152+
</colgroup>
153+
<thead>
154+
<tr class="header">
155+
<th>Name</th>
156+
<th>Language</th>
157+
<th>Comment</th>
158+
</tr>
159+
</thead>
160+
<tbody>
161+
<tr class="odd">
162+
<td><a
163+
href="https://github.com/labwc/labwc-menu-generator">labwc-menu-generator</a></td>
164+
<td>C</td>
165+
<td>Indepedent of menu-packages. Very easy to build and use.</td>
166+
</tr>
167+
<tr class="even">
168+
<td><a
169+
href="https://github.com/labwc/labwc-menu-gnome3">labwc-menu-gnome3</a></td>
170+
<td>C</td>
171+
<td>Depends on GTK and a menu package such as gnome, mate, cinnamon</td>
172+
</tr>
173+
<tr class="odd">
174+
<td><a
175+
href="https://trizenx.blogspot.com/2012/02/obmenu-generator.html">obmenu-generator</a></td>
176+
<td>Perl</td>
177+
<td>Popular with openbox communities</td>
178+
</tr>
179+
<tr class="even">
180+
<td><a
181+
href="http://fabrice.thiroux.free.fr/openbox-menu_en.html">openbox-menu</a></td>
182+
<td>C</td>
183+
<td>XDG menu spec compliant, using LXDE’s library and menu package. Used
184+
to be packaged by debian, but isn’t anymore.</td>
185+
</tr>
186+
<tr class="odd">
187+
<td><a
188+
href="https://arch.p5n.pp.ru/~sergej/dl/2018/">arch-xdg-menu</a></td>
189+
<td>Perl</td>
190+
<td>Arch Linux’s xdg-menu package based on SuSE 2003 implementation</td>
191+
</tr>
192+
<tr class="even">
193+
<td><a href="https://github.com/onuronsekiz/obamenu">obamenu</a></td>
194+
<td>python3</td>
195+
<td>Designed for pipemenus, but could easily be modified to produce a
196+
root-menu</td>
197+
</tr>
198+
</tbody>
199+
</table>
153200
<p>They are typically used like this:</p>
154-
<pre><code>labwc-menu-gnome3 &gt; ~/.config/labwc/menu.xml</code></pre>
201+
<pre><code>labwc-menu-generator &gt; ~/.config/labwc/menu.xml</code></pre>
202+
<p>Some of them support several menu formats, in which case you have to
203+
specify <code>openbox</code> format.</p>
204+
<h1 id="csd">3. Client Side Decoration (CSD)</h1>
205+
<p>Labwc is designed to use Server Side Decoration (SSD) for windows,
206+
but does support CSD. If you prefer to use CSD or use GTK applications
207+
which will not surrender their CSD, such as nautilus, you may wish to
208+
manage some CSD properties using gsettings and associated <a
209+
href="https://github.com/GNOME/gsettings-desktop-schemas">gsettings-desktop-schemas</a>.</p>
210+
<p>For example, to display minimize, maximize and close buttons, rather
211+
than just the default close, issue the following command:</p>
212+
<pre><code>gsettings set org.gnome.desktop.wm.preferences button-layout &quot;:minimize,maximize,close&quot;</code></pre>
213+
<p>To also show a client-menu button, run this command:</p>
214+
<pre><code>gsettings set org.gnome.desktop.wm.preferences button-layout &quot;menu:minimize,maximize,close&quot;</code></pre>
215+
<h1 id="output-management">4. Output Management</h1>
216+
<p>To most users the term ‘output’ refers to the physical display(s)
217+
used.</p>
218+
<p>A good starting point for managing wayland outputs is to use <a
219+
href="https://sr.ht/~emersion/wlr-randr/">wlr-randr</a> which is tool
220+
similar to <a href="https://wiki.archlinux.org/title/xrandr">xrandr</a>
221+
for X11.</p>
222+
<p>Use <a href="https://sr.ht/~emersion/wlr-randr/">wlr-randr</a> to get
223+
your output names and associated properties such as mode, position,
224+
scale and transform by simply running:</p>
225+
<pre><code>wlr-randr</code></pre>
226+
<p>There is not configuration file for <a
227+
href="https://sr.ht/~emersion/wlr-randr/">wlr-randr</a>, but you can use
228+
to configure outputs from the command line like this:</p>
229+
<pre><code>wlr-randr --output DP-1 --mode [email protected]</code></pre>
230+
<blockquote>
231+
<p>Note: Use all the frequncy (Hz) decimals when specifying a mode</p>
232+
</blockquote>
233+
<p>If you prefer to have display (output) configuration automatically
234+
selected, try <a href="https://sr.ht/~emersion/kanshi/">kanshi</a> which
235+
supports directive definitions (in <code>~/.config/kanshi/config</code>)
236+
like this:</p>
237+
<pre><code>profile {
238+
output HDMI-A-1 position 1366,0
239+
output eDP-1 position 0,0
240+
}</code></pre>
155241
</main>
156242
</body>
157243
</html>

src/integration.md

Lines changed: 80 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
1. [Panels](#panels)
44
1. [waybar](#waybar)
55
2. [Menu Generators](#menu-generators)
6-
6+
3. [CSD](#csd)
7+
4. [Output Management](#output-management)
78

89
# 1. Panels {#panels}
910

@@ -27,13 +28,87 @@ Add these two sections to enable a taskbar through the toplevel-foreign protocol
2728
Several menu-generators exist to automatically create a menu.xml with system
2829
applications:
2930

30-
- [labwc-menu-gnome3](https://github.com/labwc/labwc-menu-gnome3)
31-
- [obmenu-generator](https://trizenx.blogspot.com/2012/02/obmenu-generator.html)
32-
- [openbox-menu](http://fabrice.thiroux.free.fr/openbox-menu_en.html)
31+
| Name | Language | Comment
32+
| ---------------------- | ---------| -------
33+
| [labwc-menu-generator] | C | Indepedent of menu-packages. Very easy to build and use.
34+
| [labwc-menu-gnome3] | C | Depends on GTK and a menu package such as gnome, mate, cinnamon
35+
| [obmenu-generator] | Perl | Popular with openbox communities
36+
| [openbox-menu] | C | XDG menu spec compliant, using LXDE's library and menu package. Used to be packaged by debian, but isn't anymore.
37+
| [arch-xdg-menu] | Perl | Arch Linux's xdg-menu package based on SuSE 2003 implementation
38+
| [obamenu] | python3 | Designed for pipemenus, but could easily be modified to produce a root-menu
3339

3440
They are typically used like this:
3541

3642
```
37-
labwc-menu-gnome3 > ~/.config/labwc/menu.xml
43+
labwc-menu-generator > ~/.config/labwc/menu.xml
44+
```
45+
46+
Some of them support several menu formats, in which case you have to specify
47+
`openbox` format.
48+
49+
# 3. Client Side Decoration (CSD) {#csd}
50+
51+
Labwc is designed to use Server Side Decoration (SSD) for windows, but does
52+
support CSD. If you prefer to use CSD or use GTK applications which will not
53+
surrender their CSD, such as nautilus, you may wish to manage some CSD
54+
properties using gsettings and associated [gsettings-desktop-schemas].
55+
56+
For example, to display minimize, maximize and close buttons, rather than
57+
just the default close, issue the following command:
58+
59+
```
60+
gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
61+
```
62+
63+
To also show a client-menu button, run this command:
64+
65+
```
66+
gsettings set org.gnome.desktop.wm.preferences button-layout "menu:minimize,maximize,close"
67+
```
68+
69+
# 4. Output Management {#output-management}
70+
71+
To most users the term 'output' refers to the physical display(s) used.
72+
73+
A good starting point for managing wayland outputs is to use [wlr-randr]
74+
which is tool similar to [xrandr] for X11.
75+
76+
Use [wlr-randr] to get your output names and associated properties such as
77+
mode, position, scale and transform by simply running:
78+
79+
```
80+
wlr-randr
81+
```
82+
83+
There is not configuration file for [wlr-randr], but you can use to configure
84+
outputs from the command line like this:
85+
86+
```
87+
wlr-randr --output DP-1 --mode [email protected]
3888
```
3989

90+
> Note: Use all the frequncy (Hz) decimals when specifying a mode
91+
92+
If you prefer to have display (output) configuration automatically selected,
93+
try [kanshi] which supports directive definitions (in `~/.config/kanshi/config`)
94+
like this:
95+
96+
```
97+
profile {
98+
output HDMI-A-1 position 1366,0
99+
output eDP-1 position 0,0
100+
}
101+
```
102+
103+
[labwc-menu-generator]: https://github.com/labwc/labwc-menu-generator
104+
[labwc-menu-gnome3]: https://github.com/labwc/labwc-menu-gnome3
105+
[obmenu-generator]: https://trizenx.blogspot.com/2012/02/obmenu-generator.html
106+
[openbox-menu]: http://fabrice.thiroux.free.fr/openbox-menu_en.html
107+
[arch-xdg-menu]: https://arch.p5n.pp.ru/~sergej/dl/2018/
108+
[obamenu]: https://github.com/onuronsekiz/obamenu
109+
110+
[gsettings-desktop-schemas]: https://github.com/GNOME/gsettings-desktop-schemas
111+
112+
[kanshi]: https://sr.ht/~emersion/kanshi/
113+
[wlr-randr]: https://sr.ht/~emersion/wlr-randr/
114+
[xrandr]: https://wiki.archlinux.org/title/xrandr

0 commit comments

Comments
 (0)