nakedSway -- sway on nakedeb

to discover sway in a preconfigured session, i propose nakedsway.
this package contains all configuration files you need to get to grips with sway/wayland quickly, in the same way as nakedfluxbox and nakedi3wm.

nakedsway in action
nakedSway in action

nakedsway is available in nakedeb repository since version 1.5.5.
sway session isn't included in nakedeb by default yet but nakedtools package is already adapted to a wayland type session.

this page is not a sway initiation, the official website takes care of that. you can still consult the debian wiki. to put it simply, sway is the equivalent of i3 for wayland, the successor to x11.


sway & waybar: essentials man pages

sway is very well documented from its numerous man pages:

the sway session uses waybar to display workspaces and information by default. an alternative using a bash script (infosbar) is available in the package. you can also use i3status as a generator.
like sway, waybar is fully documented via its man pages. man waybar will tell you about the status bar and its configuration. at the end of the manual you'll find a list of the manuals dedicated to each module (+25 modules).

nakedsway: installation

nakeDeb runs on Debian, installation uses the classical protocol:

sudo apt update && sudo apt install nakedsway

this command will install:

the various configuration files, scripts and other themes are placed in /usr/share/nakedsway/ and /etc/skel/.config/ so that they can be added to the personal folder of any new user.
once nakedsway has been installed, and before starting your session, copy the appropriate files to your personal folder:

mkdir -p ~/.config/sway ~/.config/swaylock ~/.config/waybar ~/.config/foot
cp -u -R /etc/skel/.config/sway/* ~/.config/sway/
cp -u -R /etc/skel/.config/swaylock/* ~/.config/swaylock/
cp -u -R /etc/skel/.config/waybar/* ~/.config/waybar/
cp -u -R /etc/skel/.config/foot/* ~/.config/foot/

note: you can also download the nakedsway package without installing it and dig into the various files after unpacking the package like a traditional archive.

nakedsway: sway configuration

sway is configured by editing its main file ~/.config/sway/config and its appendices, usually located in ~/.config/sway/config.d/. if you edit appendices, be sure to include them (using include /path/to/file) in the main file, as is the default on nakedsway.
if you choose the option of a single configuration file, consider each appended conf file described here as a section of the sway/config file.

here is the list of built-in files for sway:

tree ~/.config/sway/
├── config > the main configuration file
├── config.d
│   ├── 00-vars.conf > determine the variables used in the other files
│   ├── 01-outputs.conf > screen management
│   ├── 02-inputs.conf > keyboard/mouse/touchpad management
│   ├── 03-statusbar.conf > configuring the status bar, managed by waybar on nakedsway
│   ├── 04-autostart.conf > start services/apps on session startup
│   ├── 05-scratchpad.conf > set floating terminal to pop-up
│   ├── 06-theme.conf > look & feel
│   ├── 07-window-rules.conf > special rules for special clients
│   ├── 08-launchers.conf > keyboard shortcuts for applications
│   ├── 09-controls.conf > keyboard shortcuts for sway
│   └── 10-modess.conf > mode configuration for sway
├── fr
│   ├── fr-kbd.conf > configuration for an azerty/fr keyboard
│   ├── fr-bepo-kbd.conf > configuration for a bepo/fr keyboard
│   └── fr-apple-kbd.conf > configuration for an apple/fr keyboard
└── scripts
    ├── import-gsettings > import GTK preferences
    ├── > inactives windows opacity configuration
    ├── infosbar > statusbar bash script (optional)
    ├── screentemp > screen color script
    ├── wallrdm > random wallpaper script
    └── window-switcher > windows switcher script

a brief explanation of the role of each file/section. don't forget to consult them and modify them according to your preferences before launching your session:

nakedsway: waybar configuration

waybar supports the status bar on sway as polybar does on i3wm by default.
waybar works in a modular way: a series of modules that can be activated to display the information you want. configuration involves a module declaration file (~/.config/waybar/config) and a CSS style file (~/.config/waybar/style.css). you can create your modules using scripts (~/.config/waybar/scripts) and use JSON syntax to change the colour, tooltip or click actions.
nakedsway includes everything you need to easily discover waybar and its various possibilities: most of the common modules are activated and should work out-of-the-box. you just need to un/comment (with //) and/or move the desired modules in the configuration file, in the "Modules order" section.
the modules then unroll their properties in the same file, listed in alphabetical order on nakedsway, but this is to make it easier to find what you're looking for. however, remember to follow the syntax carefully, because waybar will crash at the slightest missing comma.
to test and confirm, you can run pkill -9 waybar && waybar without restarting your sway session. when you are happy with the result, close your terminal and restart sway with Alt+Shit+r.
as with sway, waybar is particularly well documented via its man pages: man waybar is your friend :)

nakedsway: swaylock configuration

swaylock is the native tool for locking your screen. it is graphically similar to i3lock, with a coloured disk to show the keys pressed when entering the password. this tool accepts command line options (man swaylock for an exhaustive list) but can also be configured from a file present by default on nakedsway.
to configure swaylock, edit the dedicated file ~/.config/swaylock/config. the options are fairly intuitive except for the disk colours, which are in #RRGGBBAA format... but you can consult a conversion table to help you customise your lock screen.

nakedsway: foot configuration

foot is the default terminal on nakedsway. it can run in server/client mode to save memory. it is configured via the dedicated ~/.config/foot/foot.ini file.
by default, the NordTheme colorscheme is used, with a slight transparency. for high resolutions, i recommend changing the font size (Hack 7) and the default window size, which determines the size of the terminal opened in the scratchpad at the start of the session.

nakedsway: launching session

the sway/wayland session is recognised by lightdm, your connection manager on nakedeb. once nakedsway has been installed and your files configured, quit your session and choose "sway" from the list of lightdm sessions. cf wiki nakedeb.

to quit sway, use the default shortcut Alt+Shift+e, which will launch nakedquit as for other sessions.

nakedsway: using sway

important: using sway depends on your configuration. the instructions listed here are based on the default configuration supplied with nakedsway.

to begin with, the shortcuts are almost identical to those used on the i3wm session: you won't feel out of place if you're already using a tiling.
here are the main shortcuts used to control sway or launch applications on a nakedsway session:

wayland vs x11

a brief summary of the tools used in the various sessions:

│ tools/sessions  │ sway/wayland      │ i3/fluxbox/x11 │
│autostart        │ dex               │ fbautostart    │
│terminal         │ foot              │ rxvt-unicode   │
│screensaver      │ swayidle          │ acpi/dpms      │
│screenlocker     │ swaylock          │ i3lock         │
│composite        │ natif             │ picom/eyecandy │
│wallpaper        │ swaybg/nakedwalls │ feh/nakedwalls │
│screen color     │ wlsunset          │ redshift       │
│screenshot       │ grim              │ scrot          │
│image viewer     │ nsxiv             │ nsxiv          │
│applications menu│ rofi              │ rofi/fluxmenu  │

reset user configuration

if you have modified your configuration and wish to return to the default Debian or nakeDeb configuration, follow these methods.

default configuration files are located in /etc/sway for Debian and in /etc/skel/.config/sway for nakeDeb.
all nakedsway files are located in /usr/share/nakedsway.

sway links