{"id":15168586,"url":"https://github.com/ciavash/sway-previewkeys","last_synced_at":"2025-10-01T00:32:20.210Z","repository":{"id":147482326,"uuid":"421860536","full_name":"CIAvash/Sway-PreviewKeys","owner":"CIAvash","description":"Program for showing Sway window manager's key bindings associated with a mode","archived":true,"fork":false,"pushed_at":"2022-07-23T11:16:02.000Z","size":223,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-30T17:36:45.990Z","etag":null,"topics":["app","cli","command-line","gui","key-bindings","preview","raku","rakulang","sway","swaywm"],"latest_commit_sha":null,"homepage":"https://codeberg.org/CIAvash/Sway-PreviewKeys","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CIAvash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2021-10-27T14:53:49.000Z","updated_at":"2024-06-01T04:27:36.000Z","dependencies_parsed_at":"2023-07-24T20:15:49.560Z","dependency_job_id":null,"html_url":"https://github.com/CIAvash/Sway-PreviewKeys","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":"0.15384615384615385","last_synced_commit":"29fefcdc629a6ec640182eafe7f81ec8cb079809"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIAvash%2FSway-PreviewKeys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIAvash%2FSway-PreviewKeys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIAvash%2FSway-PreviewKeys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIAvash%2FSway-PreviewKeys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CIAvash","download_url":"https://codeload.github.com/CIAvash/Sway-PreviewKeys/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234803486,"owners_count":18889263,"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":["app","cli","command-line","gui","key-bindings","preview","raku","rakulang","sway","swaywm"],"created_at":"2024-09-27T06:23:20.025Z","updated_at":"2025-10-01T00:32:19.859Z","avatar_url":"https://github.com/CIAvash.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n====\n\nsway-preview-keys - Shows preview windows for [Sway](https://swaywm.org/) modes' key bindings\n\n![screenshot of sway-preview-keys](screenshots/sway-preview-keys.png)\n\nDESCRIPTION\n===========\n\nGets the config from sway and parses it.\n\nGets the CSS style for preview windows from path specified via command option or `$XDG_CONFIG_HOME/sway-preview-keys/style.css` or `$HOME/.config/sway-preview-keys/style.css`\n\nFinally listens to Sway mode changes and shows a preview window for mode's key bindings.\n\nSYNOPSIS\n========\n\n    Usage:\n      sway-preview-keys\n        [-p|--style-path\u003cPATH\u003e]                  -- Set CSS style path for preview window [p=path]\n        [-t|--add-mode-name]                     -- Add mode name at top of the preview window [t=title]\n        [-s|--sort-key-bindings]                 -- Sort mode's key bindings [s=sort]\n        [-d|--bindsym-default-mode=\u003cNAME\u003e]       -- Bind a symbol for previewing key bindings of default mode [d=default]\n        [-f|--filter-out=\u003cREGEX\u003e]                -- Exclude commands which match REGEX. Can be repeated. [f=filter]\n                                                    REGEX is a Raku regex: https://docs.raku.org/language/regexes\n        [-r|--max-rows=\u003cNUM\u003e]                    -- Add columns to show key bindings when number of key bindings exceed the maximum row. Can be repeated. [r=row]\n                                                    Biggest number which is lower than the number of key bindings is chosen, otherwise the minimum of the numbers is used\n        [-e|--ellipsize=\u003cNUM\u003e]                   -- Ellipsize commands, given number is used for maximum characters to show. [e=ellipsize]\n                                                    Takes effect only when number of key bindings reaches the maximum of --max-rows\n        [--ellipsis-position=\u003cstart|center|end\u003e] -- Set the position of ellipsis. Default is center.\n                                                    Takes effect only when --ellipsize is used\n\n      sway-preview-keys -v|--version -- Print version\n      sway-preview-keys -h|--help    -- Print help\n\n    Example:\n      sway-preview-keys -d 'Mod4+o' -t -e 26 -r 20 -r 38\n      sway-preview-keys --bindsym-default-mode 'Mod4+o' --add-mode-name --ellipsize 26 --max-rows 20 --max-rows 38\n      sway-preview-keys -d 'Mod4+o' -t -e 55 -r 20 -r 38 -f ':s workspace number' -f '^ focus' -f ':s ^move \u003c right left up down \u003e'\n\nExample style:\n\n```css\n#preview-window {\n    font-family: monospace;\n    background-color: rgba(43, 24, 21, 0.9);\n    color: white;\n    border-radius: 10px;\n}\n\n#preview-table {\n    padding: 2px 2px;\n}\n\n#mode-name {\n    font-weight: bold;\n    color: #CC7744;\n    margin: 0 7px;\n    padding: 4px 0;\n    border-bottom: 1px solid rgba(95, 75, 72, 0.9);\n}\n\n#key-binding, #command {\n    padding: 4px 7px;\n}\n\n#key-binding {\n    color: wheat;\n}\n\n#command {\n    color: #ddd;\n}\n```\n\nINSTALLATION\n============\n\nYou need to have [GTK Layer Shell](https://github.com/wmww/gtk-layer-shell), [Raku](https://www.raku-lang.ir/en) and [zef](https://github.com/ugexe/zef), then run:\n\n```console\nzef install --/test \"Sway::PreviewKeys:auth\u003czef:CIAvash\u003e\"\n```\n\nor if you have cloned the repo:\n\n```console\nzef install .\n```\n\nTESTING\n=======\n\n```console\nprove -ve 'raku -I.' --ext rakutest\n```\n\nREPOSITORY\n==========\n\n[https://codeberg.org/CIAvash/Sway-PreviewKeys](https://codeberg.org/CIAvash/Sway-PreviewKeys)\n\nBUG\n===\n\n[https://codeberg.org/CIAvash/Sway-PreviewKeys/issues](https://codeberg.org/CIAvash/Sway-PreviewKeys/issues)\n\nAUTHOR\n======\n\nSiavash Askari Nasr - [https://siavash.askari-nasr.com](https://siavash.askari-nasr.com)\n\nCOPYRIGHT\n=========\n\nCopyright © 2021 Siavash Askari Nasr\n\nLICENSE\n=======\n\nSway::PreviewKeys is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nSway::PreviewKeys is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Sway::PreviewKeys. If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciavash%2Fsway-previewkeys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciavash%2Fsway-previewkeys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciavash%2Fsway-previewkeys/lists"}