Sway: Difference between revisions

From Alpine Linux
No edit summary
No edit summary
Line 9: Line 9:


== Installation ==
== Installation ==
First, install & configure eudev:
<pre>
# apk add eudev
# setup-udev
</pre>
Then install graphics drivers appropriate to your system:
<pre>
# apk search mesa-dri
# apk add mesa-dri-intel # example
</pre>
Add yourself to the input and video groups:
<pre>
# adduser $USER input video
</pre>
You have to log out and back in for this to take effect. We can now install sway:


<pre>
<pre>
Line 14: Line 36:
# apk add                \ # Install optional dependencies:
# apk add                \ # Install optional dependencies:
     xorg-server-xwayland \ # strongly reccommended for compatability reasons
     xorg-server-xwayland \ # strongly reccommended for compatability reasons
     rxvt-unicode        \ # default terminal emulator
     alacritty            \ # default terminal emulator
     dmenu                \ # default application launcher
     dmenu                \ # default application launcher
     swaylock            \ # lockscreen tool
     swaylock            \ # lockscreen tool
Line 20: Line 42:
</pre>
</pre>


Note: you may be required to install sway from [[Edge]].


== Running Sway ==
== Running Sway ==


Simply run <code>sway</code> from your nearest TTY's Linux console.
 
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:
 
<pre>
$ XDG_RUNTIME_DIR=/tmp sway
</pre>
 
Add this to a script if it becomes tedious.


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

Revision as of 14:42, 11 January 2020

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

Prerequisites

  1. Install eudev and run setup-udev to configure it
  2. Install graphics drivers appropriate for your hardware
  3. Add yourself to the input and video groups
  4. Reboot

Installation

First, install & configure eudev:

# apk add eudev
# setup-udev

Then install graphics drivers appropriate to your system:

# apk search mesa-dri
# apk add mesa-dri-intel # example

Add yourself to the input and video groups:

# adduser $USER input video

You have to log out and back in for this to take effect. We can now install sway:

# apk add sway sway-doc
# apk add                \ # Install optional dependencies:
    xorg-server-xwayland \ # strongly reccommended for compatability 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

Add this to a script if it becomes tedious.

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.