{"id":30227810,"url":"https://github.com/pipelight/mudras","last_synced_at":"2025-08-14T18:49:24.988Z","repository":{"id":309178614,"uuid":"1032089273","full_name":"pipelight/mudras","owner":"pipelight","description":"A hotkey daemon for Jonin","archived":false,"fork":false,"pushed_at":"2025-08-10T09:57:51.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2025-08-10T11:41:37.628Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pipelight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-04T19:38:22.000Z","updated_at":"2025-08-10T09:57:54.000Z","dependencies_parsed_at":"2025-08-10T11:42:30.906Z","dependency_job_id":"fea8b307-eb46-4e8a-aa94-2d4914469ba5","html_url":"https://github.com/pipelight/mudras","commit_stats":null,"previous_names":["pipelight/mudras"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pipelight/mudras","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fmudras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fmudras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fmudras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fmudras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pipelight","download_url":"https://codeload.github.com/pipelight/mudras/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipelight%2Fmudras/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270467468,"owners_count":24588798,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-14T18:49:23.334Z","updated_at":"2025-08-14T18:49:24.929Z","avatar_url":"https://github.com/pipelight.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mudras: A hotkey daemon for elite shinobi.\n\n**Currently in Alpha.**\n\nA keyboard utility.\nIt executes commands when a key combination is matched.\nSet up binds and subbinds with actions on key press and release.\n\n_I need a hotkey daemon for niri, hyprland, bspwm... (wayland and X11),\nthat gives me enough rope to shoot myself in the foot._\n\n## Configuration\n\nA single configuration file in **kdl** at `~/.config/mudras/config.kdl`\nVery similar to niri bind.\n\n### Set up a bind (or hotkey, or binding).\n\n- Set up a binding as a sequence of keys separated by `+`.\n\n```kdl\nSuper+Enter\n```\n\n- You can attach commands on key **press** and/or key **release**.\n\n```kdl\nSuper+Enter {\n  @press\n  @release\n}\n```\n\n- Set up a list of commands to execute when binding is matched.\n  Commands can be single line strings escaped with \\\"\\\"\n  or multiline strings escaped with r#\\\"\\\"#.\n\n```kdl\nSuper+Enter {\n  @press {\n    - \"kitty -e fish\"\n    - r#\"\n      notify-send \"new term\"\n      \"#\n  }\n}\n```\n\n### Set up a submap (or mode, or subbind).\n\n- The submap is just a named container that contains binds as defined in the upper section.\n\n```kdl\n// Submap definition\n@submap name=\"niri\" {\n  Ctrl+m {\n    @press {\n      - \"niri msg move-column-left\"\n    }\n  }\n  Ctrl+i {\n    @press {\n      - \"niri msg move-column-right\"\n    }\n  }\n}\n\n```\n\n- Enter the submap.\n  You enter a submap with the special command prefix `@enter`,\n  followed by the **submap name**.\n\n```kdl\nSuper {\n  @release {\n    // enter a submap\n    @enter \"niri\";\n  }\n}\n```\n\n- Exit the submap.\n  You exit a submap with the special command prefix `@exit`\n\n  In the following example we exit the submap with the same\n  key we use to enter (Super).\n\n```kdl\n// Submap definition\n@submap name=\"niri\" {\n  Super {\n    @release {\n     // Exit the submap\n      @exit;\n    }\n  }\n}\n\n```\n\n### Ignore some bind on multiple key release (bug fix).\n\nWhen defining binds like `Super+Alt+T @release `, `Super+Alt @release` and `Super @release`.\nIf you type `Super+Alt+T` and release keys, actions corresponding to every bind are executed.\n\nYou may want to flag the shortest bindings with `@release backward=false`\nOnly the longest bind is triggered, therefore `Super+Alt+T` is executed\nand `Super+Alt` as of `Super` are ignored.\n\n```kdl\nSuper+Alt {\n  @release backward=false {\n    - r#\"notify-send \"test\" \"#\n  }\n}\nSuper+Alt+T {\n  @release {\n    - r#\"notify-send \"test\" \"#\n  }\n}\n```\n\n## Install\n\n### Cargo\n\n```sh\ncargo install --git https://github.com/pipelight/mudras\n```\n\n### Nixos with flakes\n\n```nix\n# flake.nix\ninputs = {\n  mudras = {\n      url = \"github:pipelight/mudras\";\n  };\n};\n```\n\n```nix\n# default.nix\nenvironment.systemPackages = with pkgs; [\n  inputs.mudras.packages.${system}.default;\n];\n\n```\n\nStart with your favorite init script or window manager.\n\n# Alternatives\n\nEverything in here has been stolen from\n[niri](https://github.com/YaLTeR/niri)\nand\n[swhkd](https://github.com/waycrate/swhkd)\nwhich are excellent alternatives to mudras.\n\nThanks to @YaLTeR, @Shinyzenith and all other contributors\nfor the relentless work and great code quality that\nbenefit mudras.\n\n# Developers\n\n```sh\ncargo build --release\nsudo RUST_LOG=debug ./target/release/mudras\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipelight%2Fmudras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpipelight%2Fmudras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipelight%2Fmudras/lists"}