My customized widgets for my laptop
README.md

swts #

swts screenshot

A Quickshell-based desktop shell for Wayland (built and daily-driven on niri), packaged as a Nix flake.

Features #

  • Side panel — floating card top-right with clock, notifications, Wi-Fi / Bluetooth, sound devices, and brightness. Opens from a hot corner trigger you wire up in niri (qs ipc call panel open|close|toggle).
  • Launcher. The clock notch opens into an app search that also answers sums such as 12*(3+4) or 50 + 10%, and Enter copies the answer. Bind it in niri to swts ipc call launcher toggle.
  • Clipboard history. cliphist records every copy except the ones password managers mark sensitive, and the launcher's clipboard mode lists them, with thumbnails for images. Open it with swts ipc call launcher clipboard, or press Ctrl+Tab in the launcher.
  • Polkit prompt. Password requests from privileged actions open the clock notch into a prompt on the focused screen. swts is the polkit agent, so disable any other one, such as niri-flake's niri-flake-polkit user service.
  • Lock screen. Black OLED lock with the hour and a password pill, and face unlock when the PAM service runs howdy. It locks from the session row, swts ipc call lock lock, loginctl lock-session, after five idle minutes, and before every suspend. On NixOS, add security.pam.services.swts = {}; for a PAM service of its own, else it borrows swaylock or login.
  • Notification toasts top-right with progress fill, hover to expand, and enter/exit animations.
  • Notification center. The notification notch opens into the history, grouped by app, with Do Not Disturb and clear buttons. Open it from the bell, the top-right screen corner, or swts ipc call notifications toggle.
  • On-screen displays — volume, brightness, mute and Bluetooth OSDs.
  • Tray. Apps that dock a tray icon, such as netbird, Proton VPN or blueman, show up in the quick-settings panel, and their menus unfold in place. An app that needs attention lights a dot on the status notch.
  • Base16 theming with automatic Stylix integration (colors + opacity) when it's present, and transparency/blur support.
  • Phosphor icons fetched as a flake input (PHOSPHOR_ICONS_DIR).

Requirements #

  • A Wayland compositor (developed against niri; blur needs a compositor that supports it).
  • Nix with flakes enabled (experimental-features = nix-command flakes).

Installation #

Try it without installing #

nix run tangled.org:shyrogan.fr/swts

Add the input to your flake.nix:

{
  inputs = {
    swts.url = "git@tangled.org:shyrogan.fr/swts";
    # optional: keep a single nixpkgs across your config
    swts.inputs.nixpkgs.follows = "nixpkgs";
  };
}

The flake exposes:

Output Description
packages.<system>.default the swts executable
homeModules.default Home Manager module that writes the theme file swts reads
devShells.default dev shell with Quickshell, formatters and tooling

With Home Manager #

Import the module and add the package. The module generates ~/.config/swts/base16-theme.json and points swts at it via SWTS_THEME_FILE. If Stylix is enabled, its colors and opacity are picked up automatically; otherwise the bundled Base16 theme is used.

{ inputs, pkgs, ... }:
{
  imports = [ inputs.swts.homeModules.default ];

  home.packages = [ inputs.swts.packages.${pkgs.system}.default ];
}

Then launch it from your compositor config (or run swts directly). With niri, add it to your spawn-at-startup:

spawn-at-startup "swts"

binds {
    Super+Space repeat=false { spawn "swts" "ipc" "call" "launcher" "toggle"; }
    Super+V repeat=false { spawn "swts" "ipc" "call" "launcher" "clipboard"; }
}

Terminal apps from the launcher open in $SWTS_TERMINAL, such as "foot" or "ghostty -e", else in the first installed terminal emulator.

Without Home Manager #

You can install just the package and manage the theme file yourself:

environment.systemPackages = [ inputs.swts.packages.${pkgs.system}.default ];

swts looks for its theme at $SWTS_THEME_FILE, falling back to $XDG_CONFIG_HOME/swts/base16-theme.json (i.e. ~/.config/swts/base16-theme.json). Copy config/base16-theme.json there, or set the variable to point at your own Base16 JSON. If neither is found, swts uses a built-in fallback theme.

Development #

# formatters (nixfmt, qmlformat), Quickshell, and runtime deps
nix develop

# run the shell from the source tree
nix run .

Because this is a flake, new files (QML, config, …) must be git add-ed before Nix can evaluate them. See AGENTS.md for architecture notes on theming, popups, icons and notifications.