fedops blog

Privacy in Computing

Sun 10 November 2019

A Different Kind of Desktop

Posted by fedops in Software   

Once you have gotten your feet wet using a traditional desktop environment like Gnome or KDE, why not take a look at something else? After all, free software is all about choice.

Enter a tiling window manager with its assorted utilities. A tiling window manager's design principles revolve around providing a minimum of decorations, being 100% controllable by keyboard shortcuts, and automatically arranging windows in efficient ways. Main reasons for their use are:

  • screen real estate on a laptop is at a premium when not docked to an external monitor, and a tiling window manager can help maximise its usefulness.
  • keyboard shortcuts tend to be much more efficient than fumbling around with a mediocre trackpad
  • less graphics usually means less resource consumption and less battery drain; great especially for older hand-me-down laptops
  • a twm's power is best harnessed with liberal use of virtual desktops, and maximized application windows for e.g. browsers. Small screens and virtual desktops go together very well.

One of the best known twms is i3, but it only works in X11. Luckily there is an alternative called sway, which essentially is a drop-in replacement with Wayland support that is even configuration-compatible in a big way.

Installing sway on Fedora used to be a bit of an ordeal, but nowadays it's as simple as typing sudo dnf module install sway/full in a terminal. This will install the required packages and add a .desktop entry for GDM (the Gnome Desktop Manager).

Now, before continuing any further I strongly suggest you go and read the excellent introductory article Using the Sway Window Manager on Fedora by Thomas Leister and especially reviewing the configuration file in your ~/.config/sway/config. Since sway is controlled by keyboard shortcuts you need to memorize quite a few of them or you won't even be able to start a terminal or log back out of it.

Log out and while logging back in, type your user name and password and before pressing enter select "Sway" in the settings (the little cogwheel icon) to get a Sway session. Now ty to navigate around, start programs, and give yourself some time to play around with it. Get into the habit of using virtual desktops and arranging applications to start on predefined spots. For example your email program on number 1, browsers on number 2, etc. Tiling window managers are an acquired taste, and practice does make perfect. Check out Luke Smith's Youtube channel for someone who's really got his stuff together.

A final tip: remembering keystrokes you don't use regularly, or arcane options to programs you only need twice a year is hard. There's no shame in creating your own paper cheat sheet to keep on your desk. Or step it up a notch and create text files in your home directory, e.g. in ~/.config/getkeys/<program-name>, and use this handy little script to display them:

#!/bin/sh
# based on: https://github.com/LukeSmithxyz/voidrice/blob/archi3/.local/bin/tools/getkeys
#

cat "$HOME/.config/getkeys/$1" 2>/dev/null && echo -e "\nThis file location:" ~/.config/getkeys/"$1" && exit
echo "Run command with one of the following arguments for info about that program:"
ls ~/.config/getkeys

Simply typing getkeys will show you what cheat sheets you have, and typing e.g. getkeys sway will show you that file into which you have entered the most useful command keys.

Enjoy!