lios 0.1.1

A customizable GTK/VTE Linux terminal emulator written in Rust.
# Lios

Customizable Rust GTK/VTE terminal emulator scaffolded from the initial Xfce Terminal-style reference in `../KnottTerminalRef`.

## Current Scope

- GTK4 window with a VTE terminal widget.
- Spawns the user's `$SHELL`, with common Unix shell fallbacks.
- Optional `-- COMMAND ...` and `--command "..."` launch modes.
- Reference-aligned defaults: black background, white foreground, Xfce palette, `Monospace 12`, block cursor, 1,000 lines of scrollback.
- Built-in themes: `xfce`, `xterm`, `solarized-dark`, `solarized-light`, `dark-pastels`, `green-on-black`, `black-on-white`, `white-on-black`.
- Background image support with image opacity, terminal background opacity, fixed color tint, or per-launch random accent tint.
- Renderer selection: `auto`, `gl`, `vulkan`, or `cairo` through `GSK_RENDERER` before GTK starts.
- Optional window decoration/topbar removal.
- Slim topbar with a collapsible in-window preferences drawer for common live theme/background changes.
- Terminal-driven config commands for theming from a shell or script.
- Clipboard/context actions for copy, copy as HTML, paste, select all.
- Keyboard shortcuts for `Ctrl+Shift+C`, `Ctrl+Shift+V`, `Ctrl+Shift+A`, `Ctrl+Shift+,`, `Ctrl++`, `Ctrl+-`, and `Ctrl+0`.

## System Dependencies

Install Rust plus GTK4/VTE development packages.

Debian/Ubuntu names:

```sh
sudo apt install pkg-config libgtk-4-dev libvte-2.91-gtk4-dev
```

Arch names:

```sh
sudo pacman -S rust pkgconf gtk4 vte4
```

## Run

```sh
cargo run
cargo run -- --working-directory "$HOME"
cargo run -- -- htop
cargo run -- --command "ls -la"
cargo run -- --theme solarized-dark
cargo run -- --renderer gl
cargo run -- --background-image ~/Pictures/wallpaper.jpg --background-opacity 0.72 --random-overlay
cargo run -- --hide-titlebar
cargo run -- config init
cargo run -- config set theme solarized-dark
cargo run -- config set renderer gl
cargo run -- config set background.image ~/Pictures/wallpaper.jpg
cargo run -- config set topbar false
```

## Configuration

Lios reads `~/.config/lios/config.toml` by default when it exists. Use `--config path/to/config.toml` to load another file.

```toml
[window]
title = "Lios"
width = 960
height = 640
decorated = true # set false to remove the topbar/window decorations
renderer = "auto" # auto, gl, vulkan, cairo

[terminal]
font = "Monospace 12"
scrollback_lines = 1000

[theme]
name = "dark-pastels"
# Optional custom overrides:
# foreground = "#f8fafc"
# background = "#020617"
# cursor = "#a78bfa"
# palette = ["#000000", "#aa0000", "#00aa00", "#aa5500", "#0000aa", "#aa00aa", "#00aaaa", "#aaaaaa", "#555555", "#ff5555", "#55ff55", "#ffff55", "#5555ff", "#ff55ff", "#55ffff", "#ffffff"]

[background]
image = "/home/you/Pictures/wallpaper.jpg"
image_opacity = 0.70
terminal_opacity = 0.78
overlay_color = "#7c3aed"
overlay_opacity = 0.18
random_overlay = false
```

CLI flags override the config file for one run.

The default topbar includes a `Customize` button when `decorated = true`. It opens a collapsible in-window drawer rather than a separate dialog. `Ctrl+Shift+,` toggles the same drawer, which is useful when the topbar is hidden. The drawer can change renderer, theme, font, background image path, image opacity, terminal opacity, overlay color, overlay opacity, random overlay, and topbar visibility. Theme/background/font changes apply live; renderer changes are saved and apply on the next launch. Changes are written back to `~/.config/lios/config.toml` when a config path is available.

Terminal config commands:

```sh
lios config path
lios config sample
lios config init
lios config init --force
lios config show
lios config set renderer gl
lios config set theme solarized-dark
lios config set background_opacity 0.80
lios config set overlay_color '#7c3aed'
lios config set overlay_opacity 0.18
lios config set random_overlay true
lios config set topbar false
```

Useful keys include `renderer`, `theme`, `font`, `background.image`, `background_opacity`, `background_image_opacity`, `overlay_color`, `overlay_opacity`, `random_overlay`, and `topbar`.

## Publish

The Cargo package is currently named `lios` and has crates.io metadata. The crates.io index currently reports `lios = "0.1.0"`, so publish under this exact name only if you control that crate; otherwise rename the package before a real publish. Also decide whether to keep the current `MIT OR Apache-2.0` license.

```sh
cargo publish --dry-run
cargo publish
```