|
|
1 місяць тому | |
|---|---|---|
| data | 1 місяць тому | |
| resources | 1 місяць тому | |
| src | 1 місяць тому | |
| .gitignore | 1 місяць тому | |
| Cargo.lock | 1 місяць тому | |
| Cargo.toml | 1 місяць тому | |
| LICENSE | 1 місяць тому | |
| LICENSE-Smithay.txt | 1 місяць тому | |
| Makefile | 1 місяць тому | |
| README.md | 1 місяць тому | |
| config.example.toml | 1 місяць тому |
A small Wayland compositor with a fullscreen, searchable application overview.
Compositron is built on Smithay and draws its overview directly in the compositor (tiny-skia and cosmic-text), so the launcher is not a separate Wayland client.
.desktop files (including Flatpak exports).--winit backend for development inside an existing Wayland session.output_scale for DRM outputs.A Wayland-capable Linux system with EGL/GBM, libinput, libseat, and Mesa. On Arch Linux:
sudo pacman -S --needed base-devel rust pkgconf wayland mesa libinput libseat gbm
make build
Development, nested in your current GNOME/Wayland session:
make run
This opens Compositron in a normal window and does not take over the seat or display. The nested window needs keyboard focus. If it appears on the screen but the first frame is missing, click inside it once; this is a winit/nested-backend quirk.
GNOME consumes Super and Alt+Tab, so they do not reach a nested compositor.
Compositron opens with the overview visible in --winit mode; after closing
it, use Ctrl+Alt+Space or Ctrl+Alt+O to reopen it. GNOME-safe window
shortcuts are Ctrl+Shift+Left/Right (snap), Ctrl+Shift+Up/Down
(maximize/restore), Ctrl+Shift+1…6 (workspace), and
Ctrl+Shift+Alt+1…6 (move window to workspace). Mouse dragging and resizing
also work normally.
Real session from a TTY:
dbus-run-session -- ./target/release/compositron
Or install it as a session so GDM/SDDM can start it:
make build
sudo make install
This installs /usr/local/bin/compositron and
/usr/share/wayland-sessions/compositron.desktop. Then log out and choose
Compositron in the display manager.
A wallpaper or bar can be provided by any layer-shell client, for example:
swaybg -c '#1b2430'
| Shortcut | Action |
|---|---|
| Super (tap) or Super+Space | Toggle the application overview |
| Ctrl+Alt+Space / Ctrl+Alt+O | Toggle the overview (nested-mode fallback) |
| Type / Backspace / Left / Right | Filter and edit the search query |
| Up / Down / Page Up / Page Down | Move through the app grid |
| Enter | Launch the selected app |
| Escape | Close the overview |
| Wheel | Scroll the app grid |
| Super+1 … Super+6 | Switch to workspace 1–6 |
| Super+Shift+1 … Super+Shift+6 | Move the focused window to that workspace |
| Super+Page Up / Page Down | Previous / next workspace |
| Super+Left / Right | Snap the focused window to the left/right half |
| Super+Up | Maximize the focused window |
| Super+Down | Restore from maximize/fullscreen |
| Super+F | Toggle fullscreen |
| Super+Q | Close the focused window |
| Super+Return | Open the configured terminal |
| Alt+Tab / Alt+Shift+Tab | Cycle windows |
| Ctrl+Alt+Left/Right/Up/Down | Alternative snap/maximize/restore shortcuts |
| Ctrl+Shift+Left/Right | GNOME-safe snap shortcuts |
| Ctrl+Shift+Up/Down | GNOME-safe maximize/restore shortcuts |
| Ctrl+Shift+1 … 6 | GNOME-safe workspace shortcuts |
| Ctrl+Shift+Alt+1 … 6 | GNOME-safe move-window-to-workspace shortcuts |
| Ctrl+Alt+F | Alternative fullscreen shortcut |
| Ctrl+Alt+1 … 6 | Alternative workspace shortcuts |
| Ctrl+Alt+Shift+1 … 6 | Alternative move-window-to-workspace shortcuts |
| Ctrl+Alt+W | Alternative close-window shortcut |
| Ctrl+Alt+Return | Alternative terminal shortcut |
| Ctrl+Alt+Backspace, Super+Shift+Q | Quit the compositor |
A Super tap is detected on release and does not require holding Super. The Ctrl+Alt alternatives exist for environments where Super is grabbed by another compositor during nested development.
Compositron reads ~/.config/compositron/config.toml (or
$XDG_CONFIG_HOME/compositron/config.toml). All keys are optional:
terminal = "kgx"
icon_theme = "Adwaita"
font = "Cantarell"
output_scale = 2.0
output_scale applies to the DRM backend; the nested --winit backend uses
the scale factor reported by GNOME automatically. Scaling is implemented at
both the output/UI level and through the fractional-scale protocol for apps.
See config.example.toml. If no terminal is configured, Compositron tries
foot, alacritty, kgx, kitty, gnome-terminal, xterm, then
weston-terminal. A terminal must support executing a command for launcher
entries with Terminal=true.
.desktop files are rescanned every time the overview opens.NoDisplay, Hidden, TryExec, OnlyShowIn, and
NotShowIn. Duplicate visible names are kept only once.Exec field codes are expanded; gio launch is used as a fallback for
D-Bus-activatable entries.--winit backend is the supported development path.src/
apps.rs XDG desktop-entry catalog, filtering, launching
config.rs Optional TOML configuration
icons.rs Icon theme lookup and rasterization
text.rs cosmic-text rendering into tiny-skia pixmaps
overview/ Overview layout, rendering, input state
workspaces.rs Six spaces and output mapping
shell/ xdg-shell, layer-shell, decorations, grabs
render.rs Output element composition
input_handler.rs Seat input, shortcuts, overview routing
state.rs Global compositor state and protocol handlers
winit.rs, udev.rs Backends
The compositor skeleton is adapted from Smithay's MIT-licensed anvil
reference compositor. See LICENSE-Smithay.txt. Compositron itself is MIT
licensed; see LICENSE.