#key #c #s #r #d #menu #color #width #margin

app wlr-which-key

Keymap manager for wlroots-based compositors

2 releases

0.1.1 Aug 25, 2023
0.1.0 May 14, 2023

#263 in Configuration

37 downloads per month

GPL-3.0-only

33KB
834 lines

wlr-which-key

Keymap manager for wlroots-based compositors. Inspired by which-key.nvim.

Installation

Packaging status

From Source

cargo install wlr-which-key --locked

Configuration

Default config file: $XDG_CONFIG_HOME/wlr-which-key/config.yaml or ~/.config/wlr-which-key/config.yaml. Run wlr-which-key --help for more info.

Example config:

# Theming
font: JetBrainsMono Nerd Font 12
background: "#282828d0"
color: "#fbf1c7"
border: "#8ec07c"
separator: ""
border_width: 2
corner_r: 10
padding: 15 # Defaults to corner_r

# Anchor and margin
anchor: center # One of center, left, right, top, bottom, bottom-left, top-left, etc.
# Only relevant when anchor is not center
margin_right: 0
margin_bottom: 0
margin_left: 0
margin_top: 0

menu: 
  "w":
    desc: WiFi
    submenu:
      "t": { desc: Toggle, cmd: wifi_toggle.sh }
      "c": { desc: Connections, cmd: kitty --class nmtui-connect nmtui-connect }
  "p":
    desc: Power
    submenu:
      "s": { desc: Sleep, cmd: systemctl suspend }
      "r": { desc: Reboot, cmd: reboot }
      "o": { desc: Off, cmd: poweroff }
  "t":
    desc: Theme
    submenu:
      "d": { desc: Dark, cmd: dark-theme on }
      "l": { desc: Light, cmd: dark-theme off }
      "t": { desc: Toggle, cmd: dark-theme toggle }
  "l":
    desc: Laptop Screen
    submenu:
      "t": { desc: Toggle On/Off, cmd: toggle-laptop-display.sh }
      "s":
        desc: Scale
        submenu:
          "1": { desc: Set Scale to 1.0, cmd: wlr-randr --output eDP-1 --scale 1 }
          "2": { desc: Set Scale to 1.1, cmd: wlr-randr --output eDP-1 --scale 1.1 }
          "3": { desc: Set Scale to 1.2, cmd: wlr-randr --output eDP-1 --scale 1.2 }
          "4": { desc: Set Scale to 1.3, cmd: wlr-randr --output eDP-1 --scale 1.3 }

image

image

Dependencies

~15MB
~318K SLoC