keydisplay/README.md
2025-01-23 21:49:40 +13:00

852 B

keydisplay

note: you will need to add yourself to the input group or run as root if you intend to use wayland

you can do it like this

doas usermod -aG input $USER

config.rs

  • use serde with a config struct

  • impl with defaults and read function

read:

  • get the current users config folder

  • make a folder if the "keydisplay" folder doesnt exist

  • make a keydisplay/config.toml if it doesnt exist

  • give it 600 permissions

config:

  • theme = {catppuccin_mocha, grey, night, day}
  • [listen]
    • keys = "z, x"
    • mouse = "m1, m2"
  • [display]
    • mouse = "key"

listen.rs

main.rs

  • read config

  • start listener on keys from config

  • load gui using theme