From 0c516701918655219a1e75bd8be3e579c937cd8b Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 27 Sep 2024 00:52:21 -0700 Subject: [PATCH 1/2] feat: Basic Kando menu --- README.org | 1 + hypr/hyprland.conf | 11 +- kando/.gitignore | 2 + kando/config.json | 15 ++ kando/menus.json | 429 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 457 insertions(+), 1 deletion(-) create mode 100644 kando/.gitignore create mode 100644 kando/config.json create mode 100644 kando/menus.json diff --git a/README.org b/README.org index 9334224..7b10294 100644 --- a/README.org +++ b/README.org @@ -28,6 +28,7 @@ Install and set the default shell to ~fish~. ** Utilities +- ~kando~: Pie menu - ~alacritty~: terminal emulator Note that in order to set this as the default terminal, you may need to put diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 296e22b..56c71d2 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -10,7 +10,7 @@ monitor=,preferred,auto,auto # See https://wiki.hyprland.org/Configuring/Keywords/ for more -exec-once = hyprpaper & swaync & fcitx5 & flameshot & eww --config ~/.config/eww/bar open vbar +exec-once = hyprpaper & swaync & fcitx5 & flameshot & eww --config ~/.config/eww/bar open vbar & kando # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -142,6 +142,9 @@ bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u bind = $mainMod SHIFT, down, movewindow, d +bind = , SUPER_R, global, kando:main +# F13 +bind = , code:191, global, kando:edit # Workspaces $w1 = ~/.config/hypr/wallpaper.sh 1 @@ -197,3 +200,9 @@ bindm = $mainMod, mouse:273, resizewindow bind = SUPER,Tab,cyclenext, # change focus to another window bind = SUPER,Tab,bringactivetotop, # bring it to the top + +# Functional keys +bindl=, XF86AudioMute, exec, amixer set Master toggle +bindl=, XF86AudioPlay, exec, playerctl play-pause +bindl=, XF86AudioNext, exec, playerctl next +bindl=, XF86AudioPrev, exec, playerctl previous diff --git a/kando/.gitignore b/kando/.gitignore new file mode 100644 index 0000000..4851bc6 --- /dev/null +++ b/kando/.gitignore @@ -0,0 +1,2 @@ +/Singleton* +/session diff --git a/kando/config.json b/kando/config.json new file mode 100644 index 0000000..9d2cec7 --- /dev/null +++ b/kando/config.json @@ -0,0 +1,15 @@ +{ + "menuTheme": "neon-lights", + "darkMenuTheme": "default", + "menuThemeColors": { + "neon-lights": { + "glow-color": "rgba(168, 255, 196, 1)", + "connector-color": "rgba(173, 222, 255, 0.75)" + } + }, + "darkMenuThemeColors": {}, + "enableDarkModeForMenuThemes": false, + "sidebarVisible": false, + "enableVersionCheck": true, + "zoomFactor": 1 +} diff --git a/kando/menus.json b/kando/menus.json new file mode 100644 index 0000000..54a2791 --- /dev/null +++ b/kando/menus.json @@ -0,0 +1,429 @@ +{ + "menus": [ + { + "shortcut": "Control+Space", + "shortcutID": "main", + "centered": false, + "root": { + "type": "submenu", + "name": "Main", + "icon": "award_star", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "submenu", + "name": "Apps", + "icon": "apps", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "command", + "data": { + "command": "x-www-browser" + }, + "name": "Web Browser", + "icon": "globe", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-email" + }, + "name": "E-Mail", + "icon": "mail", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "gimp" + }, + "name": "GIMP", + "icon": "gimp", + "iconTheme": "simple-icons" + }, + { + "type": "command", + "data": { + "command": "xdg-open ~" + }, + "name": "File Browser", + "icon": "folder_shared", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "x-terminal-emulator" + }, + "name": "Terminal", + "icon": "terminal", + "iconTheme": "material-symbols-rounded" + } + ] + }, + { + "type": "submenu", + "name": "Web Links", + "icon": "public", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "uri", + "data": { + "uri": "https://www.google.com" + }, + "name": "Google", + "icon": "google", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://github.com/kando-menu/kando" + }, + "name": "Kando on GitHub", + "icon": "github", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://ko-fi.com/schneegans" + }, + "name": "Kando on Ko-fi", + "icon": "kofi", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://www.youtube.com/@simonschneegans" + }, + "name": "Kando on YouTube", + "icon": "youtube", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://discord.gg/hZwbVSDkhy" + }, + "name": "Kando on Discord", + "icon": "discord", + "iconTheme": "simple-icons" + } + ] + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+AltLeft+ArrowRight", + "delayed": false + }, + "name": "Next Workspace", + "icon": "arrow_forward", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "submenu", + "name": "Clipboard", + "icon": "assignment", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyV", + "delayed": true + }, + "name": "Paste", + "icon": "content_paste_go", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyC", + "delayed": true + }, + "name": "Copy", + "icon": "content_copy", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyX", + "delayed": true + }, + "name": "Cut", + "icon": "cut", + "iconTheme": "material-symbols-rounded" + } + ] + }, + { + "type": "submenu", + "name": "Audio", + "icon": "play_circle", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "MediaTrackNext", + "delayed": false + }, + "name": "Next Track", + "icon": "skip_next", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "MediaPlayPause", + "delayed": false + }, + "name": "Play / Pause", + "icon": "play_pause", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "AudioVolumeMute", + "delayed": false + }, + "name": "Mute", + "icon": "music_off", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "MediaTrackPrevious", + "delayed": false + }, + "name": "Previous Track", + "icon": "skip_previous", + "iconTheme": "material-symbols-rounded", + "angle": 270 + } + ] + }, + { + "type": "submenu", + "name": "Windows", + "icon": "select_window", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "MetaLeft+ArrowUp", + "delayed": true + }, + "name": "Toggle Maximize", + "icon": "open_in_full", + "iconTheme": "material-symbols-rounded", + "angle": 0 + }, + { + "type": "hotkey", + "data": { + "hotkey": "MetaLeft+ArrowRight", + "delayed": true + }, + "name": "Tile Right", + "icon": "text_select_jump_to_end", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "AltLeft+F4", + "delayed": true + }, + "name": "Close Window", + "icon": "cancel_presentation", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "MetaLeft+ArrowLeft", + "delayed": true + }, + "name": "Tile Left", + "icon": "text_select_jump_to_beginning", + "iconTheme": "material-symbols-rounded", + "angle": 270 + } + ] + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+AltLeft+ArrowLeft", + "delayed": false + }, + "name": "Previous Workspace", + "icon": "arrow_back", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "submenu", + "name": "Bookmarks", + "icon": "folder_special", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DOWNLOAD)\"" + }, + "name": "Downloads", + "icon": "download", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir VIDEOS)\"" + }, + "name": "Videos", + "icon": "video_camera_front", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir PICTURES)\"" + }, + "name": "Pictures", + "icon": "imagesmode", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DOCUMENTS)\"" + }, + "name": "Documents", + "icon": "text_ad", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DESKTOP)\"" + }, + "name": "Desktop", + "icon": "desktop_windows", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open ~" + }, + "name": "Home", + "icon": "home", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir MUSIC)\"" + }, + "name": "Music", + "icon": "music_note", + "iconTheme": "material-symbols-rounded" + } + ] + } + ] + } + }, + { + "root": { + "type": "submenu", + "name": "Edit", + "icon": "trip_origin", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyZ", + "delayed": true + }, + "name": "Undo", + "icon": "undo", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+ShiftLeft+KeyZ", + "delayed": true + }, + "name": "Redo", + "icon": "redo", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyR", + "delayed": true + }, + "name": "Remesh", + "icon": "background_grid_small", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "F3", + "delayed": true + }, + "name": "Search", + "icon": "search", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "ShiftLeft+Space", + "delayed": true + }, + "name": "Brush", + "icon": "brush", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "", + "delayed": true + }, + "name": "Save", + "icon": "save", + "iconTheme": "material-symbols-rounded" + } + ] + }, + "shortcut": "", + "shortcutID": "edit", + "centered": false, + "anchored": false + } + ], + "templates": [] +} -- 2.44.1 From 274d09ce54c9bc98cccfba56831833f42f83cd5a Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Fri, 27 Sep 2024 01:06:23 -0700 Subject: [PATCH 2/2] feat: macOS keybindings --- README.org | 5 +++++ kando/menus.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 7b10294..978aba1 100644 --- a/README.org +++ b/README.org @@ -29,6 +29,11 @@ Install and set the default shell to ~fish~. ** Utilities - ~kando~: Pie menu + + Note the complicated key binding in the ~kando~ menu configuration. This is + used for MacOS and desktop environments where some keys cannot bind to a + command (e.g. Wacom tablets) + - ~alacritty~: terminal emulator Note that in order to set this as the default terminal, you may need to put diff --git a/kando/menus.json b/kando/menus.json index 54a2791..0f4642b 100644 --- a/kando/menus.json +++ b/kando/menus.json @@ -1,7 +1,7 @@ { "menus": [ { - "shortcut": "Control+Space", + "shortcut": "Control+Alt+Shift+U", "shortcutID": "main", "centered": false, "root": { @@ -419,7 +419,7 @@ } ] }, - "shortcut": "", + "shortcut": "Control+Alt+Shift+Y", "shortcutID": "edit", "centered": false, "anchored": false -- 2.44.1