{"id":20431809,"url":"https://github.com/doums/apekey","last_synced_at":"2025-04-12T20:52:02.212Z","repository":{"id":65949031,"uuid":"535884942","full_name":"doums/apekey","owner":"doums","description":"list and browse your XMonad keymap","archived":false,"fork":false,"pushed_at":"2023-08-06T12:09:56.000Z","size":586,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T20:51:47.624Z","etag":null,"topics":["keybind","keybindings","keymap","list","window-manager","xmonad"],"latest_commit_sha":null,"homepage":"","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/doums.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}},"created_at":"2022-09-12T23:26:53.000Z","updated_at":"2024-06-30T09:48:18.000Z","dependencies_parsed_at":"2024-11-15T08:13:11.263Z","dependency_job_id":"6833b44e-4f28-4785-92c7-599670ede12e","html_url":"https://github.com/doums/apekey","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doums%2Fapekey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doums%2Fapekey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doums%2Fapekey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doums%2Fapekey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doums","download_url":"https://codeload.github.com/doums/apekey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631728,"owners_count":21136560,"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","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":["keybind","keybindings","keymap","list","window-manager","xmonad"],"created_at":"2024-11-15T08:12:58.634Z","updated_at":"2025-04-12T20:52:02.196Z","avatar_url":"https://github.com/doums.png","language":"Rust","readme":"[![apekey](https://img.shields.io/github/actions/workflow/status/doums/apekey/test.yml?color=0D0D0D\u0026logoColor=BFBFBF\u0026labelColor=404040\u0026logo=github\u0026style=for-the-badge)](https://github.com/doums/apekey/actions?query=workflow%3Aapekey)\n[![apekey](https://img.shields.io/aur/version/apekey?color=0D0D0D\u0026logoColor=BFBFBF\u0026labelColor=404040\u0026logo=arch-linux\u0026style=for-the-badge)](https://aur.archlinux.org/packages/apekey/)\n\n## apekey\n\nList and browse your XMonad keymap.\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6359431/211675677-0e8b44d4-7551-4da4-9d5a-51c83c95b895.png\" width=\"650\"\u003e\n\n- [install](#install)\n- [usage](#usage)\n- [keybinds annotation](#keybinds-annotation)\n- [configuration](#configuration)\n- [license](#license)\n\n### Install\n\n- latest [release](https://github.com/doums/apekey/releases/latest)\n- AUR [package](https://aur.archlinux.org/packages/apekey)\n\n### Usage\n\nApekey reads your `xmonad.hs` config and looks for comments with\nspecial formats. Based on these comments, apekey will parse and\ngenerate the keymap, and will render it in a dedicated window.\n\nOnce you have annotated your keybinds simply launch apekey. Press\n`Tab` to fuzzy search keybindings by key and/or description.\n\n#### Launching apekey\n\nYou can create a keybind to launch it from XMonad. For example,\nusing it as a scratchpad:\n\n```\n-- # Keymap\nkeybinds = ([\n-- ...\n\n-- Keymap\n, (\"M-S-,\", namedScratchpadAction scratchpads \"keymap\")\n\n-- ...\n\nscratchpads = [\n-- ...\n\n, NS \"keymap\" \"apekey\"\n(title =? \"apekey\")\n(customFloating $ W.RationalRect 0.4 0.2 0.3 0.8)\n]\n```\n\n#### CLI\n\nApekey can be launched from the terminal\n\n```shell\napekey --help\n```\n\n### Keybinds annotation\n\n⚠ For now apekey only supports keybindings specified in\n_emacs-style_ format\n([EZConfig](https://xmonad.github.io/xmonad-docs/xmonad-contrib/XMonad-Util-EZConfig.html))\n\n#### Example\n\n`xmonad.hs` config\n\n```haskell\n-- # XMonad keymap\nkeybinds = ([\n-- ## Basics\n-- Recompile and restart XMonad\n(\"M-C-q\",       spawn \"xmonad --recompile; xmonad --restart\")\n-- Refresh XMonad\n, (\"M-C-r\",       refresh)\n-- Kill current window\n, (\"M-x\",         kill)\n\n-- ## Workspace navigation\n-- \"M-\u003cWorkspace key\u003e\" Move to workspace x\n-- \"M-S-\u003cWorkspace key\u003e\" Move current window to workspace x\n-- Switch to last workspace\n, (\"M-\u003cTab\u003e\",       toggleRecentWS)\n-- Switch to next workspace\n, (\"M-\u003cPage_Up\u003e\",   nextWS)\n-- Switch to previous workspace\n, (\"M-\u003cPage_Down\u003e\", prevWS)\n-- Exec the action of the current workspace\n, (\"M-\u003cReturn\u003e\",    chooseAction wsActions)\n\n-- ## Window navigation\n-- \"M-↑→↓←\" Navigate through windows\n-- \"M-S-↑→↓←\" Swap windows\n-- Focus next window up\n, (\"M-k\",         windows W.focusUp)\n-- Focus next window down\n, (\"M-j\",         windows W.focusDown)\n\n-- ...\n\n-- #\n```\n\n##### `-- # [Title]`\n\nTell apekey to start parsing from here. An optional title can be\ngiven. Use a second comment `-- #` to mark the end of the\nkeybindings declaration area.\n\n```haskell\n-- # XMonad keymap\n\n-- your keybindings declaration\n\n-- somewhere below\n-- #\n```\n\n##### `-- ## Section`\n\nDefine a section of keybindings. All subsequent annotated keybinds\nwill belong to this section until another section is defined.\n\n```haskell\n-- ## Basics\n-- a keybind declaration\n-- a keybind declaration\n-- a keybind declaration\n\n-- ## Another section\n-- keybindings declarations...\n```\n\n##### `-- Keybind description`\n\nAdds a description to a keybinding. That is, a regular comment.\nThe next line must be the corresponding keybinding declaration.\nApekey will automatically parse and extract the keybinding from\nit.\n\n```haskell\n-- Kill current window\n, (\"M-x\",         kill)\n```\n\n##### `-- \"\u003ckeys\u003e\" Description`\n\nSome keybindings are not declared \"inline\" or using the emacs format.\ne.g. mouse binding, workspaces/topics/screen navigation bindings\netc... are common cases. For these it is not possible to use the\nsimple `-- description` comments.\n\nInstead, you can use this comment format to arbitrary write _fake_\nkeybindings.\n\n```haskell\n-- \"M-\u003cTopic key\u003e\" Move to topic x\n-- \"M-S-\u003cTopic key\u003e\" Move current window to topic x\n```\n\n##### `-- ! Keybind ignored`\n\nAnnotate a keybind but do not render it.\n\n```haskell\n  -- ! Description\n  , (\"\u003cM-u\u003e\",   spawn \"script.sh\")\n```\n\n### Configuration\n\nApekey will look for a config file at\n`$XDG_CONFIG_HOME/apekey/apekey.toml`.\n\nSet `xmonad_config` to the path pointing to your\n`xmonad.hs` configuration file.\n\n```toml\nxmonad_config = \"~/.config/xmonad/xmonad.hs\"\n\n# color theme\ntheme = \"Dark\" # Light, Dark (default), Tars\n\n# [font]\n# title_size = 22\n# section_size = 16\n# keybind_size = 16\n# text_size = 16\n# error_size = 16\n```\n\n### TODO\n\n- highlight fuzzy matches\n\n### License\n\nMozilla Public License 2.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoums%2Fapekey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoums%2Fapekey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoums%2Fapekey/lists"}