Project

General

Profile

Actions

Setup-example » History » Revision 1

Revision 1/5 | Next »
mfxbe, 06/07/2024 02:29 PM


Example set up

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.

Requirements

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 as base, if you use an other system you might need to change commands.

Before running some of the build the commands you might need to install build dependencies (git, libgtk4, make, ...) as well.

Steps

1. Install wayfire

Wayfire is used as the Wayland compositor.

$ sudo apt install wayfire

If you later have problems starting Wayfire, I recommend installing Sway as well, as it pulls in more dependencies that may be missing.

2. Install more dependencies

To render the desktop, you need a wallpaper utility. The most powerful solution here is swww, which is unfortunately not in the repositories and is quite complicated to compile on Debian.
A easy way would be to download the swww binaries from the Chaotic-AUR here unpack the file and just copy the binaries to the right place.
If you do not like to do all that, just install swaybg instead:

$ sudo apt install swaybg

More useful software, not all of this packages are absolutely needed

$ sudo apt install grim slurp wlr-rand foot swaylock swayidle mako wlsunset light

4. Build and install ToplevelIt

It's a small library for waylands foreign-toplevel-protocol (Github link).

$ git clone https://github.com/mfxbe/ToplevelIt
$ make wlscan
$ make
$ sudo make install

4. Build and "install" Alice

Alice is the desktop shell providing dock, panel and more.

$ git clone https://dyndns.mfxbe.de/other/fcw/gitLinks/alice.git
$ make

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.

5. Configure wayfire

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.

[input]
xkb_layout = de
tablet_motion_mode=relative


[core]
plugins = \
  alpha \
  blur \
  autostart \
  command \
  decoration \
  expo \
  fast-switcher \
  foreign-toplevel \
  grid \
  gtk-shell \
  idle \
  ipc \
  ipc-rules \
  invert \
  move \
  oswitch \
  place \
  resize \
  switcher \
  vswitch \
  wm-actions \
  zoom

close_top_view = <super> KEY_Q | <alt> KEY_F4
vwidth = 2
vheight = 2
preferred_decoration_mode = client

[move]
activate = <super> BTN_LEFT
[resize]
activate = <super> BTN_RIGHT
[zoom]
modifier = <super>
[alpha]
modifier = <super> <alt>
[wrot]
activate = <super> <ctrl> BTN_RIGHT

# Startup commands ─────────────────────────────────────────────────────────────

[autostart]
0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP=Wayfire

lock_on_start = swaylock -i ~/bg.png && ~/Alice/build/bin/alice
lock_on_timeout = swayidle -w timeout 600 'systemctl suspend' before-sleep 'swaylock -i ~/bg.png'

background-daemon = swww-daemon
background-setter = sleep 1 && swww img ~/bg.png


autostart_wf_shell = false
notifications = mako


gamma = wlsunset -l 55.5 -L 5.5

portal = /usr/libexec/xdg-desktop-portal


[command]
binding_alicemenu = <super>
command_alicemenu = gdbus call --session --dest=eu.feritale.Alice  -o /eu/feritale/Alice -m org.gtk.Actions.Activate "open-menu" [''] {}


binding_terminal = <super> KEY_ENTER
command_terminal = foot

binding_lock = <super> <shift> KEY_ESC
command_lock = systemctl suspend

binding_logout = <super> KEY_ESC
command_logout = wlogout

binding_screenshot = KEY_PRINT
command_screenshot = grim $(date '+%F_%T').webp
binding_screenshot_interactive = <shift> KEY_PRINT
command_screenshot_interactive = slurp | grim -g - $(date '+%F_%T').webp

repeatable_binding_volume_up = KEY_VOLUMEUP
command_volume_up = amixer set Master 5%+
repeatable_binding_volume_down = KEY_VOLUMEDOWN
command_volume_down = amixer set Master 5%-
binding_mute = KEY_MUTE
command_mute = amixer set Master toggle

repeatable_binding_light_up = KEY_BRIGHTNESSUP
command_light_up = light -A 5
repeatable_binding_light_down = KEY_BRIGHTNESSDOWN
command_light_down = light -U 5


[grid]
slot_bl = <super> KEY_KP1
slot_b = <super> KEY_KP2
slot_br = <super> KEY_KP3
slot_l = <super> KEY_LEFT | <super> KEY_KP4
slot_c = <super> KEY_UP | <super> KEY_KP5
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
slot_tl = <super> KEY_KP7
slot_t = <super> KEY_KP8
slot_tr = <super> KEY_KP9
restore = <super> KEY_DOWN | <super> KEY_KP0

[fast-switcher]
activate = <alt> KEY_TAB

[vswitch]
binding_left = <ctrl> <super> KEY_LEFT
binding_down = <ctrl> <super> KEY_DOWN
binding_up = <ctrl> <super> KEY_UP
binding_right = <ctrl> <super> KEY_RIGHT
with_win_left = <ctrl> <super> <shift> KEY_LEFT
with_win_down = <ctrl> <super> <shift> KEY_DOWN
with_win_up = <ctrl> <super> <shift> KEY_UP
with_win_right = <ctrl> <super> <shift> KEY_RIGHT


[expo]
toggle = <super> KEY_A
select_workspace_1 = KEY_1
select_workspace_2 = KEY_2
select_workspace_3 = KEY_3
select_workspace_4 = KEY_4
select_workspace_5 = KEY_5
select_workspace_6 = KEY_6
select_workspace_7 = KEY_7
select_workspace_8 = KEY_8
select_workspace_9 = KEY_9

[decoration]
active_color = 0.0,0.0,0.0,1.0
inactive_color = 0.66,0.66,0.66,1.0

[oswitch]
next_output = <super> KEY_O
next_output_with_win = <super> <shift> KEY_O

[blur]
blur_by_default=role is "UNMANAGED" | role is "DESKTOP_ENVIRONMENT"
method=gaussian
gaussian_offset=1
gaussian_iterations=1

It's important to at least enable the following plugins: foreign-toplevel, ipc, ipc-rules

6. Autologin and start the environment

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.

To enable auto login create a file the following way:

$ sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf

And put in as content (username must be your user):

[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin username %I $TERM

To start Wayfire automatically when you log in, add the following to the end of ~/.profile:

if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
  exec wayfire
fi

7. Install other Fairytale Computing software

Now you can install other applications. For example [[project:loreley|Loreley]] to browse the internet.

8. Done

You've done it. Congratulations.

Updated by mfxbe 6 months ago · 1 revisions

Legal notice and privacy policy