Skip to content

Linux Wayland Compositor & Hyprland

A friend recommended Hyprland window manager which is similar to i3 window manager I currently used, but more optomised for the Wayland compositor.

Practicalli currently uses Regolith Desktop, a complete Linux desktop that leverages Gnome and i3 tiling window manager.

Regolith Desktop provides quite a rich experience using the regolith-desktop Debian package. I have not had much success with Regolith when running with Wayland (specifically Sway).

Sway compositor is an implementation of wayland for i3 window manager. Some of my applications do not see to play nice with Sway (e.g. chromium browser scrolling, simplescreenrecorder cannot run on wayland).

OBS did seem to work okay on wayland, given a sufficiently recent version.

A friend recommended Hyprland, a tiling compositor that provides the latest Wayland features and lots of eye candy. Its pretty easy to setup on Debian, although there is much additional setup before it would be comparable to Regolith Desktop.

Neovim Grug plugin is being considered as an alternative to the Spectre tool for search and replacing across a project.

Neovim Clojure navigationλ︎

Once I learned vim style commands and motions I quickly dropped much of the paredit style command, even before I tried parinfer. Parinfer is really simple and easily covers a lot of the sexp-tooling when writing Clojure code.

Personally I find vim-style editing a bit simpler and easier to remember as I am using it for everything and not only one language. There are typically as many key combinations to press with a sexp library as there are with vim.

There are a few manipulations I may still like the idea of, e.g. raise/promote a form or expression to refactor a nested expression to be the whole expression.

I have https://github.com/PaterJason/nvim-treesitter-sexp plugin installed, but havent used it much. I use https://github.com/gpanders/nvim-parinfer plugin for parinfer enabled, in alignment mode, for all Clojure language buffers.

Neovim Searchingλ︎

For project wide search and replace, I currently use Spectre plugin via the Astrocommunity plugin. It works okay and has a usable UI.

Grug looks interesting though, so time to try that at the weekend.

AstroNvim version

:Astroversion to receive the current version as a notification.

Space f n to view the notification that contains the version number, eg. Version: *4.26.5*

Hyprland on Debianλ︎

Throughout the history of Linux (and Unix), X.org has been used as the power driving all desktops. More recently the Wayland compositor was developed to provide an alternative that catered for the way many desktops are used today.

There has been a lot of work put into Wayland and although it still has some maturing to do, is generally considered stable for every day use.

Hyprland is a wayland based tiling manager that has a focus on an engaging user experience (and looking very pretty too).

Review wayland app recommendations

Some well established apps and tools may not work quite so well with wayland yet. e.g. simplescreenrecorder.

Hyperland utilities page recommends apps that work well with wayland (and hyprland)

Debian packages required for a desktop environment based on Hyprland (this is a growing list)

  • hyprland - dynamic tiling Wayland compositor
  • hyprland-backgrounds
  • hyprland-dbgsym - optional debug symbols for hyprland
  • hyprland-dev - optional development files for Hyprland
  • hyprland-protocols - wayland protocol extensions for Hyprland
  • xdg-desktop-portal-hyprland - hyprland communicates with apps via D-Bus (XDG Portal backend)
  • xdg-desktop-portal-hyprland-dbgsym - sid - debug symbols for xdg-desktop-portal-hyprland
  • hyprpaper

Optional: SDDM is a KDE based window manager that seems quite popular with Hyprland community. If SDDM is adopted then it seems appropriate to replace all Gnome tools currently used by Practicalli with their KDE equivalents.

Install hyprlandλ︎

I am using Debian Linux trixie (the next unrelease version of Debian). The hyprland packages are from the v0.41.2 release in June 25 and the latest hyperland version is v0.44.0 (released as I was writing this paragraph)

Using the Debian packages will be simpler and quicker than compiling hyprland from source. As I am only evaluating Hyprland and havent committed to it, I will stick with the Debian packages.

Install all hyprland Debian packages

apt install hyprland*

This install the packages:

Logout of the desktop or restart Debian Linux.

Use Debian Linux testing version

Hyprland recommends using Debian Sid version for the latest versions. However, after searching through the Debian Packages website for hyprland, the versions of matching packages are the same in trixie(testing) as sid(unstable).

There may be differences in versions of packages that the hyprland packages have as dependencies,

Building Hyprland for Debian Linux

drewfrif/debian-hyprland has several bash scripts for semi-automating the build and install of hyprland on Debian Linux.

There are some personal preferences in those scripts that could be changed, but it seems a good basis for automating your own build and install for all the hyprland components.

Hyprland v0.43.0 requires C++ 26 support, which is provided by gcc package version >=14. gcc --version reports 14.2.0 on Debian trixie, so all should be good

 gcc --version
gcc (Debian 14.2.0-3) 14.2.0

First useλ︎

On the login screen, select the login account, then select hyprland using the cog in the right hand corner

Enter the correct password to login with the hyprland desktop.

A yellow information bar is displayed at the top of the screen showing an autogenerated configuration file location, e.g. ~/.config/hypr/hyprland.conf

The information bar also described keybindings to start a terminal, Super q, (kitty is my Debian default terminal) and Super m to quit hyprland destkop

Practicalli dotfiles & hyprland

The autogenerated config file was moved to the Practicalli dotfiles repository.

A symbolic link replaced the ~/.config/hypr/ directory, linking to the hypr directory in the local copy of the Practicalli dotfiles repository.

ln -s ~/projects/practicalli/dotfiles/hypr ~/.config/hypr

Although Regolith has Rofi, it doesnt seem to be available when using hyprland desktop.

Options - install the rofi debian package - install one of the suggested app launcher on the hyprland wiki

I tried rofi first as its familiar from Regolith desktop.

apt install rofi

There is a rofi-dev package, although assuming that is not needed if unless I build rofi extensions

Rofi Wayland package should be used

Either use wofi or the rofi-wayland project (Debian did not have a rofi-wayland package at time of writing)

Update the hyprland config to launch rofi for the menu and use Super Space key binding (rather than Super R)

Override key binding in Hyprland config

# bind = $mainMod, R, exec, $menu
bind = $mainMod, space, exec, $menu

The rofi guide suggests creating a configuration file

Create a rofi directory in .config

mkdir -p ~/.config/rofi

The dump all the config options into a file. Most options are commented out.

rofi -dump-config > ~/.config/rofi/config.rasi

Switched to wofi menu

wofi seemed to work much better (automatically floating window unlike rofi)

Apps to installλ︎

waybar - the desktop status bar (TODO: tweak its config and learn from shared configs)

Configure waybarλ︎

Create an appealing and rich desktop menu and status bar.

Handcrafting a config

Configure Waybar for Hyprland

 cp -vr /etc/xdg/waybar ~/projects/practicalli/dotfiles/
'/etc/xdg/waybar' -> '/home/practicalli/projects/practicalli/dotfiles/waybar'
'/etc/xdg/waybar/config.jsonc' -> '/home/practicalli/projects/practicalli/dotfiles/waybar/config.jsonc'
'/etc/xdg/waybar/style.css' -> '/home/practicalli/projects/practicalli/dotfiles/waybar/style.css'
 ln -s ~/projects/practicalli/dotfiles/waybar ~/.config/waybar

waybar uses font-awesome fonts for the icons

# apt search font-awesome
fonts-font-awesome/testing,now 5.0.10+really4.7.0~dfsg-4.1 all [installed,automatic]
  iconic font designed for use with Twitter Bootstrap

# apt install fonts-font-awesome

To use the workspaces module, replace all the occurrences of sway/workspaces with hyprland/workspaces. Additionally replace all occurrences of sway/mode with hyprland/submap

nwg-shellλ︎

nwg-look is a GTK3 settings editor, I assume similar to the Appearance in control center with some Gnome Tweaks thrown in.

Debian package install

# apt install nwg-
nwg-bar       nwg-clipman   nwg-displays  nwg-hello     nwg-look
root@gkar:/etc/apt/preferences.d# apt install nwg-*
Note, selecting 'nwg-clipman' for glob 'nwg-*'
Note, selecting 'nwg-displays' for glob 'nwg-*'
Note, selecting 'nwg-hello' for glob 'nwg-*'
Note, selecting 'nwg-look' for glob 'nwg-*'
Note, selecting 'nwg-bar' for glob 'nwg-*'
The following package was automatically installed and is no longer required:
  libgspell-1-2
Use 'apt autoremove' to remove it.

Installing:
  nwg-bar  nwg-clipman  nwg-displays  nwg-hello  nwg-look

Installing dependencies:
  cliphist  gir1.2-gtklayershell-0.1  xcur2png

Summary:
  Upgrading: 0, Installing: 8, Removing: 0, Not Upgrading: 0
  Download size: 4,636 kB
  Space needed: 13.2 MB / 1,220 MB available
nwg-look settings output
 nwg-look
INFO[0000] /home/practicalli/.config/nwg-look/config file not found, creating
INFO[0000] lang: en_GB
INFO[0000] >>> Loading basic lang from '/usr/share/nwg-look/langs/en_US.json'
INFO[0000] >>> Parsing original /home/practicalli/.config/gtk-3.0/settings.ini
INFO[0000] >>> Reading gsettings
INFO[0000] gtk-theme: Gruvbox
INFO[0000] icon-theme: Moka
INFO[0000] font-name: Cousine Nerd Font 12
INFO[0000] cursor-theme: Adwaita
INFO[0000] cursor-size: 24
INFO[0000] toolbar-style: both-horiz
INFO[0000] toolbar-icons-size: large
INFO[0000] font-hinting: slight
INFO[0000] font-antialiasing: grayscale
INFO[0000] font-rgba-order: rgb
INFO[0000] text-scaling-factor: 1
INFO[0000] color-scheme: prefer-dark
INFO[0000] event-sounds: true
INFO[0000] input-feedback-sounds: false
INFO[0047] >>> Applying gsettings
INFO[0047] >> org.gnome.desktop.interface
INFO[0047] gtk-theme: Gruvbox OK
INFO[0047] icon-theme: Faba OK
INFO[0047] cursor-theme: Adwaita OK
INFO[0047] cursor-size: 24 OK
INFO[0047] font-name: Cousine Nerd Font 12 OK
INFO[0047] font-hinting: slight OK
INFO[0047] font-antialiasing: grayscale OK
INFO[0047] font-rgba-order: rgb OK
INFO[0047] text-scaling-factor: 1 OK
INFO[0047] toolbar-style: both-horiz OK
INFO[0047] toolbar-icons-size: large OK
INFO[0047] color-scheme: prefer-dark OK
INFO[0047] >> org.gnome.desktop.sound
INFO[0047] event-sounds: true OK
INFO[0047] input-feedback-sounds: false OK
INFO[0047] >>> Backing up gsettings to /home/practicalli/.local/share/nwg-look
INFO[0047] >>> Exporting /home/practicalli/.config/gtk-3.0/settings.ini
INFO[0047] >>> Exporting /home/practicalli/.gtkrc-2.0
WARN[0047] Couldn't find icons folder
INFO[0047] >>> Exporting /home/practicalli/.config/xsettingsd/xsettingsd.conf

Wayland apps and tools supportλ︎

Practicalli tools that work well with wayland

  • OBS - recent versions support wayland
  • Inkscape - TODO
  • Neovim - works in a terminal so doesnt really care
  • Neovide - TODO
  • Emacs - TODO
  • The Gimp - TODO
  • Firefox - seems okay
  • Chrome - a delay when opening tabs or scrolling windows (regoligh & sway)

Installλ︎

Install the hyprland packages using * to glob match all the relevant packages.

Install all hyprland Debian packages

apt install hyprland*

Once installed, either logout of the desktop session or restart Debian Linux.

Hyprland should be an option on the login screen. Once an account has been selected, click the cog icon to select hyprland (TODO: check if this is available after installing the package - or if some config is required)

Lots more packages are required

Hyprland is a compositor and not a full desktop environment, so investigation required as to what additional wayland supported packages are required.

Configurationλ︎

Hyprland is described as easy to configure, but what actually is involved. Is it as simple as adding hyprland packages or do I need to edit a configuration file?

Lets investigate... I didnt get far as hyprland is not a full desktop environment, so more research is required into what extra packages can be installed to have a more complete desktop experience.

Gotchasλ︎

Super c will close the app in the active window. As I use this key binding a lot in MacOSX for copy paste, then I should rebind this close action to something else, e.g. Super Shift q is the keybinding from regolith and less likely to be pressed in error. Trying Super Shift x for now as there needs to be a key binding to quit Hyprland (logout and reboot do not work currently - shutdown does though)

Hyprlandλ︎

Root shell history

apt search hyprland
apt install hyprland*

cd /etc/apt/
cd preferences.d/

hyprpm list
apt search hypr
apt show xdg-desktop-portal-hyprland
apt search wofi
apt show wofi-pass
apt show rofi
apt install rofi

apt show dolfin
apt show dolphin
apt install dolphin
apt install waybar
apt install hyprpaper
apt install wofi
apt show wayland-utils
apt install sway
apt show foot
apt install pavucontrol pamixer
apt install wdisplays
apt search hyprland
apt install xdg-desktop-portal-hyprland
apt install hyprland-backgrounds
hyprctrl hyprpaper listloaded
apt search font-awesome
apt install fonts-font-awesome
apt search eww
apt install pipewire wireplumber
apt search nwg

Material for MkDocsλ︎

Refining the experiments with installing Material for MkDocs on Debian Linux this week.

Recap:

  • Installing Material for MkDocs using Debian packages did work to a point, although there is no package for the RSS plugin (its relatively recent split from the main material-mkdocs package)
  • Installing Material for MkDocs using python packages does cover all the plugins used by Practicalli books and websites.
  • Debian issued warnings when using pip3 or pipx to install python packages outside of the Debian package system.
  • Using a Python virtual environment is the recommended way to run Material for MkDocs (or any python libraries) on Debian Linux.

A python virtual environment was created and then Material for MkDocs python packages were installed using Pip.

python3-venv package creates a Python virtual environment given a directory

Create Python Virtual Environment

python3 -m venv ~/.local/venv/

Install Material for MkDocs using Python Packages

pip install mkdocs-material mkdocs-callouts mkdocs-glightbox mkdocs-git-revision-date-localized-plugin mkdocs-redirects mkdocs-rss-plugin pillow cairosvg

Run local server for Material for MkDocs

source ~/.local/venv/bin/activate && mkdocs build

Makefile task to run server

# ------- Makefile Variables --------- #
MKDOCS_SERVER := mkdocs serve --dev-addr localhost:7777
# ------------------------------------ #

# --- Documentation Generation  ------ #
python-venv:  ## Enable Python Virtual Environment for MkDocs
    $(info --------- Mkdocs Local Server ---------)
    source ~/.local/venv/bin/activate

docs: ## Build and run mkdocs in local server (python venv)
    $(info --------- Mkdocs Local Server ---------)
    source ~/.local/venv/bin/activate && $(MKDOCS_SERVER)

docs-changed:  ## Build only changed files and run mkdocs in local server (python venv)
    $(info --------- Mkdocs Local Server ---------)
    source ~/.local/venv/bin/activate && $(MKDOCS_SERVER) --dirtyreload

docs-build:  ## Build mkdocs (python venv)
    $(info --------- Mkdocs Local Server ---------)
    source ~/.local/venv/bin/activate && mkdocs build
# ------------------------------------ #
Root shell history
apt install python3-pipx
apt install python3-venv
apt install python3
pip3 install mkdocs-material=="9.*"
pipx install mkdocs-material=="9.*"
apt install python3-pipx
apt install pipx
pipx install mkdocs-material=="9.*"
pipx install mkdocs-material
pip install mkdocs-material=="9.*"
apt search material-mkdocs
apt install mkdocs-material mkdocs-material-extensions
pip
apt remove --purge mkdocs-material mkdocs-material-extensions
apt autoremove
apt install pipx
apt remove --purge pipx
apt autoremove
apt autoclean
apt install python3-venv
exit

Slack for Debianλ︎

Download the debian package from the slack webstite (there is a small link in the right corner to a .deb file)

As the root user:

cd /home/practicalli/Downloads/
apt install ./slack-desktop-4.39.95-amd64.deb

Not that the deb file install complains about being installed by root account, but works anyway.


Thank you.

🌐 Practical.li Website

Practical.li GitHub Org practicalli-johnny profile

@practicalli@clj.social @practical_li