Project

General

Profile

Setup-example » History » Version 2

mfxbe, 06/07/2024 08:42 PM

1 1 mfxbe
# Example set up
2
3
This page shows the software and steps needed to set up a desktop environment using *Fairytale Computing* software. While this is only one of many ways to set it up, it is currently the only setup where everything is at least somewhat tested.
4
5
# Requirements
6
7 2 mfxbe
You will need a running base Linux system (basically, a system that boots up and lets you log in to a tty) with not too old software to be set up and ready to go. This could be Debian Sid or Archlinux, for example. **This example is using Debian sid as base,** if you use an other system you might need to change commands.
8 1 mfxbe
9
Before running some of the build the commands you might need to install build dependencies (``git, libgtk4, make, ...``) as well.
10
11
# Steps
12
13
## 1. Install wayfire
14
15
[Wayfire](https://wayfire.org/) is used as the Wayland compositor.
16
17
```
18
$ sudo apt install wayfire
19
```
20
21
If you later have problems starting Wayfire, I recommend installing Sway as well, as it pulls in more dependencies that may be missing.
22
23
## 2. Install more dependencies
24
25
To render the desktop, you need a wallpaper utility. The most powerful solution here is [swww](https://github.com/LGFae/swww), which is unfortunately not in the repositories and is quite complicated to compile on Debian.    
26
A easy way would be to download the swww binaries from the *Chaotic-AUR* [here](https://builds.garudalinux.org/repos/chaotic-aur/x86_64/) unpack the file and just copy the binaries to the right place.    
27
If you do not like to do all that, just install swaybg instead:
28
29
```
30
$ sudo apt install swaybg
31
```
32
33
More useful software, not all of this packages are absolutely needed
34
35
```
36
$ sudo apt install grim slurp wlr-rand foot swaylock swayidle mako wlsunset light
37
```
38
39
## 4. Build and install ToplevelIt
40
41
It's a small library for waylands foreign-toplevel-protocol ([Github link](https://github.com/mfxbe/ToplevelIt)). 
42
43
```
44
$ git clone https://github.com/mfxbe/ToplevelIt
45
$ make wlscan
46
$ make
47
$ sudo make install
48
```
49
50
51
## 4. Build and "install" Alice
52
53
Alice is the desktop shell providing dock, panel and more.
54
55
```
56
$ git clone https://dyndns.mfxbe.de/other/fcw/gitLinks/alice.git
57
$ make
58
```
59
60
The Makefile currently does not provide an install option. You can ether copy the files from the ``build`` directory to right position yourself or (later) just call the Alice binary from there. It should just work.
61
62
## 5. Configure wayfire
63
64
Below you can find an example for the Wayfire configuration which should be placed in ``~/.config/wayfire.ini``. More information are available in the [Wayfire wiki](https://github.com/WayfireWM/wayfire/wiki/Configuration).
65
66
67
```
68
[input]
69
xkb_layout = de
70
tablet_motion_mode=relative
71
72
73
[core]
74
plugins = \
75
  alpha \
76
  blur \
77
  autostart \
78
  command \
79
  decoration \
80
  expo \
81
  fast-switcher \
82
  foreign-toplevel \
83
  grid \
84
  gtk-shell \
85
  idle \
86
  ipc \
87
  ipc-rules \
88
  invert \
89
  move \
90
  oswitch \
91
  place \
92
  resize \
93
  switcher \
94
  vswitch \
95
  wm-actions \
96
  zoom
97
98
close_top_view = <super> KEY_Q | <alt> KEY_F4
99
vwidth = 2
100
vheight = 2
101
preferred_decoration_mode = client
102
103
[move]
104
activate = <super> BTN_LEFT
105
[resize]
106
activate = <super> BTN_RIGHT
107
[zoom]
108
modifier = <super>
109
[alpha]
110
modifier = <super> <alt>
111
[wrot]
112
activate = <super> <ctrl> BTN_RIGHT
113
114
# Startup commands ─────────────────────────────────────────────────────────────
115
116
[autostart]
117
0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP=Wayfire
118
119
lock_on_start = swaylock -i ~/bg.png && ~/Alice/build/bin/alice
120
lock_on_timeout = swayidle -w timeout 600 'systemctl suspend' before-sleep 'swaylock -i ~/bg.png'
121
122
background-daemon = swww-daemon
123
background-setter = sleep 1 && swww img ~/bg.png
124
125
126
autostart_wf_shell = false
127
notifications = mako
128
129
130
gamma = wlsunset -l 55.5 -L 5.5
131
132
portal = /usr/libexec/xdg-desktop-portal
133
134
135
[command]
136
binding_alicemenu = <super>
137
command_alicemenu = gdbus call --session --dest=eu.feritale.Alice  -o /eu/feritale/Alice -m org.gtk.Actions.Activate "open-menu" [''] {}
138
139
140
binding_terminal = <super> KEY_ENTER
141
command_terminal = foot
142
143
binding_lock = <super> <shift> KEY_ESC
144
command_lock = systemctl suspend
145
146
binding_logout = <super> KEY_ESC
147
command_logout = wlogout
148
149
binding_screenshot = KEY_PRINT
150
command_screenshot = grim $(date '+%F_%T').webp
151
binding_screenshot_interactive = <shift> KEY_PRINT
152
command_screenshot_interactive = slurp | grim -g - $(date '+%F_%T').webp
153
154
repeatable_binding_volume_up = KEY_VOLUMEUP
155
command_volume_up = amixer set Master 5%+
156
repeatable_binding_volume_down = KEY_VOLUMEDOWN
157
command_volume_down = amixer set Master 5%-
158
binding_mute = KEY_MUTE
159
command_mute = amixer set Master toggle
160
161
repeatable_binding_light_up = KEY_BRIGHTNESSUP
162
command_light_up = light -A 5
163
repeatable_binding_light_down = KEY_BRIGHTNESSDOWN
164
command_light_down = light -U 5
165
166
167
[grid]
168
slot_bl = <super> KEY_KP1
169
slot_b = <super> KEY_KP2
170
slot_br = <super> KEY_KP3
171
slot_l = <super> KEY_LEFT | <super> KEY_KP4
172
slot_c = <super> KEY_UP | <super> KEY_KP5
173
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
174
slot_tl = <super> KEY_KP7
175
slot_t = <super> KEY_KP8
176
slot_tr = <super> KEY_KP9
177
restore = <super> KEY_DOWN | <super> KEY_KP0
178
179
[fast-switcher]
180
activate = <alt> KEY_TAB
181
182
[vswitch]
183
binding_left = <ctrl> <super> KEY_LEFT
184
binding_down = <ctrl> <super> KEY_DOWN
185
binding_up = <ctrl> <super> KEY_UP
186
binding_right = <ctrl> <super> KEY_RIGHT
187
with_win_left = <ctrl> <super> <shift> KEY_LEFT
188
with_win_down = <ctrl> <super> <shift> KEY_DOWN
189
with_win_up = <ctrl> <super> <shift> KEY_UP
190
with_win_right = <ctrl> <super> <shift> KEY_RIGHT
191
192
193
[expo]
194
toggle = <super> KEY_A
195
select_workspace_1 = KEY_1
196
select_workspace_2 = KEY_2
197
select_workspace_3 = KEY_3
198
select_workspace_4 = KEY_4
199
select_workspace_5 = KEY_5
200
select_workspace_6 = KEY_6
201
select_workspace_7 = KEY_7
202
select_workspace_8 = KEY_8
203
select_workspace_9 = KEY_9
204
205
[decoration]
206
active_color = 0.0,0.0,0.0,1.0
207
inactive_color = 0.66,0.66,0.66,1.0
208
209
[oswitch]
210
next_output = <super> KEY_O
211
next_output_with_win = <super> <shift> KEY_O
212
213
[blur]
214
blur_by_default=role is "UNMANAGED" | role is "DESKTOP_ENVIRONMENT"
215
method=gaussian
216
gaussian_offset=1
217
gaussian_iterations=1
218
219
```
220
221
It's important to at least enable the following plugins: ``foreign-toplevel, ipc, ipc-rules``
222
223
## 6. Autologin and start the environment
224
225
A convenient way to start the environment at boot is to autologin into tty and automatically start Wayfire and swaylock (already done in the ini). Note that this only allows one user on the system.
226
227
To enable auto login create a file the following way:
228
229
```
230
$ sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
231
```
232
233
And put in as content (``username`` must be your user):
234
```
235
[Service]
236
ExecStart=
237
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM
238
```
239
 To start Wayfire automatically when you log in, add the following to the end of ``~/.profile``:
240
```
241
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
242
  exec wayfire
243
fi
244
```
245
## 7. Install other Fairytale Computing software
246
247
Now you can install other applications. For example [[project:loreley|Loreley]] to browse the internet.
248
249
## 8. Done
250
You've done it. Congratulations.
Legal notice and privacy policy