Ship default config/panels/themes with the app: --init, XDG discovery, build/CI bundling
- tui-wm --init [DIR] writes an embedded default config.toml,
panels/topbar.toml and themes/{dark,light}.toml (default target
~/.config/tui-wm, existing files untouched)
- Config discovery: ./config.toml wins, otherwise ~/.config/tui-wm/
is used (process switches working dir there so panels/themes/saves/
hot-reload all resolve consistently); spawned PTYs still start in
the user's original working directory
- VS Code build tasks copy themes/ into builds/, dist/ sample configs
refreshed with all new keys and the settings gear
- CI release now also uploads tui-wm-config.tar.gz (config + panels +
themes) alongside the binaries
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
64
dist/linux/config.toml
vendored
64
dist/linux/config.toml
vendored
@@ -1,28 +1,84 @@
|
||||
# TUI-WM konfiguration – Linux
|
||||
# Skapad av `tui-wm --init`. Dokumentation: `tui-wm --help` och README.md.
|
||||
# Filen (och panels/teman den pekar på) hot-reloadas när den sparas.
|
||||
|
||||
# Tema — egna teman läggs som TOML-filer i themes/
|
||||
theme = "themes/dark.toml"
|
||||
|
||||
# Skugga under/till höger om fönster
|
||||
shadow = true
|
||||
|
||||
# Scrollback-historik per terminal + scrollbar på högerkanten
|
||||
scrollback_lines = 1000
|
||||
show_scrollbar = true
|
||||
|
||||
# Standardstorlek [bredd, höjd] för nya terminalfönster
|
||||
default_window_size = [82, 26]
|
||||
|
||||
# Standard-shell för nya terminaler. Om inte satt → $SHELL eller /bin/bash.
|
||||
# default_shell = "/bin/fish"
|
||||
|
||||
# Bakgrundsbild (Kitty graphics — kräver Kitty/Ghostty/WezTerm)
|
||||
# background_image = "/sökväg/till/bild.jpg"
|
||||
|
||||
# Bakgrundsfärg för virtuella terminaler ("#RRGGBB", "0"-"255" eller färgnamn)
|
||||
# terminal_bg_color = "#1a1a2e"
|
||||
|
||||
[[panel]]
|
||||
position = "top"
|
||||
file = "panels/topbar.toml"
|
||||
|
||||
# ── Keybinds ──────────────────────────────────────────────────────────────────
|
||||
# ── Keybinds ────────────────────────────────────────────────────────────
|
||||
# scope = "global" → alltid aktiv, även när en terminal har fokus
|
||||
# scope = "wm" → bara aktiv när ingen terminal är fokuserad (default)
|
||||
|
||||
# Öppna Tui-run kommandodialog (global – funkar alltid)
|
||||
[[keybind]]
|
||||
key = "ctrl+space"
|
||||
scope = "global"
|
||||
label = "Öppna kommandodialog"
|
||||
action = { type = "spawn_run_dialog" }
|
||||
|
||||
# Starta ny terminal med Alt+Enter
|
||||
[[keybind]]
|
||||
key = "alt+enter"
|
||||
scope = "global"
|
||||
label = "Ny terminal"
|
||||
action = { type = "spawn_terminal" }
|
||||
|
||||
# Avsluta TUI-WM när skrivbordet är fokuserat
|
||||
[[keybind]]
|
||||
key = "alt+tab"
|
||||
scope = "global"
|
||||
label = "Fönsterväxlare"
|
||||
action = { type = "window_switcher" }
|
||||
|
||||
[[keybind]]
|
||||
key = "alt+w"
|
||||
scope = "global"
|
||||
action = { type = "window_switcher" }
|
||||
|
||||
[[keybind]]
|
||||
key = "alt+left"
|
||||
scope = "global"
|
||||
label = "Fäst vänster"
|
||||
action = { type = "snap_left" }
|
||||
|
||||
[[keybind]]
|
||||
key = "alt+right"
|
||||
scope = "global"
|
||||
label = "Fäst höger"
|
||||
action = { type = "snap_right" }
|
||||
|
||||
[[keybind]]
|
||||
key = "alt+up"
|
||||
scope = "global"
|
||||
label = "Maximera/återställ"
|
||||
action = { type = "maximize" }
|
||||
|
||||
[[keybind]]
|
||||
key = "alt+c"
|
||||
scope = "global"
|
||||
label = "Copy-mode (sök i historik)"
|
||||
action = { type = "copy_mode" }
|
||||
|
||||
[[keybind]]
|
||||
key = "ctrl+q"
|
||||
scope = "wm"
|
||||
|
||||
10
dist/linux/panels/topbar.toml
vendored
10
dist/linux/panels/topbar.toml
vendored
@@ -1,21 +1,25 @@
|
||||
# Topbar – Linux
|
||||
# Standardpanel för TUI-WM (skapad av `tui-wm --init`)
|
||||
|
||||
[[item]]
|
||||
label = "Terminal"
|
||||
action = { type = "spawn_terminal" }
|
||||
|
||||
# Inbyggda inställningar (tema/panel/skugga/scrollbar)
|
||||
[[item]]
|
||||
label = "≡ Inställningar"
|
||||
action = { type = "spawn_settings" }
|
||||
|
||||
[[item]]
|
||||
label = "Exit"
|
||||
action = { type = "exit" }
|
||||
|
||||
# Klocka – uppdateras varje sekund
|
||||
# Status-widgets (körs periodiskt, visas till höger)
|
||||
[[status]]
|
||||
command = "date '+%H:%M:%S'"
|
||||
interval = 1
|
||||
width = 10
|
||||
align = "right"
|
||||
|
||||
# Datum – uppdateras varje minut
|
||||
[[status]]
|
||||
command = "date '+%Y-%m-%d'"
|
||||
interval = 60
|
||||
|
||||
Reference in New Issue
Block a user