end4-pC icon indicating copy to clipboard operation
end4-pC copied to clipboard

Add a CheatSheet Similar to End-4 for Keybindings and Periodic Table

Open anaskhaann opened this issue 4 months ago • 2 comments

I would request you to implement the cheatsheet overlay (super+/ to toggle keybinds) working in your config, similar to what we have in end4.

I implemented it on my own but used the AI so I would request u to look into it.

While the module structure was straightforward to copy, I ran into a problem — the keybinds were showing up empty. The root cause was that my two configs use completely different HyprlandKeybinds service implementations:

  • ii — uses hyprctl binds -j (flat array, bitmask modmask, description with "Category: text" prefix)
  • your-config (i.e end4-pc) — uses a Lua parser that returns a tree structure (children: [{name, children, keybinds}]), string array mods like ["SUPER", "SHIFT"], and comment with no category prefix

What I did:

  1. Copied the base files (directly from the end4's ii/cheatsheet):

    • Cheatsheet.qml — PanelWindow + IPC handlers
    • CheatsheetPeriodicTable.qml, ElementTile.qml, periodic_table.js
  2. Adapted the keybind display to work with your data format:

    • CheatsheetKeybinds.qml — replaced the flat keybindCategories list with flattenSections() to walk the tree recursively and pass tree nodes as section
    • CheatsheetKeybindsCategory.qml — rewrote to handle tree nodes (section.name + section.keybinds) instead of category strings; switched from description to comment for labels and from modmask to the mods string array for modifiers; added uppercase mod names (SUPER, CTRL, SHIFT, ALT, META) to keySubstitutions since the Lua parser returns them uppercase
  3. Made supporting changes:

    • Added Config.options.cheatsheet block with 7 config options
    • Registered the module's import and PanelLoader in IllogicalImpulseFamily.qml

I did this whole with the AI since i am not good with Quickshell and lua. Thanks ❤️

Image

anaskhaann avatar Jul 25 '26 06:07 anaskhaann

I deleted it because I don't use it, unfortunately I won't add it.

pctrade avatar Jul 25 '26 06:07 pctrade

Okay Thanks Dude

anaskhaann avatar Jul 25 '26 06:07 anaskhaann