Skip to content

Repository files navigation

Swindings

View sway keybindings

demo.mp4

Installation

Prerequisites

  • Sway window manager (Wayland)

One line install (recommended)

curl -sSfL https://sondalex.github.io/swindings/install.sh | sh

Usage

Run:

swindings

Options

Flag Description
-i, --follow-includes Resolve include directives in the sway config file. Glob patterns are supported (e.g. include conf.d/*.conf). Disabled by default.

Example — read keybindings from a config that uses include:

swindings --follow-includes

Theming

Those themes are available:

Default

Default


Tokyo-Night

Tokyo-Night


Solarized Dark

Solarized Dark


Catppuccin Mocha

Catppuccin Mocha


Catppuccin Latte

Catppuccin Latte


Dracula

Dracula


Gruvbox Dark

Gruvbox Dark


Nord

Nord


If you want to switch for Tokyo-Night:

cp config/tokyo-night.toml ~/.config/swindings/config.toml

Recommendation

Add keymap to your ~/.config/sway/config:

bindsym $mod+k+m exec swindings

Building from source

git clone https://github.com/sondalex/swindings.git
git submodule update --init --recursive

Development

Testing

zig build test

Memory checking

WITH_VALGRIND is injected by passing -Dvalgrind=true to the build system.

Build the binary with -Dvalgrind=true:

zig build -j1 -Dvalgrind=true

Then run valgrind against it:

On unit tests

valgrind --leak-check=full \
    --show-leak-kinds=all \
    --track-origins=yes \
    --error-exitcode=1 \
    --suppressions=valgrind/swindings.supp \
    zig-out/bin/unit_tests

On executable

Requires a live Wayland compositor (cannot run in CI). Build with -Dvalgrind=true:

valgrind --leak-check=full \
    --show-leak-kinds=all \
    --track-origins=yes \
    --error-exitcode=1 \
    --suppressions=valgrind/swindings.supp \
    --log-file=raw.log \
    zig-out/bin/swindings

Generating compile_commands.json

zig build cdb

Static analysis (clang-tidy)

Requires clang-tidy and a compile_commands.json. Generate the compilation database first:

zig build cdb

Then run clang-tidy against the project sources:

clang-tidy \
    src/cli.c src/config.c src/display.c src/keyicon.c \
    src/main.c src/search.c src/structures.c src/theme.c \
    -p compile_commands.json

Releases

Packages

Contributors

Languages