Installing Debian & Sway
TLDR: Sway is ok but Hyprland is better. Don't bother using sway.
Intro
I tried Hyprland using the brilliant script from https://github.com/JaKooLit/Debian-Hyprland and fell in love with the dynamic tiling but didn't really like all the software installed.
There was also a lot of compiling so I decided to look for the more Debian option. Sway is in the repo so I did a little research, did a test install alongside KDE and fell in love with the drag and drop tiling. It seems designed for multi monitors. You don't need to be a keyboard wizard but you do need to learn a couple of bindings to open the terminal, menu and close windows.
The default theme really reminds me of fluxbox as well (an old love of mine) and I haven't even got to messing with themes and the waybar yet.
Install Debian and update to Sid
Install a base Debian with no desktop environment (deselect the top Debian option in tasksel or it will install gnome by default) and the edit sources.list to change to the sid branch and add contrib non-free
Then update to the latest version of Debian Sid ✌️
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade
Command line tools
sudo apt install zsh git htop nvtop duf nnn neofetch timeshift
Nvidia drivers
Sway says only Nouveau drivers but Nvidia seems to be working for me.
sudo apt install linux-headers-amd64 nvidia-driver firmware-misc-nonfree
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX nvidia-drm.modeset=1"' > /etc/default/grub.d/nvidia-modeset.cfg
sudo update-grub
sudo reboot
Sway WM
sudo apt install sway swaylock swayidle foot thunar imv
sudo reboot
and sway --unsupported-gpu
and you should have working desktop to copy paste from 😄
Simple Config
Copy the default config cp /etc/sway/config ~/.config/sway
and start customising.
I start by adding some gaps:
gaps inner 10
smart_gaps on
And edit the existing wallpaper:
output * bg /home/seb/Pictures/wallpapers/21522.jpg fill
Useful https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway
Oh My Zsh
Sound & Volume Controls
sudo apt install pipewire alsa-utils pamixer playerctl
This leaves working sound but only with alsamixer for volume control, so add bindings.
wev
can be installed and used to find keys such as Fn+F10 aka XF86AudioMute
# Volume controls
set $volume_up pamixer -u -i 10
set $volume_down pamixer -d 10
set $toggle_mute pamixer -t
bindsym XF86AudioRaiseVolume exec "$volume_up"
bindsym XF86AudioLowerVolume exec "$volume_down"
bindsym XF86AudioMute exec "$toggle_mute"
Screenshots
grimshot
provides the scripts to simplify using grim and slurp.
# Select and capture a custom rectangular area to clipboard
bindsym print exec grimshot copy area
# Capture the currently active window to clipboard
bindsym Shift+Print exec grimshot copy active
# Select and capture a custom rectangular area and save
bindsym $mod+print exec grimshot save area
# Capture the currently active window and save
bindsym $mod+Shift+Print exec grimshot save active
Menu
The default in Sway is wmenu but that searches for binaries and not applications. j4 generates a better menu which can be then used in the key binding in sway config.
sudo apt install j4-dmenu-desktop
Then edit the sway config and change the set $menu
set $menu j4-dmenu-desktop --dmenu="wmenu -i" | xargs swaymsg exec --
Later I wanted to change the font to increase the height to cover my waybar.
fc-list : family
to list out available fonts
--dmenu='wmenu -i -f "JetBrainsMono Nerd Font, 13"'
sets the font
This keeps the menu in the top bar. Two of many alternative menus are wofi or tofi which are a floating menu in the middle of the screen.
Lock screen
Uncomment the swayidle section for automatic locking and screen timeout and add a bind for locking the screen.
bindsym $mod+Alt+L exec swaylock
Desktop Apps
Install some desktop apps only available through snap
sudo apt install snapd xwayland fuse gimp libreoffice
sudo snap install plex-desktop telegram-desktop
Also get brave-browser, insync and fuse is needed for cursor.
Add --enable-features=UseOzonePlatform --ozone-platform-hint=auto
to shortcut/desktop for X11 apps like Brave or Cursor.
Firefox vs Brave
My display issues in KDE and Brave have disappeared... by using Sway and Firefox 😆
Video playback is slightly better in Firefox as well. Sway is more stable than KDE for me on Nvidia Wayland and much faster as a desktop. I use Brave for the to save some sites as shortcuts or webapps or whatever you call them - I have soundcloud, whatsapp andshopify dashboards loaded like this
To Do
- Setup nnn with previews - check if it can ftp first?
- Uninstall thunar
- Install Mopidy on pi and ncmpcpp on shed as terminal client
- Find a terminal media player for soundcloud
- Style waybar
sudo apt install hyprland
??