Skip to content

Appearance settings#26

Merged
am-will merged 5 commits into
am-will:mainfrom
turbineBMW:appearance-settings
Apr 1, 2026
Merged

Appearance settings#26
am-will merged 5 commits into
am-will:mainfrom
turbineBMW:appearance-settings

Conversation

@turbineBMW
Copy link
Copy Markdown
Contributor

Summary

This PR adds appearance settings for GTK and Ghostty settings, configured separately. To find an appropriate spot for these settings, I created a settings icon at the top right, added a new settings page, and pulled keybindings in as a tab. I also moved settings out of the panes and into its own window so does not get lost in unfocused workspaces.

  • persists GTK color scheme, Ghostty color scheme, and hover terminal focus in settings.json
  • Applies GTK and Ghostty appearance changes live, including keeping terminal surfaces in sync with explicit or system-selected themes
  • Uses local GSettings immediately, then reads the portal asynchronously with a bounded timeout instead of blocking the UI thread
  • Makes app settings writes atomic, preserves unrelated top-level keys, and backs up malformed existing config before rewriting a valid file
  • Defaults new first-run configs to dark for both GTK and Ghostty appearance settings, as I feel this will be the default preference of most users
  • adds Ghostty config reload/update plumbing through the FFI bindings

Testing

  • cargo test -p limux-host-linux

Demo

Recording_2026-03-28_18-42-18.mp4

Attached video shows:

  • opening the new Settings dialog
  • switching GTK and Ghostty between System, Dark, and Light
  • live updates across the app and terminal surfaces

@am-will
Copy link
Copy Markdown
Owner

am-will commented Apr 1, 2026

Taking a look thanks!

turbineBMW and others added 5 commits April 1, 2026 00:56
  Introduce a modal settings window with General and Keybindings pages
  instead of restoring settings as a pane tab.

  Add app settings persistence for:
  - GTK color scheme
  - Ghostty color scheme
  - hover-to-focus terminal behavior

  Apply appearance changes live through libadwaita, keep Ghostty surfaces
  in sync with the selected scheme, and watch system theme changes through
  the portal/GSettings when the user chooses the system option.

  Refresh the pane, sidebar, and keybind editor styling to use theme-aware
  colors so the UI follows the selected appearance consistently.

  Also handle Ghostty config reload actions through the FFI bindings and
  make terminal hover-focus read from the current app config at runtime.
… to None

  instead of forcing light mode, so Ghostty’s “System” setting can fall back to
  the resolved GTK/libadwaita theme instead of getting pinned to light.

  In rust/limux-host-linux/src/app_config.rs:160, settings saves now refuse to
  overwrite malformed existing JSON, preserve unrelated top-level keys, and write
  atomically through a temp file + rename rather than writing in place.
… longer

  does a blocking portal read on the UI thread. Limux now boots using local
  GSettings state first, then creates the portal proxy asynchronously and reads
  org.freedesktop.appearance with a bounded timeout in rust/limux-host-linux/src/
  window.rs:1588. Portal change signals also stop doing synchronous re-reads.

  The settings persistence path in rust/limux-host-linux/src/app_config.rs:161
  now returns real save errors instead of only printing them, and malformed
  settings.json is recovered by backing it up and rewriting a fresh valid config
  in rust/limux-host-linux/src/app_config.rs:190. I also changed the settings
  callback flow in rust/limux-host-linux/src/settings_editor.rs:50, rust/limux-
  host-linux/src/pane.rs:157, and rust/limux-host-linux/src/window.rs:2845 so a
  failed save shows an alert and rolls the live config/theme back.
…s dark in rust/limux-host-linux/src/

  app_config.rs. Specifically, when settings.json does not exist yet, Limux now creates:

  "appearance": {
    "color_scheme": "dark",
    "ghostty_color_scheme": "dark"
  }
Co-authored-by: Codex <noreply@openai.com>
@am-will am-will force-pushed the appearance-settings branch from 64b4c95 to db53d10 Compare April 1, 2026 07:05
@am-will am-will merged commit 3186578 into am-will:main Apr 1, 2026
am-will added a commit that referenced this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants