dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit fdc92fc93bd43a7b7b65f857346c770b362a36ac parent 31e5f3e1e391a44b40fa7a52ba571d34add425f6 Author: maydayv7 <maydayv7@gmail.com> Date: Tue, 29 Sep 2026 16:25:20 +0530 feat: Noctalia Keyhelp
Diffstat:
26 files changed, 2610 insertions(+), 1809 deletions(-)
diff --git a/files/_module.nix b/files/_module.nix @@ -77,9 +77,7 @@ in { # Hyprland WM hyprland = { shaders = ./hyprland/shaders; - noctalia = ./hyprland/noctalia; pypr = builtins.readFile ./hyprland/pypr.toml; - kebihelp = builtins.readFile ./hyprland/kebihelp.json; }; # Pictures @@ -96,6 +94,9 @@ in { # Nano Text Editor nano = builtins.readFile ./nanorc; + # Noctalia Shell + noctalia = ./noctalia; + # PcmanFM File Manager pcmanfm = builtins.readFile ./pcmanfm.conf; diff --git a/files/hyprland/kebihelp.json b/files/hyprland/kebihelp.json @@ -1,1696 +0,0 @@ -{ - "Parameters": { - "cmd_focused_window": "hyprctl activewindow", - "importer": { - "match_line": ".*@@(.+?)@@(.+?)@@(.+?)@@.*", - "position_group": 1, - "position_keybinding": 2, - "position_label": 3 - }, - "keys": { - "tab_previous": "Backtab", - "tab_next": "Tab", - "scroll_down": "Down", - "scroll_up": "Up", - "quit": "Esc" - }, - "layout": { - "n_columns": 3, - "spacing": 3, - "width": 1100, - "height": 900, - "background_color": "#@base00", - "opacity": 0.9, - "tabs": { - "background_color": "#@base02", - "background_color_current": "#@base04", - "color": "#@white", - "font": "@font", - "font_size": 10, - "padding": 1 - }, - "group_name": { - "background_color": "#@accent", - "color": "#@base00", - "bold": true, - "stretched": false, - "padding": "0px 5px 0px 2px", - "font": "@font", - "font_size": 11 - }, - "shortcut": { - "label": { - "color": "#@white", - "bold": false, - "font": "@font", - "font_size": 10 - }, - "value": { - "color": "#@base05", - "bold": true, - "font": "@monospace", - "font_size": 10 - }, - "spacing": 10 - } - } - }, - "Rules": { - "default": "Desktop", - "kitty": "Terminal", - "code": "Code", - "firefox": "Firefox" - }, - "Keybindings": { - "Desktop": { - "_hidden": false, - "Legend": { - "_hidden": false, - "keybindings": [ - { - "value": "SUPER", - "label": "$mod" - }, - { - "value": "L' / R'", - "label": "Left/Right Mouse Click" - } - ] - }, - "Compositor": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Q or ALT F4", - "label": "Quit application" - }, - { - "value": "$mod SHIFT Q", - "label": "Force Quit application" - }, - { - "value": "ALT A", - "label": "Activate urgent/last window" - }, - { - "value": "$mod E", - "label": "Maximize window" - }, - { - "value": "$mod SHIFT E", - "label": "Fullscreen window" - }, - { - "value": "ALT Q", - "label": "Minimize window" - }, - { - "value": "ALT SHIFT Q", - "label": "Show all minimized windows" - }, - { - "value": "$mod <ARROW>", - "label": "Switch focus to window in desired direction" - }, - { - "value": "$mod SHIFT ← / →", - "label": "Scrolling: move window across | Dwindle: swap windows" - }, - { - "value": "$mod SHIFT ↑ / ↓", - "label": "Scrolling: stack in/out of column | Dwindle: swap windows" - }, - { - "value": "$mod Space", - "label": "Scrolling: toggle window stacking | Dwindle: split direction" - }, - { - "value": "$mod Backspace", - "label": "Toggle tiling layout" - }, - { - "value": "$mod [ or ]", - "label": "Scrolling: shrink/grow column width" - }, - { - "value": "$mod SHIFT [ or ]", - "label": "Scrolling: center column / fit all columns on screen" - }, - { - "value": "$mod SHIFT Space", - "label": "Toggle application grouping" - }, - { - "value": "$mod CTRL <ARROW>", - "label": "Move window into desired group" - }, - { - "value": "$mod ; or :", - "label": "Toggle window float for one / all window(s)" - }, - { - "value": "$mod C", - "label": "Center floating window and/or move cursor to top right corner" - }, - { - "value": "$mod P", - "label": "Pin floating window on all workspaces" - } - ] - }, - "Switcher": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Tab", - "label": "Window Switcher" - }, - { - "value": "ALT [SHIFT] Tab", - "label": "Cycle [backwards] through open windows on current workspace" - }, - { - "value": "ALT [SHIFT] `", - "label": "Cycle [backwards] through grouped windows" - } - ] - }, - "Workspaces": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod <NUM>", - "label": "Create workspace 'NUM' {1 to 9}" - }, - { - "value": "$mod SHIFT <NUM>", - "label": "Move window to workspace 'NUM' {1 to 9}" - }, - { - "value": "$mod , or .", - "label": "Move across non-empty workspaces" - }, - { - "value": "$mod CTRL , or .", - "label": "Move across workspaces" - }, - { - "value": "$mod 0", - "label": "Toggle special workspace to stash windows" - }, - { - "value": "$mod SHIFT 0", - "label": "Move window to/from stash" - }, - { - "value": "$mod SHIFT , or .", - "label": "Move window to previous/next workspace" - }, - { - "value": "$mod ALT , or .", - "label": "Move focus to left/right monitor" - }, - { - "value": "$mod SHIFT ALT , or .", - "label": "Move window to left/right monitor" - } - ] - }, - "Utility": { - "_hidden": false, - "keybindings": [ - { - "value": "Print", - "label": "Take Screenshot of area" - }, - { - "value": "SHIFT Print", - "label": "Take Screenshot of screen" - }, - { - "value": "$mod = or -", - "label": "Zoom in/out" - }, - { - "value": "$mod SHIFT -", - "label": "Zoom out fully" - }, - { - "value": "$mod L or Esc", - "label": "Lock screen / System Logoff" - }, - { - "value": "$mod S", - "label": "Toggle Compositor Shader" - }, - { - "value": "$mod G", - "label": "Toggle Game Mode" - }, - { - "value": "$mod SHIFT S", - "label": "Toggle window swallowing" - }, - { - "value": "$mod SHIFT D", - "label": "Toggle main Display" - } - ] - }, - "Applications": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod /", - "label": "Show this page" - }, - { - "value": "$mod A", - "label": "Application Launcher" - }, - { - "value": "$mod SHIFT A", - "label": "Shell Settings" - }, - { - "value": "$mod SHIFT C", - "label": "Color Picker" - }, - { - "value": "$mod D", - "label": "Monitor Configuration" - }, - { - "value": "$mod F", - "label": "File Manager" - }, - { - "value": "$mod T", - "label": "Terminal" - }, - { - "value": "$mod SHIFT T", - "label": "Toggle Terminal in Quake mode" - }, - { - "value": "$mod V", - "label": "Toggle Clipboard" - }, - { - "value": "$mod W", - "label": "Web Browser" - }, - { - "value": "$mod Enter", - "label": "Task Manager" - }, - { - "value": "$mod +", - "label": "Calculator" - }, - { - "value": "$mod SHIFT B", - "label": "Bluetooth Settings" - }, - { - "value": "$mod SHIFT P", - "label": "Volume Control" - }, - { - "value": "$mod SHIFT N", - "label": "Network Settings" - }, - { - "value": "$mod N", - "label": "Show notification panel" - }, - { - "value": "$mod SHIFT Esc", - "label": "Inhibit all keybindings" - } - ] - }, - "Mouse": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod L'", - "label": "Move window" - }, - { - "value": "$mod R'", - "label": "Window resize" - }, - { - "value": "$mod Scroll", - "label": "Move across workspaces" - }, - { - "value": "", - "label": "" - }, - { - "value": "3F Swipe ↔", - "label": "Switch apps / columns" - }, - { - "value": "3F Swipe ↕", - "label": "Switch across workspaces" - }, - { - "value": "4F Swipe ↑", - "label": "Toggle workspace overview" - }, - { - "value": "", - "label": "" - }, - { - "value": "L' (in overview)", - "label": "Select workspace / window" - }, - { - "value": "R' (in overview)", - "label": "Close window" - }, - { - "value": "L' drag (in overview)", - "label": "Move window across workspaces" - } - ] - }, - "Submap": { - "_hidden": false, - "keybindings": [ - { - "value": "esc", - "label": "Exit Submap" - }, - { - "value": "", - "label": "" - }, - { - "value": "$mod R", - "label": "Resize Submap" - }, - { - "value": "<ARROW> or L' (Mouse Drag)", - "label": "Resize window" - }, - { - "value": "", - "label": "" - }, - { - "value": "$mod M", - "label": "Move Submap" - }, - { - "value": "L' (Mouse Drag)", - "label": "Move window" - }, - { - "value": "<ARROW>", - "label": "Move window (into group)" - }, - { - "value": "SHIFT <ARROW>", - "label": "Move floating window" - }, - { - "value": ", or .", - "label": "Move window across workspaces" - }, - { - "value": "C", - "label": "Center floating window" - }, - { - "value": "P", - "label": "Pin floating window" - }, - { - "value": "", - "label": "" - }, - { - "value": "ALT SHIFT Q", - "label": "Minimized Submap" - }, - { - "value": "Return or L'", - "label": "Unminimize selected window" - }, - { - "value": "<ARROW>", - "label": "Focus window in desired direction" - }, - { - "value": "Q", - "label": "Close selected window" - }, - { - "value": "", - "label": "" - }, - { - "value": "$mod `", - "label": "Overview Submap" - }, - { - "value": "<ARROW>", - "label": "Navigate workspaces / windows" - }, - { - "value": "<NUM>", - "label": "Jump to workspace" - }, - { - "value": "Return or L'", - "label": "Select workspace / window" - }, - { - "value": "R'", - "label": "Close window under cursor" - } - ] - } - }, - "Code": { - "_hidden": false, - "General": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL /", - "label": "Show Command Palette" - }, - { - "value": "CTRL P", - "label": "Quick Open, Go to File..." - }, - { - "value": "CTRL SHIFT N", - "label": "New window/instance" - }, - { - "value": "CTRL SHIFT W", - "label": "Close window/instance" - }, - { - "value": "CTRL ,", - "label": "User Settings" - }, - { - "value": "CTRL K + CTRL S", - "label": "Keyboard Shortcuts" - } - ] - }, - "Editing": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL X", - "label": "Cut line (empty selection)" - }, - { - "value": "CTRL C", - "label": "Copy line (empty selection)" - }, - { - "value": "ALT Up / Down", - "label": "Move line up/down" - }, - { - "value": "SHIFT ALT Up / Down", - "label": "Copy line up/down" - }, - { - "value": "CTRL D", - "label": "Delete line" - }, - { - "value": "CTRL Return", - "label": "Insert line below" - }, - { - "value": "CTRL SHIFT Return", - "label": "Insert line above" - }, - { - "value": "CTRL SHIFT \\", - "label": "Jump to matching bracket" - }, - { - "value": "CTRL ] / [", - "label": "Indent/outdent line" - }, - { - "value": "Home / End", - "label": "Go to beginning/end of line" - }, - { - "value": "CTRL Home", - "label": "Go to beginning of file" - }, - { - "value": "CTRL End", - "label": "Go to end of file" - }, - { - "value": "CTRL Up / Down", - "label": "Scroll line up/down" - }, - { - "value": "ALT PgUp / PgDown", - "label": "Scroll page up/down" - }, - { - "value": "CTRL SHIFT [", - "label": "Fold (collapse) region" - }, - { - "value": "CTRL SHIFT ]", - "label": "Unfold (uncollapse) region" - }, - { - "value": "CTRL K + CTRL [", - "label": "Fold (collapse) all subregions" - }, - { - "value": "CTRL K + CTRL ]", - "label": "Unfold (uncollapse) all subregions" - }, - { - "value": "CTRL K + CTRL 0", - "label": "Fold (collapse) all regions" - }, - { - "value": "CTRL K + CTRL J", - "label": "Unfold (uncollapse) all regions" - }, - { - "value": "CTRL K + CTRL C", - "label": "Add line comment" - }, - { - "value": "CTRL K + CTRL U", - "label": "Remove line comment" - }, - { - "value": "SHIFT ALT A", - "label": "Toggle block comment" - }, - { - "value": "ALT Z", - "label": "Toggle word wrap" - } - ] - }, - "Navigation": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL T", - "label": "Show all Symbols" - }, - { - "value": "CTRL G", - "label": "Go to Line..." - }, - { - "value": "CTRL P", - "label": "Go to File..." - }, - { - "value": "CTRL SHIFT O", - "label": "Go to Symbol..." - }, - { - "value": "CTRL SHIFT M", - "label": "Show Problems panel" - }, - { - "value": "F8", - "label": "Go to next error or warning" - }, - { - "value": "SHIFT F8", - "label": "Go to previous error or warning" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Navigate editor group history" - }, - { - "value": "ALT Left / Right", - "label": "Go back/forward" - }, - { - "value": "CTRL M", - "label": "Toggle Tab moves focus" - } - ] - }, - "Search": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL F", - "label": "Find" - }, - { - "value": "CTRL H", - "label": "Replace" - }, - { - "value": "F3", - "label": "Find next" - }, - { - "value": "SHIFT F3", - "label": "Find previous" - }, - { - "value": "ALT Return", - "label": "Select all occurences of Find match" - }, - { - "value": "CTRL K + CTRL D", - "label": "Move last selection to next Find match" - }, - { - "value": "ALT C / R / W", - "label": "Toggle case-sensitive/regex/whole word" - } - ] - }, - "Selection": { - "_hidden": false, - "keybindings": [ - { - "value": "ALT Click", - "label": "Insert cursor" - }, - { - "value": "CTRL ALT Up / Down", - "label": "Insert cursor above/below" - }, - { - "value": "CTRL U", - "label": "Undo last cursor operation" - }, - { - "value": "SHIFT ALT I", - "label": "Insert cursor at end of each line selected" - }, - { - "value": "CTRL I", - "label": "Select current line" - }, - { - "value": "CTRL SHIFT L", - "label": "Select all occurrences of current selection" - }, - { - "value": "CTRL F2", - "label": "Select all occurrences of current word" - }, - { - "value": "SHIFT ALT Right", - "label": "Expand selection" - }, - { - "value": "SHIFT ALT Left", - "label": "Shrink selection" - }, - { - "value": "SHIFT ALT (Mouse Drag) or <ARROW>", - "label": "Column (box) selection" - } - ] - }, - "Editor": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL F4", - "label": "Close editor" - }, - { - "value": "CTRL W", - "label": "Close editor" - }, - { - "value": "CTRL K + F", - "label": "Close folder" - }, - { - "value": "CTRL \\", - "label": "Split editor" - }, - { - "value": "CTRL 1 / 2 / 3", - "label": "Focus into 1st, 2nd, or 3rd editor group" - }, - { - "value": "CTRL K + CTRL Left / Right", - "label": "Focus into previous/next editor group" - }, - { - "value": "CTRL SHIFT PgUp / PgDown", - "label": "Move editor left/right" - }, - { - "value": "CTRL K + Left / Right", - "label": "Move active editor group" - } - ] - }, - "File": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL N", - "label": "New File" - }, - { - "value": "CTRL O", - "label": "Open File..." - }, - { - "value": "CTRL S", - "label": "Save" - }, - { - "value": "CTRL SHIFT S", - "label": "Save As..." - }, - { - "value": "CTRL K + S", - "label": "Save All" - }, - { - "value": "CTRL F4", - "label": "Close" - }, - { - "value": "CTRL K + CTRL W", - "label": "Close All" - }, - { - "value": "CTRL SHIFT T", - "label": "Reopen closed editor" - }, - { - "value": "CTRL K + Return", - "label": "Keep preview mode editor open" - }, - { - "value": "CTRL TAB", - "label": "Open next" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Open previous" - }, - { - "value": "CTRL K + P", - "label": "Copy path of active file" - }, - { - "value": "CTRL K + R", - "label": "Reveal active file in Explorer" - }, - { - "value": "CTRL K + O", - "label": "Show active file in new window/instance" - } - ] - }, - "Display": { - "_hidden": false, - "keybindings": [ - { - "value": "F11", - "label": "Toggle full screen" - }, - { - "value": "SHIFT ALT 0", - "label": "Toggle editor layout" - }, - { - "value": "CTRL =/-", - "label": "Zoom in/out" - }, - { - "value": "CTRL B", - "label": "Toggle Sidebar visibility" - }, - { - "value": "CTRL SHIFT E", - "label": "Show Explorer/Toggle focus" - }, - { - "value": "CTRL SHIFT F", - "label": "Show Search" - }, - { - "value": "CTRL SHIFT G", - "label": "Show Source Control" - }, - { - "value": "CTRL SHIFT D", - "label": "Show Debug" - }, - { - "value": "CTRL SHIFT X", - "label": "Show Extensions" - }, - { - "value": "CTRL SHIFT H", - "label": "Replace in files" - }, - { - "value": "CTRL SHIFT J", - "label": "Toggle Search details" - }, - { - "value": "CTRL SHIFT U", - "label": "Show Output panel" - }, - { - "value": "CTRL SHIFT V", - "label": "Open Markdown preview" - }, - { - "value": "CTRL K + V", - "label": "Open Markdown preview to the side" - }, - { - "value": "CTRL K + Z", - "label": "Zen Mode (Esc to exit)" - } - ] - }, - "Debug": { - "_hidden": false, - "keybindings": [ - { - "value": "F9", - "label": "Toggle breakpoint" - }, - { - "value": "F5", - "label": "Start/Continue" - }, - { - "value": "SHIFT F5", - "label": "Stop" - }, - { - "value": "F11", - "label": "Step into" - }, - { - "value": "SHIFT F11", - "label": "Step out" - }, - { - "value": "F10", - "label": "Step over" - }, - { - "value": "CTRL K + CTRL I", - "label": "Show hover" - } - ] - }, - "Terminal": { - "_hidden": false, - "keybindings": [ - { - "value": "ALT T", - "label": "Show terminal" - }, - { - "value": "CTRL C", - "label": "Copy selection" - }, - { - "value": "CTRL V", - "label": "Paste into active terminal" - }, - { - "value": "CTRL Up / Down", - "label": "Scroll up/down" - }, - { - "value": "SHIFT PgUp / PgDown", - "label": "Scroll page up/down" - }, - { - "value": "CTRL Home / End", - "label": "Scroll to top/bottom" - } - ] - } - }, - "Terminal": { - "_hidden": false, - "Legend": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL SHIFT", - "label": "$mod" - } - ] - }, - "Scrolling": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Up", - "label": "Scroll line up" - }, - { - "value": "$mod Down", - "label": "Scroll line down" - }, - { - "value": "$mod PgUp", - "label": "Scroll page up" - }, - { - "value": "$mod PgDown", - "label": "Scroll page down" - }, - { - "value": "$mod Home", - "label": "Scroll to beginning" - }, - { - "value": "$mod End", - "label": "Scroll to end" - }, - { - "value": "$mod Z", - "label": "Scroll to prompt -1" - }, - { - "value": "$mod X", - "label": "Scroll to prompt 1" - }, - { - "value": "$mod H", - "label": "Show scrollback" - }, - { - "value": "$mod G", - "label": "Show last command output" - } - ] - }, - "Tabs": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Right", - "label": "Next tab" - }, - { - "value": "CTRL TAB", - "label": "Next tab" - }, - { - "value": "$mod Left", - "label": "Previous tab" - }, - { - "value": "CTRL SHIFT TAB", - "label": "Previous tab" - }, - { - "value": "$mod T", - "label": "New tab" - }, - { - "value": "$mod Q", - "label": "Close tab" - }, - { - "value": "$mod .", - "label": "Move tab forward" - }, - { - "value": "$mod ,", - "label": "Move tab backward" - }, - { - "value": "$mod ALT T", - "label": "Set tab title" - } - ] - }, - "Window": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod Return", - "label": "New window" - }, - { - "value": "$mod N", - "label": "New OS window" - }, - { - "value": "$mod W", - "label": "Close window" - }, - { - "value": "$mod ]", - "label": "Next window" - }, - { - "value": "$mod [", - "label": "Previous window" - }, - { - "value": "$mod B", - "label": "Move window backward" - }, - { - "value": "$mod `", - "label": "Move window to top" - }, - { - "value": "$mod R", - "label": "Resize window" - }, - { - "value": "$mod <N>", - "label": "'N'th window" - }, - { - "value": "$mod F7", - "label": "Focus visible window" - }, - { - "value": "$mod F8", - "label": "Swap with window" - }, - { - "value": "$mod L", - "label": "Next layout" - } - ] - }, - "Actions": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod F", - "label": "Find occurrences of entered text" - }, - { - "value": "$mod C", - "label": "Copy to clipboard" - }, - { - "value": "$mod V", - "label": "Paste from clipboard" - }, - { - "value": "$mod S or SHIFT Insert", - "label": "Paste from selection" - }, - { - "value": "CTRL C", - "label": "Copy or Interrupt" - }, - { - "value": "$mod O", - "label": "Pass selection to program" - }, - { - "value": "$mod U", - "label": "Unicode input" - }, - { - "value": "$mod = / + / -", - "label": "Change font size" - }, - { - "value": "$mod E", - "label": "Open URL with hints" - } - ] - }, - "Debug": { - "_hidden": false, - "keybindings": [ - { - "value": "$mod F1", - "label": "Show help" - }, - { - "value": "$mod F2", - "label": "Edit config file" - }, - { - "value": "$mod Esc", - "label": "Shell window" - }, - { - "value": "$mod Del", - "label": "Clear terminal reset active" - }, - { - "value": "$mod F5", - "label": "Load config file" - }, - { - "value": "$mod F6", - "label": "Debug config" - } - ] - } - }, - "Firefox": { - "_hidden": false, - "Navigation": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + Left", - "label": "Back" - }, - { - "value": "CTRL + Right", - "label": "Forward" - }, - { - "value": "ALT + Home", - "label": "Home" - }, - { - "value": "CTRL + O", - "label": "Open File" - }, - { - "value": "CTRL + R", - "label": "Reload" - }, - { - "value": "CTRL + SHIFT + R", - "label": "Reload (override cache)" - }, - { - "value": "CTRL + .", - "label": "Stop" - } - ] - }, - "Current Page": { - "_hidden": false, - "keybindings": [ - { - "value": "Tab", - "label": "Focus Next Link or Input Field" - }, - { - "value": "SHIFT + Tab", - "label": "Focus Previous Link or Input Field" - }, - { - "value": "Space", - "label": "Go Down a Screen" - }, - { - "value": "SHIFT + Space", - "label": "Go Up a Screen" - }, - { - "value": "CTRL + Down", - "label": "Go to Bottom of Page" - }, - { - "value": "CTRL + Up", - "label": "Go to Top of Page" - }, - { - "value": "F6", - "label": "Move to Next Frame" - }, - { - "value": "SHIFT + F6", - "label": "Move to Previous Frame" - }, - { - "value": "CTRL + P", - "label": "Print" - }, - { - "value": "CTRL + S", - "label": "Save Page As" - }, - { - "value": "CTRL + +", - "label": "Zoom In" - }, - { - "value": "CTRL + -", - "label": "Zoom Out" - }, - { - "value": "CTRL + 0", - "label": "Zoom Reset" - } - ] - }, - "Editing": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + C", - "label": "Copy" - }, - { - "value": "CTRL + X", - "label": "Cut" - }, - { - "value": "Backspace", - "label": "Delete" - }, - { - "value": "Home", - "label": "Go to Beginning of Line" - }, - { - "value": "End", - "label": "Go to End of Line" - }, - { - "value": "CTRL + V", - "label": "Paste" - }, - { - "value": "CTRL + SHIFT + V", - "label": "Paste (as plain text)" - }, - { - "value": "CTRL + SHIFT + Z", - "label": "Redo" - }, - { - "value": "CTRL + A", - "label": "Select All" - }, - { - "value": "CTRL + Z", - "label": "Undo" - } - ] - }, - "Search": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + F", - "label": "Find" - }, - { - "value": "CTRL + G", - "label": "Find Again" - }, - { - "value": "CTRL + SHIFT + G", - "label": "Find Previous" - }, - { - "value": "'", - "label": "Quick Find within link-text only" - }, - { - "value": "/", - "label": "Quick Find" - }, - { - "value": "Esc", - "label": "Close the Find or Quick Find bar" - }, - { - "value": "CTRL + K", - "label": "Focus Search bar" - }, - { - "value": "CTRL + Up / Down", - "label": "Change the Default Search Engine" - }, - { - "value": "ALT + Up / Down", - "label": "View menu to switch, add, or manage search engines" - }, - { - "value": "CTRL + W", - "label": "Close Tab" - }, - { - "value": "CTRL + SHIFT + W", - "label": "Close Window" - }, - { - "value": "CTRL + Tab", - "label": "Cycle through Tabs in Recently Used Order" - }, - { - "value": "CTRL + Q", - "label": "Quit" - }, - { - "value": "CTRL + ALT + Left", - "label": "Go one Tab to the Left" - }, - { - "value": "CTRL + ALT + Right", - "label": "Go one Tab to the Right" - }, - { - "value": "CTRL + SHIFT + PgUp", - "label": "Move Tab Left" - }, - { - "value": "CTRL + SHIFT + PgDown", - "label": "Move Tab Right" - }, - { - "value": "CTRL + SHIFT + Home", - "label": "Move Tab in focus to start" - }, - { - "value": "CTRL + SHIFT + End", - "label": "Move Tab in focus to end" - }, - { - "value": "CTRL + M", - "label": "Mute/Unmute Audio" - }, - { - "value": "CTRL + T", - "label": "New Tab" - }, - { - "value": "CTRL + N", - "label": "New Window" - }, - { - "value": "CTRL + SHIFT + P", - "label": "New Private Window" - }, - { - "value": "ALT + Enter", - "label": "Open Address in New Foreground Tab" - }, - { - "value": "Enter", - "label": "Open Focused Bookmark or Link in Current Tab" - }, - { - "value": "CTRL + Enter", - "label": "Open Focused Link in New Background Tab" - }, - { - "value": "CTRL + SHIFT + Enter", - "label": "Open Focused Bookmark in New Background Tab" - }, - { - "value": "SHIFT + Enter", - "label": "Open Focused Bookmark or Link in New Window" - }, - { - "value": "CTRL + SHIFT + T", - "label": "Undo Close Tab" - }, - { - "value": "CTRL + SHIFT + N", - "label": "Undo Close Window" - }, - { - "value": "CTRL + 1-8", - "label": "Select Tab 1-8" - }, - { - "value": "CTRL + 9", - "label": "Select Last Tab" - }, - { - "value": "CTRL + SHIFT + X", - "label": "Moves the URL left or right" - } - ] - }, - "History": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + SHIFT + H", - "label": "History sidebar" - }, - { - "value": "CTRL + SHIFT + Delete", - "label": "Clear Recent History" - } - ] - }, - "Bookmarks": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + SHIFT + D", - "label": "Bookmark All Tabs" - }, - { - "value": "CTRL + D", - "label": "Bookmark This Page" - }, - { - "value": "CTRL + B", - "label": "Bookmarks sidebar" - }, - { - "value": "CTRL + SHIFT + S", - "label": "Library window (Bookmarks)" - }, - { - "value": "(search field in Library) + Space", - "label": "Search for all Bookmarks" - } - ] - }, - "Tools": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + J", - "label": "Downloads" - }, - { - "value": "CTRL + SHIFT + A", - "label": "Add-ons" - }, - { - "value": "CTRL + ALT + I", - "label": "Toggle Developer Tools" - }, - { - "value": "CTRL + ALT + K", - "label": "Web Console" - }, - { - "value": "CTRL + ALT + C", - "label": "Inspector" - }, - { - "value": "CTRL + ALT + S", - "label": "Debugger" - }, - { - "value": "SHIFT + F7", - "label": "Style Editor" - }, - { - "value": "SHIFT + F5", - "label": "Profiler" - }, - { - "value": "CTRL + ALT + E", - "label": "Network" - }, - { - "value": "SHIFT + F2", - "label": "Developer Toolbar" - }, - { - "value": "CTRL + ALT + M", - "label": "Responsive Design View" - }, - { - "value": "SHIFT + F4", - "label": "Scratchpad" - }, - { - "value": "CTRL + U", - "label": "Page Source" - }, - { - "value": "CTRL + SHIFT + J", - "label": "Browser Console" - }, - { - "value": "CTRL + I", - "label": "Page Info" - } - ] - }, - "PDF Viewer": { - "_hidden": false, - "keybindings": [ - { - "value": "N / J / Right", - "label": "Next page" - }, - { - "value": "P / K / Left", - "label": "Previous page" - }, - { - "value": "CTRL + +", - "label": "Zoom in" - }, - { - "value": "CTRL + -", - "label": "Zoom out" - }, - { - "value": "CTRL + 0", - "label": "Automatic Zoom" - }, - { - "value": "R", - "label": "Rotate the document clockwise" - }, - { - "value": "CTRL + R", - "label": "Rotate counterclockwise" - }, - { - "value": "CTRL + ALT + P", - "label": "Switch to Presentation Mode" - }, - { - "value": "S", - "label": "Choose Text Selection Tool" - }, - { - "value": "H", - "label": "Choose Hand Tool" - }, - { - "value": "CTRL + ALT + G", - "label": "Focus the Page Number input box" - } - ] - }, - "Miscellaneous": { - "_hidden": false, - "keybindings": [ - { - "value": "CTRL + Enter", - "label": "Complete .com address" - }, - { - "value": "SHIFT + Enter", - "label": "Complete .net address" - }, - { - "value": "CTRL + SHIFT + Enter", - "label": "Complete .org address" - }, - { - "value": "SHIFT + Delete", - "label": "Delete Selected Autocomplete Entry" - }, - { - "value": "CTRL + SHIFT + F", - "label": "Toggle Full Screen" - }, - { - "value": "CTRL + ALT + R", - "label": "Toggle Reader Mode" - }, - { - "value": "F7", - "label": "Caret Browsing" - }, - { - "value": "CTRL + L", - "label": "Select Location Bar" - } - ] - }, - "Media": { - "_hidden": false, - "keybindings": [ - { - "value": "Space", - "label": "Toggle Play/Pause" - }, - { - "value": "Down", - "label": "Decrease volume" - }, - { - "value": "Up", - "label": "Increase volume" - }, - { - "value": "CTRL + Down", - "label": "Mute audio" - }, - { - "value": "CTRL + Up", - "label": "Unmute audio" - }, - { - "value": "Left", - "label": "Seek back 15 seconds" - }, - { - "value": "CTRL + Left", - "label": "Seek back 10%" - }, - { - "value": "Right", - "label": "Seek forward 15 seconds" - }, - { - "value": "CTRL + Right", - "label": "Seek forward 10%" - }, - { - "value": "Home", - "label": "Seek to the beginning" - }, - { - "value": "End", - "label": "Seek to the end" - } - ] - } - } - } -} diff --git a/files/hyprland/noctalia/layout/layout.luau b/files/noctalia/hypr-layout/layout.luau diff --git a/files/hyprland/noctalia/layout/plugin.toml b/files/noctalia/hypr-layout/plugin.toml diff --git a/files/hyprland/noctalia/layout/translations/en.json b/files/noctalia/hypr-layout/translations/en.json diff --git a/files/hyprland/noctalia/submap/plugin.toml b/files/noctalia/hypr-submap/plugin.toml diff --git a/files/hyprland/noctalia/submap/submap.luau b/files/noctalia/hypr-submap/submap.luau diff --git a/files/hyprland/noctalia/submap/translations/en.json b/files/noctalia/hypr-submap/translations/en.json diff --git a/files/noctalia/keyhelp/README.md b/files/noctalia/keyhelp/README.md @@ -0,0 +1,36 @@ +# Keyhelp + +Keyhelp is a key-bindings helper for Hyprland/Niri. +The Desktop page displays the compositor's shortcuts. +The focused application selects the initial page. + +- Tab / Shift+Tab: move between controls +- Ctrl+Tab / Ctrl+Shift+Tab: switch application pages and clear search +- Page Up / Page Down: browse 8 results at a time +- Ctrl+F: focus search without losing its text +- Escape, outside click, or Super+/: close + +## Integration + +Each compositor supplies its executable path and invokes the controller: + +```sh +noctalia msg plugin maydayv7/keyhelp:controller all toggle hyprland +noctalia msg plugin maydayv7/keyhelp:controller all toggle niri +``` + +The controller queries the focused app before opening the panel - a failed query falls back to Desktop. +Ordinary `panel-toggle maydayv7/keyhelp:panel` is available for development. + +## Maintaining shortcuts + +Edit [`shortcuts.json`](./shortcuts.json). +Groups contain `name` and ordered `entries`. +Entries contain `keys` and `description`. `gap_before` (optional) adds separation. +Aliases match app IDs exactly. +Desktop pages declare `compositor = "hyprland"` or `"niri"`. + +--- + +- [Runtime API](https://docs.noctalia.dev/noctalia/plugins/development/runtime-api/) +- [Plugin UI](https://docs.noctalia.dev/noctalia/plugins/development/declarative-ui/) diff --git a/files/noctalia/keyhelp/controller.luau b/files/noctalia/keyhelp/controller.luau @@ -0,0 +1,49 @@ +local model = require("./lib/model.luau") +local controller = require("./lib/controller.luau") +local panelId = "maydayv7/keyhelp:panel" + +local function detect(compositor, done) + local argv + if compositor == "hyprland" then + argv = { noctalia.getConfig("hyprctl_path"), "-j", "activewindow" } + else + argv = { noctalia.getConfig("niri_path"), "msg", "--json", "focused-window" } + end + local accepted = noctalia.runAsync(argv, function(result) + if result.exitCode ~= 0 or result.timedOut or result.stdoutTruncated then + noctalia.log("Keyhelp: focused application unavailable; using Desktop") + done({}) + return + end + local window = noctalia.json.decode(result.stdout) + done(model.appIds(compositor, window)) + end) + if not accepted then + done({}) + end +end + +local control = controller.new({ + detect = detect, + open = function(context) + noctalia.state.set("context", context) + noctalia.togglePanel(panelId) + end, + close = function() + noctalia.togglePanel(panelId) + end, +}, noctalia.state.get("panel_open") == true) + +noctalia.state.watch("panel_open", function(open) + control.lifecycle(open == true) +end) + +function onIpc(event, payload) + if event == "toggle" and not control.toggle(payload) then + noctalia.log("Keyhelp: toggle requires hyprland or niri") + end +end + +function onExit() + control.stop() +end diff --git a/files/noctalia/keyhelp/lib/controller.luau b/files/noctalia/keyhelp/lib/controller.luau @@ -0,0 +1,66 @@ +local M = {} + +function M.new(host, alreadyOpen) + local self = { phase = alreadyOpen and "open" or "closed", desired = alreadyOpen or false, generation = 0 } + local function begin() + self.generation = self.generation + 1 + local generation = self.generation + self.phase = "pending" + host.detect(self.backend, function(appIds) + if generation ~= self.generation or self.phase ~= "pending" or not self.desired then + return + end + self.phase = "opening" + host.open({ compositor = self.backend, appIds = appIds }) + end) + end + + function self.toggle(backend) + if backend ~= "hyprland" and backend ~= "niri" then + return false + end + self.backend = backend + self.desired = not self.desired + if self.phase == "closed" and self.desired then + begin() + elseif self.phase == "pending" and not self.desired then + self.generation = self.generation + 1 + self.phase = "closed" + elseif self.phase == "open" and not self.desired then + self.phase = "closing" + host.close() + end + return true + end + + function self.lifecycle(open) + if open then + if self.phase ~= "opening" and self.phase ~= "closing" then + self.desired = true + end + self.phase = "open" + if not self.desired then + self.phase = "closing" + host.close() + end + else + local reopen = self.phase == "closing" and self.desired + self.generation = self.generation + 1 + self.phase = "closed" + self.desired = reopen + if reopen then + begin() + end + end + end + + function self.stop() + self.generation = self.generation + 1 + self.desired = false + self.phase = "closed" + end + + return self +end + +return M diff --git a/files/noctalia/keyhelp/lib/model.luau b/files/noctalia/keyhelp/lib/model.luau @@ -0,0 +1,157 @@ +local M = {} +local PAGE_SIZE = 8 + +local function text(value) + return type(value) == "string" and value:find("%S") ~= nil +end + +local function array(value) + if type(value) ~= "table" then + return false + end + local count = 0 + for key in pairs(value) do + if type(key) ~= "number" or key < 1 or key % 1 ~= 0 then + return false + end + count = count + 1 + end + return count == #value +end + +-- Validate content and assign runtime IDs +function M.prepare(data) + if type(data) ~= "table" or data.version ~= 1 or not array(data.pages) or #data.pages == 0 then + return nil, "Expected version 1 and a nonempty pages array" + end + local aliases, desktops = {}, {} + for pageIndex, page in ipairs(data.pages) do + if + type(page) ~= "table" + or not text(page.name) + or not array(page.groups) + or #page.groups == 0 + or not array(page.aliases) + then + return nil, "Invalid page at position " .. pageIndex + end + page.id = tostring(pageIndex) + if page.compositor ~= nil then + if (page.compositor ~= "hyprland" and page.compositor ~= "niri") or desktops[page.compositor] then + return nil, "Invalid or duplicate Desktop compositor" + end + desktops[page.compositor] = true + end + for _, alias in ipairs(page.aliases) do + if not text(alias) or aliases[alias:lower()] then + return nil, "Invalid or duplicate app alias" + end + aliases[alias:lower()] = true + end + for groupIndex, group in ipairs(page.groups) do + if type(group) ~= "table" or not text(group.name) or not array(group.entries) or #group.entries == 0 then + return nil, "Invalid group at position " .. groupIndex .. " in " .. page.name + end + group.id = tostring(groupIndex) + for entryIndex, entry in ipairs(group.entries) do + if + type(entry) ~= "table" + or not text(entry.keys) + or not text(entry.description) + or (entry.gap_before ~= nil and type(entry.gap_before) ~= "boolean") + then + return nil, "Invalid entry at position " .. entryIndex .. " in " .. page.name .. "/" .. group.name + end + entry.id = tostring(entryIndex) + end + end + end + if not desktops.hyprland or not desktops.niri then + return nil, "Both Desktop pages are required" + end + return data +end + +function M.pages(data, compositor) + local result = {} + for _, page in ipairs(data.pages) do + if page.compositor == nil or page.compositor == compositor then + table.insert(result, page) + end + end + return result +end + +function M.selectPage(pages, appIds) + for _, appId in ipairs(appIds or {}) do + for _, page in ipairs(pages) do + for _, alias in ipairs(page.aliases) do + if appId:lower() == alias:lower() then + return page.id + end + end + end + end + for _, page in ipairs(pages) do + if page.compositor then + return page.id + end + end + return pages[1].id +end + +function M.appIds(compositor, window) + if type(window) ~= "table" then + return {} + end + local ids = {} + local fields = compositor == "hyprland" and { "class", "initialClass" } or { "app_id" } + for _, field in ipairs(fields) do + if text(window[field]) then + table.insert(ids, window[field]) + end + end + return ids +end + +function M.search(pages, selected, query) + local terms, result = {}, {} + for term in query:lower():gmatch("%S+") do + table.insert(terms, term) + end + for _, page in ipairs(pages) do + if page.id == selected then + for _, group in ipairs(page.groups) do + for _, entry in ipairs(group.entries) do + local haystack = table.concat({ page.name, group.name, entry.keys, entry.description }, " "):lower() + local matches = true + for _, term in ipairs(terms) do + if not haystack:find(term, 1, true) then + matches = false + break + end + end + if matches then + table.insert( + result, + { page = page, group = group, entry = entry, key = page.id .. "/" .. group.id .. "/" .. entry.id } + ) + end + end + end + end + end + return result +end + +function M.paginate(results, requested) + local count = math.max(1, math.ceil(#results / PAGE_SIZE)) + local current = math.max(1, math.min(requested, count)) + local rows = {} + for i = (current - 1) * PAGE_SIZE + 1, math.min(current * PAGE_SIZE, #results) do + table.insert(rows, results[i]) + end + return rows, current, count +end + +return M diff --git a/files/noctalia/keyhelp/panel.luau b/files/noctalia/keyhelp/panel.luau @@ -0,0 +1,268 @@ +local model = require("./lib/model.luau") +local pages, selected, query = {}, "", "" +local pageNumber, pageCount, inputRevision, resultsRevision = 1, 1, 0, 0 +local generation, opened, loading, errorMessage = 0, false, false, nil +local context = {} +local render, load +local tr = noctalia.tr + +local function resetResults() + pageNumber = 1 + resultsRevision = resultsRevision + 1 +end + +local function choose(id) + selected, query = id, "" + inputRevision = inputRevision + 1 + resetResults() + render() +end + +local function changePage(delta) + local nextPage = math.max(1, math.min(pageNumber + delta, pageCount)) + if nextPage == pageNumber then + return + end + pageNumber = nextPage + resultsRevision = resultsRevision + 1 + render() +end + +local function renderResults(rows) + local content, previousGroup = {}, nil + for _, row in ipairs(rows) do + local group = row.page.id .. "/" .. row.group.id + if previousGroup ~= group then + table.insert( + content, + ui.label({ + key = "heading-" .. group, + text = row.page.name .. " · " .. row.group.name, + color = "primary", + fontWeight = "bold", + fontSize = 14, + }) + ) + previousGroup = group + elseif row.entry.gap_before then + table.insert(content, ui.separator({ key = "gap-" .. row.key, color = "outline", spacing = 4 })) + end + table.insert( + content, + ui.row( + { key = row.key, gap = 16, paddingH = 12, paddingV = 8, fill = "surface_variant", radius = 8, align = "center" }, + { + ui.label({ text = row.entry.description, flexGrow = 1, maxWidth = 460, maxLines = 5, fontSize = 14 }), + ui.label({ + text = row.entry.keys, + width = 260, + maxWidth = 260, + maxLines = 5, + textAlign = "end", + fontSize = 13, + fontWeight = "bold", + color = "primary", + }), + } + ) + ) + end + if #rows == 0 then + table.insert(content, ui.label({ text = tr("no_results"), color = "on_surface_variant" })) + end + -- A new key resets scrolling when the query, app, or page changes + return ui.scroll({ key = "results-" .. resultsRevision, flexGrow = 1, gap = 8 }, content) +end + +render = function() + if not opened then + return + end + local children = { + ui.row({ gap = 12, align = "center" }, { + ui.glyph({ name = "keyboard", color = "primary", size = 24 }), + ui.label({ text = tr("title"), fontSize = 20, fontWeight = "bold", flexGrow = 1 }), + ui.button({ + glyph = "x", + variant = "ghost", + controlSize = "sm", + tooltip = tr("close"), + onClick = function() + panel.close() + end, + }), + }), + } + if loading or errorMessage then + table.insert( + children, + ui.label({ text = loading and tr("loading") or tr("load_error"), color = "on_surface_variant" }) + ) + if errorMessage then + table.insert(children, ui.label({ text = errorMessage, maxLines = 6 })) + table.insert( + children, + ui.button({ + text = tr("retry"), + onClick = function() + load() + end, + }) + ) + end + panel.render(ui.column({ gap = 16, padding = 20 }, children)) + return + end + + local selectedName = "" + for _, page in ipairs(pages) do + if page.id == selected then + selectedName = page.name + break + end + end + + table.insert( + children, + ui.input({ + key = "search-" .. inputRevision, + value = query, + focus = true, + placeholder = tr("search", { app = selectedName }), + onChange = function(value) + query = value + resetResults() + render() + end, + }) + ) + local tabs = {} + for _, page in ipairs(pages) do + table.insert( + tabs, + ui.button({ + key = page.id, + text = page.name, + controlSize = "sm", + flexGrow = 1, + variant = "ghost", + selected = selected == page.id, + onClick = function() + choose(page.id) + end, + }) + ) + end + table.insert(children, ui.row({ gap = 8 }, tabs)) + + local results = model.search(pages, selected, query) + local rows + rows, pageNumber, pageCount = model.paginate(results, pageNumber) + table.insert(children, renderResults(rows)) + table.insert( + children, + ui.row({ gap = 8, align = "center" }, { + ui.label({ text = tr("count", { count = #results }), flexGrow = 1, color = "on_surface_variant", fontSize = 12 }), + ui.button({ + key = "previous", + text = tr("previous"), + controlSize = "sm", + variant = "ghost", + enabled = pageNumber > 1, + onClick = function() + changePage(-1) + end, + }), + ui.label({ text = tr("page", { current = pageNumber, total = pageCount }), fontSize = 12 }), + ui.button({ + key = "next", + text = tr("next"), + controlSize = "sm", + variant = "ghost", + enabled = pageNumber < pageCount, + onClick = function() + changePage(1) + end, + }), + }) + ) + table.insert(children, ui.label({ text = tr("hints"), fontSize = 11, color = "on_surface_variant", maxLines = 2 })) + panel.render(ui.column({ gap = 12, padding = 20, flexGrow = 1 }, children)) +end + +load = function() + generation = generation + 1 + local request = generation + loading, errorMessage = true, nil + render() + local accepted = noctalia.readFileAsync("shortcuts.json", function(raw, err) + if not opened or generation ~= request then + return + end + loading = false + local data + if raw then + data, err = noctalia.json.decode(raw) + if data then + data, err = model.prepare(data) + end + end + if not data then + errorMessage = err or tr("invalid_data") + noctalia.log("Keyhelp: " .. errorMessage) + else + pages = model.pages(data, context.compositor) + selected = model.selectPage(pages, context.appIds) + resetResults() + end + render() + end) + if not accepted then + loading, errorMessage = false, tr("read_busy") + render() + end +end + +function onOpen() + opened = true + context = noctalia.state.get("context") or {} + if context.compositor ~= "hyprland" and context.compositor ~= "niri" then + context = { compositor = noctalia.getenv("NIRI_SOCKET") and "niri" or "hyprland", appIds = {} } + end + noctalia.state.set("panel_open", true) + query, pages, selected = "", {}, "" + inputRevision = inputRevision + 1 + load() +end + +function onClose() + opened = false + generation = generation + 1 + noctalia.state.set("panel_open", false) +end + +function onExit() + onClose() +end + +function onKey(chord, pressed) + if not pressed or loading or errorMessage then + return + end + if chord == "Page_Down" then + changePage(1) + elseif chord == "Page_Up" then + changePage(-1) + elseif chord == "ctrl+f" then + inputRevision = inputRevision + 1 + render() + elseif chord == "ctrl+Tab" or chord == "ctrl+shift+Tab" then + local delta = chord == "ctrl+Tab" and 1 or -1 + for index, page in ipairs(pages) do + if page.id == selected then + choose(pages[(index - 1 + delta) % #pages + 1].id) + break + end + end + end +end diff --git a/files/noctalia/keyhelp/plugin.toml b/files/noctalia/keyhelp/plugin.toml @@ -0,0 +1,39 @@ +id = "maydayv7/keyhelp" +name = "Keyhelp" +version = "1.0.0" +plugin_api = 30 +author = "maydayv7" +license = "GPL-3.0-only" +icon = "keyboard" +tags = ["hyprland", "niri", "panel", "utility"] +description = "Searchable application and desktop shortcut reference." + +[[setting]] +key = "hyprctl_path" +type = "string" +label_key = "settings.hyprctl" +default = "hyprctl" +advanced = true + +[[setting]] +key = "niri_path" +type = "string" +label_key = "settings.niri" +default = "niri" +advanced = true + +[[service]] +id = "controller" +entry = "controller.luau" + +[[panel]] +id = "panel" +entry = "panel.luau" +width = 900 +height = 720 +placement = "floating" +position = "center" +layer = "overlay" +keyboard_focus = "exclusive" +dismiss_on_outside_click = true +capture_keys = ["ctrl+Tab", "ctrl+shift+Tab", "Page_Down", "Page_Up", "ctrl+f"] diff --git a/files/noctalia/keyhelp/shortcuts.json b/files/noctalia/keyhelp/shortcuts.json @@ -0,0 +1,1937 @@ +{ + "version": 1, + "pages": [ + { + "name": "Desktop", + "aliases": [], + "compositor": "hyprland", + "groups": [ + { + "name": "Legend", + "entries": [ + { + "keys": "SUPER", + "description": "$mod" + }, + { + "keys": "L' / R'", + "description": "Left/Right Mouse Click" + } + ] + }, + { + "name": "Compositor", + "entries": [ + { + "keys": "$mod Q or ALT F4", + "description": "Quit application" + }, + { + "keys": "$mod SHIFT Q", + "description": "Force Quit application" + }, + { + "keys": "ALT A", + "description": "Activate urgent/last window" + }, + { + "keys": "$mod E", + "description": "Maximize window" + }, + { + "keys": "$mod SHIFT E", + "description": "Fullscreen window" + }, + { + "keys": "ALT Q", + "description": "Minimize window" + }, + { + "keys": "ALT SHIFT Q", + "description": "Show all minimized windows" + }, + { + "keys": "$mod <ARROW>", + "description": "Switch focus to window in desired direction" + }, + { + "keys": "$mod SHIFT ← / →", + "description": "Scrolling: move window across | Dwindle: swap windows" + }, + { + "keys": "$mod SHIFT ↑ / ↓", + "description": "Scrolling: stack in/out of column | Dwindle: swap windows" + }, + { + "keys": "$mod Space", + "description": "Scrolling: toggle window stacking | Dwindle: split direction" + }, + { + "keys": "$mod Backspace", + "description": "Toggle tiling layout" + }, + { + "keys": "$mod [ or ]", + "description": "Scrolling: shrink/grow column width" + }, + { + "keys": "$mod SHIFT [ or ]", + "description": "Scrolling: center column / fit all columns on screen" + }, + { + "keys": "$mod SHIFT Space", + "description": "Toggle application grouping" + }, + { + "keys": "$mod CTRL <ARROW>", + "description": "Move window into desired group" + }, + { + "keys": "$mod ; / '", + "description": "Toggle floating for one window / all windows" + }, + { + "keys": "$mod C", + "description": "Center floating window and/or move cursor to top right corner" + }, + { + "keys": "$mod P", + "description": "Pin floating window on all workspaces" + } + ] + }, + { + "name": "Switcher", + "entries": [ + { + "keys": "$mod Tab", + "description": "Window Switcher" + }, + { + "keys": "ALT [SHIFT] Tab", + "description": "Cycle [backwards] through open windows on current workspace" + }, + { + "keys": "ALT [SHIFT] `", + "description": "Cycle [backwards] through grouped windows" + } + ] + }, + { + "name": "Workspaces", + "entries": [ + { + "keys": "$mod 1-9", + "description": "Focus workspace 1-9 on the current monitor" + }, + { + "keys": "$mod SHIFT 1-9", + "description": "Move window to workspace 1-9 without following" + }, + { + "keys": "$mod , or .", + "description": "Move across non-empty workspaces" + }, + { + "keys": "$mod CTRL , or .", + "description": "Move across workspaces" + }, + { + "keys": "$mod 0", + "description": "Toggle special workspace to stash windows" + }, + { + "keys": "$mod SHIFT 0", + "description": "Move window to/from stash" + }, + { + "keys": "$mod SHIFT , or .", + "description": "Move window to previous/next workspace" + }, + { + "keys": "$mod ALT , or .", + "description": "Move focus to left/right monitor" + }, + { + "keys": "$mod SHIFT ALT , or .", + "description": "Move window to left/right monitor" + } + ] + }, + { + "name": "Utility", + "entries": [ + { + "keys": "Print", + "description": "Take Screenshot of area" + }, + { + "keys": "SHIFT Print", + "description": "Take Screenshot of screen" + }, + { + "keys": "$mod = or -", + "description": "Zoom in/out" + }, + { + "keys": "$mod SHIFT -", + "description": "Zoom out fully" + }, + { + "keys": "$mod L", + "description": "Lock screen" + }, + { + "keys": "$mod S", + "description": "Toggle Compositor Shader" + }, + { + "keys": "$mod G", + "description": "Toggle Game Mode" + }, + { + "keys": "$mod SHIFT S", + "description": "Toggle window swallowing" + }, + { + "keys": "$mod SHIFT D", + "description": "Toggle main Display" + }, + { + "keys": "$mod Esc", + "description": "Open session menu" + } + ] + }, + { + "name": "Applications", + "entries": [ + { + "keys": "$mod /", + "description": "Toggle Keyhelp" + }, + { + "keys": "$mod A", + "description": "Application Launcher" + }, + { + "keys": "$mod SHIFT A", + "description": "Shell Settings" + }, + { + "keys": "$mod SHIFT C", + "description": "Color Picker" + }, + { + "keys": "$mod D", + "description": "Monitor Configuration" + }, + { + "keys": "$mod F", + "description": "File Manager" + }, + { + "keys": "$mod T", + "description": "Terminal" + }, + { + "keys": "$mod SHIFT T", + "description": "Toggle Terminal in Quake mode" + }, + { + "keys": "$mod V", + "description": "Toggle Clipboard" + }, + { + "keys": "$mod W", + "description": "Web Browser" + }, + { + "keys": "$mod Enter", + "description": "Task Manager" + }, + { + "keys": "$mod SHIFT =", + "description": "Toggle calculator" + }, + { + "keys": "$mod SHIFT B", + "description": "Bluetooth Settings" + }, + { + "keys": "$mod SHIFT P", + "description": "Volume Control" + }, + { + "keys": "$mod SHIFT N", + "description": "Network Settings" + }, + { + "keys": "$mod N", + "description": "Show notification panel" + }, + { + "keys": "$mod SHIFT Esc", + "description": "Enter / exit the inhibit submap" + } + ] + }, + { + "name": "Mouse", + "entries": [ + { + "keys": "$mod L'", + "description": "Move window" + }, + { + "keys": "$mod R'", + "description": "Window resize" + }, + { + "keys": "$mod Scroll", + "description": "Move across workspaces" + }, + { + "keys": "3F Swipe ↔", + "description": "Switch apps / columns", + "gap_before": true + }, + { + "keys": "3F Swipe ↕", + "description": "Switch across workspaces" + }, + { + "keys": "4F Swipe ↑", + "description": "Toggle workspace overview" + }, + { + "keys": "L' (in overview)", + "description": "Select workspace / window", + "gap_before": true + }, + { + "keys": "Middle click (in overview)", + "description": "Close window under cursor" + } + ] + }, + { + "name": "Resize submap", + "entries": [ + { + "keys": "$mod R", + "description": "Enter / exit resize submap" + }, + { + "keys": "Arrow keys", + "description": "Resize window by 10 pixels" + }, + { + "keys": "L' drag", + "description": "Resize window with the mouse" + }, + { + "keys": "Esc", + "description": "Exit resize submap" + } + ] + }, + { + "name": "Move submap", + "entries": [ + { + "keys": "$mod M", + "description": "Enter / exit move submap" + }, + { + "keys": "Arrow keys", + "description": "Move window in a direction, respecting groups" + }, + { + "keys": "SHIFT Arrow keys", + "description": "Move floating window by 30 pixels" + }, + { + "keys": "L' drag", + "description": "Move window with the mouse" + }, + { + "keys": ", / .", + "description": "Move window to previous / next workspace" + }, + { + "keys": "C", + "description": "Center floating window" + }, + { + "keys": "P", + "description": "Toggle pinned window" + }, + { + "keys": "Esc", + "description": "Exit move submap" + } + ] + }, + { + "name": "Minimized submap", + "entries": [ + { + "keys": "ALT SHIFT Q", + "description": "Show minimized windows" + }, + { + "keys": "Arrow keys", + "description": "Focus window in a direction" + }, + { + "keys": "Return / L'", + "description": "Restore selected window and exit submap" + }, + { + "keys": "Q", + "description": "Close selected window" + }, + { + "keys": "Esc", + "description": "Hide minimized workspace and exit submap" + } + ] + }, + { + "name": "Overview submap", + "entries": [ + { + "keys": "$mod `", + "description": "Toggle overview" + }, + { + "keys": "Arrow keys", + "description": "Navigate workspaces / windows" + }, + { + "keys": "1-9", + "description": "Focus workspace and close overview" + }, + { + "keys": "Return / L'", + "description": "Select workspace / window and close overview" + }, + { + "keys": "Middle click", + "description": "Close window under cursor" + }, + { + "keys": "Esc / $mod `", + "description": "Close overview and exit submap" + } + ] + }, + { + "name": "Media and hardware", + "entries": [ + { + "keys": "XF86AudioPlay", + "description": "Play / pause media" + }, + { + "keys": "XF86AudioPrev / XF86AudioNext", + "description": "Previous / next track" + }, + { + "keys": "XF86AudioMute", + "description": "Toggle mute" + }, + { + "keys": "XF86AudioRaiseVolume / XF86AudioLowerVolume", + "description": "Increase / decrease volume" + }, + { + "keys": "XF86MonBrightnessUp / XF86MonBrightnessDown", + "description": "Increase / decrease display brightness" + }, + { + "keys": "XF86KbdBrightnessUp / XF86KbdBrightnessDown", + "description": "Increase / decrease keyboard backlight" + }, + { + "keys": "XF86TouchpadToggle", + "description": "Toggle touchpad" + }, + { + "keys": "Lid closed", + "description": "Lock screen" + } + ] + } + ] + }, + { + "name": "Desktop", + "compositor": "niri", + "aliases": [], + "groups": [ + { + "name": "Legend", + "entries": [ + { + "keys": "SUPER", + "description": "$mod" + } + ] + }, + { + "name": "Windows and columns", + "entries": [ + { + "keys": "$mod Q / ALT F4", + "description": "Close window" + }, + { + "keys": "$mod C", + "description": "Center window" + }, + { + "keys": "$mod E", + "description": "Maximize window to edges" + }, + { + "keys": "$mod SHIFT E", + "description": "Toggle fullscreen window" + }, + { + "keys": "$mod ]", + "description": "Increase column width by 10%" + }, + { + "keys": "$mod [", + "description": "Cycle preset column widths" + }, + { + "keys": "$mod =", + "description": "Maximize column" + }, + { + "keys": "$mod -", + "description": "Cycle preset window heights" + }, + { + "keys": "$mod ;", + "description": "Toggle floating window" + }, + { + "keys": "$mod '", + "description": "Switch focus between floating and tiling" + }, + { + "keys": "$mod SHIFT Tab", + "description": "Toggle tabbed column display" + }, + { + "keys": "$mod Tab", + "description": "Toggle overview" + } + ] + }, + { + "name": "Focus and movement", + "entries": [ + { + "keys": "$mod ← / →", + "description": "Focus previous / next column or monitor" + }, + { + "keys": "$mod ↑ / ↓", + "description": "Focus previous / next window or workspace" + }, + { + "keys": "$mod SHIFT ← / →", + "description": "Consume or expel window left / right" + }, + { + "keys": "$mod SHIFT ↑ / ↓", + "description": "Move window up / down, crossing workspaces" + }, + { + "keys": "$mod SHIFT Return", + "description": "Move window to next monitor" + } + ] + }, + { + "name": "Workspaces", + "entries": [ + { + "keys": "$mod 1-9", + "description": "Focus workspace 1-9" + }, + { + "keys": "$mod SHIFT 1-9", + "description": "Move window to workspace 1-9" + } + ] + }, + { + "name": "Applications and shell", + "entries": [ + { + "keys": "$mod /", + "description": "Toggle Keyhelp" + }, + { + "keys": "$mod F", + "description": "Open file manager" + }, + { + "keys": "$mod T", + "description": "Open Kitty terminal" + }, + { + "keys": "$mod W", + "description": "Open Firefox" + }, + { + "keys": "$mod Return", + "description": "Open task manager" + }, + { + "keys": "XF86Calculator", + "description": "Open calculator" + }, + { + "keys": "$mod A", + "description": "Open launcher" + }, + { + "keys": "$mod SHIFT A", + "description": "Open shell settings" + }, + { + "keys": "$mod N", + "description": "Open notifications" + }, + { + "keys": "$mod V", + "description": "Open clipboard" + }, + { + "keys": "$mod Esc", + "description": "Open session menu" + } + ] + }, + { + "name": "Utilities", + "entries": [ + { + "keys": "Print", + "description": "Capture a screen region" + }, + { + "keys": "SHIFT Print", + "description": "Pick a screen to capture" + }, + { + "keys": "CTRL Print", + "description": "Capture focused window" + }, + { + "keys": "$mod L", + "description": "Lock screen" + }, + { + "keys": "$mod SHIFT C", + "description": "Pick a color" + }, + { + "keys": "$mod SHIFT B", + "description": "Open Bluetooth settings" + }, + { + "keys": "$mod SHIFT N", + "description": "Open network settings" + }, + { + "keys": "$mod SHIFT P", + "description": "Open audio settings" + }, + { + "keys": "$mod D", + "description": "Open display settings" + } + ] + }, + { + "name": "Mouse", + "entries": [ + { + "keys": "$mod SHIFT Right click", + "description": "Cycle preset window widths" + }, + { + "keys": "$mod Scroll up / down", + "description": "Focus previous / next column" + }, + { + "keys": "$mod SHIFT Scroll up / down", + "description": "Focus previous / next workspace" + } + ] + }, + { + "name": "Media and hardware", + "entries": [ + { + "keys": "XF86AudioPlay", + "description": "Play / pause media" + }, + { + "keys": "XF86AudioPrev / XF86AudioNext", + "description": "Previous / next track" + }, + { + "keys": "XF86AudioMute", + "description": "Toggle mute" + }, + { + "keys": "XF86AudioRaiseVolume / XF86AudioLowerVolume", + "description": "Increase / decrease volume" + }, + { + "keys": "XF86MonBrightnessUp / XF86MonBrightnessDown", + "description": "Increase / decrease display brightness" + }, + { + "keys": "XF86KbdBrightnessUp / XF86KbdBrightnessDown", + "description": "Increase / decrease keyboard backlight" + } + ] + } + ] + }, + { + "name": "Code", + "aliases": ["code", "code-url-handler", "com.visualstudio.code"], + "groups": [ + { + "name": "General", + "entries": [ + { + "keys": "CTRL /", + "description": "Show Command Palette" + }, + { + "keys": "CTRL P", + "description": "Quick Open, Go to File..." + }, + { + "keys": "CTRL SHIFT N", + "description": "New window/instance" + }, + { + "keys": "CTRL SHIFT W", + "description": "Close window/instance" + }, + { + "keys": "CTRL ,", + "description": "User Settings" + }, + { + "keys": "CTRL K + CTRL S", + "description": "Keyboard Shortcuts" + } + ] + }, + { + "name": "Editing", + "entries": [ + { + "keys": "CTRL X", + "description": "Cut line (empty selection)" + }, + { + "keys": "CTRL C", + "description": "Copy line (empty selection)" + }, + { + "keys": "ALT Up / Down", + "description": "Move line up/down" + }, + { + "keys": "SHIFT ALT Up / Down", + "description": "Copy line up/down" + }, + { + "keys": "CTRL D", + "description": "Delete line" + }, + { + "keys": "CTRL Return", + "description": "Insert line below" + }, + { + "keys": "CTRL SHIFT Return", + "description": "Insert line above" + }, + { + "keys": "CTRL SHIFT \\", + "description": "Jump to matching bracket" + }, + { + "keys": "CTRL ] / [", + "description": "Indent/outdent line" + }, + { + "keys": "Home / End", + "description": "Go to beginning/end of line" + }, + { + "keys": "CTRL Home", + "description": "Go to beginning of file" + }, + { + "keys": "CTRL End", + "description": "Go to end of file" + }, + { + "keys": "CTRL Up / Down", + "description": "Scroll line up/down" + }, + { + "keys": "ALT PgUp / PgDown", + "description": "Scroll page up/down" + }, + { + "keys": "CTRL SHIFT [", + "description": "Fold (collapse) region" + }, + { + "keys": "CTRL SHIFT ]", + "description": "Unfold (uncollapse) region" + }, + { + "keys": "CTRL K + CTRL [", + "description": "Fold (collapse) all subregions" + }, + { + "keys": "CTRL K + CTRL ]", + "description": "Unfold (uncollapse) all subregions" + }, + { + "keys": "CTRL K + CTRL 0", + "description": "Fold (collapse) all regions" + }, + { + "keys": "CTRL K + CTRL J", + "description": "Unfold (uncollapse) all regions" + }, + { + "keys": "CTRL K + CTRL C", + "description": "Add line comment" + }, + { + "keys": "CTRL K + CTRL U", + "description": "Remove line comment" + }, + { + "keys": "SHIFT ALT A", + "description": "Toggle block comment" + }, + { + "keys": "ALT Z", + "description": "Toggle word wrap" + } + ] + }, + { + "name": "Navigation", + "entries": [ + { + "keys": "CTRL T", + "description": "Show all Symbols" + }, + { + "keys": "CTRL G", + "description": "Go to Line..." + }, + { + "keys": "CTRL P", + "description": "Go to File..." + }, + { + "keys": "CTRL SHIFT O", + "description": "Go to Symbol..." + }, + { + "keys": "CTRL SHIFT M", + "description": "Show Problems panel" + }, + { + "keys": "F8", + "description": "Go to next error or warning" + }, + { + "keys": "SHIFT F8", + "description": "Go to previous error or warning" + }, + { + "keys": "CTRL SHIFT TAB", + "description": "Navigate editor group history" + }, + { + "keys": "ALT Left / Right", + "description": "Go back/forward" + }, + { + "keys": "CTRL M", + "description": "Toggle Tab moves focus" + } + ] + }, + { + "name": "Search", + "entries": [ + { + "keys": "CTRL F", + "description": "Find" + }, + { + "keys": "CTRL H", + "description": "Replace" + }, + { + "keys": "F3", + "description": "Find next" + }, + { + "keys": "SHIFT F3", + "description": "Find previous" + }, + { + "keys": "ALT Return", + "description": "Select all occurences of Find match" + }, + { + "keys": "CTRL K + CTRL D", + "description": "Move last selection to next Find match" + }, + { + "keys": "ALT C / R / W", + "description": "Toggle case-sensitive/regex/whole word" + } + ] + }, + { + "name": "Selection", + "entries": [ + { + "keys": "ALT Click", + "description": "Insert cursor" + }, + { + "keys": "CTRL ALT Up / Down", + "description": "Insert cursor above/below" + }, + { + "keys": "CTRL U", + "description": "Undo last cursor operation" + }, + { + "keys": "SHIFT ALT I", + "description": "Insert cursor at end of each line selected" + }, + { + "keys": "CTRL I", + "description": "Select current line" + }, + { + "keys": "CTRL SHIFT L", + "description": "Select all occurrences of current selection" + }, + { + "keys": "CTRL F2", + "description": "Select all occurrences of current word" + }, + { + "keys": "SHIFT ALT Right", + "description": "Expand selection" + }, + { + "keys": "SHIFT ALT Left", + "description": "Shrink selection" + }, + { + "keys": "SHIFT ALT (Mouse Drag) or <ARROW>", + "description": "Column (box) selection" + } + ] + }, + { + "name": "Editor", + "entries": [ + { + "keys": "CTRL F4", + "description": "Close editor" + }, + { + "keys": "CTRL W", + "description": "Close editor" + }, + { + "keys": "CTRL K + F", + "description": "Close folder" + }, + { + "keys": "CTRL \\", + "description": "Split editor" + }, + { + "keys": "CTRL 1 / 2 / 3", + "description": "Focus into 1st, 2nd, or 3rd editor group" + }, + { + "keys": "CTRL K + CTRL Left / Right", + "description": "Focus into previous/next editor group" + }, + { + "keys": "CTRL SHIFT PgUp / PgDown", + "description": "Move editor left/right" + }, + { + "keys": "CTRL K + Left / Right", + "description": "Move active editor group" + } + ] + }, + { + "name": "File", + "entries": [ + { + "keys": "CTRL N", + "description": "New File" + }, + { + "keys": "CTRL O", + "description": "Open File..." + }, + { + "keys": "CTRL S", + "description": "Save" + }, + { + "keys": "CTRL SHIFT S", + "description": "Save As..." + }, + { + "keys": "CTRL K + S", + "description": "Save All" + }, + { + "keys": "CTRL F4", + "description": "Close" + }, + { + "keys": "CTRL K + CTRL W", + "description": "Close All" + }, + { + "keys": "CTRL SHIFT T", + "description": "Reopen closed editor" + }, + { + "keys": "CTRL K + Return", + "description": "Keep preview mode editor open" + }, + { + "keys": "CTRL TAB", + "description": "Open next" + }, + { + "keys": "CTRL SHIFT TAB", + "description": "Open previous" + }, + { + "keys": "CTRL K + P", + "description": "Copy path of active file" + }, + { + "keys": "CTRL K + R", + "description": "Reveal active file in Explorer" + }, + { + "keys": "CTRL K + O", + "description": "Show active file in new window/instance" + } + ] + }, + { + "name": "Display", + "entries": [ + { + "keys": "F11", + "description": "Toggle full screen" + }, + { + "keys": "SHIFT ALT 0", + "description": "Toggle editor layout" + }, + { + "keys": "CTRL =/-", + "description": "Zoom in/out" + }, + { + "keys": "CTRL B", + "description": "Toggle Sidebar visibility" + }, + { + "keys": "CTRL SHIFT E", + "description": "Show Explorer/Toggle focus" + }, + { + "keys": "CTRL SHIFT F", + "description": "Show Search" + }, + { + "keys": "CTRL SHIFT G", + "description": "Show Source Control" + }, + { + "keys": "CTRL SHIFT D", + "description": "Show Debug" + }, + { + "keys": "CTRL SHIFT X", + "description": "Show Extensions" + }, + { + "keys": "CTRL SHIFT H", + "description": "Replace in files" + }, + { + "keys": "CTRL SHIFT J", + "description": "Toggle Search details" + }, + { + "keys": "CTRL SHIFT U", + "description": "Show Output panel" + }, + { + "keys": "CTRL SHIFT V", + "description": "Open Markdown preview" + }, + { + "keys": "CTRL K + V", + "description": "Open Markdown preview to the side" + }, + { + "keys": "CTRL K + Z", + "description": "Zen Mode (Esc to exit)" + } + ] + }, + { + "name": "Debug", + "entries": [ + { + "keys": "F9", + "description": "Toggle breakpoint" + }, + { + "keys": "F5", + "description": "Start/Continue" + }, + { + "keys": "SHIFT F5", + "description": "Stop" + }, + { + "keys": "F11", + "description": "Step into" + }, + { + "keys": "SHIFT F11", + "description": "Step out" + }, + { + "keys": "F10", + "description": "Step over" + }, + { + "keys": "CTRL K + CTRL I", + "description": "Show hover" + } + ] + }, + { + "name": "Terminal", + "entries": [ + { + "keys": "ALT T", + "description": "Show terminal" + }, + { + "keys": "CTRL C", + "description": "Copy selection" + }, + { + "keys": "CTRL V", + "description": "Paste into active terminal" + }, + { + "keys": "CTRL Up / Down", + "description": "Scroll up/down" + }, + { + "keys": "SHIFT PgUp / PgDown", + "description": "Scroll page up/down" + }, + { + "keys": "CTRL Home / End", + "description": "Scroll to top/bottom" + } + ] + } + ] + }, + { + "name": "Terminal", + "aliases": ["kitty", "net.kovidgoyal.kitty"], + "groups": [ + { + "name": "Legend", + "entries": [ + { + "keys": "CTRL SHIFT", + "description": "$mod" + } + ] + }, + { + "name": "Scrolling", + "entries": [ + { + "keys": "$mod Up", + "description": "Scroll line up" + }, + { + "keys": "$mod Down", + "description": "Scroll line down" + }, + { + "keys": "$mod PgUp", + "description": "Scroll page up" + }, + { + "keys": "$mod PgDown", + "description": "Scroll page down" + }, + { + "keys": "$mod Home", + "description": "Scroll to beginning" + }, + { + "keys": "$mod End", + "description": "Scroll to end" + }, + { + "keys": "$mod Z", + "description": "Scroll to prompt -1" + }, + { + "keys": "$mod X", + "description": "Scroll to prompt 1" + }, + { + "keys": "$mod H", + "description": "Show scrollback" + }, + { + "keys": "$mod G", + "description": "Show last command output" + } + ] + }, + { + "name": "Tabs", + "entries": [ + { + "keys": "$mod Right", + "description": "Next tab" + }, + { + "keys": "CTRL TAB", + "description": "Next tab" + }, + { + "keys": "$mod Left", + "description": "Previous tab" + }, + { + "keys": "CTRL SHIFT TAB", + "description": "Previous tab" + }, + { + "keys": "$mod T", + "description": "New tab" + }, + { + "keys": "$mod Q", + "description": "Close tab" + }, + { + "keys": "$mod .", + "description": "Move tab forward" + }, + { + "keys": "$mod ,", + "description": "Move tab backward" + }, + { + "keys": "$mod ALT T", + "description": "Set tab title" + } + ] + }, + { + "name": "Window", + "entries": [ + { + "keys": "$mod Return", + "description": "New window" + }, + { + "keys": "$mod N", + "description": "New OS window" + }, + { + "keys": "$mod W", + "description": "Close window" + }, + { + "keys": "$mod ]", + "description": "Next window" + }, + { + "keys": "$mod [", + "description": "Previous window" + }, + { + "keys": "$mod B", + "description": "Move window backward" + }, + { + "keys": "$mod `", + "description": "Move window to top" + }, + { + "keys": "$mod R", + "description": "Resize window" + }, + { + "keys": "$mod <N>", + "description": "'N'th window" + }, + { + "keys": "$mod F7", + "description": "Focus visible window" + }, + { + "keys": "$mod F8", + "description": "Swap with window" + }, + { + "keys": "$mod L", + "description": "Next layout" + } + ] + }, + { + "name": "Actions", + "entries": [ + { + "keys": "$mod F", + "description": "Find occurrences of entered text" + }, + { + "keys": "$mod C", + "description": "Copy to clipboard" + }, + { + "keys": "$mod V", + "description": "Paste from clipboard" + }, + { + "keys": "$mod S or SHIFT Insert", + "description": "Paste from selection" + }, + { + "keys": "CTRL C", + "description": "Copy or Interrupt" + }, + { + "keys": "$mod O", + "description": "Pass selection to program" + }, + { + "keys": "$mod U", + "description": "Unicode input" + }, + { + "keys": "$mod = / + / -", + "description": "Change font size" + }, + { + "keys": "$mod E", + "description": "Open URL with hints" + } + ] + }, + { + "name": "Debug", + "entries": [ + { + "keys": "$mod F1", + "description": "Show help" + }, + { + "keys": "$mod F2", + "description": "Edit config file" + }, + { + "keys": "$mod Esc", + "description": "Shell window" + }, + { + "keys": "$mod Del", + "description": "Clear terminal reset active" + }, + { + "keys": "$mod F5", + "description": "Load config file" + }, + { + "keys": "$mod F6", + "description": "Debug config" + } + ] + } + ] + }, + { + "name": "Firefox", + "aliases": ["firefox", "org.mozilla.firefox"], + "groups": [ + { + "name": "Navigation", + "entries": [ + { + "keys": "CTRL + Left", + "description": "Back" + }, + { + "keys": "CTRL + Right", + "description": "Forward" + }, + { + "keys": "ALT + Home", + "description": "Home" + }, + { + "keys": "CTRL + O", + "description": "Open File" + }, + { + "keys": "CTRL + R", + "description": "Reload" + }, + { + "keys": "CTRL + SHIFT + R", + "description": "Reload (override cache)" + }, + { + "keys": "CTRL + .", + "description": "Stop" + } + ] + }, + { + "name": "Current Page", + "entries": [ + { + "keys": "Tab", + "description": "Focus Next Link or Input Field" + }, + { + "keys": "SHIFT + Tab", + "description": "Focus Previous Link or Input Field" + }, + { + "keys": "Space", + "description": "Go Down a Screen" + }, + { + "keys": "SHIFT + Space", + "description": "Go Up a Screen" + }, + { + "keys": "CTRL + Down", + "description": "Go to Bottom of Page" + }, + { + "keys": "CTRL + Up", + "description": "Go to Top of Page" + }, + { + "keys": "F6", + "description": "Move to Next Frame" + }, + { + "keys": "SHIFT + F6", + "description": "Move to Previous Frame" + }, + { + "keys": "CTRL + P", + "description": "Print" + }, + { + "keys": "CTRL + S", + "description": "Save Page As" + }, + { + "keys": "CTRL + +", + "description": "Zoom In" + }, + { + "keys": "CTRL + -", + "description": "Zoom Out" + }, + { + "keys": "CTRL + 0", + "description": "Zoom Reset" + } + ] + }, + { + "name": "Editing", + "entries": [ + { + "keys": "CTRL + C", + "description": "Copy" + }, + { + "keys": "CTRL + X", + "description": "Cut" + }, + { + "keys": "Backspace", + "description": "Delete" + }, + { + "keys": "Home", + "description": "Go to Beginning of Line" + }, + { + "keys": "End", + "description": "Go to End of Line" + }, + { + "keys": "CTRL + V", + "description": "Paste" + }, + { + "keys": "CTRL + SHIFT + V", + "description": "Paste (as plain text)" + }, + { + "keys": "CTRL + SHIFT + Z", + "description": "Redo" + }, + { + "keys": "CTRL + A", + "description": "Select All" + }, + { + "keys": "CTRL + Z", + "description": "Undo" + } + ] + }, + { + "name": "Search", + "entries": [ + { + "keys": "CTRL + F", + "description": "Find" + }, + { + "keys": "CTRL + G", + "description": "Find Again" + }, + { + "keys": "CTRL + SHIFT + G", + "description": "Find Previous" + }, + { + "keys": "'", + "description": "Quick Find within link-text only" + }, + { + "keys": "/", + "description": "Quick Find" + }, + { + "keys": "Esc", + "description": "Close the Find or Quick Find bar" + }, + { + "keys": "CTRL + K", + "description": "Focus Search bar" + }, + { + "keys": "CTRL + Up / Down", + "description": "Change the Default Search Engine" + }, + { + "keys": "ALT + Up / Down", + "description": "View menu to switch, add, or manage search engines" + }, + { + "keys": "CTRL + W", + "description": "Close Tab" + }, + { + "keys": "CTRL + SHIFT + W", + "description": "Close Window" + }, + { + "keys": "CTRL + Tab", + "description": "Cycle through Tabs in Recently Used Order" + }, + { + "keys": "CTRL + Q", + "description": "Quit" + }, + { + "keys": "CTRL + ALT + Left", + "description": "Go one Tab to the Left" + }, + { + "keys": "CTRL + ALT + Right", + "description": "Go one Tab to the Right" + }, + { + "keys": "CTRL + SHIFT + PgUp", + "description": "Move Tab Left" + }, + { + "keys": "CTRL + SHIFT + PgDown", + "description": "Move Tab Right" + }, + { + "keys": "CTRL + SHIFT + Home", + "description": "Move Tab in focus to start" + }, + { + "keys": "CTRL + SHIFT + End", + "description": "Move Tab in focus to end" + }, + { + "keys": "CTRL + M", + "description": "Mute/Unmute Audio" + }, + { + "keys": "CTRL + T", + "description": "New Tab" + }, + { + "keys": "CTRL + N", + "description": "New Window" + }, + { + "keys": "CTRL + SHIFT + P", + "description": "New Private Window" + }, + { + "keys": "ALT + Enter", + "description": "Open Address in New Foreground Tab" + }, + { + "keys": "Enter", + "description": "Open Focused Bookmark or Link in Current Tab" + }, + { + "keys": "CTRL + Enter", + "description": "Open Focused Link in New Background Tab" + }, + { + "keys": "CTRL + SHIFT + Enter", + "description": "Open Focused Bookmark in New Background Tab" + }, + { + "keys": "SHIFT + Enter", + "description": "Open Focused Bookmark or Link in New Window" + }, + { + "keys": "CTRL + SHIFT + T", + "description": "Undo Close Tab" + }, + { + "keys": "CTRL + SHIFT + N", + "description": "Undo Close Window" + }, + { + "keys": "CTRL + 1-8", + "description": "Select Tab 1-8" + }, + { + "keys": "CTRL + 9", + "description": "Select Last Tab" + }, + { + "keys": "CTRL + SHIFT + X", + "description": "Moves the URL left or right" + } + ] + }, + { + "name": "History", + "entries": [ + { + "keys": "CTRL + SHIFT + H", + "description": "History sidebar" + }, + { + "keys": "CTRL + SHIFT + Delete", + "description": "Clear Recent History" + } + ] + }, + { + "name": "Bookmarks", + "entries": [ + { + "keys": "CTRL + SHIFT + D", + "description": "Bookmark All Tabs" + }, + { + "keys": "CTRL + D", + "description": "Bookmark This Page" + }, + { + "keys": "CTRL + B", + "description": "Bookmarks sidebar" + }, + { + "keys": "CTRL + SHIFT + S", + "description": "Library window (Bookmarks)" + }, + { + "keys": "(search field in Library) + Space", + "description": "Search for all Bookmarks" + } + ] + }, + { + "name": "Tools", + "entries": [ + { + "keys": "CTRL + J", + "description": "Downloads" + }, + { + "keys": "CTRL + SHIFT + A", + "description": "Add-ons" + }, + { + "keys": "CTRL + ALT + I", + "description": "Toggle Developer Tools" + }, + { + "keys": "CTRL + ALT + K", + "description": "Web Console" + }, + { + "keys": "CTRL + ALT + C", + "description": "Inspector" + }, + { + "keys": "CTRL + ALT + S", + "description": "Debugger" + }, + { + "keys": "SHIFT + F7", + "description": "Style Editor" + }, + { + "keys": "SHIFT + F5", + "description": "Profiler" + }, + { + "keys": "CTRL + ALT + E", + "description": "Network" + }, + { + "keys": "SHIFT + F2", + "description": "Developer Toolbar" + }, + { + "keys": "CTRL + ALT + M", + "description": "Responsive Design View" + }, + { + "keys": "SHIFT + F4", + "description": "Scratchpad" + }, + { + "keys": "CTRL + U", + "description": "Page Source" + }, + { + "keys": "CTRL + SHIFT + J", + "description": "Browser Console" + }, + { + "keys": "CTRL + I", + "description": "Page Info" + } + ] + }, + { + "name": "PDF Viewer", + "entries": [ + { + "keys": "N / J / Right", + "description": "Next page" + }, + { + "keys": "P / K / Left", + "description": "Previous page" + }, + { + "keys": "CTRL + +", + "description": "Zoom in" + }, + { + "keys": "CTRL + -", + "description": "Zoom out" + }, + { + "keys": "CTRL + 0", + "description": "Automatic Zoom" + }, + { + "keys": "R", + "description": "Rotate the document clockwise" + }, + { + "keys": "CTRL + R", + "description": "Rotate counterclockwise" + }, + { + "keys": "CTRL + ALT + P", + "description": "Switch to Presentation Mode" + }, + { + "keys": "S", + "description": "Choose Text Selection Tool" + }, + { + "keys": "H", + "description": "Choose Hand Tool" + }, + { + "keys": "CTRL + ALT + G", + "description": "Focus the Page Number input box" + } + ] + }, + { + "name": "Miscellaneous", + "entries": [ + { + "keys": "CTRL + Enter", + "description": "Complete .com address" + }, + { + "keys": "SHIFT + Enter", + "description": "Complete .net address" + }, + { + "keys": "CTRL + SHIFT + Enter", + "description": "Complete .org address" + }, + { + "keys": "SHIFT + Delete", + "description": "Delete Selected Autocomplete Entry" + }, + { + "keys": "CTRL + SHIFT + F", + "description": "Toggle Full Screen" + }, + { + "keys": "CTRL + ALT + R", + "description": "Toggle Reader Mode" + }, + { + "keys": "F7", + "description": "Caret Browsing" + }, + { + "keys": "CTRL + L", + "description": "Select Location Bar" + } + ] + }, + { + "name": "Media", + "entries": [ + { + "keys": "Space", + "description": "Toggle Play/Pause" + }, + { + "keys": "Down", + "description": "Decrease volume" + }, + { + "keys": "Up", + "description": "Increase volume" + }, + { + "keys": "CTRL + Down", + "description": "Mute audio" + }, + { + "keys": "CTRL + Up", + "description": "Unmute audio" + }, + { + "keys": "Left", + "description": "Seek back 15 seconds" + }, + { + "keys": "CTRL + Left", + "description": "Seek back 10%" + }, + { + "keys": "Right", + "description": "Seek forward 15 seconds" + }, + { + "keys": "CTRL + Right", + "description": "Seek forward 10%" + }, + { + "keys": "Home", + "description": "Seek to the beginning" + }, + { + "keys": "End", + "description": "Seek to the end" + } + ] + } + ] + } + ] +} diff --git a/files/noctalia/keyhelp/translations/en.json b/files/noctalia/keyhelp/translations/en.json @@ -0,0 +1,18 @@ +{ + "title": "Keyhelp", + "close": "Close", + "search": "Search {app} shortcuts…", + "loading": "Loading shortcuts…", + "load_error": "Could not load shortcuts", + "invalid_data": "The shortcut file is invalid.", + "read_busy": "The file reader is busy. Try again.", + "retry": "Retry", + "no_results": "No matching shortcuts in this app. Try another search or select another app.", + "count": "{count} shortcuts", + "page": "{current} / {total}", + "previous": "Previous", + "next": "Next", + "hints": "Ctrl+Tab: apps · Page Up/Down: pages · Ctrl+F: search · Esc: close", + "settings.hyprctl": "Hyprctl executable", + "settings.niri": "Niri executable" +} diff --git a/modules/desktop/_wm/shell.nix b/modules/desktop/_wm/shell.nix @@ -311,7 +311,7 @@ # Plugins plugins = { - source = lib.mkDefault [ + source = [ { name = "official"; kind = "git"; @@ -322,10 +322,16 @@ kind = "git"; location = "https://github.com/noctalia-dev/community-plugins"; } + { + name = "local"; + kind = "path"; + location = files.noctalia; + } ]; - enabled = lib.mkDefault [ + enabled = [ "noctalia/screen_recorder" "noctalia/timer" + "maydayv7/keyhelp" ]; }; plugin_settings."noctalia/screen_recorder" = { diff --git a/modules/desktop/hyprland/_features/shell.nix b/modules/desktop/hyprland/_features/shell.nix @@ -1,5 +1,5 @@ ## Shell Integration -{files ? null, ...}: { +_: { home = { config, lib, @@ -38,36 +38,16 @@ }; # Plugins - plugins = { - source = [ - { - name = "official"; - kind = "git"; - location = "https://github.com/noctalia-dev/official-plugins"; - } - { - name = "community"; - kind = "git"; - location = "https://github.com/noctalia-dev/community-plugins"; - } - { - name = "local"; - kind = "path"; - location = files.hyprland.noctalia; - } - ]; - enabled = [ - "noctalia/screen_recorder" - "noctalia/timer" - "maydayv7/hyprland-submap" - "maydayv7/hyprland-layout" - ]; - }; + plugins.enabled = lib.mkAfter [ + "maydayv7/hyprland-submap" + "maydayv7/hyprland-layout" + ]; plugin_settings = let hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl"; jq = lib.getExe pkgs.jq; socket2 = "${lib.getExe pkgs.socat} -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock -"; in { + "maydayv7/keyhelp".hyprctl_path = hyprctl; "maydayv7/hyprland-submap" = { command = socket2; aliases = [ diff --git a/modules/desktop/hyprland/_features/utils.nix b/modules/desktop/hyprland/_features/utils.nix @@ -1,30 +1,18 @@ ## Utilities -{ - util ? null, - files ? null, - ... -}: { +{files ? null, ...}: { nixos = {pkgs, ...}: { environment.systemPackages = with pkgs; [ - custom.kebihelp custom.hyprutils unstable.pyprland hyprshade ]; }; - home = {config, ...}: { + home = _: { home.file = with files.hyprland; { # Pyprland ".config/pypr/config.toml".text = pypr; - # Keybinds Viewer - ".config/kebihelp.json".text = util.build.theme { - inherit (config.stylix) fonts; - inherit (config.lib.stylix) colors; - file = kebihelp; - }; - # Shaders ".config/hypr/shaders" = { source = shaders; diff --git a/modules/desktop/hyprland/_settings/apps.nix b/modules/desktop/hyprland/_settings/apps.nix @@ -17,7 +17,6 @@ lib.mkIf (osConfig != null) ( mod = "SUPER"; unit = command: lib.head (lib.splitString " " command); - toggle = app: "pkill ${app} || uwsm app -u ${app}.scope -- ${app}"; runOnce = app: "pgrep ${app} || uwsm app -u ${app}.scope -- ${app}"; in { ## App Environment @@ -63,7 +62,7 @@ lib.mkIf (osConfig != null) ( # Utilities (bind (combo [mod] "A") (exec "noctalia msg panel-toggle launcher")) - (bind (combo [mod] "slash") (exec "${toggle "kebihelp"} show -a")) + (bind (combo [mod] "slash") (exec "noctalia msg plugin maydayv7/keyhelp:controller all toggle hyprland")) (bind (combo [mod "SHIFT"] "C") (exec "${runOnce "hyprpicker"} -arf hex")) (bind (combo [mod "SHIFT"] "B") (exec (runOnce "overskride"))) (bind (combo [mod] "D") (exec (runOnce "nwg-displays"))) @@ -120,14 +119,6 @@ lib.mkIf (osConfig != null) ( stay_focused = true; } - # Keybinds Viewer - { - match.title = "^(Kebihelp)$"; - pin = true; - stay_focused = true; - opacity = "0.9 override"; - } - # Browser Windows { match.title = "^(Picture-in-[P|p]icture)$"; diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix @@ -10,7 +10,7 @@ base = import ../_base.nix {}; args = {inherit util files inputs;}; - features = builtins.map (p: import p args) ( + features = map (p: import p args) ( util.map.modules.list ../_wm ++ util.map.modules.list ./_features ); @@ -22,7 +22,7 @@ in { nixos.qt nixos.gtk ] - ++ builtins.map (f: f.nixos or {}) features; + ++ map (f: f.nixos or {}) features; homeManager.hyprland.imports = [ @@ -30,7 +30,7 @@ in { homeManager.qt homeManager.gtk ] - ++ builtins.map (f: f.home or {}) features - ++ builtins.map (p: import p args) (util.map.modules.list ./_settings); + ++ map (f: f.home or {}) features + ++ map (p: import p args) (util.map.modules.list ./_settings); }; } diff --git a/modules/desktop/niri/_features/shell.nix b/modules/desktop/niri/_features/shell.nix @@ -1,6 +1,9 @@ ## Shell Integration _: { - home = _: { - programs.noctalia.settings.shell.niri_overview_type_to_launch_enabled = true; + home = {config, ...}: { + programs.noctalia.settings = { + shell.niri_overview_type_to_launch_enabled = true; + plugin_settings."maydayv7/keyhelp".niri_path = "${config.programs.niri.package}/bin/niri"; + }; }; } diff --git a/modules/desktop/niri/_settings/keybinds.nix b/modules/desktop/niri/_settings/keybinds.nix @@ -7,7 +7,6 @@ _: {config, ...}: { in { # Compositor - "Super+slash".action = show-hotkey-overlay; "Alt+F4".action = close-window; "Super+Q".action = close-window; "Super+C".action = center-window; @@ -73,6 +72,13 @@ _: {config, ...}: { action = focus-workspace-down; cooldown-ms = 150; }; + + # Keyhelp + "Super+slash" = { + action = spawn "noctalia" "msg" "plugin" "maydayv7/keyhelp:controller" "all" "toggle" "niri"; + repeat = false; + hotkey-overlay.title = "Keyhelp"; + }; } // # Workspaces diff --git a/modules/desktop/niri/default.nix b/modules/desktop/niri/default.nix @@ -10,7 +10,7 @@ base = import ../_base.nix {}; args = {inherit util files inputs;}; - features = builtins.map (p: import p args) ( + features = map (p: import p args) ( util.map.modules.list ../_wm ++ util.map.modules.list ./_features ); @@ -22,7 +22,7 @@ in { nixos.qt nixos.gtk ] - ++ builtins.map (f: f.nixos or {}) features; + ++ map (f: f.nixos or {}) features; homeManager.niri.imports = [ @@ -31,7 +31,7 @@ in { homeManager.qt homeManager.gtk ] - ++ builtins.map (f: f.home or {}) features - ++ builtins.map (p: import p args) (util.map.modules.list ./_settings); + ++ map (f: f.home or {}) features + ++ map (p: import p args) (util.map.modules.list ./_settings); }; } diff --git a/packages/kebihelp/default.nix b/packages/kebihelp/default.nix @@ -1,42 +0,0 @@ -{ - lib, - pkgs, - ... -}: -with pkgs; -with python311Packages; let - metadata = import ./metadata.nix; -in - buildPythonPackage rec { - pname = "kebihelp"; - version = metadata.rev; - - src = fetchFromGitHub { - owner = "juienpro"; - repo = pname; - inherit (metadata) rev sha256; - }; - - build-system = [setuptools-scm]; - nativeBuildInputs = [libsForQt5.qt5.wrapQtAppsHook]; - propagatedBuildInputs = [ - prettytable - pyqt5 - pyqt5-sip - libsForQt5.qt5.qtwayland - ]; - - format = "pyproject"; - dontWrapQtApps = true; - dontCheckRuntimeDeps = true; - preFixup = '' - makeWrapperArgs+=("''${qtWrapperArgs[@]}") - ''; - - meta = { - description = "Universal Keybinding helper written in Python and QT5"; - homepage = metadata.repo; - license = lib.licenses.mit; - maintainers = ["maydayv7"]; - }; - } diff --git a/packages/kebihelp/metadata.nix b/packages/kebihelp/metadata.nix @@ -1,6 +0,0 @@ -{ - repo = "https://github.com/juienpro/kebihelp"; - release = true; - rev = "v0.1.2"; - sha256 = "sha256-GWsStVpUk7BCtfcRzcaSn4MNuomgrRef0XAFWnUcPAk="; -}