Sway in Arch Linux: other configurations

Let’s continue the Sway window manager (in Arch Linux) series I started in my previous post and continued in the other post.

Screenshots

We can use “grimshot”, part of sway-contrib, to take screenshots, which requires the main program for performing the actual screenshot, “grim”.

By default, such utilities are installed in “/usr/share/sway-contrib”, which is not part of the PATH. So, put that directory in the PATH environment variable or prefix the call with the full path.

Here’s the help of grimshot:

You can try running that from the command line and do some experiments.

Then, you might want to set a few keybindings in the Sway config file, e.g.:

Let’s also install an image viewer, like “Eye of Gnome”:

This way, we can open the generated screenshot images.

Brightness and volume

How do you set the screen’s brightness and volume using the corresponding keys?

First, we need a program to control the brightness, “brightnessctl”. For the volume, we use “wpctl”, part of “wireplumber”:

Here are the keybindings for the media keys for brightness and volume (if your keyboard has them):

Note the use of “-l 1.0” meaning that we don’t want to allow the wireplumber to increase the volume above 100%.

Running from a Display Manager

The default installation already created a file in the appropriate folder to let SDDM start the Sway session.

Let’s install the SDDM package:

Then, we enable the service at boot:

If we want to start it without rebooting, the first time we run:

And now you can enter Sway from here.

Stay tuned for other posts on the Sway WM!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.