Skip to content

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

74 Commits

Folders and files

Repository files navigation

quickshell-modern

A compact, OLED-black desktop shell for niri, built with Quickshell. The top bar grows into a launcher, control center, wallpaper picker and clipboard history, while matugen keeps the whole desktop in sync with the wallpaper.

Arch Linux Quickshell niri License

Quick settings

Features

  • Peninsula bar — a compact plate pinned to the top edge, with concave flare wings that blend it into the screen, or a floating island with a gap above (switchable in quick settings → Bar style). Workspace pills, a centered clock, keyboard layout, network state and a battery pill.
  • One surface, many panels — the bar morphs into the launcher, quick settings, wallpaper ribbon or clipboard picker on the monitor you target. Esc, the scrim or a click outside closes the open panel.
  • Launcher — fuzzy matching across application names, keywords and comments, with results ranked by launch frequency and persisted launch counts. Applications marked Terminal=true run through $TERMINAL (defaults to alacritty).
  • Control center — volume and brightness sliders, Mic / DND / Caffeine / Wi-Fi / Bluetooth chips, and tabs for calendar, timer, stopwatch, weather, media, notifications, power, system monitor, tray and app colors.
  • System monitor — CPU and GPU load with temperatures plus RAM, read from /proc and sysfs (k10temp/coretemp and amdgpu).
  • Tray — StatusNotifierItems with their D-Bus menus rendered inside the control center, including submenus.
  • Wi-Fi management — scanned networks and saved profiles via nmcli, including connect, disconnect, forget and password entry.
  • Notifications — a notification server with popup toasts, DND, actions, critical notifications and a scrollable history in the control center. History is capped at 50 entries and persisted on disk (notifs.json, gitignored).
  • Clipboard history — browse, re-copy and delete cliphist entries with the keyboard or mouse. Entries show a type/preview (image thumbnail or text/binary info with size/length metadata).
  • OCR — press Mod+Shift+S, drag a region on the focused output and the recognized text lands in the clipboard with a notification. The pipeline combines Tesseract preprocessing variants with optional local RapidOCR (PP-OCRv5/v6 via ONNX Runtime) and picks the best candidate by confidence, layout and script. Default languages are rus+est+eng; override with QS_OCR_LANGS.
  • Wallpapers — a thumbnail ribbon of your wallpaper directory (~/Pictures/Wallpapers by default, override with QS_WALLPAPERS_DIR), plus desktop drag-and-drop for new images.
  • OSD — volume, brightness, microphone, Caps Lock and keyboard-layout changes replace the bar content for a moment.
  • Live theming — matugen's Material palette or a fixed Gruvbox palette is applied to GTK, Qt, niri, terminals, editors and shells; the shell recolors as soon as the palette or the selected color scheme changes.
  • Multi-monitor aware — every screen gets its own bar; panels open on the monitor they were requested for.

Screenshots

Bar
Bar — workspace pills, clock, layout, network and battery
Launcher
Launcher — fuzzy search and launch-frequency ranking
Timer
Timer — presets, ±1 minute, pause and reset
Stopwatch
Stopwatch — survives closing the panel
App colors
App colors — per-application theme targets
Clipboard history
Clipboard — history with decode, copy and delete
Notification
Notification — toast with actions and DND support
Caps Lock OSD
Caps Lock OSD
Volume OSD
Volume OSD
Brightness OSD
Brightness OSD
Microphone OSD
Microphone OSD

Requirements

  • niri — workspaces, keyboard layouts, focused-output targeting and power actions use niri msg IPC.
  • Quickshell 0.3.2+ with Qt 6 and layer-shell support.
  • matugen — generates the Material palette from the wallpaper. The shell has a fallback palette, works without it, and can use the fixed Gruvbox scheme instead.
  • awww — wallpaper daemon used by the picker and desktop drop. awww img and awww query must work.
  • cliphist and wl-clipboard — clipboard storage.
  • brightnessctl — backlight control.
  • NetworkManager (nmcli) — network status and Wi-Fi management.
  • BlueZ (bluetoothctl) — Bluetooth state and toggling.
  • PipeWire + WirePlumber and pactl (from libpulse) — audio state and volume control.
  • curl — weather data from api.open-meteo.com (location via ipwho.is).
  • fd — recursive scan of the wallpaper directory.
  • grim — screen capture for OCR.
  • ImageMagick (magick) — crops/preprocesses the OCR selection.
  • Tesseract with tesseract-data-rus, tesseract-data-est and tesseract-data-eng — local OCR baseline and fallback.
  • Python 3 — runs the OCR pipeline, benchmark and optional RapidOCR adapter.
  • Google Sans and Material Symbols Rounded — the default UI fonts.
  • Optional: jq for focused-output keybinds, bat for the bat color target, libnotify for timer completion notifications, dbus plus systemd-inhibit for lock-screen sleep handling, and glib2 for setting the GTK color scheme. coreutils provides stdbuf for the audio and network event monitors.

On Arch Linux, the core packages are:

sudo pacman -S --needed quickshell niri matugen cliphist wl-clipboard \
  brightnessctl networkmanager bluez-utils wireplumber libpulse curl jq fd \
  grim imagemagick tesseract tesseract-data-rus tesseract-data-est \
  tesseract-data-eng ttf-material-symbols-variable

Install awww separately (package or local build), and place GoogleSans.ttf in ~/.local/share/fonts before running fc-cache -f. If you do not want Google Sans, change fontFamily in style/Theme.qml.

Installation

Clone the configuration into the default Quickshell location:

git clone https://github.com/cactozs/quickshell-modern.git ~/.config/quickshell

Start the shell for the current session:

qs

QuickShell discovers ~/.config/quickshell/shell.qml automatically. To start it with niri, add the following to ~/.config/niri/config.kdl (or an included file):

spawn-at-startup "awww-daemon"
spawn-at-startup "sh" "-c" "wl-paste --type text --watch cliphist store"
spawn-at-startup "sh" "-c" "wl-paste --type image --watch cliphist store"
spawn-at-startup "env" "QT_QUICK_BACKEND=software" "quickshell"

QT_QUICK_BACKEND=software keeps the shell on Qt's software renderer and avoids loading the GPU stack just for the bar. Remove it if you prefer hardware rendering.

First launch

  1. Run ./scripts/check-environment from this checkout. Missing tools are listed beside the features that use them; the shell can still run with optional integrations missing.
  2. Start qs from a terminal. Fix any QML or runtime errors printed there before adding it to niri startup.
  3. Add the startup commands above, then use Mod+A for the launcher, Mod+V for clipboard, Mod+N for notifications and Mod+S for quick settings.
  4. Run ./scripts/check-project before sharing changes. It checks every QML file with qmllint, validates the project scripts and runs the OCR accuracy self-test.

Keybinds

The shell exposes its actions over IPC. Bindings live in your niri config, not in this repository. These are the bindings used by the reference setup:

binds {
    Mod+A repeat=false hotkey-overlay-title="Launcher" {
        spawn-sh "qs ipc call launcher toggleOn $(niri msg --json focused-output | jq -r .name)";
    }
    Mod+V repeat=false hotkey-overlay-title="Clipboard" {
        spawn-sh "qs ipc call clipboard toggleOn $(niri msg --json focused-output | jq -r .name)";
    }
    Mod+Ctrl+W repeat=false hotkey-overlay-title="Wallpaper" {
        spawn-sh "qs ipc call wallpaper toggleOn $(niri msg --json focused-output | jq -r .name)";
    }
    Mod+N repeat=false hotkey-overlay-title="Notifications" {
        spawn-sh "qs ipc call notifs toggleOn $(niri msg --json focused-output | jq -r .name)";
    }
    Mod+Shift+N repeat=false hotkey-overlay-title="Toggle Do Not Disturb" {
        spawn "qs" "ipc" "call" "notifs" "toggleDnd";
    }
    Mod+P repeat=false hotkey-overlay-title="Toggle Bar" {
        spawn "qs" "ipc" "call" "bar" "toggle";
    }
    Mod+Shift+S repeat=false hotkey-overlay-title="OCR" {
        spawn-sh "qs ipc call ocr startOn $(niri msg --json focused-output | jq -r .name)";
    }
}

Clicking empty space on the bar opens quick settings. You can also bind it directly:

Mod+S repeat=false hotkey-overlay-title="Quick settings" {
    spawn-sh "qs ipc call quicksettings toggleOn $(niri msg --json focused-output | jq -r .name)";
}

IPC

All panel state can be driven with qs ipc call <target> <function> [args...]:

Target Function Description
bar toggle Hide or show the bar on every output
bar setStyle <notch|island> / getStyle Switch or read the bar outline style
launcher toggle / toggleOn <screen> / close Open, open on a specific output, or close
quicksettings toggle / toggleOn <screen> / close Open, open on a specific output, or close
quicksettings openTab <screen> <index> Open the panel on a specific tab
clipboard toggle / toggleOn <screen> / close Clipboard history
ocr start / startOn <screen> / cancel Region OCR: capture, recognize and copy
wallpaper toggle / toggleOn <screen> / close Wallpaper ribbon
wallpaper set <path> / refresh Apply a wallpaper / rescan the collection
notifs toggle / toggleOn <screen> / close Notification center (quick settings notifications tab)
notifs clearAll / toggleDnd / listActive Clear history, toggle DND, list active summaries
systemtheme apply Rewrite every enabled application theme now
systemtheme setApp <id> <enabled> Enable or disable an app color target

Quick settings tab indexes:

Index Tab
0 Calendar
1 Timer
2 Stopwatch
3 Weather
4 Media
5 Notifications
6 Power
7 Wi-Fi networks
8 Bar style / app colors
9 System monitor
10 Tray

Examples:

qs ipc call quicksettings openTab "" 5
qs ipc call wallpaper set "$HOME/Pictures/Wallpapers/mountain.png"
qs ipc call systemtheme setApp ghostty false

An empty screen argument keeps the last used output, or falls back to the first output.

Theming

The shell's palette comes from style/Colors.json, which matugen generates from the active wallpaper. The file is gitignored; style/Theme.qml contains matching fallback values so a fresh checkout still looks right. When the file changes, the shell watches it and recolors live.

For the usual wallpaper-to-theme flow, make awww img regenerate the palette. The reference setup puts a small shim at /usr/local/bin/awww (earlier in PATH than the real binary):

#!/bin/sh
# Only plain `awww img <existing-file>` is intercepted. Everything else
# (query/restore/pause, extra flags, colors, stdin) reaches the real binary.
if [ "$#" -eq 2 ] && [ "$1" = img ] && [ -f "$2" ]; then
    matugen image "$2" && exit 0
fi
exec /usr/bin/awww "$@"

~/.config/matugen/config.toml must set the wallpaper with the real binary (so the shim does not recurse) and write the template into this repository's style/Colors.json:

[config]
version_check = false
source_color_index = 0
fallback_color = "#6750A4"

[config.wallpaper]
set = true
command = "/usr/bin/awww img --transition-type center \"{{ image }}\""

[templates.quickshell]
input_path = "/home/you/.config/matugen/templates/quickshell.json"
output_path = "/home/you/.config/quickshell/style/Colors.json"
type = "SchemeContent"

The template maps Material color roles onto JSON keys; Theme.qml reads at least these:

{
  "primary": "{{colors.primary.default.hex}}",
  "on_primary": "{{colors.on_primary.default.hex}}",
  "primary_container": "{{colors.primary_container.default.hex}}",
  "on_primary_container": "{{colors.on_primary_container.default.hex}}",
  "secondary": "{{colors.secondary.default.hex}}",
  "on_secondary": "{{colors.on_secondary.default.hex}}",
  "tertiary": "{{colors.tertiary.default.hex}}",
  "on_tertiary": "{{colors.on_tertiary.default.hex}}",
  "error": "{{colors.error.default.hex}}",
  "on_error": "{{colors.on_error.default.hex}}",
  "error_container": "{{colors.error_container.default.hex}}",
  "surface": "{{colors.surface.default.hex}}",
  "on_surface": "{{colors.on_surface.default.hex}}",
  "on_surface_variant": "{{colors.on_surface_variant.default.hex}}",
  "surface_container_lowest": "{{colors.surface_container_lowest.default.hex}}",
  "surface_container_low": "{{colors.surface_container_low.default.hex}}",
  "surface_container": "{{colors.surface_container.default.hex}}",
  "surface_container_high": "{{colors.surface_container_high.default.hex}}",
  "surface_container_highest": "{{colors.surface_container_highest.default.hex}}",
  "outline": "{{colors.outline.default.hex}}",
  "outline_variant": "{{colors.outline_variant.default.hex}}",
  "inverse_surface": "{{colors.inverse_surface.default.hex}}",
  "inverse_on_surface": "{{colors.inverse_on_surface.default.hex}}",
  "shadow": "{{colors.shadow.default.hex}}"
}

Extra keys are ignored, so you can extend the template with the rest of the Material palette. The shell itself watches style/Colors.json; no Quickshell restart or post-hook is needed.

Color scheme and application targets

The Color scheme selector (quick settings → palette icon) switches between Matugen (wallpaper-derived) and Gruvbox (fixed warm palette). The shell and every enabled target below follow the active scheme.

The App colors section enables or disables each target. Every enabled target is rewritten whenever the palette or scheme changes; disabling one leaves its last generated file untouched.

Target File written One-time setup
GTK ~/.config/gtk-3.0/gtk.css, ~/.config/gtk-4.0/gtk.css Generated directly by Matugen
Qt ~/.config/qt6ct/colors/matugen.conf Select the palette in qt6ct
niri ~/.config/niri/quickshell.kdl include "quickshell.kdl"
Ghostty ~/.config/ghostty/themes/Quickshell theme = Quickshell
Foot ~/.config/foot/quickshell.ini include=~/.config/foot/quickshell.ini
Alacritty ~/.config/alacritty/quickshell.toml import = ["~/.config/alacritty/quickshell.toml"]
Kitty ~/.config/kitty/quickshell.conf include ~/.config/kitty/quickshell.conf
Neovim ~/.config/nvim/colors/quickshell.lua :colorscheme quickshell
Helix ~/.config/helix/themes/quickshell.toml theme = "quickshell"
Zed ~/.config/zed/themes/quickshell.json Select the dark Quickshell theme
Bash ~/.config/bash/quickshell.sh source ~/.config/bash/quickshell.sh in ~/.bashrc
Fish ~/.config/fish/conf.d/quickshell.fish Automatic
bat ~/.config/bat/themes/quickshell.tmTheme --theme="quickshell" in the bat config

The active scheme and disabled targets are stored in theme-apps.json at the project root (gitignored). Runtime UI state is also stored locally and gitignored (bar.json, notifs.json, quicksettings-state.json, services/LauncherCounts.json):

{
  "colorScheme": "matugen",
  "themeAppsOff": "ghostty,alacritty,kitty,helix,bash"
}

Use Apply now in the App colors section, or qs ipc call systemtheme apply, to force a full rewrite. The scheme can also be switched with qs ipc call systemtheme setColorScheme gruvbox (or matugen).

Geometry and fonts

style/Theme.qml holds the shell geometry and colors: bar height and side margin, corner radii, plates, and the font families. Matugen mode keeps the opaque black OLED plates; Gruvbox mode uses warm Gruvbox dark plates and orange/green/yellow/red accents.

Wallpapers

The picker scans the wallpaper directory recursively for jpg, jpeg, png and webp files (~/Pictures/Wallpapers by default; set QS_WALLPAPERS_DIR to override). The directory is created automatically if missing. Click a thumbnail to apply it and close the ribbon; the current wallpaper is outlined in the accent color.

Dropping an image file on empty desktop copies it into the wallpaper directory and applies it immediately. Non-file URLs and unsupported extensions are ignored.

OCR

Mod+Shift+S freezes the focused output, modules/ocr/OcrOverlay.qml lets you drag the region and scripts/ocr-pipeline.sh turns it into text. The pipeline is deliberately more than a single Tesseract call, because one pass is confidently wrong in common cases:

  • the selection is expanded by a few pixels, so a glyph the drag cut in half is not lost;
  • the region is recognized several times: grayscale, contrast stretched, inverted (for dark themes), binarized, sharpened and in color, each with page segmentation modes for text blocks and for sparse text;
  • the candidate with the highest confidence mass wins. Confidence mass (confidence summed over all characters) is used instead of the average confidence, because a candidate that only read half of the region is very confident about what it did read;
  • the text is rebuilt from the winning Tesseract TSV, so no second recognition pass is needed.

On a synthetic screenshot corpus (light and dark themes, 10–20 px type, low contrast, blur, noise, downscaled and colored text) this cuts the character error rate by roughly two thirds compared to the single-pass version and keeps the worst case far below it.

The language set defaults to rus+est+eng; a single language is noticeably worse for text that mixes scripts, for example Latin words inside Russian sentences. Override it with QS_OCR_LANGS (QS_OCR_LANGS=eng+rus). Fine tuning knobs of the pipeline itself are QS_OCR_SCALE (upscale percentage, default 175), QS_OCR_MARGIN (selection padding in pixels, default 6), QS_OCR_BORDER (white frame around the crop, default 20), QS_OCR_MIN_CONF (confidence floor for a candidate, default 55), QS_OCR_MIN_CHARS (minimum recognized characters for a candidate, default 8) and QS_OCR_DEBUG=1 (candidate diagnostics on stderr).

./scripts/ocr-selftest renders synthetic screenshots with known text and checks that the pipeline reads them back; ./scripts/check-project runs it together with the QML and shell syntax checks.

Project structure

.
├── shell.qml                 # ShellRoot: bars, desktop drop, toasts, scrim
├── modules/
│   ├── bar/                  # Peninsula bar, clock, workspaces, status
│   ├── clipboard/            # Clipboard history picker
│   ├── launcher/             # Application launcher
│   ├── notifs/               # Notification cards, toasts, click-outside scrim
│   ├── ocr/                  # Fullscreen region selector for OCR
│   ├── osd/                  # In-bar OSD
│   ├── quicksettings/        # Control center and all tabs
│   └── wallpaper/            # Wallpaper ribbon and desktop drop target
├── services/                 # Singletons: niri, audio, network, theme, state...
├── scripts/
│   ├── ocr-pipeline.sh       # OCR: crop, preprocess, recognize, pick the best text
│   ├── ocr-selftest          # Accuracy regression test for the OCR pipeline
│   ├── check-environment     # Reports missing tools, fonts and language data
│   └── check-project         # QML and shell syntax checks plus the OCR self-test
├── style/
│   ├── Colors.json           # Generated by matugen (gitignored)
│   └── Theme.qml             # Palette, fonts and geometry
├── assets/screenshots/
├── theme-apps.json           # Color scheme + app targets (gitignored)
└── LICENSE

All panel content lives inside the bar's layer surface. A single transparent fullscreen scrim handles click-outside dismissal, and a mask cuts out the open panel so its own clicks still land.

Notes and limitations

  • niri only. Workspace dots, keyboard-layout state and focused-output targeting use niri's IPC; other compositors are not supported.
  • Persisted local state. Notification history (notifs.json) and timer/stopwatch state (quicksettings-state.json) are persisted on disk and restored on startup/reload (gitignored). Restored notifications keep history/metadata but not live actions or popup toasts.
  • Weather needs network access. Data comes from api.open-meteo.com; the location is detected by IP through ipwho.is. No API key is required.
  • Idle lock timeouts default to 300s (lock) / 450s (power off monitors); override with QS_LOCK_TIMEOUT / QS_MONITOR_OFF_TIMEOUT (seconds).
  • App theme files are overwritten. Disable a target in App colors if you maintain that file by hand.
  • OCR runs locally. The default language set is rus+est+eng and can be overridden with QS_OCR_LANGS. scripts/ocr-pipeline.sh is the stable entry point; it delegates to scripts/ocr-pipeline.py, which runs Tesseract candidates and, when available, the local RapidOCR adapter from .venv-ocr. RapidOCR models/cache live in .cache/ocr/. If RapidOCR is not installed, OCR falls back to Tesseract only.
  • Tested with Quickshell 0.3.2 and niri 26.04 on Arch Linux. Other versions may work but are not tested.

Troubleshooting

  • Check logs in a terminal: run qs or quickshell -p ~/.config/quickshell/shell.qml and read QML/runtime errors from stderr. After config changes, try quickshell --reload.
  • Environment/deps: run ./scripts/check-environment for missing tools and ./scripts/check-project for QML/script validation. Missing optional tools disable related features (e.g. no cliphist/wl-paste → clipboard history, no awww → wallpapers, no nmcli/bluetoothctl → network/Bluetooth, no matugen → wallpaper-derived palette fallback only).
  • Clipboard issues: ensure wl-paste --watch cliphist store daemons are running and cliphist, wl-copy, wl-paste are installed.
  • OCR issues: install grim, imagemagick, tesseract, Python 3 and the language packs; run tesseract --list-langs to confirm rus, est and eng. The default language set is rus+est+eng; override it with QS_OCR_LANGS (for example QS_OCR_LANGS=eng+rus). Run ./scripts/ocr-setup to install the optional local RapidOCR venv, ./scripts/ocr-selftest for the quick benchmark, ./scripts/ocr-selftest --full for edge cases, and QS_OCR_DEBUG=1 ./scripts/ocr-pipeline.sh <image> <WxH+X+Y> rus+est+eng to inspect candidate scores.
  • Theme/wallpaper issues: verify awww-daemon is running, QS_WALLPAPERS_DIR points to an existing directory, and matugen writes to style/Colors.json if using Matugen scheme. Use qs ipc call systemtheme apply to force-regenerate app theme files.
  • UI/fonts/icons: install the expected fonts/icons (Google Sans, Material Symbols Rounded) or adjust style/Theme.qml; on Qt/Wayland rendering issues, try toggling QT_QUICK_BACKEND=software.

Credits

Built on Quickshell, niri, matugen, awww, cliphist and Material Symbols.

License

MIT — see LICENSE.

About

No description or website provided.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages