Sway: Difference between revisions

From Alpine Linux
mNo edit summary
No edit summary
(12 intermediate revisions by 7 users not shown)
Line 3: Line 3:
== Prerequisites ==
== Prerequisites ==


# Install eudev and run setup-udev to configure it
First, install & configure eudev:
# Install graphics drivers appropriate for your hardware
 
# Add yourself to the input and video groups
<pre>
# Reboot
# apk add eudev
# setup-udev
</pre>
 
Then install graphics drivers appropriate to your system:
 
<pre>
# apk add mesa-dri-gallium  # gallium
# apk add mesa-dri-classic  # or classic
</pre>
 
The following links contain guides for setting up the video stack.
 
* [https://wiki.alpinelinux.org/wiki/Intel_Video Intel Video]
* [https://wiki.alpinelinux.org/wiki/Radeon_Video Radeon Video]
 
Add yourself to the input and video groups:
 
<pre>
# adduser $USER input
# adduser $USER video
</pre>
 
You have to log out and back in for this to take effect.
 
Install some TTF fonts:
 
<pre>
# apk add ttf-dejavu
</pre>


== Installation ==
== Installation ==
We can now install sway:


<pre>
<pre>
# apk add sway sway-doc
# apk add sway sway-doc
# apk add                \ # Install optional dependencies:
# apk add                \ # Install optional dependencies:
     xorg-server-xwayland \ # strongly reccommended for compatability reasons
     xwayland             \ # strongly reccommended for compatibility reasons
     rxvt-unicode        \ # default terminal emulator
     alacritty            \ # default terminal emulator
     dmenu                \ # default application launcher
     dmenu                \ # default application launcher
     imagemagick          \ # for taking screenshots
     swaylock            \ # lockscreen tool
     ffmpeg                # for recording video from the screen
     swayidle              # idle management (DPMS) daemon
</pre>
</pre>


Note: you may be required to install sway from [[Edge]].
== Running Sway ==
 
To run sway, first set XDG_RUNTIME_DIR to a suitable location (e.g. /tmp). Install & configure elogind to skip this step. Then run sway from the Linux console:


== Running Sway ==
<pre>
$ XDG_RUNTIME_DIR=/tmp sway
</pre>


Simply run <code>sway</code> from your nearest TTY's Linux console.
See the [https://wiki.alpinelinux.org/wiki/Wayland Wayland] page for a permanent configuration


== Configuration and Usage ==
== Configuration and Usage ==

Revision as of 05:12, 11 August 2021

Sway is a tiling Wayland compositor. It's a drop-in replacement for the i3 window manager.

Prerequisites

First, install & configure eudev:

# apk add eudev
# setup-udev

Then install graphics drivers appropriate to your system:

# apk add mesa-dri-gallium  # gallium
# apk add mesa-dri-classic  # or classic

The following links contain guides for setting up the video stack.

Add yourself to the input and video groups:

# adduser $USER input
# adduser $USER video

You have to log out and back in for this to take effect.

Install some TTF fonts:

# apk add ttf-dejavu

Installation

We can now install sway:

# apk add sway sway-doc
# apk add                \ # Install optional dependencies:
    xwayland             \ # strongly reccommended for compatibility reasons
    alacritty            \ # default terminal emulator
    dmenu                \ # default application launcher
    swaylock             \ # lockscreen tool
    swayidle               # idle management (DPMS) daemon

Running Sway

To run sway, first set XDG_RUNTIME_DIR to a suitable location (e.g. /tmp). Install & configure elogind to skip this step. Then run sway from the Linux console:

$ XDG_RUNTIME_DIR=/tmp sway

See the Wayland page for a permanent configuration

Configuration and Usage

An example config is provided at /etc/sway/config. Copy it to ~/.config/sway/config and read through it to learn the default keybindings.

For additional information, start at man 5 sway and read the upstream FAQ.