From 2e2d2a464fa4c99ead7499e569177bd52a5d853b Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Mon, 23 Dec 2024 12:08:34 +0100 Subject: [PATCH] added kando, added blender config to persistent storage --- nixos/configuration.nix | 6 +- nixos/modules/hyprland/home.nix | 1 + nixos/modules/hyprland/hyprland.nix | 7 +- nixos/modules/impermanence/home.nix | 1 + nixos/modules/kando/config.json | 34 +++ nixos/modules/kando/default.nix | 9 + nixos/modules/kando/menus.json | 410 ++++++++++++++++++++++++++++ 7 files changed, 462 insertions(+), 6 deletions(-) create mode 100644 nixos/modules/kando/config.json create mode 100644 nixos/modules/kando/default.nix create mode 100644 nixos/modules/kando/menus.json diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9b539a8..2c363e6 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -121,16 +121,14 @@ #background; loginBackground = false; }) + killall nix-output-monitor eza zoxide fd (pkgs.writeShellScriptBin "root-files" '' - sudo ${pkgs.fd}/bin/fd --one-file-system --base-directory / --type f --hidden --exclude "{tmp,etc/passwd}" + ${pkgs.fd}/bin/fd --one-file-system --base-directory / --type f --hidden --exclude "{tmp,etc/passwd}" '') #https://www.reddit.com/r/NixOS/comments/1d1apm0/comment/l5tgbwz/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button - (pkgs.writeShellScriptBin "root-files" '' - sudo ${pkgs.fd}/bin/fd --one-file-system --base-directory / --type f --hidden --exclude "{tmp,etc/passwd}" - '') gparted exfatprogs kitty diff --git a/nixos/modules/hyprland/home.nix b/nixos/modules/hyprland/home.nix index 304b7b7..0454222 100644 --- a/nixos/modules/hyprland/home.nix +++ b/nixos/modules/hyprland/home.nix @@ -2,5 +2,6 @@ { imports = [ ./hyprland.nix + ../kando ]; } diff --git a/nixos/modules/hyprland/hyprland.nix b/nixos/modules/hyprland/hyprland.nix index 4dea31f..1d6cd6c 100644 --- a/nixos/modules/hyprland/hyprland.nix +++ b/nixos/modules/hyprland/hyprland.nix @@ -39,7 +39,7 @@ in "${pkgs.clipse}/bin/clipse -listen &" "${pkgs.swww}/bin/swww-daemon &" "${pkgs.swww}/bin/swww img ${wallpaper-image} &" - #"${pkgs.kando}/bin/kando" + "${pkgs.kando}/bin/kando" ]; exec = [ @@ -65,7 +65,7 @@ in "$mod, F, fullscreen," "$mod, R, exec, $menu" "$mod, V, exec, $clipboardManager" - #"CTRL, SPACE, global, kando:example-menu" + "CTRL, SPACE, global, kando:nix-hyprland" "$mod SHIFT, I, exec, source ${toggle_monitors}" "$mod SHIFT, O, exec, hyprctl dispatch dpms on" # Move focus with mainMod + arrow keys @@ -170,6 +170,9 @@ in "noanim, kando" "float, kando" "pin, kando" + + #blender + "opaque, blender" ]; windowrulev2 = [ diff --git a/nixos/modules/impermanence/home.nix b/nixos/modules/impermanence/home.nix index 809d307..bb9be0e 100644 --- a/nixos/modules/impermanence/home.nix +++ b/nixos/modules/impermanence/home.nix @@ -28,6 +28,7 @@ ".local/share/TelegramDesktop" ".config/solaar" ".config/kdeconnect" + ".config/blender" ]; files = [ ".screenrc" diff --git a/nixos/modules/kando/config.json b/nixos/modules/kando/config.json new file mode 100644 index 0000000..a410264 --- /dev/null +++ b/nixos/modules/kando/config.json @@ -0,0 +1,34 @@ +{ + "locale": "auto", + "menuTheme": "default", + "darkMenuTheme": "default", + "menuThemeColors": {}, + "darkMenuThemeColors": {}, + "enableDarkModeForMenuThemes": false, + "soundTheme": "none", + "soundVolume": 0.5, + "sidebarVisible": false, + "enableVersionCheck": true, + "zoomFactor": 1, + "menuOptions": { + "centerDeadZone": 50, + "minParentDistance": 150, + "dragThreshold": 15, + "fadeInDuration": 150, + "fadeOutDuration": 200, + "enableMarkingMode": true, + "enableTurboMode": true, + "gestureMinStrokeLength": 150, + "gestureMinStrokeAngle": 20, + "gestureJitterThreshold": 10, + "gesturePauseTimeout": 100, + "fixedStrokeLength": 0, + "rmbSelectsParent": false, + "gamepadBackButton": 1, + "gamepadCloseButton": 2 + }, + "editorOptions": { + "showSidebarButtonVisible": false, + "showEditorButtonVisible": false + } +} diff --git a/nixos/modules/kando/default.nix b/nixos/modules/kando/default.nix new file mode 100644 index 0000000..c520f97 --- /dev/null +++ b/nixos/modules/kando/default.nix @@ -0,0 +1,9 @@ +{ ... }: +let folder = ".config/kando"; +in +{ + home.file = { + #"${folder}/config.json".source = ./config.json; + "${folder}/menus.json".source = ./menus.json; + }; +} diff --git a/nixos/modules/kando/menus.json b/nixos/modules/kando/menus.json new file mode 100644 index 0000000..5dd9b8b --- /dev/null +++ b/nixos/modules/kando/menus.json @@ -0,0 +1,410 @@ +{ + "menus": [ + { + "shortcut": "Control+Space", + "shortcutID": "example-menu", + "centered": false, + "root": { + "type": "submenu", + "name": "Пример меню", + "icon": "award_star", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "submenu", + "name": "Приложения", + "icon": "apps", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "command", + "data": { + "command": "x-www-browser" + }, + "name": "Веб-браузер", + "icon": "globe", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-email" + }, + "name": "Почта", + "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": "Проводник", + "icon": "folder_shared", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "x-terminal-emulator" + }, + "name": "Терминал", + "icon": "terminal", + "iconTheme": "material-symbols-rounded" + } + ] + }, + { + "type": "submenu", + "name": "Веб-ссылки", + "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 в GitHub", + "icon": "github", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://ko-fi.com/schneegans" + }, + "name": "Кандо в Ko-fi", + "icon": "kofi", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://www.youtube.com/@simonschneegans" + }, + "name": "Kando в YouTube", + "icon": "youtube", + "iconTheme": "simple-icons" + }, + { + "type": "uri", + "data": { + "uri": "https://discord.gg/hZwbVSDkhy" + }, + "name": "Kando в Discord", + "icon": "discord", + "iconTheme": "simple-icons" + } + ] + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+AltLeft+ArrowRight", + "delayed": false + }, + "name": "Следующий рабочий стол", + "icon": "arrow_forward", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "submenu", + "name": "Буфер обмена", + "icon": "assignment", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyV", + "delayed": true + }, + "name": "Вставить", + "icon": "content_paste_go", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyC", + "delayed": true + }, + "name": "Скопировать", + "icon": "content_copy", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+KeyX", + "delayed": true + }, + "name": "Вырезать", + "icon": "cut", + "iconTheme": "material-symbols-rounded" + } + ] + }, + { + "type": "submenu", + "name": "Аудио", + "icon": "play_circle", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "hotkey", + "data": { + "hotkey": "MediaTrackNext", + "delayed": false + }, + "name": "Следующий трек", + "icon": "skip_next", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "MediaPlayPause", + "delayed": false + }, + "name": "Играть / Пауза", + "icon": "play_pause", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "AudioVolumeMute", + "delayed": false + }, + "name": "Беззвучный режим", + "icon": "music_off", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "MediaTrackPrevious", + "delayed": false + }, + "name": "Предыдущий трек", + "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": "Развернуть", + "icon": "open_in_full", + "iconTheme": "material-symbols-rounded", + "angle": 0 + }, + { + "type": "hotkey", + "data": { + "hotkey": "MetaLeft+ArrowRight", + "delayed": true + }, + "name": "Окно вправо", + "icon": "text_select_jump_to_end", + "iconTheme": "material-symbols-rounded", + "angle": 90 + }, + { + "type": "hotkey", + "data": { + "hotkey": "AltLeft+F4", + "delayed": true + }, + "name": "Закрыть окно", + "icon": "cancel_presentation", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "hotkey", + "data": { + "hotkey": "MetaLeft+ArrowLeft", + "delayed": true + }, + "name": "Окно влево", + "icon": "text_select_jump_to_beginning", + "iconTheme": "material-symbols-rounded", + "angle": 270 + } + ] + }, + { + "type": "hotkey", + "data": { + "hotkey": "ControlLeft+AltLeft+ArrowLeft", + "delayed": false + }, + "name": "Предыдущий рабочий стол", + "icon": "arrow_back", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "submenu", + "name": "Заметки", + "icon": "folder_special", + "iconTheme": "material-symbols-rounded", + "children": [ + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DOWNLOAD)\"" + }, + "name": "Загрузки", + "icon": "download", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir VIDEOS)\"" + }, + "name": "Видео", + "icon": "video_camera_front", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir PICTURES)\"" + }, + "name": "Фото", + "icon": "imagesmode", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DOCUMENTS)\"" + }, + "name": "Документы", + "icon": "text_ad", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir DESKTOP)\"" + }, + "name": "Рабочий стол", + "icon": "desktop_windows", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open ~" + }, + "name": "Домой", + "icon": "home", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "xdg-open \"$(xdg-user-dir MUSIC)\"" + }, + "name": "Музыка", + "icon": "music_note", + "iconTheme": "material-symbols-rounded" + } + ] + } + ] + } + }, + { + "root": { + "type": "submenu", + "name": "NixOS", + "icon": "nixos", + "iconTheme": "simple-icons-colored", + "children": [ + { + "type": "command", + "data": { + "command": "wofi --show drun", + "delayed": false + }, + "name": "Приложения", + "icon": "apps", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "firefox", + "delayed": false + }, + "name": "Firefox", + "icon": "firefoxbrowser", + "iconTheme": "simple-icons" + }, + { + "type": "command", + "data": { + "command": "dolphin", + "delayed": false + }, + "name": "Файлы", + "icon": "folder_open", + "iconTheme": "material-symbols-rounded" + }, + { + "type": "command", + "data": { + "command": "grim -g \"$(slurp -w 0)\" - | satty --early-exit --copy-command 'wl-copy' --filename '-' --initial-tool brush", + "delayed": true + }, + "name": "Скриншот", + "icon": "screenshot_monitor", + "iconTheme": "material-symbols-rounded" + } + ] + }, + "shortcut": "", + "shortcutID": "nix-hyprland", + "centered": false, + "warpMouse": false, + "anchored": false + } + ], + "templates": [] +}