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>
This commit is contained in:
2026-07-16 00:30:56 +02:00
parent 3db0c82e03
commit 9d637a9378
14 changed files with 625 additions and 14 deletions

View File

@@ -22,6 +22,12 @@ background_image = "/home/brasse/Bilder/backrunder/pexels-veeterzy-38136.jpg"
# 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"
@@ -94,6 +100,13 @@ 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]]