Skip to content

About

Enhanced omarchy SDDM theme

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

omarchy-sddm

The stock Omarchy SDDM login theme, with a session selector added. Installs as a separate theme called omarchy-plus.

Omarchy's theme is deliberately minimal — a logo, a lock icon and a password box — and it has no way to choose which compositor or session you log into. It picks one silently. This project keeps that appearance and adds the controls that the other stock SDDM themes (maldives, maya, elarun) have.

Design: does not touch the stock theme

The stock omarchy theme is left completely untouched. This installs alongside it and points SDDM at the new one via a single drop-in:

/usr/share/sddm/themes/omarchy-plus/     the theme
/etc/sddm.conf.d/zz-omarchy-plus.conf    [Theme] Current=omarchy-plus

Reverting is removing that one file, or make uninstall. There is no backup directory and nothing to restore, because nothing was overwritten.

The drop-in is named zz-… so it sorts after the omarchy-settings files (10-theme.conf, 99-omarchy-login.conf), which also set Current=. SDDM reads /etc/sddm.conf.d/*.conf in lexical order and later files win.

Artwork (logo.png, lock.png, entry.png, bullet.png, and the -failed variants) is symlinked from the stock theme rather than copied. Those files are regenerated by omarchy-plymouth-set when you change desktop theme, and symlinks mean this theme follows those colour changes instead of going stale.

What it adds

  • Session selector — top right, small font, following the convention of the stock maya theme. Lists every session SDDM knows about, Wayland and X11 alike. Honours SDDM's RememberLastSession, so your choice sticks; falls back to the uwsm session when there is nothing remembered.
  • Username field — editable and prefilled with the last user, matching the maldives and elarun convention. Without it there is no way to log in as an account other than the remembered one.
  • User switching — only shown when the machine has more than one account
  • Power actions — shutdown and reboot always shown; suspend and hibernate only when the greeter reports them available (matching elarun, which gates only those two)
  • Clock top left, caps-lock warning, status/error line
  • Keyboard navigation throughout, and RTL layout mirroring

Not included

  • Keyboard layout selector. SDDM's stock LayoutBox draws its own chrome — a blue focus highlight and a white arrow button — that no property can override, so it never matched this theme's entry.png fields. With a single layout configured it also had nothing to offer. Re-add it in Main.qml if you ever set multiple layouts in ~/.config/hypr/input.lua.

Targets

Target What it does
make preview Runs the theme in SDDM's greeter test mode. Stages a throwaway copy in /tmp; nothing is installed.
make install Installs /usr/share/sddm/themes/omarchy-plus and writes the Current= drop-in. Stock theme untouched.
make install-no-auto-login Comments out User= and Session= in /etc/sddm.conf.d/autologin.conf if not already commented, backing it up to autologin.conf.orig. Without this you never see the greeter — Omarchy enables autologin on encrypted installs.
make uninstall Removes the theme directory and the drop-in; SDDM falls back to the stock theme.
make install-autorotate Stops the login screen coming up rotated on a 2-in-1. Vars: ORIENT= (default normal), OUTPUT= (default eDP-1). Independent of make install.
make uninstall-autorotate Removes that; the greeter compositor goes back to the stock config.
make status Reports whether the theme is installed, whether the drop-in is present, whether autologin is on, and the state of the autorotate hook.

install, install-no-auto-login and install-autorotate need root; they re-run themselves under sudo and explain what they are doing as they go.

A typical first run:

make install
make install-no-auto-login

Upright login screen on a 2-in-1 (make install-autorotate)

On a convertible whose panel is mounted 90° round, the session comes out right because ~/.config/hypr/ applies the orientation — but the login screen is rotated, because SDDM's Wayland greeter runs its own Hyprland as the sddm user, with a config of its own and no monitor rules in it.

That config is the only place the rotation can be applied from, so this is a separate mechanism from the theme entirely. A rotate button in the theme is not possible: the greeter's QML cannot execute anything, so it could never call hyprctl — SddmComponents is loose .qml files with no compiled plugin, and no QML module on the system exposes process execution. The compositor config is also the only start-up hook available, since SDDM's scripts/ directory is X11-Xsetup plumbing and its Wayland SessionCommand is for the logged-in session, not the greeter.

So this installs a greeter config of its own and points SDDM at it:

/usr/share/sddm/omarchy-plus/hyprland.lua        greeter compositor config
/usr/share/sddm/omarchy-plus/autorotate          accelerometer watcher
/etc/sddm.conf.d/zz-omarchy-plus-wayland.conf    [Wayland] CompositorCommand=

Neither the theme nor the package-owned /usr/share/sddm/hyprland.lua is touched. Ours dofiles the package file, so its misc/animations settings keep applying and omarchy-settings upgrades to it keep taking effect. Reverting is removing the drop-in, or make uninstall-autorotate.

make install and make uninstall do not touch any of this — the two features are independent.

Orientations

ORIENT= takes the same words monitor-sensor prints, mapped to the transform value hyprctl monitors reports:

ORIENT= transform rotation
normal 0 0°
left-up 1 90°
bottom-up 2 180°
right-up 3 270°

The fixed orientation is applied at greeter start-up, so the login screen is upright even with no sensor daemon — and being stored in the config, that value is also the "remembered" orientation. If the screen comes up the wrong way, use the other 90° value; if it is upside down, use bottom-up.

Automatic rotation

To have the greeter follow the accelerometer as well, iio-sensor-proxy is needed, and it is not installed by default:

sudo pacman -S iio-sensor-proxy

With it present the watcher pipes monitor-sensor and drives the rotation through hyprctl eval "rotate(N)" — the same mechanism, and the same orientation mapping, as ~/bin/autorotate uses in a session. hyprctl eval runs in the same Lua state the config was loaded into, which is why rotate() is defined as a global in it. Without the package the watcher exits at once and only the fixed orientation applies.

Only the internal panel

Rotation is applied to eDP*, DSI* or LVDS* — or the exact OUTPUT= you name — and never to HDMI-* or DP-*, so a docked machine cannot have its external monitor rotated at the login screen. If your panel is named something else, nothing will move; use OUTPUT=auto or the real name.

Checking it

make status reports the state of the hook, including the one genuinely dangerous case: an override present but its config missing, which would stop the greeter starting at all. Both scripts validate the rendered config with luac -p and hyprland --verify-config before installing anything.

To see what would be installed, without installing or needing root:

./install-autorotate.sh --dry-run --orient left-up

None of this is exercised by make preview, which runs the greeter inside your own session and so never starts the greeter's compositor. The real check is to log out. From a TTY while the login screen is up (Ctrl+Alt+F3):

sudo -u sddm env XDG_RUNTIME_DIR=/run/sddm hyprctl monitors -j

Run it as sddm, not root — Hyprland's IPC socket is UID-checked.

If the greeter ever fails to appear, undo it from a TTY:

sudo rm /etc/sddm.conf.d/zz-omarchy-plus-wayland.conf && sudo systemctl restart sddm

Notes on SDDM 0.21

Found the hard way while building this, and worth knowing before editing the QML:

  • Qt.DisplayRole is not implemented on sessionModel — it returns undefined. The real roles are Qt.UserRole + N: +1 dir, +2 file, +3 type (1 = X11, 2 = Wayland), +4 name, +5 exec, +6 comment. A delegate can use model.name, but a plain binding must go through sessionModel.data(index, Qt.UserRole + 4).
  • Because of that, the stock theme's uwsm-preference scan never actually matched anything — it read DisplayRole, got undefined, fell back to "", and so always returned sessionModel.lastIndex.
  • A function declared inside a QML Item is not visible to its children's property bindings (ReferenceError: ... is not defined). Use a property binding instead.
  • Reading a model via rowCount()/data() creates no binding dependency — those are method calls. Bind against a Repeater's count instead. A hidden ListView does not work for this: with no viewport it never instantiates items, so its count stays 0.
  • In --test-mode, sddm.canPowerOff / canReboot / canSuspend / canHibernate are all false, and userModel.lastUser and sddm.hostName are empty strings. None of that reflects a real greeter.

Caveat

omarchy-refresh-sddm rewrites themes/omarchy, not themes/omarchy-plus, so this install survives it — but a desktop theme change will not recolour this theme's Main.qml background. The two literals #1a1b26 and #ffffff are what omarchy-plymouth-set rewrites, so edit those by hand if you want the background to track your desktop theme.

Layout

Main.qml                 the theme (the only modified stock file)
theme.conf               stock, kept for completeness
metadata.desktop         stock, with an updated name and description
install.sh               installs as omarchy-plus, writes the Current= drop-in
uninstall.sh             removes both
disable-autologin.sh     comments out autologin
preview.sh               greeter test-mode preview, installs nothing
autorotate.lua.in        greeter compositor config template (rotation + watcher)
autorotate-watch.sh      accelerometer watcher, installed as the greeter's autorotate
install-autorotate.sh    installs the above, plus the [Wayland] override drop-in
uninstall-autorotate.sh  removes them
Makefile                 the targets above

About

Enhanced omarchy SDDM theme

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages