Skip to content

Latest commit

 

History

History
317 lines (240 loc) · 10.3 KB

File metadata and controls

317 lines (240 loc) · 10.3 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.3.5 - 2026-08-26

Fixed

  • Docs: missing syntax highlighting for all meta commands
  • Docs: missing @ escape table entry in the wks manual

Added

  • @column: A meta command used to group @group's into a single column

  • docs-live make target for live document editing

0.3.4 - 2026-08-13

Fixed

  • Menu flickering when releasing keyboard with +keep keys.

Added

  • Release as a flag: The flicker fix changed the default release behavior. Restore globally with --release or :release.

0.3.3 - 2026-07-23

Fixed

  • Nix: correct libX11 and libXinerama package names

Added

  • Meta command @group: Organize a menu into labeled columns #14.
    @group "Chats" {
        a "Chat A" %{{...}}
        b "Chat B" %{{...}}
    }
    
    @group "Mail" {
        c "Mail C" %{{...}}
    }
    
    • The block is not a submenu - grouped chords still belong to the enclosing scope. A prefix inside a group joins the column, but its own submenu is an independent scope with its own grouping.
    • A submenu must be entirely grouped or entirely ungrouped.
    • Default sort orders columns alphabetically by name and coalesces duplicate names into one column; :unsorted / --unsorted keeps declaration order, coalescing only adjacent duplicates.
    • Grouped scopes size columns as menu width / number of groups and ignore :max-columns / --max-columns.
    • New header color: :fg-header / --fg-header (default #7FB4CA).
    • Header text alignment is a menu-wide setting: :header-align / --header-align (default left; also accepts center or right).
    • Header font: :header-font / --header-font (default: falls back to the menu font).

Changed

  • Generated config.h now defines headerAlign and headerFont. Config headers generated by older wk versions must be regenerated with make from-wks, or manually updated; see MIGRATION.md.

0.3.2 - 2026-05-07

Fixed

  • Wayland: respect wl_output transform (@kurisu-dotto-komu)

Added

  • -c, --center flag and :center macro to center the menu (@kurisu-dotto-komu )

0.3.1 - 2026-01-16

Fixed

  • Wayland: support fractional scaling
  • Wayland: menu now moves to focused monitor on keypress

0.3.0 - 2026-01-05

Added

  • Flag +args: Define positional arguments accessible via interpolations in the form of %($0), %($1), etc.

    # Define arguments per chord in an array
    [
        (a "Alice" +args "alice@example.com")
        (b "Bob" +args "bob@example.com")
    ] "Email %($0)" %{{mailto:%($0)}}
    # 'a' -> mailto:alice@example.com
    # 'b' -> mailto:bob@example.com
    # 'c' -> mailto:(null)
    
    p "+Prefix" +args "outer0" "outer1"
    {
        a "Direct child" +write %{{%($0) %($1)}}
        n "+Nested" +args "inner0"
        {
            # $0 is shadowed, but $1 is still from grandparent
            b "Grandchild" +write %{{%($0) %($1)}}
        }
    }
    # p a -> outer0 outer1
    # p n b -> inner0 outer1
    
  • Key options <a b c ...>: Avoid trigger key collisions via key options <x y z ...>.

    # --------------
    # --- Before ---
    # --------------
    # File chat.wks
    s "Signal" %{{signal}}
    
    # File music.wks
    s "Spotify" %{{spotify}}
    
    # File main.wks
    A "Apps"
    {
        :include "chat.wks"
        :include "music.wks"
    }
    
    # -------------
    # --- After ---
    # -------------
    # File chat.wks
    <s i g> "Signal" %{{signal}}
    
    # File music.wks
    <s p o> "Spotify" %{{spotify}}
    
    # File main.wks
    A "Apps"
    {
        :include "chat.wks"
        :include "music.wks"
    }
    
  • Foreground color @goto: Distinguish @goto chords with a specific foreground color via --fg-goto, or :fg-goto.

Changed

  • Truncation Warning: Previously warned users that menu items would be truncated. Now only shown with --debug as the menu itself shows it has been truncated.

Fixed

0.2.1 - 2025-12-18

Fixed

  • Nix: interactive bash errors 9455f58
  • Parser: Infinite loop on certain syntax errors 982bdfe
  • Runtime: Displaying invisible menu when no key chords defined f0a00b6

0.2.0 - 2025-12-16

This release features a significant internal rewrite with new data structures, an improved configuration system, and several new features. See MIGRATION.md for upgrade instructions from v0.1.x.

Added

  • Meta command @goto: Navigate between menu locations without restarting wk. Useful for creating "hydra" menus with navigation back to parent menus or root.

    w "Window" {
        m "Move" +keep {
            ... "Move to %(index+1)" %{{move-window %(index)}}
            BS "Go back" @goto "w"
            S-BS "Go home" @goto ""
        }
    }
    
  • Menu titles: Display a title above the menu using --title CLI flag, :title preprocessor macro, or +title "..." flag on chords/prefixes. Using +title without an argument sets the title to the chord's description. Includes --title-font and :title-font for separate title styling.

  • Command wrapping: Wrap all commands with a prefix string using --wrap-cmd, :wrap-cmd macro, or +wrap "..." flag. Useful for running commands through wrappers like uwsm-app -- or terminal emulators.

    • +unwrap flag to opt-out of global wrapping on specific chords
    • Wrapper precedence: chord +wrap > inherited +wrap > global :wrap-cmd
  • User variables via :var preprocessor macro for reusable values:

    :var "WORKSPACE_CMD" "hyprctl dispatch workspace"
    [asdfghjkl] "Workspace %(index+1)" %{{%(WORKSPACE_CMD) %(index)}}
    
    • Variables work in descriptions, commands, and preprocessor macro arguments
    • Meta-variables supported (variable names containing other variables)
  • keepDelay setting: Configurable delay (default 75ms) between keyboard ungrab and command execution for +keep chords. Prevents focus-stealing issues with compositor commands. Set via :keep-delay N or --keep-delay N.

  • Table padding: New --table-padding / :table-padding option for additional padding between outermost cells and the border.

  • Shell completions: Zsh and Bash completion scripts in completions/.

  • Nix flake support: Full Nix packaging with flake.nix including:

    • Backend selection: pkgs.wk.override { backend = "x11"; }
    • Build from wks files: pkgs.wk.override { wksFile = ./keychords.wks; }
    • Inline wks content: pkgs.wk.override { wksContent = "..."; }
    • Directory includes: pkgs.wk.override { wksDirs = [./wks/shared]; }
  • Key chord deduplication: When duplicate keys are defined at the same level, the last definition wins (previously caused undefined behavior).

Changed

  • Configuration architecture redesign: Merged key_chords.def.h into config.def.h. The separate key chords header file has been removed. Key chords are now defined as part of the main configuration.

  • Default sorting enabled: Key chords are now sorted by default (matching emacs-which-key behavior). Use --unsorted or :unsorted to disable.

    • Note: Index interpolations (%(index)) are resolved before sorting, so indices reflect parse order, not final display order.
  • Internal data structures: Complete rewrite using arena allocation and new types (Span, Vector, Stack, String, Property). This improves memory management and extensibility but changes the transpiled header format.

  • Man pages: Switched from Org/Pandoc to scdoc for man page generation. scdoc is now an optional build dependency.

  • Foreground colors: Now use designated initializers for clarity:

    static const char* foreground[FOREGROUND_COLOR_LAST] = {
        [FOREGROUND_COLOR_KEY]       = "#DCD7BA",
        [FOREGROUND_COLOR_DELIMITER] = "#525259",
        [FOREGROUND_COLOR_PREFIX]    = "#AF9FC9",
        [FOREGROUND_COLOR_CHORD]     = "#DCD7BA",
        [FOREGROUND_COLOR_TITLE]     = "#DCD7BA",
    };

Fixed

  • Wayland: Menu staying hidden even after delay expired
  • Relative includes with symlinked files
  • Double escape bug in preprocessor/writer
  • Writer not escaping backslashes correctly
  • False positive detection for special tokens
  • Various compiler stability fixes for edge cases

Removed

  • key_chords.def.h: Configuration is now unified in config.def.h. Use make from-wks to build with custom key chords defined in config/key_chords.wks.

  • +ignore-sort flag: Replaced by making sorting the default and adding --unsorted / :unsorted for the opposite behavior.

0.1.3 - 2024-XX-XX

Added

  • Implicit chord array implementation
  • maxWidth parameter for menu width control

Fixed

  • Wayland menu width/height miscalculation
  • Drawing full text when no space for ellipsis

0.1.2 - 2024-XX-XX

Initial documented release.