1
1
# Getting Started
2
2
3
- Labwc is designed to be easy to get started with.
3
+ ## Introduction
4
4
5
- To use the compositor for the first time, there is no need for configuration
6
- files, theme files or even a session file. It should be enough to simply run
7
- the labwc binary from a TTY or Wayland/X11 session.
5
+ If you are coming to labwc for the first time, this is the page to read. Should
6
+ you get stuck, do reach out on the [ IRC Channel] or [ Github Discussions] .
8
7
9
- If labwc is not packaged by your OS/distribution of choice, it is quite easy
10
- to build (which should take no more than a few seconds) and run from the build
11
- directory.[ ^ 1 ]
12
-
13
- [ ^ 1 ] : The compositor works fine without doing a system-wide installation, but
14
- just be aware that you will not get localized (translated to local
15
- language) window context menus, nor will you get a system-wide .desktop
16
- file where most display managers look for them (if you use one of them).
8
+ [ IRC Channel ] : https://web.libera.chat/gamja/?channels=#labwc
9
+ [ Github Discussions ] : https://github.com/labwc/labwc/discussions
17
10
18
- The first time you run labwc, you'll be greeted by a blank screen. If you click
19
- on the desktop you will see your root-menu containing 'Reconfigure' and 'Exit'.
20
- Although this initial appearance is minimalist and sparse, it is easy to get
21
- started.
11
+ ## Context
22
12
23
- Before doing any configuration, you can start labwc with the following command
24
- to start an application (alacritty is used in the example, but it could of
25
- course be any application):
13
+ Labwc is a system level software component for which the entry barrier is
14
+ higher compared with that of many user applications. It can be perceived as
15
+ difficult to set up due to the need for manual configuration and because it is
16
+ a base component upon which Desktop Environments can be built which means that
17
+ there are many ways in which it can be used and that work is required to get
18
+ the best out of it. But fret not, with a small amount of work some very
19
+ creative experiences will be opened up that will most likely be worth the
20
+ effort.
26
21
27
- ```
28
- labwc -s alacritty
29
- ```
22
+ Pre-configured [ Desktop Environments ] exist using ` labwc ` as the compositor,
23
+ but in this document you will be guided to start the compositor without any
24
+ such setup.
30
25
31
- Alternatively, if you have bemenu installed, you can use the default keybind
32
- Alt-F3 to launch applications.
26
+ [ Desktop Environments ] : links.html#desktops
33
27
34
- < img src = " img/scrot-first-start.png " />
28
+ ## Installation
35
29
36
- # Configuration
30
+ Install ` labwc ` with your package manager and come back here when done.
37
31
38
- User config files are located at ` ${XDG_CONFIG_HOME:-$HOME/.config/labwc/} `
39
- (usually ` ~/.config/labwc/ ` ) with the following five files being used:
40
- [ rc.xml] , [ menu.xml] , [ autostart] , [ environment] and [ themerc-override] .
32
+ Also install ` alacritty ` (a terminal emulator which is available in most
33
+ distros' repositories). There is of course nothing forcing you to use
34
+ ` alacritty ` but it is likely to be useful the first time the start the
35
+ compositor.
41
36
42
- The example [ rc.xml] has been kept simple. For all options and default values,
43
- see [ rc.xml.all]
37
+ ## Launching
44
38
45
- For full details on configuration options, see the man pages:
46
- [ labwc(1)] , [ labwc-config(5)] , [ labwc-theme(5)] , [ labwc-actions(5)] and
47
- [ labwc-menu(5)] .
39
+ Launch labwc by typing ` labwc ` in your terminal. Some Display Managers (like
40
+ ` SDDM ` or ` GDM ` ) will show labwc, so you can also start from there.
48
41
49
- Run ` labwc --reconfigure ` to reload configuration and theme files.
42
+ > TECHNICAL NOTE: labwc can be started from a TTY or nested in a Wayland/X11
43
+ > session.
50
44
51
- Your OS/Distribution of choice may include these example configuration files in
52
- ` /usr/share/doc/labwc/ ` or similar. If not, you could download them with:
45
+ If you start ` labwc ` with no prior configuration you will be greeted by a blank
46
+ screen. If you click on the desktop you will see your root-menu containing only
47
+ 'Reconfigure' and 'Exit' (and 'Terminal' from version 0.9.0 onwards). Do not be
48
+ put off by this sparse appearance. There is a lot more to this compositor than
49
+ first meets the eye.
53
50
54
- ``` bash
55
- mkdir -p ~ /.config/labwc
56
- wget https://raw.githubusercontent.com/labwc/labwc/master/docs/environment -O ~ /.config/labwc/environment
57
- wget https://raw.githubusercontent.com/labwc/labwc/master/docs/autostart -O ~ /.config/labwc/autostart
58
- wget https://raw.githubusercontent.com/labwc/labwc/master/docs/menu.xml -O ~ /.config/labwc/menu.xml
59
- wget https://raw.githubusercontent.com/labwc/labwc/master/docs/rc.xml -O ~ /.config/labwc/rc.xml
60
- ```
51
+ You can start a terminal by pressing ` Super + Return ` .
61
52
62
- > ** _ NOTE:_ ** Before using these configuration files, please read them through
63
- > and modify the content to suit your specific needs.
53
+ <img src =" img/scrot-first-start.png " />
64
54
65
- For more information about each configuration file and to help create a setup
66
- that work for you, please read through the sections below.
55
+ # Configuration
67
56
68
- If you get stuck, do reach out on the [ IRC Channel ] or [ Github Discussions ] .
57
+ Configuration files are located in ` $HOME/.config/labwc/ `
69
58
70
- [ rc.xml ] : https://github.com/labwc/labwc/blob/master/docs/rc.xml
71
- [ rc.xml.all ] : https://github.com/labwc/labwc/blob/master/docs/rc.xml.all
72
- [ menu.xml ] : https://github.com/labwc/labwc/blob/master/docs/menu.xml
73
- [ autostart ] : https://github.com/labwc/labwc/blob/master/docs/autostart
74
- [ environment ] : https://github.com/labwc/labwc/blob/master/docs/environment
75
- [ themerc-override ] : https://github.com/labwc/labwc/blob/master/docs/themerc
76
- [ labwc(1) ] : https://labwc.github.io/labwc.1.html
77
- [ labwc-config(5) ] : https://labwc.github.io/labwc-config.5.html
78
- [ labwc-menu(5) ] : https://labwc.github.io/labwc-menu.5.html
79
- [ labwc-environment(5) ] : https://labwc.github.io/labwc-environment.5.html
80
- [ labwc-theme(5) ] : https://labwc.github.io/labwc-theme.5.html
81
- [ labwc-actions(5) ] : https://labwc.github.io/labwc-actions.5.html
82
- [ IRC Channel ] : https://web.libera.chat/gamja/?channels=#labwc
83
- [ Github Discussions ] : https://github.com/labwc/labwc/discussions
59
+ In this guide we are going to cover some common setup steps which will give you
60
+ a good feel for the four most important configuration files which are:
61
+ [ environment] , [ rc.xml] , [ autostart] and [ menu.xml] .
84
62
85
- ## Step 1 - Set your keyboard layout
63
+ Whenever a configuration or theme file has been changed, the command `labwc
64
+ --reconfigure` has be run for the settings to take affect. With additions to
65
+ ` autostart ` you will need to re-start the compositor.
86
66
87
- Set the environment variable ` XKB_DEFAULT_LAYOUT ` with your country code.
67
+ It is generally recommended not to copy the example configuration files, but to
68
+ build them from scratch.
88
69
89
- For example to start with Swedish keyboard layout, run
70
+ ## Step 1 - Set your keyboard layout
90
71
91
- ```
92
- XKB_DEFAULT_LAYOUT=se labwc
93
- ```
72
+ Set the environment variable ` XKB_DEFAULT_LAYOUT ` with your country code in
73
+ ` ~/.config/labwc/environment ` .
94
74
95
- Or simply add this line to ` ~/.config/labwc/environment `
75
+ For example to use a Swedish keyboard layout, add this line:
96
76
97
77
```
98
78
XKB_DEFAULT_LAYOUT=se
99
79
```
100
80
101
- If you are unsure what your country code is, refer to the 'layout' section of
102
- ` /usr/share/X11/xkb/rules/evdev.lst `
81
+ If you are unsure what your country code is, use the website
82
+ [ xkeyboard-config.freedesktop.org] or search the 'layout' section of your
83
+ local copy of ` evdev.lst ` which is typically located at
84
+ ` /usr/share/X11/xkb/rules/evdev.lst ` .
103
85
104
- See further details, see [ docs/ environment] and [ xkeyboard-config(7)] .
86
+ See further details, see [ environment] and [ xkeyboard-config(7)] .
105
87
88
+ [ xkeyboard-config.freedesktop.org ] : https://xkeyboard-config.freedesktop.org/layouts/gallery
106
89
[ xkeyboard-config(7) ] : https://manpages.debian.org/testing/xkb-data/xkeyboard-config.7.en.html
107
90
108
- ## Step 2 - Add some items to the root-menu
109
-
110
- Create a ` ~/.config/labwc/menu.xml ` to hand-craft a menu. See [ docs/menu.xml]
111
- for inspiration, or use the simple example below
112
-
113
- ```
114
- <?xml version="1.0" ?>
115
-
116
- <openbox_menu>
117
- <menu id="root-menu" label="">
118
- <item label="Web browser"><action name="Execute" command="firefox" /></item>
119
- <item label="Terminal"><action name="Execute" command="alacritty" /></item>
120
- <item label="Reconfigure"><action name="Reconfigure" /></item>
121
- <item label="Exit"><action name="Exit" /></item>
122
- </menu>
123
- </openbox_menu>
124
- ```
125
-
126
- See [ integration#menu-generators] for ideas on how to automatically create
127
- menu.xml files.
91
+ ## Step 2 - Set some keybinds
128
92
129
- ## Step 3 - Set a shortcut to a launcher
130
-
131
- If you want to bind a key-combination to a launcher such as rofi or wofi, or
132
- simply a terminal, create a configuration file ` ~/.config/labwc/rc.xml ` and add
133
- a ` <keybind> ` entry as shown below. In this example ` Super-d ` is bound to the
134
- terminal sakura:
93
+ If you want to bind a key-combination to an application like a launcher or
94
+ terminal, create a configuration file ` ~/.config/labwc/rc.xml ` and add a
95
+ ` <keyboard> ` section as shown below.
135
96
136
97
```
137
98
<?xml version="1.0" ?>
138
99
<labwc_config>
139
-
140
100
<keyboard>
141
101
<default />
142
- <keybind key="W-d"><action name="Execute" command="sakura" /></keybind>
143
- <keybind key="W-z"><action name="Execute" command="wofi --show drun" /></keybind>
102
+ <!-- The W- prefix refers to the Super key -->
103
+ <keybind key="W-d">
104
+ <action name="Execute" command="sakura" />
105
+ </keybind>
106
+ <keybind key="W-z">
107
+ <action name="Execute" command="wofi --show drun" />
108
+ </keybind>
144
109
</keyboard>
145
-
146
110
</labwc_config>
147
111
```
148
112
149
- See [ docs/rc.xml.all] for all available configuration options.
113
+ > TECHNICAL NOTE: The ` <default/> ` element includes all the built-in keybinds
114
+ > as described [ here] .
115
+
116
+ [ here ] : https://labwc.github.io/labwc-config.5.html#entry_keyboard_default
117
+
118
+ See [ rc.xml] for all available configuration options.
150
119
151
120
To figure out the name of a key, you can use either xev (widely available,
152
121
runs via xwayland) or [ wev] . Alternatively, search for keysym names directly in
@@ -155,46 +124,75 @@ runs via xwayland) or [wev]. Alternatively, search for keysym names directly in
155
124
[ wev ] : https://git.sr.ht/~sircmpwn/wev
156
125
[ xkbcommon-keysyms.h ] : https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
157
126
158
- ## Step 4 - Start a background-image client and a panel
127
+ ## Step 3 - Use a wallpaper and a panel
128
+
129
+ We recommend using ` swaybg ` for setting a background image or color. You can of
130
+ course run ` swaybg ` directly from a launcher or panel, but for persistence add
131
+ the example line below to ` ~/.config/labwc/autostart `
132
+
133
+ ```
134
+ swaybg -c '#334455' &
135
+ ```
159
136
160
- To use a background-color/image client or a panel, simply add the command
161
- to ` ~/.config/labwc/autostart ` . See example below for using swaybg and waybar:
137
+ ...or for an image try something like this:
162
138
163
139
```
164
- swaybg -i foo.png >/dev/null 2>&1 &
165
- waybar >/dev/null 2>&1 &
140
+ swaybg -i ~/Pictures/wallpaper.png &
166
141
```
167
142
168
- The ` >/dev/null 2>&1 ` is simply there to hide the logging.
169
- Don't forget the ` & ` at the end otherwise the compositor will get stuck on that
170
- line.
143
+ > IMPORTANT: The ` & ` at the end is needed to prevent the compositor getting
144
+ > stuck on that line.
145
+
146
+ There are many widely packaged bars and panels that can be used with ` labwc ` ,
147
+ for example ` xfce4-panel ` , ` lxqt-panel ` , ` waybar ` and ` sfwbar ` . Just take a
148
+ pick and add one to your ` ~/.config/labwc/autostart ` like this:
149
+
150
+ ```
151
+ xfce4-panel &
152
+ ```
171
153
172
- See further examples in [ docs/ autostart]
154
+ See further examples in [ autostart]
173
155
174
- ## Step 5 - install some themes for server-side-decorations
156
+ ## Step 4 - Build a root-menu
175
157
176
- Some commonly packaged themes support openbox (and therefore labwc) out of the
177
- box, for example ` Numix ` and ` Adapta ` .
158
+ Whether or not you take this step really comes down to how you want to use the
159
+ compositor. For example, if you prefer to use a desktop client like ` xfdesktop `
160
+ or ` pcmanfm-qt --desktop ` which provide their own root menus.
178
161
179
- Install a theme and set it in rc.xml:
162
+ To handcraft a menu, create a ` ~/.config/labwc/menu.xml ` and populate with
163
+ your favourite applications as in the example below:
180
164
181
165
```
182
- <theme>
183
- <name>Numix</name>
184
- </theme>
166
+ <?xml version="1.0" ?>
167
+ <openbox_menu>
168
+ <menu id="root-menu" label="">
169
+ <item label="Web browser"><action name="Execute" command="firefox"/></item>
170
+ <item label="Terminal"><action name="Execute" command="alacritty"/></item>
171
+ <item label="Reconfigure"><action name="Reconfigure"/></item>
172
+ <item label="Exit"><action name="Exit"/></item>
173
+ </menu>
174
+ </openbox_menu>
185
175
```
186
176
187
- To just use the current GTK theme, you can use [ labwc-gtktheme]
177
+ A lot can be done with the compositor menu. See [ integration#menu-generators]
178
+ and [ menu.xml] for ideas on how to automatically create menu.xml files as well
179
+ as creating pipemenus.
188
180
189
181
Refer to the [ man pages] for full documentation.
190
182
191
183
Enjoy!
192
184
185
+ [ labwc(1) ] : https://labwc.github.io/labwc.1.html
186
+ [ labwc-config(5) ] : https://labwc.github.io/labwc-config.5.html
187
+ [ labwc-menu(5) ] : https://labwc.github.io/labwc-menu.5.html
188
+ [ labwc-environment(5) ] : https://labwc.github.io/labwc-environment.5.html
189
+ [ labwc-theme(5) ] : https://labwc.github.io/labwc-theme.5.html
190
+ [ labwc-actions(5) ] : https://labwc.github.io/labwc-actions.5.html
191
+
192
+ [ environment ] : https://github.com/labwc/labwc/blob/master/docs/environment
193
+ [ rc.xml ] : https://github.com/labwc/labwc/blob/master/docs/rc.xml.all
194
+ [ autostart ] : https://github.com/labwc/labwc/blob/master/docs/autostart
195
+ [ menu.xml ] : https://github.com/labwc/labwc/blob/master/docs/menu.xml
193
196
194
- [ docs/environment ] : https://github.com/labwc/labwc/blob/master/docs/environment
195
- [ docs/menu.xml ] : https://github.com/labwc/labwc/blob/master/docs/menu.xml
196
197
[ integration#menu-generators ] : https://labwc.github.io/integration.html#menu-generators
197
- [ docs/rc.xml.all ] : https://github.com/labwc/labwc/blob/master/docs/rc.xml.all
198
- [ docs/autostart ] : https://github.com/labwc/labwc/blob/master/docs/autostart
199
- [ labwc-gtktheme ] : https://github.com/johanmalm/labwc-gtktheme
200
198
[ man pages ] : manual.html
0 commit comments