Repository navigation
Plugin Internals
Generated from
docs/PLUGINS.en.mdat v0.3.0. Edit it in the repository: this page is rewritten at each release.
hyprdesk is split into packages: each configurable feature (desktop,
icons, launcher, wallpaper, widgets, bar, screens, workspaces, effects) is a
self-contained module, shipped with the binary as a built-in package
(builtin: true). This document describes the contract of a package, that of
a widget, and where the launcher fits.
| Concept | Where | What it is |
|---|---|---|
| Settings package | src/ui/plugins/<id>.rs |
an entry of the Settings screen: manifest, messages, state, view, update, CLI keys |
| Widget |
src/widgets/, src/ui/widget_view.rs
|
an element placed on the desktop or in the bar, fed by a data source |
| Widget plugin | ~/.config/hypr/hyprdesk/widgets/<name>.lua |
a widget written in Lua, detected without recompiling |
| Desktop |
src/ui/plugins/desktop.rs, desktop/
|
each screen's desktop (background, icons, widgets), part of the core |
| Dock |
src/ui/plugins/dock.rs, dock/
|
the desktop dock: a standalone widget, the only control in launcher-only mode |
Five packages put a surface on screen on top of their Settings page. Each lives in its own folder, laid out the same way:
| Path | Role |
|---|---|
src/ui/plugins/<id>.rs |
root: manifest (INFO), messages, Settings page, submodule declarations |
src/ui/plugins/<id>/surface.rs (or surface/) |
what the plugin puts on screen |
src/ui/plugins/<id>/… |
its other parts: modules, styles, menus, motion |
src/<id>/ |
UI-free logic also used outside the UI (CLI, LYRA, lock) — today src/panorama/
|
-
Desktop:
surface.rs(a screen's desktop: background, glass-mode veil, icons and widgets, beside the Settings drawer),layout.rs(widgets laid out without overlapping),corners.rs(hot corners: a 2 px square on theOverlaylayer per configured corner and screen, none on a screen showing a fullscreen window nor at a corner touched by a neighbouring screen; the action runs aftercorners.delay, the corner lights up, then waits for the pointer to leave; a corner can ask for a key held down,corners.<corner>_modifier, read by the core insrc/modkeys.rswithout any bind). Its page: Display, Forced modes, Hot corners (a sketch of the screen, one action per corner: Exposé, full desktop, Launcher, notification centre, lock, screens off, Panorama, and under it the key to hold: ⌘ Super, ⌥ Alt, ⌃ Ctrl, ⇧ Shift), Session, Dependencies. It is part of the core (CORE_PLUGINS): the shell does not exist without it. Settings list it first in the « Plugins » group, with the other shell plugins. -
Bar:
surface.rs(zones, modules, actions),layout.rs(measuring, overflow),motion.rs(local motion),style/(Continuité, Graphite, Island, Convexe),popover.rs+popover/(drop-down menus),window.rs(the active window's menu, on its title).src/bar_offer.rsadds modules shipped later to the configured bar. -
Dock:
surface.rs(the dock and the window card),lifecycle.rs,keyboard.rs,motion.rs,contrast.rs. Its page: Content, Appearance (with the style:dock.*options from thedesign_optionsregistry), Pinned. Turning it off removes the dock from every screen and from the bar; an olddisabled_plugins = { "launcher" }is read as"dock". -
Launcher:
grid.rs(large sheet and centered card,hyprdesk apps, dock button,keys.search); the search engine (ui/search.rs) stays shared. Its page: Applications, Shape, Shortcut. It is part of the core (CORE_PLUGINS): turning the dock off does not turn it off. Quick Look (core cardsrc/ui/quicklook.rs, a self-contained iced component — state, messages, keys, view, subscriptions — that the daemon mounts throughsrc/ui/quicklook_demon.rs, lending it its look; its renderers without any UI in the sharedcrates/hyprdesk-previewcrate, used by the portal and HyprFiles too, MLG-462; Space in:f, on a desktop icon or in the file dialog,hyprdesk quicklook <path>): a video or a sound plays (MLG-437) in a separate process (hyprdesk media-player,crates/hyprdesk-preview/src/media_player.rs: libmpv loaded at run time, software rendering in memory, frames and state over a pipe), started when the file is shown and killed on close or on the next file. Play and pause by clicking the picture, the button or K (Space still closes); seek bar, elapsed time and duration; mute (button, M) and volume, kept for the next file. A sound shows its cover, else its waveform in theme colours, with title and artist. While a video plays, the player holdsorg.freedesktop.ScreenSaver.Inhibit(served by hypridle, as for Firefox or VLC) and releases it on pause, at the end and on close; a sound alone does not; same setting as idle-during-video (idle_video), and nothing when the machine policy enforces locking. Without libmpv (packagempv): the thumbnail, "Playback unavailable", and a line inhyprdesk doctor. Folder usage (MLG-417, computed in the shared cratecrates/hyprdesk-preview/src/dirstats.rs, shared viewsrc/ui/dirstats.rs): Quick Look on a folder shows a stacked bar by category (Images, Videos, Sounds, Documents, Code, Archives, Other; colours derived from the accent, 3:1 on the background), its legend (size, files, share: colour never carries the meaning alone), the largest subfolders as gauges, what the count misses ("at least"), the age ("computed 3 h ago") and "Refresh". The walk runs off the UI thread, bounded (10 million entries, 60 s, depth 64), never follows a link nor crosses into another file system, and counts hard links once; a dated cache shared by every surface lives in$XDG_CACHE_HOME/hyprdesk/dirstats/(stale after 24 h or when the folder changes: recomputed by itself, the old figure shown meanwhile), and the walk is dropped on the next file or on close. The file dialog's preview pane shows a compact view; Thunar gets it through its "Quick Look" action, which also applies to folders; HyprFiles shows it in the inspector and in Quick Look on a folder, throughhyprdesk dirstats <folder> --json(same cache; without hyprdesk, it says so). The text equivalent is read by the screen reader and printed byhyprdesk dirstats <folder> [--refresh] [--json]. -
Panorama:
surface/(pages, gestures, tiles insurface/modules/),design.rsandmodules.rs(Settings tabs); logic insrc/panorama/.
These plugins stay under src/ui/: they extend App, whose fields are
private to the ui module.
Menus. One component, src/ui/menu.rs: rows, separators, headings,
icons, pressed state, destructive items in red, keyboard navigation. The
bar's menus (popover.rs) and the right-click card (src/ui/context.rs:
desktop, icons, widgets, dock, launcher grid, sharing a file) use it; a
plugin menu does the same instead of drawing its own rows. The text-field
edit menu (src/ui/edit.rs) wraps every surface's view: no field has
anything to declare.
Exposé (shell core, next to the Workspaces screen and the switcher; not
a plugin): hyprdesk expose [all], keys.expose (CTRL + Down), four fingers
up, the bar's hyprdesk menu. The workspace's windows as non-overlapping
thumbnails (src/expose.rs, logic; src/ui/expose.rs, overlay card),
captured by grim -T (icon when grim is missing, said in the footer and in
hyprdesk doctor); typing filters, arrows, Enter, drag onto a workspace in the
top row to send the window there.
Emoji & Symbols (core, the launcher's :e mode; not a plugin):
hyprdesk characters, keys.characters (SUPER + CTRL + Space), the bar's
hyprdesk menu. A grid by category with recents, search by French and English
names, skin tones (src/charview.rs, embedded data assets/charview/chars.tsv
rebuilt by scripts/charview-data.py from Unicode and CLDR). Enter pastes into
the active window (wl-copy then Control-V, Control-Shift-V in a terminal)
without touching the clipboard: its content is kept then put back
(wl-paste, its main type), and the passing character stays out of cliphist
(wl-copy --sensitive); Shift + Enter only copies; missing wl-clipboard is said in the footer and in
hyprdesk doctor.
Live Text (core, src/ocr.rs; not a plugin): hyprdesk capture texte,
CTRL + Print (the "Capture · text" essential), the bar Capture menu's "Copy
text from an area", the "Copy text" action of a screenshot's notification. The
area is chosen with slurp, captured by grim at scale 2, read by tesseract
in the system's languages (French and English by default); the text goes to the
clipboard and its start to a bubble. A system language without its data is said
in the bubble; missing tesseract: greyed entry, an "Install" bubble (the
distribution's command in the terminal), a hyprdesk doctor line.
Backup (core, src/backup.rs; page src/ui/plugins/backup.rs, bar
module assets/widgets/integres/backup.lua): Settings → Backup,
hyprdesk backup …, config set backup.*. The home folder copied by
restic to an external disk, a folder or sftp:, hourly or daily (systemd
timer hyprdesk-backup.timer), the repository password in the keyring
(secret-tool); a file or a folder restored next to the original. One state
(state.json) read by the page, the bar module (hd.backup_status, added
once to the bar: last backup, percentage, failure in red, disk not connected
in amber; "Back up now" menu) and hyprdesk doctor; missing restic is said
in all three.
Phone (core, src/kdeconnect.rs, followed by src/sources/kdeconnect.rs;
bar module assets/widgets/integres/phone.lua): continuity through KDE
Connect, on the session bus of kdeconnectd (rather than kdeconnect-cli). The
"Phone" module, added once to the bar and hidden without a paired, reachable
device, shows the battery (amber at 20 %, red at 10 %, unless charging); its
menu rings the phone ("Find my phone") and sends it the clipboard. A file is
sent to the phone from "Share…" on the desktop and from Quick Look ("Send to
…", so also from the :f search). The clipboard is shared both ways by
kdeconnectd itself; the phone's notifications arrive through
org.freedesktop.Notifications, so in the notification centre.
hyprdesk phone [list | ring | clipboard | send]; hyprdesk doctor reports
a missing or stopped kdeconnectd, and each device's plugins. No call starts
kdeconnectd through D-Bus activation.
freedesktop services (core, src/fdo_services.rs; not a plugin):
hyprdesk is the default for every freedesktop interface it serves
(MLG-419); an explicit choice is left as is. The daemon holds the
org.kde.StatusNotifierWatcher watcher whether or not the bar shows the
system tray (IsStatusNotifierHostRegistered says whether it does); the
portal preferences it writes hand the wallpaper and sleep inhibition to
hyprdesk;gtk when their line is missing. hyprdesk doctor
(“freedesktop services” section) says who holds notifications, the system
tray, the polkit agent, the Secret Service, the portal interfaces, the
global menu, AT-SPI, default applications and XDG autostart.
File dialog preview pane (core, src/ui/filechooser.rs; MLG-415): to the
right of the list, a compact Quick Look of the selected row: picture, first
page of a PDF or document, video thumbnail (nothing plays), cover or waveform
of a sound, start of a text, then the file's facts. Same renders and cache as
Quick Look, read off the UI thread, with its indicator when they take time.
The “Preview” button and Ctrl + Shift + P fold or unfold it; the state is
remembered ($XDG_STATE_HOME/hyprdesk/file-dialog-preview); a window
narrower than 1020 px folds it by itself without changing that choice.
Portal dialogs (core, src/portal_fenetre.rs; not a plugin, MLG-434):
every dialog hyprdesk serves for the portal (FileChooser, Wallpaper,
Background, Access, AppChooser and those to come, all in the
hyprdesk-portal host: since MLG-462 the file dialog and its Quick Look no
longer go through the daemon, see src/portal_fichiers.rs; the host installs alone, packaging/portal/) is a real xdg_toplevel window, not a layer: Hyprland moves it (Alt + drag,
movewindow), it floats and gets the border, corners and shadow of any
window. One class, hyprdesk-dialog, one window rule (règle_lua:
floating, centered), set by the process that opens the dialog. It is
attached to the app's window when the portal gives
parent_window = "wayland:<handle>" (handle imported through xdg-foreign v2,
zxdg_importer_v2), and then modal for that app only (xdg-dialog v1,
xdg_wm_dialog_v1): other windows stay usable. Centered on the app (by pid,
else by app_id, on the dialog's workspace), then focused (hl.dsp.focus):
Escape, Enter and typing go to it. Closed by Hyprland, it answers
"cancelled"; Request.Close and the app leaving the bus close it. A new
dialog is born the same way, through iced_layershell (vendored:
parent_handle, modal), which opens its xdg windows next to its layers:
let settings = portal_fenetre::réglages(&title, size, &Parent::parse(&parent_window));
std::thread::spawn(move || {
portal_fenetre::poser_règle();
portal_fenetre::centrer(&title, size, &requester);
});
Task::done(Msg::NewBaseWindow { settings, id })hyprdesk doctor ("Portal dialogs" section) says whether the compositor
offers xdg-foreign v2 and xdg-dialog v1; without them the dialog still
opens, without a parent or without modality.
Permissions and "Open With" (core, Access and AppChooser portals; not a
plugin, MLG-388): the hyprdesk-portal host serves
org.freedesktop.impl.portal.Access (portal_socle::Permissions) and
org.freedesktop.impl.portal.AppChooser (portal_socle::ChoixApplication),
declared in hyprdesk.portal and handed to hyprdesk by the portal
preferences (hyprdesk;gtk, added only when the line is missing: a line
already there is a choice, and is kept). Both cards are portal dialogs
(src/portal_carte.rs, portal_fenetre windows, see above).
The permission card (camera, location, screenshot, background image, running
in the background…) shows the app's icon and name, the request's title,
subtitle, body and choices (check box or list), "Deny" and the grant button
with the app's labels; Enter does not grant, Escape and closing the window
deny; the frontend keeps the answer in its permission store, the host does
not write there (pure logic in src/portal_access.rs). The "Open With" card
lists the offered apps in Quick Look's order (quicklook::apps_for: the last
one chosen, then the type's default, then by name; without a usable list,
the type's apps); arrows, Enter, double click or "Open"; UpdateChoices
refreshes it while open; "Always open this type with this application"
writes hyprdesk-mimeapps.list (apps::toujours_ouvrir_avec), never the
shared mimeapps.list (pure logic in src/portal_appchooser.rs).
Settings → Applications → Application permissions says who answers each
interface (fdo_services::qui_répond) and lists the camera, microphone and
location permissions granted per app, each one removable (core
src/permission_store.rs, org.freedesktop.impl.portal.PermissionStore);
hyprdesk doctor ("freedesktop services") has one line per interface.
Screenshot and color picker (core, Screenshot portal; not a plugin,
MLG-427): the hyprdesk-portal host serves
org.freedesktop.impl.portal.Screenshot version 3 (portal_socle::Capture,
pure logic in src/portal_screenshot.rs), declared in hyprdesk.portal and
given to hyprdesk with hyprland as fallback (hyprdesk;hyprland; in the copy
hyprdesk wrote, the old hyprland line it had put there becomes
hyprdesk;hyprland, any other value stays). Permission for a non-interactive
screenshot is kept by the frontend: it reads the permission store
(screenshot table), asks through the permission card (Access portal) and
passes permission_store_checked; without that hint, the host reads the
store itself (permission_store::valeurs_sur), never writes to it, and asks
when nothing is stored. An interactive screenshot opens the "Screenshot" card
(the same dialog as the permission card): an area, a window, the entire
screen or the active window, "Cancel" or "Capture". The capture uses the
tools of hyprdesk capture (hyprshot to its output, without saving,
clipboard or notification; grim for the whole screen; the same selection
lock), is saved in Pictures/Captures, and its uri is returned.
AvailableTargets follows the tools present. The color picker (PickColor)
is hyprpicker (-f hex); when it is missing a notification says so and
hyprdesk doctor lists it. "Screenshot and color picker" line under
"freedesktop services".
Screen sharing (core, ScreenCast portal; not a plugin, MLG-428):
xdg-desktop-portal-hyprland keeps the ScreenCast interface and produces the
PipeWire stream (ScreenCast=hyprdesk;hyprland since MLG-429: the host relays every call to xdph, see "Remote control"); hyprdesk serves its dialog, through
the picker xdph runs (screencopy:custom_picker_binary in
~/.config/hypr/xdph.conf), the only way to name one window exactly. When
the daemon starts, portal_screencast::poser writes the launcher
~/.local/share/hyprdesk/hyprdesk-share-picker (hyprdesk-portal --selecteur-partage), then appends a screencopy { … } block to
xdph.conf (created when missing; an existing file is copied once to
.avant-hyprdesk.bak and its settings kept; a picker chosen by the user is
never replaced); xdph is restarted to read it only when it holds no request,
no session and no stream in PipeWire, waiting 10 minutes at most, otherwise
at the next start. The "Share Screen" card (a real dialog window, centered
on the requesting app, found in the frontend's object tree) has three tabs:
Screens (grim -o thumbnails), Windows (grim -T thumbnails, as in Exposé)
and Area (drawn with slurp; when missing, the card says so); the "Allow … to
resume this share without asking again" box gives xdph's r flag: the
choice is kept by xdph and the frontend, nothing on hyprdesk's side. Escape,
"Cancel" or closing the window refuse. While a share is on, the Bar plugin's
"Screen sharing" module (assets/widgets/integres/screencast.lua,
hd.screencast(), Hyprland's screencast>> events, initial state read from
PipeWire) shows its icon in the accent color and what is shared; hidden
otherwise. It does not stop the share: xdph tells neither the portal nor the
app about a session closed from outside, so stopping stays with the app.
"Screen sharing (choice of screen or window)" line under "freedesktop
services".
Application global shortcuts (core, GlobalShortcuts portal; not a plugin,
MLG-431): the hyprdesk-portal host serves
org.freedesktop.impl.portal.GlobalShortcuts version 2
(portal_raccourcis_bus::Raccourcis, pure logic in
src/portal_raccourcis.rs), declared in hyprdesk.portal and given to
hyprdesk with hyprland as fallback (hyprdesk;hyprland; in the copy written
by hyprdesk, the old hyprland line it had put there becomes
hyprdesk;hyprland, any other value stays). xdg-desktop-portal-hyprland is
only the fallback now: it ignores the key the app prefers, binds no key,
never gives a shortcut back and mixes up two unsandboxed apps with the same
id. An app is known by its app_id, otherwise by the program that opened it
(programme:<name>). Its shortcuts already chosen are given back at once
with their key (~/.config/hypr/hyprdesk/global-shortcuts.json, hyprdesk's
file); new ones open the binding dialog (src/portal_raccourcis_carte.rs, a
real dialog window): one row per shortcut, the proposed key (the app's
preference when free, otherwise a free neighbour), "Change" (records a
combination, Hyprland staying in the empty hyprdesk-capture submap
meanwhile), "No key", the conflict in plain words ("already taken by
hyprdesk: …", "by Hyprland: …", "by : …"); "Bind" (only without a
conflict), "Don't bind" (remembered, never asked again), "Cancel" (nothing
remembered). The host binds the keys of live sessions in Hyprland itself
(Lua table __hyprdesk_gs, apart from __hyprdesk_binds; two binds per
key, on press and on release, hl.dsp.event("hyprdesk-gs:p|r:<app>:<id>"),
active while the desktop is shown) and reads those events on socket2 to emit
Activated and Deactivated to the one session holding the shortcut; a
combination held by hyprdesk or Hyprland is never bound; binds are removed
when the session closes or the app leaves. Settings → Keyboard & mouse →
Keyboard, "Application shortcuts" section: each app and its shortcuts,
"Capture", "Remove the key", "Forget"; a change announces ShortcutsChanged to
the affected sessions only, and ConfigureShortcuts opens this page.
"Application global shortcuts" line under "freedesktop services".
Application printing (core, Print portal; not a plugin, MLG-425): the
hyprdesk-portal host serves org.freedesktop.impl.portal.Print
(portal_impression_bus::Impression, pure logic in
src/portal_impression.rs), declared in hyprdesk.portal and given to
hyprdesk with gtk as the fallback (hyprdesk;gtk; a line already there is a
choice and stays). CUPS is read by a shared core service (src/cups.rs:
lpstat under LC_ALL=C, IPP attributes of queues and jobs through
ipptool, which the "Printers and scanners" page will read too) and written
by lp only: never lpadmin nor lpoptions. PreparePrint opens the print
dialog (src/portal_impression_carte.rs, a real dialog window attached to
the app): printer and its state in plain words, pages (all, current page,
selection, a "1-3, 5" range), copies and collation, two-sided and color
only when the queue supports them, orientation, paper size (the queue's
sizes, readable names), pages per sheet, the sheet drawn to scale; it
returns the settings in the GtkPrintSettings and GtkPageSetup format with a
token (single use, one hour). Print first copies the received file
($XDG_RUNTIME_DIR/hyprdesk/impression/, 0600), sends it without a dialog
with a valid token (the app already rendered the chosen pages: neither
page-ranges nor orientation is passed again), with the dialog otherwise
(first page rendered by pdftoppm, range bounded by pdfinfo,
page-ranges passed to CUPS), then deletes it; reply 0 as soon as CUPS
took the job, then followed every 2 s (10 min at most) and told by a
notification: sent, printed, stopped with CUPS's reason, interrupted.
Without CUPS (missing, stopped, no printer), the dialog says so and only
allows "Cancel". No printing to a file (output-uri). "Application
printing" line of "Freedesktop services", with the state of CUPS and its
queues.
Application launcher installs (core, DynamicLauncher portal; not a
plugin, MLG-430): the hyprdesk-portal host serves
org.freedesktop.impl.portal.DynamicLauncher version 1
(portal_lanceur_bus::Lanceurs, pure logic in src/portal_lanceur.rs),
declared in hyprdesk.portal and handed to hyprdesk with gtk as the
fallback (hyprdesk;gtk; a line already there is a choice and stays).
PrepareInstall opens the "Add a launcher" card
(src/portal_lanceur_carte.rs, a real dialog window attached to the app):
the icon received (PNG, JPEG or SVG), the proposed name in a focused field
(unless editable_name is false), the address of a web app; "Add" (or Enter
in the field) returns the chosen name, cleaned up, and the icon as received,
and is greyed out while the name is empty; "Cancel" or Escape return 1.
SupportedLauncherTypes is 3 (application and web app).
RequestInstallToken (installing without the card) is only granted to
software centers (org.gnome.Software, org.kde.discover) and hyprdesk.
Install and Uninstall stay with the frontend, as the spec says: it
writes the .desktop file ($XDG_DATA_HOME/xdg-desktop-portal/applications/,
linked from applications/) and the icon (Icon= as an absolute path). The
daemon reloads the application list as soon as its folders change
(launch::apps_changes, a stamp read every 2 s off the UI thread): the
launcher shows up right away in the Launcher and the dock, found by its
name, and by the GenericName, Keywords and Exec command the app wrote
(MLG-443). "Application launcher installs" line of "Freedesktop services".
Name and avatar shared with apps (core, Account portal; not a plugin,
MLG-426): the hyprdesk-portal host serves
org.freedesktop.impl.portal.Account version 1
(portal_compte_bus::Comptes, pure logic in src/portal_compte.rs),
declared in hyprdesk.portal and given to hyprdesk with gtk as the fallback
(hyprdesk;gtk; a line already there is a choice and stays).
GetUserInformation opens the "Personal information" card
(src/portal_compte_carte.rs, a real dialog window attached to the app):
who is asking, the reason it gives (reason, cleaned up, at most 400
characters, or "The app does not say why"), the avatar (a disc with the
initial when there is none), the full name and the user name; "Share"
returns id, name and image (the avatar's file:// address, handed to
a sandboxed app through the frontend's document portal); "Decline", Escape or
closing the window return 1; Enter does not share. The account is read by
the core service src/compte.rs, which the lock screen now uses and the
"Users & Groups" page will use (MLG-438): AccountsService (RealName,
IconFile) only when it is already running (never started just to read a
name), otherwise passwd (the GECOS field); the AccountsService avatar,
otherwise /var/lib/AccountsService/icons/<id>, ~/.face, ~/.face.icon,
when it is an image hyprdesk can show (PNG, JPEG, GIF, WebP, BMP, ICO; at
most 10 MiB). The log only keeps where the name and avatar came from, never
their content. "Name and avatar shared with apps" line in "Freedesktop
services".
App access to USB devices (core, Usb portal; not a plugin, MLG-433):
the hyprdesk-portal host serves org.freedesktop.impl.portal.Usb
version 1 (portal_usb_bus::Usb, pure logic in src/portal_usb.rs),
declared in hyprdesk.portal and given to hyprdesk (hyprdesk;gtk; gtk
does not serve Usb, a line already there is a choice and stays). The
frontend sorts out what the app may see (the enumerable-devices rules of
its sandbox, refusals in the store's usb table), then AcquireDevices
opens the "Access to a USB device" card (src/portal_usb_carte.rs, a real
dialog window attached to the app): the app, each device named from udev
(vendor and product from the hardware database, otherwise what the device
reports; failing that "USB device 1d6b:0002"), its IDs, the access asked for
(read only, read and write) and its node; one checkbox per device when
there are several; "Remember this choice for …"; "Decline" or "Allow".
"Allow" returns the checked subset in devices (a(sa{sv})), with
writable; the frontend opens the nodes itself (O_RDONLY or O_RDWR)
and hands the descriptors over with FinishAcquireDevices: none goes
through hyprdesk. "Decline", Escape or closing the window return 1; Enter
does not allow. A remembered grant is kept in the permission store, table
hyprdesk-usb (the frontend's key usb:<vendor>/<product>/<serial>,
values yes, ro or rw, the name): the same request then goes through
without the card, a write request on a read-only grant asks again. These
grants are listed and can be removed in Settings → Applications →
Application permissions. "App access to USB devices" line in "Freedesktop
services".
Remote control (core, RemoteDesktop portal; not a plugin, MLG-429):
the hyprdesk-portal host serves org.freedesktop.impl.portal.RemoteDesktop
(portal_bureau_distant_bus, pure logic in src/portal_bureau_distant.rs),
declared in hyprdesk.portal and given to hyprdesk (hyprdesk;gtk; a line
already there is a choice and stays). xdph does not serve RemoteDesktop and
Hyprland 0.57 takes no events over EIS: granted input goes through
Hyprland's virtual keyboard (zwp_virtual_keyboard_v1, the seat's keymap
as is, keysyms found by libxkbcommon loaded at run time) and virtual
pointer (zwlr_virtual_pointer_v1, one per shared screen for absolute
motion) (src/portal_injection.rs). Touch is not offered
(AvailableDeviceTypes = keyboard | pointer: Hyprland has no virtual
touchscreen). The host is also an EIS server (ConnectToEIS,
src/portal_eis.rs, libeis loaded at run time): version 2 with libeis, 1
without; a "hyprdesk" seat offers only the granted capabilities, the
absolute device has one region per stream of the screen. A session's
screen goes through ScreenCast, which the host serves as a relay to
xdph (src/portal_screencast_bus.rs, at the same paths: frontend 1.22
sends a RemoteDesktop session's ScreenCast.SelectSources to the
ScreenCast backend); xdph keeps the PipeWire stream and still launches
hyprdesk's picker, and every app's screen sharing goes through this relay
(hyprdesk;hyprland: xdph as fallback). On Start, the "Remote control"
card (src/portal_bureau_distant_carte.rs, a real window) names the app,
what it will be able to do (Keyboard, Pointer checkboxes), the chosen
screen, warns that it will be able to type and click for you; "Remember"
when the app asks for it (hyprdesk's restore_data, nesting xdph's);
"Decline" or "Allow"; Enter does not allow. During a session, the Bar
plugin's "Remote control" module
(assets/widgets/integres/remotedesktop.lua, offered through
bar_offer::OFFERED) shows an accent icon, the app in its tooltip and
Stop in its menu: the host closes the session (Closed signal), its
mirror session at xdph (the stream stops), its EIS server and its virtual
devices. The state is published by the host on its name
(org.hyprdesk.BureauDistant, Sessions property, Changed signal), read
without a process (hd.remote_desktop()); without the daemon, the service
still answers per the specification. "Remote control (keyboard and
pointer)" and "Screen sharing" lines in "Freedesktop services".
Portal versions and restarts (core, MLG-439; src/portal_relance.rs):
every interface of the host publishes version, under the specification's
name (#[zbus(property, name = "version")]: zbus would otherwise write
Version, which the frontend does not read), at the version of the
xdg-desktop-portal 1.22 interface files (portal_socle::VERSIONS:
Screenshot 3, GlobalShortcuts 2, the others 1 — only Screenshot and
GlobalShortcuts are read by the frontend, which sets its own at startup;
it only publishes DynamicLauncher if it found an implementation at
startup). When the daemon starts, a host whose program was
replaced is restarted first, then the frontend; the frontend also when its
preferences changed or its view does not match the host; never while a
request is in progress (a request/… object on the frontend or the host:
an open dialog, a held inhibition), while the host holds a global shortcuts
session (the app keeps it for its lifetime and would not open it again),
while a print job is being sent (a copy of the received file by a living
host in the sending folder: with a token, no request/… object tells it),
nor while xdph holds a request or a session. "Portal: backend versions and the
frontend's view" section of hyprdesk doctor.
A package is a module of src/ui/plugins/ that exposes:
pub const INFO: PluginInfo = PluginInfo {
id: "screens", // stable identifier: tab, `hyprdesk settings screens`
label: "Écrans", // navigation: French source text, translated at display time (§ 9)
icon: "video-display", // glyph (ui/icons.rs) or theme icon
summary: "Détection, disposition, …",
builtin: true, // shipped with hyprdesk
};
#[derive(Debug, Clone)]
pub enum Msg { … } // its messages, nothing else
pub fn wrap(m: Msg) -> UiMsg { … } // envelope towards the application
pub struct State { … } // its screen state (optional)
impl App {
pub(in crate::ui) fn tab_screens(&self) -> Element<'_, UiMsg>; // view
pub(in crate::ui) fn screens_update(&mut self, m: Msg) -> Task<UiMsg>; // update
}The package only knows its own messages. It emits them through wrap(Msg::…);
if it needs to talk to another package, it goes through super::other::wrap(…),
which makes the dependency visible.
src/ui/plugins/mod.rs is the registry:
-
BUILTIN: the manifests, in navigation order; -
PluginMsg: one variant per package, wrapped inPanelMsg::Plugin; -
update,view,on_show: routing to the relevant package; -
find: looks up a package by identifier or by a French alias (fond,écrans…), forhyprdesk settings <package>.
src/ui/panel.rs is the drawer's shell: its surface (its own layer
above the windows), opening and closing, the navigation built from
BUILTIN, and the shared helpers (section, field, apply, commit,
commit_reload, panel_ctx). It contains no setting: its only messages are
Tab, Close, Commit and Plugin(..).
- The view emits
wrap(Msg::X). - The package's update modifies
App::settings(the model insrc/settings.rs, mirror ofsettings.lua). - It calls one of the shell's helpers:
-
apply(): the effective configuration changes in memory, without saving. This is what is used while a slider is being dragged. -
commit(): likeapply(), then writes~/.config/hypr/hyprdesk/settings.lua. -
commit_reload(): writes, then reloads the whole configuration. This is needed when Lua must be re-executed, for example to enable a widget.
-
- The daemon watches
hyprdesk/: a write coming from elsewhere (CLI, editor) is reloaded the same way.
settings.lua is loaded before hyprdesk.lua: what the user writes
by hand has the last word, and field(…, "key") flags it in the view.
settings.lua is also reloaded on its own, without hyprdesk.lua, for
the screen's state. A setting that targets an element of hyprdesk.lua must
therefore survive this standalone read (this is the case for hd.place and
hd.disable).
Each package declares its keys in src/cli_config.rs (KEYS table, plugin
field). A key is a name, a help text, and three functions: read the effective
value, write into Settings, remove. hyprdesk config groups them by
package, in BUILTIN order, and writes the same settings.lua as the
Settings screen:
hyprdesk config # all keys, by package, effective values
hyprdesk config list screens # a single package
hyprdesk config get launcher_group
hyprdesk config set show_on primary
hyprdesk config set keys.launcher "SUPER + ALT + D"
hyprdesk config set assign.firefox 2 silent # dynamic key (workspaces)
hyprdesk config set widget.calendar on # dynamic key (widgets)
hyprdesk config unset show_on # back to the default valueKeys per package:
| Package | Keys |
|---|---|
desktop |
show_on, mode, glass_opacity, icon_scope, icon_double_click, float_launched, focus, font, font_size
|
keys |
suspend_binds, keys.toggle, keys.launcher, keys.hide, keys.settings, keys.lock, keys.leave, keys.switch, keys.search, keys.overview, keys.focus_bar, keys.focus_dock, keys.focus_notifications, keys.focus_settings, keys.force_quit, keys.files, keys.custom.<combo>, keys.keyboard_access, keys.take, keys.media, keys.essentials, keys.essentials_off
|
input |
keyboard_access |
icons |
grid.icon_size, grid.cell, icon_theme
|
dock |
running_apps, launcher_group
|
launcher |
apps_style, apps_suggestions, apps_categories, apps_unified, launcher.<shape>
|
wallpaper |
wallpaper (image or #rrggbb, all desktops), wallpaper.fit, wallpaper.span (on: spread across all screens) |
widgets |
widget.<type> (on / off) |
bar |
bar, bar.position, bar.height, bar.monitor (all, primary, or comma-separated screens) |
screens |
primary |
workspaces |
workspaces, workspace.<n> (screen: connector, primary, auto), assign.<app>, workspace_selector (relief, rail, miniatures, icones) |
layouts |
layout, layout.<n>, dwindle.<option>, master.<option>, scrolling.<option>
|
apptheme |
app_themes (kitty, gtk, qt, none; all by default) |
animations (Desktop tab) |
transition, fade_ms, crossfade_ms
|
theme |
theme.preset (theme engine pack: name or id), theme.name, theme.fg, theme.bg, theme.accent, background, theme.effects.<place>.opacity (0..1), theme.effects.<place>.blur (places: bar, menus, launcher, settings, widgets — no blur) |
dock (appearance) |
dock.<style>, launcher_position, launcher_size, launcher_pinned, launcher_show_settings, launcher_show_assistant
|
apps |
apps.<role> (browser, terminal, files, editor, image, video, audio, pdf, mail, ai) |
assistant |
assistant_mode (window, terminal), ai_services, ai_use
|
plugins |
plugin.<id> (on / off) |
The screen layout (position, rotation, mode) stays in the Settings
screen. Each change is applied live there, then must be confirmed
before being written to monitors.lua. A blind write from the command
line would not have this safety net.
The Settings navigation groups packages (plugins::GROUPS), following the
sidebar of macOS System Settings: Network & Bluetooth, Power & Notifications,
General, Appearance, Accessibility, Control Center, Assistant, Spotlight,
Privacy & Security, Desktop & Dock, Windows, Displays & wallpaper, Lock &
accounts, Keyboard & mouse, Printers & Scanners, Configuration. A new package
goes into one group (a test checks that each package is in exactly one).
Wide drawer: the selected package's tabs appear under it as sub-entries;
narrow drawer: as pills above the page.
The macOS System Settings panes hyprdesk does not have yet stand at their
place in the navigation, announced as “to come” (common body
plugins::a_venir: the banner “This pane arrives in a future release of
hyprdesk” and the list of what the pane will cover): focus (Focus) and
screentime (Screen Time) in Power & Notifications, accessibility
(Accessibility),
privacy (Privacy & Security), screensaver (Screen Saver) in Displays &
wallpaper, users (Users & Groups) and accounts (Internet Accounts) in
Lock & accounts, printers (Printers & Scanners). Each will be filled in a
future release: the package module replaces the a_venir call with its real
page.
“Advanced settings” (drawer header, key advanced_settings): checked, everything
is shown; unchecked, only the essentials. Hidden then: the packages of
ADVANCED_ONLY, the tabs of ADVANCED_TABS, and the fields a view wraps in
self.adv(…). Nothing is removed from the configuration: only the display
changes.
Marking, everywhere (wide or narrow drawer): a cyan flask (icon
hyprdesk-advanced) next to an advanced tab and, while advanced settings are
shown, next to every package that holds advanced settings, with their count
(plugins::adv_count: advanced tabs, ADVANCED_PLACES sections,
self.adv(…) calls counted in ADV_SOURCES); an “Advanced” badge at the top
of the page, a cyan frame around an advanced section. Rule: a tab made only of raw Hyprland options,
files or expert settings is advanced (● below); on a basic page, raw
Hyprland options (hyprset::GROUPS outside BASIC_GROUPS) are framed by
App::hyprset_tab. The options_brutes_marquees_avancees test checks it.
| Package | Tabs |
|---|---|
| Desktop | Display · Forced modes ● · Session ● · Dependencies ● |
| Theme | Themes · Colors · Text (font, size) · Transparency ● |
| Animations | Animations · Curves ● · Effects · Desktop ● (desktop transitions, wallpaper crossfade) |
| Windows | Appearance · Behaviour ● · Rules (windows; layers and workspaces when advanced) · Groups ● |
| Keyboard and mouse | Keyboard · Mouse · Touchpad · Cursor · Gestures · Devices ● |
| Hyprland configuration | Cleanup · Environment ● · Hyprland plugins ● · Permissions ● · Advanced ● |
| Dock | Content · Appearance · Pinned |
| Launcher | Applications · Shape · Shortcut |
| Bar | General · Modules |
| Screens | Layout · Screen (clicking on the map leads there) |
| Workspaces | Count and screens · Applications |
| Layouts | General · Dwindle · Master · Scrolling · Custom |
| Widgets | On this desktop (a widget selected on the desktop leads there) · Available |
- Create
src/ui/plugins/<id>.rswithINFO,Msg,wrap, the state if needed, the view and<id>_update. - Declare it in
plugins/mod.rs:pub mod, a line inBUILTIN, a variant inPluginMsg, an arm inupdate,viewand, if needed,on_show. - If the package has a screen state, add its field to
Panel(panel.rs). If it has many settings, split them into tabs: aTABSconstant ((identifier, label)), an arm inplugins::tabs, and the view only shows the tab ofself.subtab(INFO.id). The drawer draws the pills and remembers the choice;hyprdesk settings <package>/<tab>opens it directly. - Persist in
Settings(src/settings.rs): the field,from_config,apply_toandto_lua. On the Lua side, the key must be recognized inconfig/lua.rsand documented inassets/hyprdesk.meta.lua. - Declare the CLI keys in
cli_config.rs. - Add a test for the package, and a scene in the preview
(
ui/preview.rs,scripts/verify.sh).
The plugins::tests::registre test checks that identifiers are unique.
The cli_config::tests::chaque_cle_appartient_a_un_paquet test checks that
each CLI key points to an existing package.
| id | Label | Controls | Domain outside the UI |
|---|---|---|---|
desktop |
Desktop | screens the desktop is shown on, mode, font, session | config::General |
keys |
Shortcuts | every active shortcut (outside the full desktop, desktop shown), hyprdesk's own, essential window, workspace and screen shortcuts set by hyprdesk |
keymap.rs, essentials.rs
|
icons |
Icons | application shortcuts, size, theme |
launch.rs, layout.rs
|
dock |
Dock | windows shown, grouping, style | — (widget, § 3) |
launcher |
Launcher | presentation, suggestions, shape, shortcut | search.rs |
theme |
Theme | colors, backgrounds, effect of each place (opacity, blur), desktop mode, lock screen veil; shipped themes and “Custom themes” |
theme.rs, config::Theme
|
apptheme |
Theme modules | the theme engine modules that carry the theme to other software (kitty: ~/.config/kitty/hyprdesk-theme.conf, included at the end of kitty.conf, reloaded with SIGUSR1) |
apptheme.rs |
wallpaper |
Wallpaper | image, slideshow, color; scope | config::WallpaperRule |
widgets |
Widgets | activation, placement |
widgets/ (§ 2) |
bar |
Bar | position, height, screens, modules |
bar_offer.rs (surface: ui/plugins/bar/) |
screens |
Screens | detection, layout, orientation, mode, primary screen |
screens.rs → monitors.lua
|
workspaces |
Workspaces | persistent workspaces, application assignment, bar selector style, the “Workspaces” organising screen |
hypr.rs (Hyprland rules), ui/overview.rs
|
layouts |
Layouts | default and per-workspace layout, Dwindle, Master, Scrolling options, custom layouts (lua:<name>), each layout's shortcuts |
tiling.rs |
apps |
Applications | default applications (browser, terminal, files, editor, images, video, audio, PDF, mail, AI), applied to the system (xdg-mime); only installed applications are offered (TryExec / Exec program present), recognized by the role's file type or by their freedesktop category (WebBrowser, TextEditor, FileManager, Email, TerminalEmulator); a choice that has gone missing is flagged “not installed” |
apps.rs |
assistant |
AI | tabs Assistant (LYRA, mindlog.hyprland_tools, with Claude Code, Codex or Zcode, and hyprdesk's context), Other AI services (providers, the provider of each feature, keys in the keyring) and SmartUI design (icons redrawn by AI, hyprdesk-smartui theme, automatic generation) |
assistant.rs, ai_services.rs, smartui.rs
|
share |
Sharing | export / import of a setup or of the theme alone (archive) | share.rs |
plugins |
Plugins | state and activation of packages, Lua plugins: active, third-party, adding, removing | widgets/plugins.rs |
about |
About | version, system, Hyprland, LYRA, configuration files, dependencies, SmartUI theme; copy for a bug report | doctor.rs |
storage |
Storage | tabs Disks (every volume, mounted or not, read by lsblk; mount, unmount, eject through udisksctl; “Analyze” a mounted volume), Usage (a folder split by file type, its largest subfolders to drill into, breadcrumb, open or move to the trash) and Tidy-up (trash, thumbnails, application caches one by one — Git repositories left out —, package cache through paccache and journals through journalctl --vacuum-size, both through pkexec); every action that deletes asks for a second click |
volumes.rs, menage.rs, dirstats
|
The domain (model, Lua, Hyprland rules, monitors.lua) does not depend on
the UI. The package bridges the two. This is what will later make it
possible to turn them into separate crates: the domain first, the UI
next. For now, packages are modules of the binary, because their views
need the application state (App).
A widget is a type and an instance:
-
Type (
config::WidgetType, catalogConfig::catalog):- built-in, declared in
widgets::BUILTINS:clock,calendar,system,media,command,lua; - or a detected Lua plugin (§ 2.3).
- built-in, declared in
-
Instance (
config::WidgetDef): a type and its options, plus its placement (anchoron a 3×3 grid,x/yoffsets,size,card). It also carries its scope (workspace,monitor) and its origin (hyprdesk.luaorsettings.lua).
Identifiers. An instance declared without an id gets <type>#<n>, counted
per type and per origin: a widget added from the settings does not shift
those of hyprdesk.lua. Bar modules have their own
identifiers (bar:<zone>:<n>) and do not count.
-
Declaration:
hd.widget("calendar", { anchor = "right" })inhyprdesk.lua, or activation in Settings → Widgets (written tosettings.lua). -
Placement:
hd.place("calendar#0", { … })repositions a widget fromhyprdesk.luawithout touching the file. -
Deactivation:
hd.disable("calendar#0")turns off a widget fromhyprdesk.lua. Turning it back on removes the line. -
Polling: the scheduler (
ui/mod.rs,poll) polls each widget at itsinterval, off the UI thread, and only if the widget is visible. Results from a stale configuration are ignored (generation number). -
Rendering:
ui/widget_view.rsturns the value (widgets::Value: text, system lines, media, rich content) into iced elements, inside its card.
A plugin is a <name>.lua file or a <name>/init.lua folder. Search
folders, the first match wins:
~/.config/hypr/hyprdesk/widgets~/.local/share/hyprdesk/widgets/usr/share/hyprdesk/widgets
The shipped plugins (network, bluetooth, battery, capture, keyboard, player, updates, removable, nightlight, gpu, vkbd, mymfa, notifications,
session, index, voice) are built into the binary, and a file with the same name replaces them.
return {
name = "VPN", description = "VPN state", interval = 5, anchor = "top-right",
options = { interface = "wg0" }, -- default values of the options
render = function(o) -- text, or a rich table:
return { icon = "network-vpn-symbolic", tooltip = "VPN up", state = "active" }
end, -- state: normal, active, warning, critical, hidden
on_click = function(o) end,
on_scroll = function(o, dir) end, -- +1 / -1
menu = function(o) return { { header = "VPN" }, { label = "Disconnect", action = function() end } } end,
}A long task can return progress (a number from 0 to 1): the bar draws a
thin gauge in the module, in its state colour, before the text (the updates
plugin uses it during an update, option detaille).
A count can return badge (an integer): the bar shows it as an oval on the
module, like unread notifications, “99+” past 99; 0 or nothing, no oval (the
updates plugin puts the number of pending packages there).
A menu entry can also be a text field: { input = "Password", label = "Wi-Fi “Home”", secret = true, action = function(text) … end }. Enter
calls the action with the typed text, then the menu closes; secret masks the input,
which is wiped from hyprdesk's memory as soon as it is sent. An entry { image = "/path.png" }
(or file:///…) shows an image, an album cover for instance: only a local file,
nothing is downloaded.
The same plugin works on the desktop and in the bar (hd.bar({ right = { "vpn" } })).
Available helpers: hd.exec (output of a command, time-bounded) and
hd.spawn (launch through Hyprland); hd.exe is the path of the running
hyprdesk, to call it without relying on PATH (hd.spawn(hd.exe .. " lock")). The Lua runs on a dedicated thread,
with a time budget per call. A failing plugin is flagged in the
settings without blocking the others.
A render called every few seconds should not launch processes: for system
state, hyprdesk keeps snapshots up to date over D-Bus (signals, no polling),
read instantly. hd.network() (NetworkManager: state, Wi-Fi enabled, active
connections with SSID and signal strength), hd.bluetooth() (BlueZ: adapter
powered, paired or connected devices, battery), hd.power_profile() (active
and offered power profiles), hd.phones() (KDE Connect on the session bus:
paired and reachable phones, battery, plugins) return nil when the service is unreachable: the
plugin then falls back to hd.exec. Alongside them, hd.batteries()
(/sys/class/power_supply), hd.gpus() (NVIDIA GPUs that switch between
vfio-pci and nvidia, read from sysfs; gpu widget), hd.index_status() (file index daemon, nil
when stopped) and hd.notifications() (nil when a daemon other than
hyprdesk shows notifications). The fields are described in
hyprdesk.meta.en.lua; the built-in widgets network, bluetooth,
battery, notifications and index use them, and keep nmcli or
bluetoothctl for their menu actions.
Bar modules are widgets placed in a zone (left,
center, right) of hd.bar, with in_bar = true. Some are specific to
the bar and are not widgets: menus (the shell menus), workspaces, window, volume, brightness (backlight, or external screens through DDC/CI), tray,
desktop. hd.bar({ monitor = "primary" }) shows the bar on the primary
screen.
The bar adapts to each screen:
-
Compact mode (
compact = "auto" | "always" | "never",autoby default): on a screen narrower than 1600 px or in portrait, the window title is shortened, the clock is reduced to the time, and icons lose their label (volume, plugins). -
Modules for vertical screens (
portrait = { left, center, right }): they can also be set in Bar → Modules → Vertical screens. -
Style (
style = "continuity" | "graphite" | "island" | "convex"): a complete bar per style, one rendering module insrc/ui/plugins/bar/style/.continuite(default) is the smoked glass with a gliding capsule;graphiteis a machined neutral acrylic slab — a rounded block floating above the screen edge, modules engraved into the surface, the active workspace raised — and enforces its relief keys (the workspace selector only applies to Continuité). Picking a style also applies its layout (Graphite: window title left, workspaces centered, network/battery/volume + short clock + one settings panel right) and its geometry (bottom, 40 px, 10 px margin) — in Settings, through the CLI (bar.style), and inhd.barwhen no zone is written. Fields and zones adjusted afterwards stay authoritative. -
Margin (
margin = 0..32, 0 by default in Continuité): distance between the bar and the screen edge; the reserved area accounts for it.
Each zone is clipped: even when too long, they no longer overlap.
The dock used to be a part of the desktop, then of the Launcher package. It
is now a standalone widget, with its own package (dock); the
application launcher its button opens is the launcher package:
-
Role. It is the dock at the bottom center, with the open windows followed
by the ⚙ button. It is the only control in
launcher-onlymode, where tiled windows leave room for it (per-screengaps_outrule). -
Windows shown (
running_apps):-
off: only the settings button; -
workspace: the windows of the displayed workspace; -
all: all windows, including those set aside, so they can be called back.
-
-
Grouping (
launcher_group):-
none: one entry per window; -
app: one entry per application, that is, per window class, hence per binary. Dots show the number of windows, and a click focuses the most recently used one; -
workspace: windows grouped under their workspace number.
-
-
Golden rule. Using it never changes the desktop mode:
- in
launcher-only, a click focuses the window; - in
full-desktop, the chosen window comes back alone on top of the desktop, and the others stay set aside; - ⚙ opens the settings in their own layer.
- in
| Mode | Windows | Visible | Shortcut |
|---|---|---|---|
no-desktop |
normal | wallpaper | SUPER + CTRL + D |
launcher-only |
in place, clear the launcher | launcher | SUPER + ALT + D |
full-desktop |
set aside (special:hyprdesk) |
icons, widgets, launcher | SUPER + D |
The current mode's shortcut returns to no-desktop. The bar's Desktop button
cycles from one mode to the next: no-desktop → launcher-only → full-desktop.
Neither the launcher nor the settings change the mode.
The Plugins package shows everything that is installed:
-
Built-in packages. Each one has a switch. Turning a package off
(
disabled_plugins, orhyprdesk config set plugin.bar off) removes it from the navigation and disables its feature: no bar, no launcher, no workspace rules, no icons or widgets on the desktop, plain background, no new-screen notice; Panorama off: no surface nor strip-screen offer, playback (video, radio) stopped,hyprdesk panorama …commands ignored, and LYRA voice stops listening — unless thevoicebar module is placed, which shows and drives it without the Panorama.Config::plugin_on(id)is the only check, placed at the point where each feature acts. Desktop, Modules, Theme and Plugins form the core and always stay enabled (CORE_PLUGINS). -
Lua plugins. Each one shows whether it is active and where it comes from:
built-in, shipped, or third-party (with its path). A third-party plugin is
installed from a
.luafile, aninit.luafolder or a git repository (https:// or ssh only;#<commit>at the end of the URL pins a revision), into~/.config/hypr/hyprdesk/widgets/. It first goes into quarantine (widgets::plugins::fetch, outside the plugin folders: nothing is loaded); the review card shows the source, the commit, the SHA-256 and the start of the code, and installation only happens after consent (widgets::plugins::confirm).third_party_plugins = falsein/etc/hyprdesk/policy.tomlforbids it on the machine. Removing it moves it to.retired/, from where it can be restored. -
Configure. A plugin that declares
optionshas a "Configure" button: each option is set there (a switch for a boolean, a field for a number or text). The setting goes tohd.config({ plugin_options = { <plugin> = { <option> = <value> } } })and applies to every instance of the plugin, except options written on the instance itself. "Plugin defaults" goes back to the default values. For theupdatesplugin, the check and update commands of each source are shown and can be changed (hd.config({ update_commands = { aur = { upgrade = "…" } } })).
A third-party compiled package cannot be hot-loaded. Third-party extensions
therefore go through Lua plugins, or through a contribution to the BUILTIN
registry.
The launcher has one surface per screen, on Hyprland's Top layer, above
the windows. Its exclusive zone (like the bar's) makes windows
leave room for it, without any margin rule. Tooltips and the window list of a
grouped application open in a bubble, itself a surface
(Overlay) placed at the cursor. A 250 ms delay leaves time to move from the
launcher to the bubble. Settings: edge (bottom, top, left, right),
size, pinned applications, assistant and settings buttons.
The assistant package opens LYRA (hyprpanel-chat, repository
mindlog.hyprland_tools). LYRA works with the subscription chosen for the ai
role (Claude Code, Codex, Zcode). hyprdesk provides its environment:
-
hyprdesk context: modes and shortcuts, packages, default applications, launcher, workspaces, bar, widgets, files, commands; - the same text in
~/.config/hyprpanel/context.d/hyprdesk.md, kept up to date on every configuration change.
Contract expected on LYRA's side, detected in its --help:
-
--provider <zcode|claude_code|codex>: the session's provider; - reading the files in
~/.config/hyprpanel/context.d/*.md, added to the context (without replacing LYRA's role).
As long as LYRA does not offer them, it keeps its own provider choice,
and the context waits in context.d.
When LYRA offers hyprpanel-chat serve (seen in its --help) and the
assistant opens “in its own window”, hyprdesk draws the
conversation itself in a drawer styled like Settings (same layer, header,
cards, Esc); LYRA keeps the whole engine: providers, tools,
confirmations, memory, scope, context.d. Only one drawer at a time.
Without serve, LYRA opens in its own window, placed like the drawer.
The engine is a child process, started on opening and stopped on
closing. It talks in JSON Lines (one object per line, distinguished by
type; unknown fields ignored) — code: src/chat.rs, view: src/ui/chat.rs.
| Direction | type |
Fields |
|---|---|---|
| → LYRA | hello |
client, protocol (1), language
|
| → LYRA | message |
id, text, attachments [{path}] |
| → LYRA | confirm |
request, accept
|
| → LYRA | choice |
request, value
|
| → LYRA |
cancel, new_conversation
|
— |
| → LYRA | provider |
value |
| ← LYRA | ready |
protocol, provider, providers, fs
|
| ← LYRA |
turn_start / turn_end
|
id (+ full text at the end) |
| ← LYRA | delta |
text (Markdown, streamed) |
| ← LYRA |
thinking / progress
|
active / phase, fraction
|
| ← LYRA | tool |
id, name, summary, status (running, done, error), result
|
| ← LYRA | confirm_request |
id, command, reason, risk (low, high) |
| ← LYRA | choice_request |
id, kind, prompt, options [{label, value, preview}] |
| ← LYRA | error |
message, fatal
|
A confirmation is never accepted by default: it waits for the click.
To try it without LYRA: HYPRDESK_CHAT_ENGINE="hyprdesk chat-mock" in
the daemon's environment (fake engine: streamed text, one tool, a
confirmation if the message mentions “gaps”, a choice if it mentions
“couleur” (French for “color”).
hyprdesk export [file] [--theme] and hyprdesk import <archive> [--theme] [--dry-run] [--screens] [--trust-code], or the Sharing package, which
offers two scopes: the entire setup, or the theme only.
-
The archive (entire setup) holds everything hyprdesk and Hyprland keep (MLG-203), with a
manifest.json:-
hyprdesk.lua,settings.lua, third-party plugins, “Custom themes” (hyprdesk/themes/), screen calibrations (hyprdesk/calibration/); -
hypr/:hyprland.luaand every localrequireit loads. Requires are followed step by step in the text, without running anything. This coversbinds.lua,inputs.lua,monitors.lua,autostart.lua, the generated files and your own. The files of the folder they reference are included too (~/.config/hypr/scripts/…); -
state/layout.toml: icon positions, desktop mode of each workspace; - the wallpaper images (
wallpapers/) and the other files referenced by path in the settings (files/: icons, lock screen image, SmartUI icon theme…).
AI services and their keys, passwords, light pairing and system settings (sound, network, login) are not included.
-
-
On import:
- the imported configuration is checked before any change: the check
(
--dry-run, Check button) compiles the Lua without ever running it; - the archive's Lua is only read in a sandbox (no files, no commands); the theme alone carries no code;
- the entire setup copies
hyprdesk.lua, the plugins and the Hyprland configuration (shortcuts, startup, scripts), which will then run with your rights: the import says so and asks for your consent (--trust-code, or the toggle in the Sharing package); - the Hyprland configuration is written in one go and checked by Hyprland,
which puts it back as it was on error.
monitors.luais applied only with--screens(the “Also apply the screen layout” toggle); - paths under the original home folder are rewritten to yours;
- the state (icon positions, desktop modes) replaces yours;
- AI services from the archive are ignored: yours stay in place;
- the current configuration is backed up into
hyprdesk/backups/; - wallpapers are copied into
~/.local/share/hyprdesk/wallpapers/<archive>/, and their paths rewritten; - plugins, themes, calibrations and referenced files already present are kept (nothing is overwritten).
- the imported configuration is checked before any change: the check
(
A theme (theme.rs) gathers what can be seen: name, colors (text,
surfaces, accent, background without image), wallpapers, effect of each place
(background opacity and Hyprland blur for the bar, menus, launcher and
settings; widget opacity), desktop mode and glass veil, lock screen veil,
blur and image, transitions, font and size, icon theme, theme modules (targets
and options).
-
Export (
--theme, or “Theme only”): the effective theme (settings andhyprdesk.luacombined), written to asettings.luathat contains only the theme, with the images of its wallpapers;manifest.jsoncarrieskind = "theme"and a summary (theme: name, colors). -
Import: only the theme changes; bar, shortcuts, widgets, plugins and
screens stay as they are. A theme archive is always imported this way;
the theme of a full archive can be too, on request (
--theme). A wallpaper that is neither in the archive nor present on the machine is dropped. -
Custom themes: theme archives stored in
hyprdesk/themes/(Theme package: “Save to Custom themes”, one click to apply). Shipped themes (theme::PRESETS) change colors and effects, not the wallpapers.
A scene is an image designed for the whole screen layout.
-
Automatic slicing (
span.rs):hd.wallpaper({ path = …, span = true })(or “Span across all screens”, orwallpaper.span on). The canvas encloses the screens as Hyprland places them (logical positions and sizes); the image covers it, centered, and each screen shows its share. An L-shaped, stacked or offset layout stays continuous; areas of the canvas without a screen are not seen. A slideshow spans the same way. - Resolution: choosing an image that is too small for the targeted screens (or for the whole canvas if it is spanned) shows a non-blocking warning: upscaling factor and recommended size, in physical pixels (Hyprland's scale included).
-
Theme derived from a scene (
theme::create,hyprdesk theme new, or “Create from an image” in the Theme package): colors extracted from the image (surfaces in the hue of the shadows, accent in the dominant vivid hue), spanned scene, translucent and blurred surfaces; stored in Custom themes. The source can be an image, or a pack (folder or.zip) whosemanifest.jsondesignates the master scene (master) and its name (theme): the pack's pre-cut slices are ignored, slicing is done according to the actual screens. -
Lock screen: it shows the whole scene (same image as the desktop),
unless it has its own image (
lock_image). Per-screen slicing on the lock screen will come once the lock screen knows which output carries each surface. -
hyprdesk wallpaper split <image> [folder] [--scale N]writes each screen's share (<screen>.png), for another tool or for checking.
hyprdesk speaks French (source language) or English:
hd.config({ language = "auto" | "fr" | "en" }), Settings → Desktop → Language, or
hyprdesk config set language en. auto follows LC_ALL, LC_MESSAGES then LANG
(French if the language is French, English otherwise). A chosen language also
applies to dates; auto lets dates follow LC_TIME.
The French text is the key (gettext-style): the
locales/en.toml catalog, built into the binary, maps each French text to its
translation. A missing text is shown in French: nothing breaks.
-
Views (Rust):
textcomes fromcrate::i18n(not from iced) in views; it translates any text present in the catalog, literal or computed. Other labels go throughcrate::i18n::tr("…")(radio,.label,text_input,placeholder,label: …fields); a text with placeholders is writtencrate::tr!("Écran {mon}", mon = m). Constants (INFO,TABS, built-in widgets) are translated at display time. -
Command line: messages through
tr!, help texts translated line by line (i18n::tr_lines, columns included). -
Lua plugins:
hd.t("texte")translates,hd.lang()returns"fr"or"en"for a plugin that has its own texts. -
Stay in French: logs, generated files (
settings.lua,monitors.lua), context passed to LYRA. -
Checks:
i18n::tests::catalogue_complet(texts marked insrc/andassets/),registres_traduits(packages, tabs, widgets),aide_traduiteandaide_config_traduite. To complete the catalog:HYPRDESK_I18N_TODO=missing.toml HYPRDESK_I18N_TODO_DIR=<dir> cargo test i18nwrites the missing entries, to be translated and then added tolocales/en.toml.
hyprdesk 0.3.0 · GPL-3.0-or-later · This wiki is generated from the repository by scripts/wiki.sh: suggest changes there.