Files
TUI-WM/config.toml
Bjorn Blomberg 9d637a9378 Screenshot feature (text + PNG) and keybind editor tab in settings
- New screenshot action (default alt+p, bindable like any action):
  renders the current workspace to a buffer and saves it as plain text
  and/or PNG (screenshot_format = text|png|both, screenshot_dir
  configurable, default skärmbilder/ under the config dir). The PNG is
  rasterized cell by cell with an embedded DejaVu Sans Mono font
  (vendored, ~340 kB); glyphs missing from the font (color emoji)
  render as filled boxes. A popup confirms the saved paths
- Settings dialog gains a 'Tangenter' row: lists all keybinds with
  label and scope, Enter captures the next keypress as the new chord
  (persisted by rewriting [[keybind]] via toml_edit), Delete removes
  a binding — changes take effect immediately
- Integration suite: 48/48 (screenshot files + validity, keybind list,
  live rebind ctrl+space→alt+z)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 00:30:56 +02:00

124 lines
3.5 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TUI-WM konfiguration
# Bakgrundsbild (Kitty graphics protocol — kräver Kitty/Ghostty/WezTerm)
background_image = "/home/brasse/Bilder/backrunder/pexels-veeterzy-38136.jpg"
# Bakgrundsfärg för virtuella terminaler.
# Om inte satt → genomskinlig (bakgrundsbild syns igenom).
# Stödjer: "#RRGGBB", "0"-"255" (indexed), färgnamn (black, red, etc.)
# terminal_bg_color = "#1a1a2e"
# Standard-shell för nya terminaler. Om inte satt → $SHELL eller /bin/bash.
# default_shell = "/bin/fish"
# Antal raders scrollback-historik per virtuell terminal (default: 1000).
# Scrolla med mushjulet i fönster vars app inte själv fångar musen;
# tangenttryck hoppar tillbaka till botten.
# scrollback_lines = 1000
# Visa scrollbar på terminalfönstrens högerkant när historik finns (default: true)
# show_scrollbar = true
# Standardstorlek [bredd, höjd] för nya terminalfönster (default: [82, 26])
# default_window_size = [82, 26]
# Skärmbilder: katalog (relativ = under konfig-katalogen) och format
# ("text", "png" eller "both").
# screenshot_dir = "skärmbilder"
# screenshot_format = "both"
[[panel]]
position = "top"
file = "panels/topbar.toml"
# ── 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" }
# Fönsterväxlare (MRU-ordning). alt+w är primär — alt+tab fångas ofta
# av skrivbordsmiljön och alt+pilar av vissa terminaler; bokstavs-binds
# fungerar överallt. (I terminaler med kitty keyboard-protokoll
# levereras även alt+tab/pilar korrekt.)
[[keybind]]
key = "alt+w"
scope = "global"
label = "Fönsterväxlare"
action = { type = "window_switcher" }
[[keybind]]
key = "alt+tab"
scope = "global"
action = { type = "window_switcher" }
# Fäst fokuserat fönster som vänster/höger halvskärm
[[keybind]]
key = "alt+h"
scope = "global"
label = "Fäst vänster"
action = { type = "snap_left" }
[[keybind]]
key = "alt+left"
scope = "global"
action = { type = "snap_left" }
[[keybind]]
key = "alt+l"
scope = "global"
label = "Fäst höger"
action = { type = "snap_right" }
[[keybind]]
key = "alt+right"
scope = "global"
action = { type = "snap_right" }
# Maximera/återställ fokuserat fönster (även dubbelklick på titelraden)
[[keybind]]
key = "alt+m"
scope = "global"
label = "Maximera/återställ"
action = { type = "maximize" }
[[keybind]]
key = "alt+up"
scope = "global"
action = { type = "maximize" }
# Skärmbild av arbetsytan (sparas som text + PNG i skärmbilder/)
[[keybind]]
key = "alt+p"
scope = "global"
label = "Skärmbild"
action = { type = "screenshot" }
# Copy-mode: bläddra/söka i fokuserat fönsters historik med tangentbordet
# (↑↓/PgUp/PgDn bläddrar, / söker, n/N hoppar mellan träffar, q stänger)
[[keybind]]
key = "alt+c"
scope = "global"
label = "Copy-mode (sök i historik)"
action = { type = "copy_mode" }
# Avsluta TUI-WM när skrivbordet är fokuserat
[[keybind]]
key = "ctrl+q"
scope = "wm"
label = "Avsluta TUI-WM"
action = { type = "exit" }