From 8b2d7dc814483046ecc54f38afc370e7e38e6880 Mon Sep 17 00:00:00 2001 From: andrei Date: Sun, 10 May 2026 22:25:04 +0700 Subject: [PATCH] my config --- flake.lock | 48 +- flake.nix | 30 + modules/flake-parts.nix | 5 +- modules/home.nix | 10 +- modules/hosts/nixxx/configuration.nix | 148 +++-- modules/hosts/nixxx/default.nix | 6 +- .../hosts/nixxx/hardware-configuration.nix | 11 +- modules/programs/base.nix | 12 +- modules/programs/bash.nix | 2 + modules/programs/git.nix | 13 +- modules/programs/matugen/matugen.nix | 7 +- modules/programs/neovim.nix | 22 - modules/programs/tmux.nix | 53 -- modules/programs/waybar.nix | 227 ------- modules/sessions/niri/config.kdl | 600 +++++------------- modules/sessions/niri/niri.nix | 252 ++++---- modules/sessions/niri/noctalia.nix | 12 +- modules/sessions/niri/wrapped-niri.nix | 337 ---------- modules/sessions/xfce-rdp.nix | 17 +- modules/theme.nix | 7 - 20 files changed, 459 insertions(+), 1360 deletions(-) delete mode 100644 modules/programs/neovim.nix delete mode 100644 modules/programs/tmux.nix delete mode 100644 modules/programs/waybar.nix delete mode 100644 modules/sessions/niri/wrapped-niri.nix diff --git a/flake.lock b/flake.lock index 21691c1..98623b5 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1777678872, - "narHash": "sha256-EPIFsulyon7Z1vLQq5Fk64GR8L7cQsT+IPhcsukVbgk=", + "lastModified": 1777988971, + "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "5250617bffd85403b14dbf43c3870e7f255d2c16", + "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", "type": "github" }, "original": { @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1777679572, - "narHash": "sha256-egYNbRrkn+6SwTHinhdb6WUfzzdC3nXfCRqS321VylY=", + "lastModified": 1778365864, + "narHash": "sha256-ImoT/wqmgMImf2dAC+E0MverAdA4QXsedOeES9B7Ezw=", "owner": "nix-community", "repo": "home-manager", - "rev": "9cb587ade2aa1b4a7257f0238d41072690b0ca4f", + "rev": "2f419037039a152448c5f4ae9494154753d1b399", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1777699141, - "narHash": "sha256-wAeDjnP9IZXb+S0cglXN9ITWF6HVFhruPaoyVLbShVI=", + "lastModified": 1778392415, + "narHash": "sha256-UbEC8dOIWwCG4mww7SGhYMgM1yi8ewgKLi8O3uhX33M=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "8dbf91d91d0e9be3aa0fe2a9fc364a6f7ad053a8", + "rev": "670859bacca122ec1158c882b4cf2828930b3669", "type": "github" }, "original": { @@ -98,11 +98,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1777627080, - "narHash": "sha256-9xzxgWsZZRbiMDa6iSZfD1dZGlUvsHp2aawWM5LK6F8=", + "lastModified": 1778389445, + "narHash": "sha256-9NyDMVf8ydUZGTzcPcLMQf0o1B3bte/00UGbuXHNWh8=", "owner": "YaLTeR", "repo": "niri", - "rev": "5f6f131b24826a01374d5cd87b281bd7ea181537", + "rev": "38191826cb1e5fb9051a7e141fefe4941a2b4bed", "type": "github" }, "original": { @@ -113,11 +113,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1777578337, - "narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=", + "lastModified": 1777954456, + "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "15f4ee454b1dce334612fa6843b3e05cf546efab", + "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", "type": "github" }, "original": { @@ -144,11 +144,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1777428379, - "narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=", + "lastModified": 1778003029, + "narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "755f5aa91337890c432639c60b6064bb7fe67769", + "rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5", "type": "github" }, "original": { @@ -166,11 +166,11 @@ "noctalia-qs": "noctalia-qs" }, "locked": { - "lastModified": 1777427472, - "narHash": "sha256-kqcfLdxb+CqTroMErCScvx6YQcZYJcf6X+z5I8kBJK8=", + "lastModified": 1778104114, + "narHash": "sha256-+tbqLv7IW5Aem8kGF6cp4n3MtNBcwqmuGlMt6S1kQjs=", "owner": "noctalia-dev", "repo": "noctalia-shell", - "rev": "9f8dd48c8df5ab1f7f87ddf9842627e1e5682186", + "rev": "eb2b53ddaa7564f5c93031cbe65cd5b6ef3c12a9", "type": "github" }, "original": { @@ -189,11 +189,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1777380063, - "narHash": "sha256-q5mWOEICcZzr+KnjIwDHV9EXiBxOC9cnBpxZbDAViU8=", + "lastModified": 1777773024, + "narHash": "sha256-pLU+KB84A0Jei/vTD6pOS4Ovkmq3QDfPQHg1MlKsRqM=", "owner": "noctalia-dev", "repo": "noctalia-qs", - "rev": "8742a7a748c43bf44eb6862a8ebd3591ed71502d", + "rev": "d3e26ccd9eecde9139be00caf5dc2d4260fb31ee", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e6f30a7..498f207 100644 --- a/flake.nix +++ b/flake.nix @@ -17,22 +17,52 @@ /* ┌──────────────────────────────────────────┐ │ системные импорты │ └──────────────────────────────────────────┘ */ + + /* Основной репозиторий пакетов NixOS. Использование ветки 'nixos-unstable' + гарантирует получение самых свежих версий софта, таких как niri или noctalia, + которые быстро развиваются и требуют актуальных библиотек. */ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + /* Легковесный фреймворк для организации флейка. Он заменяет громоздкие + конструкции стандартного вывода (outputs) на модульную систему, позволяя + автоматически генерировать настройки для разных архитектур (x86_64, aarch64) + через удобные блоки perSystem. */ flake-parts.url = "github:hercules-ci/flake-parts"; + /* Утилита для автоматического импорта директорий. Она рекурсивно сканирует + папки и подключает все .nix файлы, избавляя от необходимости вручную + прописывать каждый модуль в списке imports при расширении конфигурации. */ import-tree.url = "github:vic/import-tree"; + /* niri-flake — это специализированный Nix-флейк + (обычно поддерживаемый пользователем sodiboo), + который предоставляет пакеты и модули для Wayland-композитора niri. + Он часто используется вместе с flake-parts, чтобы декларативно + управлять конфигурацией графической среды и всегда иметь самую + свежую версию композитора. + */ niri-flake = { url = "github:sodiboo/niri-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; + /* Noctalia не является полноценным окружением рабочего стола + (как GNOME или KDE), а представляет собой визуальный слой, + который работает поверх оконных менеджеров. Она берет на себя функции, + за которые обычно отвечают разрозненные утилиты: + Панели и статус-бары: Полностью настраиваемые виджеты. + Уведомления и OSD: Встроенная система оповещений и индикаторов громкости/яркости. + Lock Screen: Экран блокировки с поддержкой PAM (например, для отпечатков пальцев). + Launcher и Док: Лаунчер приложений и панель задач. + Виджеты рабочего стола: Поддержка десктопных виджетов с привязкой к разным мониторам.*/ noctalia = { url = "github:noctalia-dev/noctalia-shell"; inputs.nixpkgs.follows = "nixpkgs"; }; + /* Инструмент для декларативного управления домашним каталогом пользователя. + В связке с графическими оболочками он отвечает за генерацию конфигов для + niri, noctalia, стилизацию GTK/Qt и управление файлами в ~/.config. */ home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/flake-parts.nix b/modules/flake-parts.nix index c7fe4d9..4e4dfc1 100644 --- a/modules/flake-parts.nix +++ b/modules/flake-parts.nix @@ -1,7 +1,4 @@ -/* ┌──────────────────────────────────────────┐ - │ это хз зачем модули какие-то │ - └──────────────────────────────────────────┘ */ { inputs, ...}: { imports = [ inputs.flake-parts.flakeModules.modules ]; systems = [ "x86_64-linux" ]; -} +} \ No newline at end of file diff --git a/modules/home.nix b/modules/home.nix index 3f87c50..9f9c0b0 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -1,8 +1,4 @@ -/* ┌──────────────────────────────────────────┐ - │ home manager для программок типо │ - └──────────────────────────────────────────┘ */ -{ inputs, self, ... }: -{ +{ inputs, self, ... }:{ flake.nixosModules.home-manager = { imports = [ inputs.home-manager.nixosModules.home-manager @@ -14,9 +10,7 @@ extraSpecialArgs = { inherit inputs self; }; backupCommand = "rm"; -/* ┌──────────────────────────────────────────┐ - │ обьявляется пользователь │ - └──────────────────────────────────────────┘ */ + # пользователь хоме манагера users.${self.user} = { home.stateVersion = "26.05"; programs.home-manager.enable = true; diff --git a/modules/hosts/nixxx/configuration.nix b/modules/hosts/nixxx/configuration.nix index 0f246e3..d565a74 100644 --- a/modules/hosts/nixxx/configuration.nix +++ b/modules/hosts/nixxx/configuration.nix @@ -1,72 +1,47 @@ -/* ┌──────────────────────────────────────────┐ - │ системный конфиг │ - └──────────────────────────────────────────┘ */ +# сам конфиг --------------------------------------------------------------------------------- { self, ... }: -{ - flake.nixosModules.nixxx = { pkgs, ... }: { +{flake.nixosModules.nixxx = { pkgs, ... }: { -/* ┌──────────────────────────────────────────┐ - │ импорт модулей с програмками │ - └──────────────────────────────────────────┘ */ - imports = [ + # пользовательский аккаунт + users.users.${self.user} = { + # группы пользователя + extraGroups = [ "wheel" ]; + isNormalUser = true; + + # личные пакеты пользователя + packages = with pkgs; [ + tree + ]; + }; + + # подключение модулей + imports = [ + # железо self.nixosModules.nixxxHardware - # тут программки + # тут простые программки self.nixosModules.base - # тут описанные через flakes + # тут програмки описанные через flakes self.nixosModules.fastfetch self.nixosModules.home-manager - self.nixosModules.vscode + #self.nixosModules.vscode # тут графические окружения self.nixosModules.niri self.nixosModules.xfcerdp - ]; + ]; + # разрешить несвободное ПО + nixpkgs.config.allowUnfree = true; -/* ┌──────────────────────────────────────────┐ - │ GRUB │ - └──────────────────────────────────────────┘ */ - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = true; + # hostname + networking.hostName = "nixos"; + # timezone + time.timeZone = "Asia/Krasnoyarsk"; - # Enable flakes. - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - # Enable store optimization on every rebuild. - nix.settings.auto-optimise-store = true; - - # Enable automatic garbace collection. - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - - networking.hostName = "nixos"; # Define your hostname. - - # Configure network connections interactively with nmcli or nmtui. - networking.networkmanager.enable = true; - - # Set your time zone. - time.timeZone = "Asia/Krasnoyarsk"; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable bluetooth. - hardware.bluetooth.enable = true; - - # Enable sound. - services.pipewire = { - enable = true; - pulse.enable = true; - }; - -# Локализация + # языки i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "ru_RU.UTF-8"; @@ -80,32 +55,51 @@ LC_TIME = "ru_RU.UTF-8"; }; + # загрузчик + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + # системные хуйнюшки --------------------------------------------------------------------------------- + # Enable flakes. + nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # Enable TLP. - services.tlp = { - enable = true; - settings = { - # Improve performance on battery. - CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance"; - PLATFORM_PROFILE_ON_BAT = "performance"; - }; - }; + # Enable store optimization on every rebuild. + nix.settings.auto-optimise-store = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.${self.user} = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - tree - ]; - }; - - # Allow unfree packages. - nixpkgs.config.allowUnfree = true; - - - system.stateVersion = "25.11"; # Did you read the comment? + # Enable automatic garbace collection. + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; }; -} + + # Configure network connections interactively with nmcli or nmtui. + networking.networkmanager.enable = true; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable bluetooth. + hardware.bluetooth.enable = true; + + # Enable sound. + services.pipewire = { + enable = true; + pulse.enable = true; + }; + + # для ноутбуков + # Enable TLP. + /*services.tlp = { + enable = true; + settings = { + # Improve performance on battery. + CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance"; + PLATFORM_PROFILE_ON_BAT = "performance"; + }; + };*/ + + system.stateVersion = "25.11"; # Did you read the comment? +};} diff --git a/modules/hosts/nixxx/default.nix b/modules/hosts/nixxx/default.nix index 9fee5a0..731c43e 100644 --- a/modules/hosts/nixxx/default.nix +++ b/modules/hosts/nixxx/default.nix @@ -1,9 +1,7 @@ -/* ┌──────────────────────────────────────────┐ - │ где модули │ - └──────────────────────────────────────────┘ */ +# подключение конфиги с названием nixxx ------------------------------------------------------ { inputs, self, ... }: { flake.nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem { modules = [ self.nixosModules.nixxx ]; }; -} +} \ No newline at end of file diff --git a/modules/hosts/nixxx/hardware-configuration.nix b/modules/hosts/nixxx/hardware-configuration.nix index de4cf5a..b57635e 100644 --- a/modules/hosts/nixxx/hardware-configuration.nix +++ b/modules/hosts/nixxx/hardware-configuration.nix @@ -1,26 +1,25 @@ /* ┌───────────────────────────────────────────────────┐ │системные настройки через команду надо взять конфиг│ └───────────────────────────────────────────────────┘ */ +# nixos-generate-config --show-hardware-config + { self, ... }: { flake.nixosModules.nixxxHardware = { config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + # какие модули ядра будут загружены boot.initrd.availableKernelModules = [ "ata_piix" "mptspi" "uhci_hcd" "ehci_pci" "ahci" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; -/* ┌──────────────────────────────────────────┐ - │ VMware │ - └──────────────────────────────────────────┘ */ + # модули для вмваре services.xserver.videoDrivers = [ "vmware" ]; virtualisation.vmware.guest.enable = true; hardware.graphics.enable = true; -/* ┌──────────────────────────────────────────┐ - │ диски │ - └──────────────────────────────────────────┘ */ + # диски fileSystems."/" = { device = "/dev/disk/by-uuid/d0270880-39ef-4ae8-8701-87606a0d4578"; fsType = "ext4"; diff --git a/modules/programs/base.nix b/modules/programs/base.nix index 32c132a..b35a34d 100644 --- a/modules/programs/base.nix +++ b/modules/programs/base.nix @@ -2,27 +2,27 @@ { flake.nixosModules.base = { pkgs, ... }: { imports = [ + # простые конфиги для программ тут self.nixosModules.kitty self.nixosModules.git + self.nixosModules.bash + self.nixosModules.vscode ]; - # List packages installed in system profile. + # программы для всей системы environment.systemPackages = with pkgs; [ gnome-clocks kdePackages.okular kdePackages.partitionmanager - krita - obsidian telegram-desktop vesktop mc btop htop - firefox - + firefox ]; - # List font packages installed in system profile. + # шрифты fonts.packages = with pkgs; [ ibm-plex nerd-fonts.jetbrains-mono diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index eb1592e..c9d863d 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -1,3 +1,4 @@ +# тут алиасы для шелла всякие { self, ... }: { flake.nixosModules.bash = { @@ -12,6 +13,7 @@ nrb = "sudo nixos-rebuild boot --flake .#nixos"; nrs = "sudo nixos-rebuild switch --flake .#nixos"; nrt = "sudo nixos-rebuild test --flake .#nixos"; + pls = "sudo"; }; }; } diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 829495f..7327b98 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -1,8 +1,7 @@ -{ self, ... }: -{ +# настройки гита +{ self, ... }: { flake.nixosModules.git = { - home-manager.users.${self.user}.imports = [ - { + home-manager.users.${self.user}.imports = [{ programs.git = { enable = true; settings = { @@ -10,12 +9,8 @@ name = "andre"; email = "vaylinnnn6@gmail.com"; }; - core = { - editor = "nvim"; - }; }; }; - } - ]; + }]; }; } diff --git a/modules/programs/matugen/matugen.nix b/modules/programs/matugen/matugen.nix index 71cb1aa..70e59ed 100644 --- a/modules/programs/matugen/matugen.nix +++ b/modules/programs/matugen/matugen.nix @@ -1,5 +1,4 @@ -{ self, ... }: -{ +{ self, ... }: { flake.nixosModules.matugen = { pkgs, lib, ... }: { imports = [ @@ -7,9 +6,7 @@ ]; home-manager.users.${self.user}.imports = [ - { - # home.activation.matugen = "${pkgs.matugen}/bin/matugen image ${self.wallpaper} --source-color-index 0"; - + { home.packages = with pkgs; [ matugen kdePackages.breeze diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix deleted file mode 100644 index 3fdafd7..0000000 --- a/modules/programs/neovim.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ self, ... }: -{ - # flakes.nixosModules.neovim = { - # home-manager.users.${self.user} = { inputs, ... }: { - # imports = [ inputs.nixvim.homeModules.nixvim ]; - # - # home.sessionVariables = { - # MANPAGER = "nvim +Man!"; - # }; - # - # programs.nixvim = { - # opts = { - # number = true; - # relativenumber = true; - # shiftwidth = 2; - # }; - # enable = true; - # colorschemes.gruvbox.enable = true; - # }; - # }; - # }; -} diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix deleted file mode 100644 index 4880245..0000000 --- a/modules/programs/tmux.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ self, ... }: -{ - flake.nixosModules.tmux = { pkgs, ... }: { - home-manager.users.${self.user}.imports = [ - { - programs.tmux = { - enable = true; - mouse = true; - baseIndex = 1; - plugins = with pkgs; [ - { - plugin = tmuxPlugins.resurrect; - extraConfig = "set -g @resurrect-strategy-nvim 'session'"; - } - ]; - extraConfig = '' - bind -n M-r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded" - bind -n M-s choose-session - - bind -n M-1 select-window -t 1 - bind -n M-2 select-window -t 2 - bind -n M-3 select-window -t 3 - bind -n M-4 select-window -t 4 - bind -n M-5 select-window -t 5 - bind -n M-6 select-window -t 6 - bind -n M-7 select-window -t 7 - bind -n M-8 select-window -t 8 - bind -n M-9 select-window -t 9 - - bind -n M-h select-pane -L - bind -n M-l select-pane -R - bind -n M-k select-pane -U - bind -n M-j select-pane -D - - bind -n M-H resize-pane -L 5 - bind -n M-L resize-pane -R 5 - bind -n M-K resize-pane -U 3 - bind -n M-J resize-pane -D 3 - - bind -n M-u split-window -v - bind -n M-i split-window -h - - bind -n M-t new-window - bind -n M-c kill-pane - bind -n M-q kill-window - bind -n M-w kill-session - bind -n M-d detach - ''; - }; - } - ]; - }; -} diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix deleted file mode 100644 index 41982e9..0000000 --- a/modules/programs/waybar.nix +++ /dev/null @@ -1,227 +0,0 @@ -{ self, ... }: -{ - flake.nixosModules.waybar = { pkgs, ... }: - { - environment.systemPackages = with pkgs; [ - bluetui - wiremix - ]; - - fonts.packages = with pkgs; [ - font-awesome - ]; - - home-manager.users.${self.user}.imports = [ - { - home.activation = { - waybar = '' - ${pkgs.procps}/bin/pkill -SIGUSR2 waybar - ''; - }; - - programs.waybar = { - enable = true; - settings = { - bar = { - height = 24; - # width = 24; - layer = "top"; - spacing = 0; - position = "bottom"; - modules-left = [ "niri/workspaces" "niri/language" ]; - modules-center = [ "niri/window" ]; - modules-right = [ "tray" "wireplumber" "network" "bluetooth" "backlight" "clock" "battery" "battery#bat2" "custom/power" ]; - "niri/workspaces" = { - "disable-scroll" = true; - "all-outputs" = true; - "warp-on-scroll" = false; - "format" = "{icon}"; - }; - "tray" = { - "spacing" = 10; - }; - "niri/language" = { - "format" = "{short}"; - }; - "clock" = { - "tooltip-format" = "{:%Y %B}\n{calendar}"; - }; - "backlight" = { - "format" = "{icon} {percent}%"; - "format-icons" = ["" "" "" "" "" "" "" "" ""]; - }; - "battery" = { - "bat" = "BAT0"; - "states" = { - "good" = 95; - "warning" = 30; - "critical" = 15; - }; - "format" = "{icon} {capacity}%"; - "format-full" = "{icon} {capacity}%"; - "format-charging" = " {capacity}%"; - "format-icons" = ["" "" "" "" ""]; - }; - "battery#bat2" = { - "bat" = "BAT1"; - "states" = { - "good" = 95; - "warning" = 30; - "critical" = 15; - }; - "format" = "{icon} {capacity}%"; - "format-full" = "{icon} {capacity}%"; - "format-charging" = " {capacity}%"; - "format-plugged" = " {capacity}%"; - "format-icons" = ["" "" "" "" ""]; - }; - "bluetooth" = { - "format" = ""; - "format-off" = "󰂲"; - "on-click" = "kitty --hold sh -c 'bluetui'"; - }; - "network" = { - "format-wifi" = " {essid}"; - "format-disconnected" = "󰖪"; - "on-click" = "kitty --hold sh -c 'nmtui'"; - }; - "wireplumber" = { - "format" = "{icon} {volume}%"; - "format-muted" = "󰖁"; - "format-icons" = { - "default" = ["" "" ""]; - }; - "on-click" = "kitty --hold sh -c 'wiremix'"; - }; - "custom/power" = { - "format" = "⏻"; - "on-click" = "systemctl suspend"; - # "shutdown" = "shutdown"; - # "reboot" = "reboot"; - # "suspend" = "systemctl suspend"; - # "hibernate" = "systemctl hibernate" - }; - }; - }; - - style = /*css*/ '' - /* @import "/home/${self.user}/.cache/wal/colors-waybar.css"; */ - @import "/home/${self.user}/.config/waybar/colors.css"; - - * { - /* `otf-font-awesome` is required to be installed for icons */ - font-family: ${self.font.propo}, JetBrainsMonoNerdFontPropo; - font-size: 13pt; - transition-property: background-color; - transition-duration: .25s; - } - - window#waybar { - background-color: @background; - color: @on_surface; - } - - button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px transparent; - /* Avoid rounded borders under each button name */ - - border: none; - border-radius: ${self.border.small}; - margin: 2 2; - } - - #workspaces button { - /* padding: 5 0; */ - padding: 0 5; - background-color: transparent; - } - - #workspaces button:hover { - background: @primary_container; - } - - #workspaces button.focused, #workspaces button.active { - background-color: @source_color; - color: @background; - /* box-shadow: inset 0 -3px @color3; */ - } - - #workspaces button.urgent { - background-color: @secondary; - } - - #language, - #tray, - #bluetooth, - #wireplumber, - #network, - #backlight, - #clock, - #battery, - #custom-power { - margin: 2 2; - padding: 0 10; - /* padding: 10 0; */ - color: @on_surface; - border-radius: ${self.border.small}; - } - - #battery, - #bluetooth, - #wireplumber, - #custom-power, - #network { - background-color: @primary_container; - color: @background; - } - - /* top right bottom left */ - #battery { - padding: 0 5 0 10; - /* padding: 5 0 10 0; */ - border-radius: ${self.border.small} 0 0 ${self.border.small}; - margin: 2 0 2 2; - /* margin: 2 2 0 2; */ - } - - #battery.bat2 { - padding: 0 10 0 5; - /* padding: 10 0 5 0; */ - border-radius: 0 ${self.border.small} ${self.border.small} 0; - margin: 2 2 2 0; - /* margin: 0 2 2 2; */ - } - - #custom-power { - background-color: @source_color; - } - - #bluetooth:hover, - #wireplumber:hover, - #network:hover, - #custom-power:hover { - background-color: @on_primary_container; - } - - #window, - #workspaces { - margin: 0 4; - /* margin: 4 0; */ - } - - /* If workspaces is the leftmost module, omit left margin */ - .modules-left > widget:first-child > #workspaces { - margin-left: 0; - } - - /* If workspaces is the rightmost module, omit right margin */ - .modules-right > widget:last-child > #workspaces { - margin-right: 0; - } - ''; - }; - } - ]; - }; -} diff --git a/modules/sessions/niri/config.kdl b/modules/sessions/niri/config.kdl index c55d471..0098074 100644 --- a/modules/sessions/niri/config.kdl +++ b/modules/sessions/niri/config.kdl @@ -1,41 +1,33 @@ -// This config is in the KDL format: https://kdl.dev -// "/-" comments out the following node. -// Check the wiki for a full description of the configuration: -// https://yalter.github.io/niri/Configuration:-Introduction - -//include "./colors.kdl" -//include "./config-nix.kdl" - -// Input device configuration. // Find the full list of options on the wiki: // https://yalter.github.io/niri/Configuration:-Input + +//########################### +// настройки ввода +//########################### input { + + //########################### + // настройки клавиатуры + //########################### keyboard { xkb { - // You can set rules, model, layout, variant and options. - // For more information, see xkeyboard-config(7). - - // For example: + // Раскладка layout "us,ru" - // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps" - options "grp:alt_shift_toggle" - - // If this section is empty, niri will fetch xkb settings - // from org.freedesktop.locale1. You can control these using - // localectl set-x11-keymap. + // переключение + options "grp:alt_shift_toggle" } repeat-delay 250 repeat-rate 25 - // Enable numlock on startup, omitting this setting disables it. + // сразу включить NumLock numlock } - // Next sections include libinput settings. - // Omitting settings disables them, or leaves them at their default values. - // All commented-out settings here are examples, not defaults. + //########################### + // настройки мышки, тачпада + //########################### touchpad { off // tap @@ -58,50 +50,34 @@ input { // scroll-method "no-scroll" } - trackpoint { - // off - // natural-scroll - // accel-speed 0.2 - accel-profile "flat" - // scroll-method "on-button-down" - // scroll-button 273 - // scroll-button-lock - // middle-emulation - } - - // Uncomment this to make the mouse warp to the center of newly focused windows. + // перенести мышку на новое окно warp-mouse-to-focus - // Focus windows and outputs automatically when moving the mouse into them. + // автофокус при наведении мышки // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. focus-follows-mouse max-scroll-amount="95%" } -// You can configure outputs by their name, which you can find -// by running `niri msg outputs` while inside a niri instance. -// The built-in laptop monitor is usually called "eDP-1". -// Find more information on the wiki: -// https://yalter.github.io/niri/Configuration:-Outputs -// Remember to uncomment the node by removing "/-"! -output "eDP-1" { - // Uncomment this line to disable this output. - // off +//########################### +// мониторы +//########################### +// You can configure outputs by their name, which you can find by running `niri msg outputs` while inside a niri instance. +output "eDP-1" { // Resolution and, optionally, refresh rate of the output. // The format is "x" or "x@". - // If the refresh rate is omitted, niri will pick the highest refresh rate - // for the resolution. + // If the refresh rate is omitted, niri will pick the highest refresh rate for the resolution. // If the mode is omitted altogether or is invalid, niri will pick one automatically. // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. mode "1920x1080@60" - // You can use integer or fractional scale, for example use 1.5 for 150% scale. + // увеличение, for example use 1.5 for 150% scale. scale 1 - // Transform allows to rotate the output counter-clockwise, valid values are: - // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. + // поворот, значения: normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. transform "normal" + // позиционирование нескольких мониторов // Position of the output in the global coordinate space. // This affects directional monitor actions like "focus-monitor-left", and cursor movement. // The cursor can only move between directly adjacent outputs. @@ -114,187 +90,86 @@ output "eDP-1" { // position x=1280 y=0 } -// overview { -// workspace-shadow { -// off -// } -// } +// выключить тени при обзоре всех окон +overview { + workspace-shadow { + off + } +} -// Settings that influence how windows are positioned and sized. -// Find more information on the wiki: -// https://yalter.github.io/niri/Configuration:-Layout +//########################### +// поведение окон +//########################### layout { - // Set gaps around windows in logical pixels. + // отступ между окон gaps 8 + // одно окно по центру always-center-single-column - // So wallpapers in the overview can be seen. + // прозрачные рабочие столы чтобы видеть обои круто background-color "transparent" - // When to center a column when changing focus, options are: + // центрировать окно в фокусе // - "never", default behavior, focusing an off-screen column will keep at the left - // or right edge of the screen. - // - "always", the focused column will always be centered. // - "on-overflow", focusing a column will center it if it doesn't fit - // together with the previously focused column. center-focused-column "never" - // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between. + // ширина окна preset-column-widths { - // Proportion sets the width as a fraction of the output width, taking gaps into account. - // For example, you can perfectly fit four windows sized "proportion 0.25" on an output. - // The default preset widths are 1/3, 1/2 and 2/3 of the output. proportion 0.33333 proportion 0.5 proportion 0.66667 - - // Fixed sets the width in logical pixels exactly. - // fixed 1920 } - // You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between. - // preset-window-heights { } - - // You can change the default width of the new windows. + // ширина окна на старте default-column-width { proportion 0.5; } - // If you leave the brackets empty, the windows themselves will decide their initial width. - // default-column-width {} - // By default focus ring and border are rendered as a solid background rectangle - // behind windows. That is, they will show up through semitransparent windows. - // This is because windows using client-side decorations can have an arbitrary shape. - // - // If you don't like that, you should uncomment `prefer-no-csd` below. - // Niri will draw focus ring and border *around* windows that agree to omit their - // client-side decorations. - // - // Alternatively, you can override it with a window rule called - // `draw-border-with-background`. - - // You can change how the focus ring looks. + // подсветка активного окна focus-ring { - // Uncomment this line to disable the focus ring. - // off - // How many logical pixels the ring extends out from the windows. + // ширина обводки width 2 - // Colors can be set in a variety of ways: - // - CSS named colors: "red" - // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa" - // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. - - // Color of the ring on the active monitor. - // active-color "#7fc8ff" - - // Color of the ring on inactive monitors. - // - // The focus ring only draws around the active window, so the only place - // where you can see its inactive-color is on other monitors. - // inactive-color "#505050" - - // You can also use gradients. They take precedence over solid colors. - // Gradients are rendered the same as CSS linear-gradient(angle, from, to). - // The angle is the same as in linear-gradient, and is optional, - // defaulting to 180 (top-to-bottom gradient). - // You can use any CSS linear-gradient tool on the web to set these up. - // Changing the color space is also supported, check the wiki for more info. - // - // active-gradient from="#80c8ff" to="#c7ff7f" angle=45 - - // You can also color the gradient relative to the entire view - // of the workspace, rather than relative to just the window itself. - // To do that, set relative-to="workspace-view". - // - // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + // Cцвет обводки + active-color "#FFFF" } - // You can also add a border. It's similar to the focus ring, but always visible. + // обводка всегда видна border { // The settings are the same as for the focus ring. // If you enable the border, you probably want to disable the focus ring. off - width 2 - // active-color "#ffc87f" - // inactive-color "#505050" - - // Color of the border around windows that request your attention. - // urgent-color "#9b0000" - - // Gradients can use a few different interpolation color spaces. - // For example, this is a pastel rainbow gradient via in="oklch longer hue". - // - // active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue" - - // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" } - // You can enable drop shadows for windows. + // тени shadow { // Uncomment the next line to enable shadows. // on - - // By default, the shadow draws only around its window, and not behind it. - // Uncomment this setting to make the shadow draw behind its window. - // - // Note that niri has no way of knowing about the CSD window corner - // radius. It has to assume that windows have square corners, leading to - // shadow artifacts inside the CSD rounded corners. This setting fixes - // those artifacts. - // - // However, instead you may want to set prefer-no-csd and/or - // geometry-corner-radius. Then, niri will know the corner radius and - // draw the shadow correctly, without having to draw it behind the - // window. These will also remove client-side shadows if the window - // draws any. - // - // draw-behind-window true - - // You can change how shadows look. The values below are in logical - // pixels and match the CSS box-shadow properties. - - // Softness controls the shadow blur radius. - softness 30 - - // Spread expands the shadow. - spread 5 - - // Offset moves the shadow relative to the window. - offset x=0 y=5 - - // You can also change the shadow color and opacity. - // color "#0007" } - // Struts shrink the area occupied by windows, similarly to layer-shell panels. - // You can think of them as a kind of outer gaps. They are set in logical pixels. - // Left and right struts will cause the next window to the side to always be visible. - // Top and bottom struts will simply add outer gaps in addition to the area occupied by - // layer-shell panels and regular gaps. + // постоянные отступы на экране struts { - // left 64 - // right 64 + left 64 + right 64 // top 64 // bottom 64 } } -// Add lines like this to spawn processes at startup. -// Note that running niri as a session supports xdg-desktop-autostart, -// which may be more convenient to use. -// See the binds section below for more spawn examples. -// This line starts waybar, a commonly used bar for Wayland compositors. -// spawn-at-startup "waybar" // Bar. +//########################### +// автозапуск +//########################### spawn-at-startup "noctalia-shell" // Shell. +spawn-at-startup "kitty" // terminal // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" hotkey-overlay { - // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. + // выключить подсказку на старте skip-at-startup } @@ -305,48 +180,30 @@ hotkey-overlay { // After enabling or disabling this, you need to restart the apps for this to take effect. prefer-no-csd -// You can change the path where screenshots are saved. -// A ~ at the front will be expanded to the home directory. -// The path is formatted with strftime(3) to give you the screenshot date and time. +//########################### +// место для скриншотов +//########################### screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" -// You can also set this to null to disable saving screenshots to disk. -// screenshot-path null - -// Animation settings. -// The wiki explains how to configure individual animations: -// https://yalter.github.io/niri/Configuration:-Animations +//########################### +// анимации +//########################### animations { // Uncomment to turn off all animations. // off // Slow down all animations by this factor. Values below 1 speed them up instead. - // slowdown 3.0 + slowdown 2.0 } -// environment { -// QT_QPA_PLATFORMTHEME "gtk3" -// } - -// cursor { -// xcursor-theme "Bibata-Modern-Classic" -// xcursor-size 24 -// } - -// layer-rule { -// match namespace="^wallpaper$" -// place-within-backdrop true -// } - +//########################### +// чето понты какие-то +//########################### layer-rule { match namespace="^noctalia-overview*" place-within-backdrop true } -// Window rules let you adjust behavior for individual windows. -// Find more information on the wiki: -// https://yalter.github.io/niri/Configuration:-Window-Rules - // Example: enable rounded corners for all windows. window-rule { clip-to-geometry true @@ -364,28 +221,21 @@ layer-rule { } } -// Work around WezTerm's initial configure bug -// by setting an empty default-column-width. window-rule { - // This regular expression is intentionally made as specific as possible, - // since this is the default config, and we want no false positives. - // You can get away with just app-id="wezterm" if you want. match app-id=r#"^org\.wezfurlong\.wezterm$"# default-column-width {} } -// Open the Firefox picture-in-picture player as floating by default. +// firefox PiP в плавающем окне window-rule { - // This app-id regular expression will work for both: - // - host Firefox (app-id is "firefox") - // - Flatpak Firefox (app-id is "org.mozilla.firefox") match app-id=r#"firefox$"# title="^Picture-in-Picture$" open-floating true } -// Example: block out two password managers from screen capture. -// (This example rule is commented out with a "/-" in front.) -/-window-rule { +//########################### +// спрятать окна от скриншотов +//########################### +window-rule { match app-id=r#"^org\.keepassxc\.KeePassXC$"# match app-id=r#"^org\.gnome\.World\.Secrets$"# @@ -395,36 +245,27 @@ window-rule { // block-out-from "screencast" } +//########################### +// бинды клавиш +//########################### binds { - // Keys consist of modifiers separated by + signs, followed by an XKB key name - // in the end. To find an XKB name for a particular key, you may use a program - // like wev. - // - // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt - // when running as a winit window. - // - // Most actions that you can bind here can also be invoked programmatically with - // `niri msg action do-something`. - - // Mod-Shift-/, which is usually the same as Mod-?, - // shows a list of important hotkeys. + // показать подсказку Mod+Shift+Slash { show-hotkey-overlay; } - // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+Shift+G hotkey-overlay-title=null { spawn "godot-mono"; } - Mod+Shift+O hotkey-overlay-title=null { spawn "obsidian"; } - Mod+Shift+F hotkey-overlay-title=null { spawn-sh "zen"; } - Mod+Shift+T hotkey-overlay-title=null { spawn-sh "Telegram"; } - Mod+Shift+C hotkey-overlay-title=null { spawn "kitty"; } + // запуск программ + Mod+Ctrl+T hotkey-overlay-title=null { spawn-sh "Telegram"; } + Mod+Ctrl+B hotkey-overlay-title=null { spawn-sh "firefox"; } + Mod+Ctrl+C hotkey-overlay-title=null { spawn-sh "code"; } + + Mod+T hotkey-overlay-title=null { spawn "kitty"; } Mod+E hotkey-overlay-title=null { spawn "nautilus"; } Mod+P { spawn-sh "noctalia-shell ipc call launcher toggle"; } Mod+S { spawn-sh "noctalia-shell ipc call settings toggle"; } - - // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. - // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. - // For example, this is a standard bind to toggle the screen reader (orca). - // Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } - + + // + // надо посмотреть + // + // // Example volume keys mappings for PipeWire & WirePlumber. // The allow-when-locked=true property makes them work even when the session is locked. // Using spawn-sh allows to pass multiple arguments together with the command. @@ -433,141 +274,110 @@ binds { XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; } XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; } XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; } - // Example media keys mapping using playerctl. // This will work with any MPRIS-enabled media player. XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; } XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; } XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; } XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; } - // Example brightness key mappings for brightnessctl. // You can use regular spawn with multiple arguments too (to avoid going through "sh"), // but you need to manually put each argument in separate "" quotes. XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+5%"; } XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "5%-"; } - // Open/close the Overview: a zoomed-out view of workspaces and windows. - // You can also move the mouse into the top-left hot corner, - // or do a four-finger swipe up on a touchpad. + // обзор Mod+O repeat=false { toggle-overview; } + // закрыть окно Mod+C repeat=false { close-window; } +// управление фокусом ---------------------------------------------------- + // перемещение фокуса Mod+Left { focus-column-left; } Mod+Down { focus-window-down; } Mod+Up { focus-window-up; } Mod+Right { focus-column-right; } - Mod+H { focus-column-left; } - Mod+J { focus-window-down; } - Mod+K { focus-window-up; } - Mod+L { focus-column-right; } - - Mod+Shift+Left { move-column-left; } - Mod+Shift+Down { move-window-down; } - Mod+Shift+Up { move-window-up; } - Mod+Shift+Right { move-column-right; } - Mod+Shift+H { move-column-left; } - Mod+Shift+J { move-window-down; } - Mod+Shift+K { move-window-up; } - Mod+Shift+L { move-column-right; } - - // Alternative commands that move across workspaces when reaching - // the first or last window in a column. - // Mod+J { focus-window-or-workspace-down; } - // Mod+K { focus-window-or-workspace-up; } - // Mod+Ctrl+J { move-window-down-or-to-workspace-down; } - // Mod+Ctrl+K { move-window-up-or-to-workspace-up; } - Mod+Home { focus-column-first; } Mod+End { focus-column-last; } + + // фокус на мониторах + Mod+Shift+Left { focus-monitor-left; } + Mod+Shift+Down { focus-monitor-down; } + Mod+Shift+Up { focus-monitor-up; } + Mod+Shift+Right { focus-monitor-right; } + +// управление окнами ---------------------------------------------------- + // перемещение окон + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Down { move-window-down; } + Mod+Ctrl+Up { move-window-up; } + Mod+Ctrl+Right { move-column-right; } Mod+Ctrl+Home { move-column-to-first; } Mod+Ctrl+End { move-column-to-last; } + Mod+Ctrl+Page_Down { move-column-to-workspace-down; } + Mod+Ctrl+Page_Up { move-column-to-workspace-up; } + Mod+Comma { consume-or-expel-window-left; } + Mod+Period { consume-or-expel-window-right; } - Mod+Ctrl+Left { focus-monitor-left; } - Mod+Ctrl+Down { focus-monitor-down; } - Mod+Ctrl+Up { focus-monitor-up; } - Mod+Ctrl+Right { focus-monitor-right; } - Mod+Ctrl+H { focus-monitor-left; } - Mod+Ctrl+J { focus-monitor-down; } - Mod+Ctrl+K { focus-monitor-up; } - Mod+Ctrl+L { focus-monitor-right; } + // управление размером окон + Mod+R { switch-preset-column-width; } // ширина + Mod+Shift+R { switch-preset-window-height; } // высота + Mod+Ctrl+R { reset-window-height; } + Mod+M { maximize-column; } + Mod+F { fullscreen-window; } + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + // плавающее окно + Mod+V { toggle-window-floating; } + Mod+Shift+V { switch-focus-between-floating-and-tiling; } + + //застакать окна + Mod+W { toggle-column-tabbed-display; } + + //растянуть окно насколько возможно + Mod+Ctrl+F { expand-column-to-available-width; } + + //Mod+Ctrl+C { center-column; } + + // Center all fully visible columns on screen. + //Mod+Alt+C { center-visible-columns; } + + + // перемещение окон по областям + Mod+Alt+1 { move-column-to-workspace 1; } + Mod+Alt+2 { move-column-to-workspace 2; } + Mod+Alt+3 { move-column-to-workspace 3; } + Mod+Alt+4 { move-column-to-workspace 4; } + Mod+Alt+5 { move-column-to-workspace 5; } + Mod+Alt+6 { move-column-to-workspace 6; } + Mod+Alt+7 { move-column-to-workspace 7; } + Mod+Alt+8 { move-column-to-workspace 8; } + Mod+Alt+9 { move-column-to-workspace 9; } + + // перемещение окон по мониторам Mod+Shift+Ctrl+Left { move-column-to-monitor-left; } Mod+Shift+Ctrl+Down { move-column-to-monitor-down; } Mod+Shift+Ctrl+Up { move-column-to-monitor-up; } Mod+Shift+Ctrl+Right { move-column-to-monitor-right; } - Mod+Shift+Ctrl+H { move-column-to-monitor-left; } - Mod+Shift+Ctrl+J { move-column-to-monitor-down; } - Mod+Shift+Ctrl+K { move-column-to-monitor-up; } - Mod+Shift+Ctrl+L { move-column-to-monitor-right; } + +// управление рабочими областями ---------------------------------------------------- - // Alternatively, there are commands to move just a single window: - // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; } - // ... - - // And you can also move a whole workspace to another monitor: - // Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; } - // ... + // переместить область + Mod+Alt+Ctrl+Left { move-workspace-to-monitor-left; } + Mod+Alt+Ctrl+Right { move-workspace-to-monitor-right; } + Mod+Alt+Ctrl+Up { move-workspace-to-monitor-up; } + Mod+Alt+Ctrl+Down { move-workspace-to-monitor-down; } + // фокус на области Mod+Page_Down { focus-workspace-down; } Mod+Page_Up { focus-workspace-up; } - Mod+U { focus-workspace-down; } - Mod+I { focus-workspace-up; } - Mod+Ctrl+Page_Down { move-column-to-workspace-down; } - Mod+Ctrl+Page_Up { move-column-to-workspace-up; } - Mod+Ctrl+U { move-column-to-workspace-down; } - Mod+Ctrl+I { move-column-to-workspace-up; } - - // Alternatively, there are commands to move just a single window: - // Mod+Ctrl+Page_Down { move-window-to-workspace-down; } - // ... - Mod+Shift+Page_Down { move-workspace-down; } Mod+Shift+Page_Up { move-workspace-up; } - Mod+Shift+U { move-workspace-down; } - Mod+Shift+I { move-workspace-up; } - - // You can bind mouse wheel scroll ticks using the following syntax. - // These binds will change direction based on the natural-scroll setting. - // - // To avoid scrolling through workspaces really fast, you can use - // the cooldown-ms property. The bind will be rate-limited to this value. - // You can set a cooldown on any bind, but it's most useful for the wheel. - Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=50 { focus-workspace-up; } - Mod+Ctrl+WheelScrollDown cooldown-ms=50 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=50 { move-column-to-workspace-up; } - - Mod+WheelScrollRight { focus-column-right; } - Mod+WheelScrollLeft { focus-column-left; } - Mod+Ctrl+WheelScrollRight { move-column-right; } - Mod+Ctrl+WheelScrollLeft { move-column-left; } - - // Usually scrolling up and down with Shift in applications results in - // horizontal scrolling; these binds replicate that. - Mod+Shift+WheelScrollDown { focus-column-right; } - Mod+Shift+WheelScrollUp { focus-column-left; } - Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } - Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } - - // Similarly, you can bind touchpad scroll "ticks". - // Touchpad scrolling is continuous, so for these binds it is split into - // discrete intervals. - // These binds are also affected by touchpad's natural-scroll, so these - // example binds are "inverted", since we have natural-scroll enabled for - // touchpads by default. - // Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; } - // Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; } - - // You can refer to workspaces by index. However, keep in mind that - // niri is a dynamic workspace system, so these commands are kind of - // "best effort". Trying to refer to a workspace index bigger than - // the current workspace count will instead refer to the bottommost - // (empty) workspace. - // - // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on - // will all refer to the 3rd workspace. + Mod+1 { focus-workspace 1; } Mod+2 { focus-workspace 2; } Mod+3 { focus-workspace 3; } @@ -577,98 +387,36 @@ binds { Mod+7 { focus-workspace 7; } Mod+8 { focus-workspace 8; } Mod+9 { focus-workspace 9; } - Mod+Shift+1 { move-column-to-workspace 1; } - Mod+Shift+2 { move-column-to-workspace 2; } - Mod+Shift+3 { move-column-to-workspace 3; } - Mod+Shift+4 { move-column-to-workspace 4; } - Mod+Shift+5 { move-column-to-workspace 5; } - Mod+Shift+6 { move-column-to-workspace 6; } - Mod+Shift+7 { move-column-to-workspace 7; } - Mod+Shift+8 { move-column-to-workspace 8; } - Mod+Shift+9 { move-column-to-workspace 9; } - // Alternatively, there are commands to move just a single window: - // Mod+Ctrl+1 { move-window-to-workspace 1; } + // #################### + // нахуй мышку + // #################### + //Mod+WheelScrollDown cooldown-ms=50 { focus-workspace-down; } + //Mod+WheelScrollUp cooldown-ms=50 { focus-workspace-up; } + //Mod+Ctrl+WheelScrollDown cooldown-ms=50 { move-column-to-workspace-down; } + //Mod+Ctrl+WheelScrollUp cooldown-ms=50 { move-column-to-workspace-up; } - // Switches focus between the current and the previous workspace. - // Mod+Tab { focus-workspace-previous; } + //Mod+WheelScrollRight { focus-column-right; } + //Mod+WheelScrollLeft { focus-column-left; } + //Mod+Ctrl+WheelScrollRight { move-column-right; } + //Mod+Ctrl+WheelScrollLeft { move-column-left; } - // The following binds move the focused window in and out of a column. - // If the window is alone, they will consume it into the nearby column to the side. - // If the window is already in a column, they will expel it out. + // Usually scrolling up and down with Shift in applications results in + // horizontal scrolling; these binds replicate that. + //Mod+Shift+WheelScrollDown { focus-column-right; } + //Mod+Shift+WheelScrollUp { focus-column-left; } + //Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + //Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } - Mod+Comma { consume-or-expel-window-left; } - Mod+Period { consume-or-expel-window-right; } - - // Consume one window from the right to the bottom of the focused column. - Mod+Shift+Comma { consume-window-into-column; } - // Expel the bottom window from the focused column to the right. - Mod+Shift+Period { expel-window-from-column; } - - Mod+R { switch-preset-column-width; } - // Cycling through the presets in reverse order is also possible. - // Mod+R { switch-preset-column-width-back; } - Mod+Shift+R { switch-preset-window-height; } - Mod+Ctrl+R { reset-window-height; } - Mod+M { maximize-column; } - Mod+F { fullscreen-window; } - - // Expand the focused column to space not taken up by other fully visible columns. - // Makes the column "fill the rest of the space". - Mod+Ctrl+F { expand-column-to-available-width; } - - Mod+Ctrl+C { center-column; } - - // Center all fully visible columns on screen. - Mod+Alt+C { center-visible-columns; } - - // Finer width adjustments. - // This command can also: - // * set width in pixels: "1000" - // * adjust width in pixels: "-5" or "+5" - // * set width as a percentage of screen width: "25%" - // * adjust width as a percentage of screen width: "-10%" or "+10%" - // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0, - // set-column-width "100" will make the column occupy 200 physical screen pixels. - Mod+Minus { set-column-width "-10%"; } - Mod+Equal { set-column-width "+10%"; } - - // Finer height adjustments when in column with other windows. - Mod+Shift+Minus { set-window-height "-10%"; } - Mod+Shift+Equal { set-window-height "+10%"; } - - // Move the focused window between the floating and the tiling layout. - Mod+V { toggle-window-floating; } - Mod+Shift+V { switch-focus-between-floating-and-tiling; } - - // Toggle tabbed column display mode. - // Windows in this column will appear as vertical tabs, - // rather than stacked on top of each other. - Mod+W { toggle-column-tabbed-display; } - - // Actions to switch layouts. - // Note: if you uncomment these, make sure you do NOT have - // a matching layout switch hotkey configured in xkb options above. - // Having both at once on the same hotkey will break the switching, - // since it will switch twice upon pressing the hotkey (once by xkb, once by niri). - // Mod+Space { switch-layout "next"; } - // Mod+Shift+Space { switch-layout "prev"; } + //################################### + //скриншоты + //################################### Print { screenshot; } Ctrl+Print { screenshot-screen; } Alt+Print { screenshot-window; } - // Applications such as remote-desktop clients and software KVM switches may - // request that niri stops processing the keyboard shortcuts defined here - // so they may, for example, forward the key presses as-is to a remote machine. - // It's a good idea to bind an escape hatch to toggle the inhibitor, - // so a buggy application can't hold your session hostage. - // - // The allow-inhibiting=false property can be applied to other binds as well, - // which ensures niri always processes them, even when an inhibitor is active. - Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - - // The quit action will show a confirmation dialog to avoid accidental exits. + // выход Ctrl+Alt+Delete { quit; } Mod+Shift+E { spawn-sh "noctalia-shell ipc call sessionMenu toggle"; } diff --git a/modules/sessions/niri/niri.nix b/modules/sessions/niri/niri.nix index 775478f..a5e0d82 100644 --- a/modules/sessions/niri/niri.nix +++ b/modules/sessions/niri/niri.nix @@ -1,161 +1,145 @@ { self, ... }: -{ - flake.nixosModules.niri = { pkgs, lib, config, ... }: - { - imports = [ - self.nixosModules.matugen - # self.nixosModules.waybar - self.nixosModules.noctalia - ]; +{flake.nixosModules.niri = { pkgs, lib, config, ... }: { + imports = [ + # управляет цветвми под обои + self.nixosModules.matugen + # панельки и тд + self.nixosModules.noctalia + ]; - kitty.wal.enable = true; + # включить програмки для этой сессии + kitty.wal.enable = true; + programs.niri.enable = true; - programs.niri.enable = true; + # логин-менеджер + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + }; - #services.displayManager.ly = - #let - # xsession-wrapper = pkgs.runCommand "xsession-wrapper-fixed" { - # src = config.services.displayManager.sessionData.wrapper; - # } '' - # cp --preserve=mode $src $out - # substituteInPlace $out --replace "X-NIXOS-SYSTEMD-AWARE" "X-NIXOS-SYSTEMD-AWARE|niri" - # ''; - #in { - # enable = true; - # x11Support = false; - # settings = { - # setup_cmd = "${xsession-wrapper}"; - # session_log = ".ly-session.log"; - # }; - #}; + # автомонтирование флешек + services.udisks2.enable = true; + # корзина и тд для проводника + services.gvfs.enable = true; - services.displayManager.sddm = { + # пакеты для нири + environment.systemPackages = with pkgs; [ + brightnessctl + eog + gnome-themes-extra + kdePackages.breeze + kdePackages.breeze-icons + kdePackages.dolphin + kdePackages.kcalc + mpv + nautilus + pywal + wl-clipboard + xwayland-satellite + ]; + + home-manager.users.${self.user} = { config, ... }: { + + # лаунчер приложений + programs.rofi = { enable = true; - wayland.enable = true; # Чтобы SDDM сам работал на вейленде + font = "${self.font.mono} 18"; + extraConfig = { + kb-row-up = "Up"; + kb-row-down = "Down"; + kb-accept-entry = "Control+m,Return,KP_Enter"; + kb-remove-to-eol = "Control+Shift+e"; + kb-mode-next = "Shift+Right,Control+Tab,Control+l"; + kb-mode-previous = "Shift+Left,Control+Shift+Tab,Control+h"; + kb-mode-complete = ""; + kb-remove-char-back = "BackSpace"; + }; + theme = "~/.cache/wal/colors-rofi-dark.rasi"; }; - services.udisks2.enable = true; # Removable media. - services.gvfs.enable = true; # Nautilus mount and trash support. - - environment.systemPackages = with pkgs; [ - brightnessctl - btop - eog - gnome-themes-extra - kdePackages.breeze - kdePackages.breeze-icons - kdePackages.dolphin - kdePackages.kcalc - mpv - nautilus - pywal - wl-clipboard - xwayland-satellite - ]; - - home-manager.users.${self.user} = { config, ... }: { - # home.activation.pywal = "${pkgs.pywal}/bin/wal --cols16 -i ${self.wallpaper}"; - - programs.rofi = { - enable = true; - font = "${self.font.mono} 18"; - extraConfig = { - kb-row-up = "Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab"; - kb-row-down = "Down,Control+j"; - kb-accept-entry = "Control+m,Return,KP_Enter"; - kb-remove-to-eol = "Control+Shift+e"; - kb-mode-next = "Shift+Right,Control+Tab,Control+l"; - kb-mode-previous = "Shift+Left,Control+Shift+Tab,Control+h"; - kb-mode-complete = ""; - kb-remove-char-back = "BackSpace"; - }; - theme = "~/.cache/wal/colors-rofi-dark.rasi"; + # всплывающее окно аутентификации + services.polkit-gnome.enable = true; + systemd.user.services.polkit-gnome = { + Service = { + Restart = "on-failure"; + RestartSec = 1; }; - - services.polkit-gnome.enable = true; # Enable Gnome polkit. - - systemd.user.services.polkit-gnome = { - Service = { - Restart = "on-failure"; - RestartSec = 1; - }; - Unit = { - StartLimitIntervalSec = 30; - StartLimitBurst = 10; - }; + Unit = { + StartLimitIntervalSec = 30; + StartLimitBurst = 10; }; + }; - # Symlink config file. - xdg.configFile."niri/config.kdl".source = ./config.kdl; + # привязка конфига нири + xdg.configFile."niri/config.kdl".source = ./config.kdl; - # Write custom config file. - xdg.configFile."niri/config-nix.kdl".text = /* kdl */ '' - window-rule { - geometry-corner-radius ${self.border.main} - } - ''; + # Write custom config file. + #xdg.configFile."niri/config-nix.kdl".text = /* kdl */ '' + # window-rule { + # geometry-corner-radius ${self.border.main} + # } + #''; - # Set default applications. - xdg.mimeApps = { - enable = true; - defaultApplications = let - imageViewer = "org.gnome.eog.desktop"; - documentViewer = "org.kde.okular.desktop"; - videoViewer = "mpv.desktop"; - in { - "image/png" = imageViewer; - "image/jpg" = imageViewer; - "image/jpeg" = imageViewer; - "document/pdf" = documentViewer; - "video/mp4" = videoViewer; - "video/webm" = videoViewer; - }; + # приложения по умолчанию + xdg.mimeApps = { + enable = true; + defaultApplications = let + imageViewer = "org.gnome.eog.desktop"; + documentViewer = "org.kde.okular.desktop"; + videoViewer = "mpv.desktop"; + in { + "image/png" = imageViewer; + "image/jpg" = imageViewer; + "image/jpeg" = imageViewer; + "document/pdf" = documentViewer; + "video/mp4" = videoViewer; + "video/webm" = videoViewer; }; + }; - # Set cursor theme. - home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic"; + # Set cursor theme. + home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic"; - # Set dark theme for GTK programs. - dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; + # Set dark theme for GTK programs. + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; - # Set GTK theme. - gtk = { - enable = true; - gtk4.theme = null; - theme = { - name = "adw-gtk3-dark"; - package = pkgs.adw-gtk3; - }; - cursorTheme = { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - size = 24; - }; - font = { - name = "${self.font.mono}"; - size = 13; - }; + # Set GTK theme. + gtk = { + enable = true; + gtk4.theme = null; + theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; }; + cursorTheme = { + name = "Bibata-Modern-Classic"; + package = pkgs.bibata-cursors; + size = 20; + }; + font = { + name = "${self.font.mono}"; + size = 13; + }; + }; # Make QT follow GTK theme. - qt = { - enable = true; - platformTheme.name = "gtk3"; + qt = { + enable = true; + platformTheme.name = "gtk3"; - qt5ctSettings = { - Fonts = { - fixed = "\"${self.font.mono},13\""; - general = "\"${self.font.mono},13\""; - }; + qt5ctSettings = { + Fonts = { + fixed = "\"${self.font.mono},13\""; + general = "\"${self.font.mono},13\""; }; + }; - qt6ctSettings = { - Fonts = { - fixed = "\"${self.font.mono},13\""; - general = "\"${self.font.mono},13\""; - }; + qt6ctSettings = { + Fonts = { + fixed = "\"${self.font.mono},13\""; + general = "\"${self.font.mono},13\""; }; }; }; }; -} +};} diff --git a/modules/sessions/niri/noctalia.nix b/modules/sessions/niri/noctalia.nix index 7c71650..444b88c 100644 --- a/modules/sessions/niri/noctalia.nix +++ b/modules/sessions/niri/noctalia.nix @@ -71,10 +71,10 @@ showCpuFreq = false; showCpuTemp = true; showCpuUsage = true; - showDiskAvailable = false; - showDiskUsage = false; - showDiskUsageAsPercent = false; - showGpuTemp = false; + showDiskAvailable = true; + showDiskUsage = true; + showDiskUsageAsPercent = true; + showGpuTemp = true; showLoadAverage = false; showMemoryAsPercent = false; showMemoryUsage = true; @@ -587,7 +587,7 @@ monitors = []; location = "top_right"; overlayLayer = true; - backgroundOpacity = 1; + backgroundOpacity = 0.75; respectExpireTimeout = false; lowUrgencyDuration = 2; normalUrgencyDuration = 3; @@ -657,7 +657,7 @@ enableUserTheming = false; }; nightLight = { - enabled = true; + enabled = false; forced = false; autoSchedule = true; nightTemp = "5000"; diff --git a/modules/sessions/niri/wrapped-niri.nix b/modules/sessions/niri/wrapped-niri.nix deleted file mode 100644 index 1382c3f..0000000 --- a/modules/sessions/niri/wrapped-niri.nix +++ /dev/null @@ -1,337 +0,0 @@ -{ self, inputs, ... }: -{ - flake.nixosModules.wrappedNiri = { pkgs, lib, ... }: - { - programs.niri = { - enable = true; - package = self.packages.${pkgs.stdenv.hostPlatform.system}.wrappedNiri; - }; - }; - perSystem = { pkgs, lib, ... }: { - packages.wrappedNiri = inputs.nix-wrapper-modules.wrappers.niri.wrap { - inherit pkgs; - settings = { - input = { - keyboard = { - xkb = { - layout = "us,ru"; - options = "grp:caps_toggle"; - }; - repeat-delay = 250; - repeat-rate = 25; - }; - - touchpad = { - tap = null; - natural-scroll = null; - }; - - mouse = { - accel-profile = "flat"; - }; - - trackpoint = { - accel-profile = "flat"; - }; - - warp-mouse-to-focus = null; - # focus-follows-mouse.max-scroll-amount = "95%"; - }; - - outputs."eDP-1" = { - mode = "1920x1080@60"; - scale = 1; - transform = "normal"; - }; - - layout = { - gaps = 8; - always-center-single-column = null; - center-focused-column = "never"; - - preset-column-widths = [ - { proportion = 0.33333; } - { proportion = 0.5; } - { proportion = 0.66667; } - ]; - - default-column-width.proportion = 0.5; - - focus-ring = { - width = 3; - active-color = "#77863D"; - inactive-color = "#505050"; - }; - - border = { - off = null; - width = 2; - active-color = "#ffc87f"; - inactive-color = "#505050"; - urgent-color = "#9b0000"; - }; - - shadow = { - softness = 30; - spread = 5; - # offset = "x=0 y=5"; - color = "#0007"; - }; - - struts = { }; - }; - - spawn-at-startup = [ - "waybar" - "dunst" - ]; - - spawn-sh-at-startup = [ - "swaybg -i /mnt/data/pictures/Bierstadt_Mount_Baker_Washington.jpg" - "wlsunset -l 43.2 -L 76.9 -t 5000" - "wal -i /mnt/data/pictures/Bierstadt_Mount_Baker_Washington.jpg --cols16" - "matugen image /mnt/data/pictures/Bierstadt_Mount_Baker_Washington.jpg" - ]; - - hotkey-overlay.skip-at-startup = null; - prefer-no-csd = null; - - screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; - - animations = { }; - - window-rules = [ - { - matches = [ - { - app-id = "firefox$"; - title = "^Picture-in-Picture$"; - } - ]; - open-floating = true; - } - ]; - - binds = { - "Mod+Shift+Slash".show-hotkey-overlay = null; - - "Mod+Shift+G".spawn-sh = "godot-mono"; - - "Mod+Shift+O".spawn-sh = "obsidian"; - - "Mod+Shift+F".spawn-sh = "zen"; - - "Mod+Shift+T".spawn-sh = "Telegram"; - - "Mod+Shift+C".spawn-sh = "kitty"; - - "Mod+E".spawn-sh = "nautilus"; - - "Mod+P".spawn-sh = "wofi --show drun"; - - "XF86AudioRaiseVolume" = { - allow-when-locked = true; - spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+ -l 1.0"; - }; - - "XF86AudioLowerVolume" = { - allow-when-locked = true; - spawn-sh = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; - }; - - "XF86AudioMute" = { - allow-when-locked = true; - spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - }; - - "XF86AudioMicMute" = { - allow-when-locked = true; - spawn-sh = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; - }; - - "XF86AudioPlay" = { - allow-when-locked = true; - spawn-sh = "playerctl play-pause"; - }; - - "XF86AudioStop" = { - allow-when-locked = true; - spawn-sh = "playerctl stop"; - }; - - "XF86AudioPrev" = { - allow-when-locked = true; - spawn-sh = "playerctl previous"; - }; - - "XF86AudioNext" = { - allow-when-locked = true; - spawn-sh = "playerctl next"; - }; - - "XF86MonBrightnessUp" = { - allow-when-locked = true; - spawn-sh = "brightnessctl --class=backlight set +5%"; - }; - - "XF86MonBrightnessDown" = { - allow-when-locked = true; - spawn-sh = "brightnessctl --class=backlight set 5%-"; - }; - - "Mod+O" = { - repeat = false; - toggle-overview = null; - }; - - "Mod+C" = { - repeat = false; - close-window = null; - }; - - "Mod+Left".focus-column-left = null; - "Mod+Down".focus-window-down = null; - "Mod+Up".focus-window-up = null; - "Mod+Right".focus-column-right = null; - "Mod+H".focus-column-left = null; - "Mod+J".focus-window-down = null; - "Mod+K".focus-window-up = null; - "Mod+L".focus-column-right = null; - - "Mod+Shift+Left".move-column-left = null; - "Mod+Shift+Down".move-window-down = null; - "Mod+Shift+Up".move-window-up = null; - "Mod+Shift+Right".move-column-right = null; - "Mod+Shift+H".move-column-left = null; - "Mod+Shift+J".move-window-down = null; - "Mod+Shift+K".move-window-up = null; - "Mod+Shift+L".move-column-right = null; - - "Mod+Home".focus-column-first = null; - "Mod+End".focus-column-last = null; - "Mod+Ctrl+Home".move-column-to-first = null; - "Mod+Ctrl+End".move-column-to-last = null; - - "Mod+Ctrl+Left".focus-monitor-left = null; - "Mod+Ctrl+Down".focus-monitor-down = null; - "Mod+Ctrl+Up".focus-monitor-up = null; - "Mod+Ctrl+Right".focus-monitor-right = null; - "Mod+Ctrl+H".focus-monitor-left = null; - "Mod+Ctrl+J".focus-monitor-down = null; - "Mod+Ctrl+K".focus-monitor-up = null; - "Mod+Ctrl+L".focus-monitor-right = null; - - "Mod+Shift+Ctrl+Left".move-column-to-monitor-left = null; - "Mod+Shift+Ctrl+Down".move-column-to-monitor-down = null; - "Mod+Shift+Ctrl+Up".move-column-to-monitor-up = null; - "Mod+Shift+Ctrl+Right".move-column-to-monitor-right = null; - "Mod+Shift+Ctrl+H".move-column-to-monitor-left = null; - "Mod+Shift+Ctrl+J".move-column-to-monitor-down = null; - "Mod+Shift+Ctrl+K".move-column-to-monitor-up = null; - "Mod+Shift+Ctrl+L".move-column-to-monitor-right = null; - - "Mod+Page_Down".focus-workspace-down = null; - "Mod+Page_Up".focus-workspace-up = null; - "Mod+U".focus-workspace-down = null; - "Mod+I".focus-workspace-up = null; - - "Mod+Ctrl+Page_Down".move-column-to-workspace-down = null; - "Mod+Ctrl+Page_Up".move-column-to-workspace-up = null; - "Mod+Ctrl+U".move-column-to-workspace-down = null; - "Mod+Ctrl+I".move-column-to-workspace-up = null; - - "Mod+Shift+Page_Down".move-workspace-down = null; - "Mod+Shift+Page_Up".move-workspace-up = null; - "Mod+Shift+U".move-workspace-down = null; - "Mod+Shift+I".move-workspace-up = null; - - "Mod+WheelScrollDown" = { - cooldown-ms = 150; - focus-workspace-down = null; - }; - - "Mod+WheelScrollUp" = { - cooldown-ms = 150; - focus-workspace-up = null; - }; - - "Mod+Ctrl+WheelScrollDown" = { - cooldown-ms = 150; - move-column-to-workspace-down = null; - }; - - "Mod+Ctrl+WheelScrollUp" = { - cooldown-ms = 150; - move-column-to-workspace-up = null; - }; - - "Mod+WheelScrollRight".focus-column-right = null; - "Mod+WheelScrollLeft".focus-column-left = null; - "Mod+Ctrl+WheelScrollRight".move-column-right = null; - "Mod+Ctrl+WheelScrollLeft".move-column-left = null; - - "Mod+Shift+WheelScrollDown".focus-column-right = null; - "Mod+Shift+WheelScrollUp".focus-column-left = null; - "Mod+Ctrl+Shift+WheelScrollDown".move-column-right = null; - "Mod+Ctrl+Shift+WheelScrollUp".move-column-left = null; - - "Mod+1".focus-workspace = 1; - "Mod+2".focus-workspace = 2; - "Mod+3".focus-workspace = 3; - "Mod+4".focus-workspace = 4; - "Mod+5".focus-workspace = 5; - "Mod+6".focus-workspace = 6; - "Mod+7".focus-workspace = 7; - "Mod+8".focus-workspace = 8; - "Mod+9".focus-workspace = 9; - - "Mod+Shift+1".move-column-to-workspace = 1; - "Mod+Shift+2".move-column-to-workspace = 2; - "Mod+Shift+3".move-column-to-workspace = 3; - "Mod+Shift+4".move-column-to-workspace = 4; - "Mod+Shift+5".move-column-to-workspace = 5; - "Mod+Shift+6".move-column-to-workspace = 6; - "Mod+Shift+7".move-column-to-workspace = 7; - "Mod+Shift+8".move-column-to-workspace = 8; - "Mod+Shift+9".move-column-to-workspace = 9; - - "Mod+Comma".consume-or-expel-window-left = null; - "Mod+Period".consume-or-expel-window-right = null; - "Mod+Shift+Comma".consume-window-into-column = null; - "Mod+Shift+Period".expel-window-from-column = null; - - "Mod+R".switch-preset-column-width = null; - "Mod+Shift+R".switch-preset-window-height = null; - "Mod+Ctrl+R".reset-window-height = null; - "Mod+M".maximize-column = null; - "Mod+F".fullscreen-window = null; - "Mod+Ctrl+F".expand-column-to-available-width = null; - "Mod+Alt+C".center-column = null; - "Mod+Ctrl+C".center-visible-columns = null; - - "Mod+Minus".set-column-width = "-10%"; - "Mod+Equal".set-column-width = "+10%"; - "Mod+Shift+Minus".set-window-height = "-10%"; - "Mod+Shift+Equal".set-window-height = "+10%"; - - "Mod+V".toggle-window-floating = null; - "Mod+Shift+V".switch-focus-between-floating-and-tiling = null; - "Mod+W".toggle-column-tabbed-display = null; - - "Print".screenshot = null; - "Ctrl+Print".screenshot-screen = null; - "Alt+Print".screenshot-window = null; - - "Mod+Escape" = { - allow-inhibiting = false; - toggle-keyboard-shortcuts-inhibit = null; - }; - - "Mod+Shift+E".quit = null; - "Ctrl+Alt+Delete".quit = null; - "Mod+Shift+P".power-off-monitors = null; - }; - }; - }; - }; -} diff --git a/modules/sessions/xfce-rdp.nix b/modules/sessions/xfce-rdp.nix index 99b8af7..93b57a4 100644 --- a/modules/sessions/xfce-rdp.nix +++ b/modules/sessions/xfce-rdp.nix @@ -1,24 +1,31 @@ +/* ┌──────────────────────────────────────────┐ + │ XFCE для RDP │ + └──────────────────────────────────────────┘ */ { self, ... }: { flake.nixosModules.xfcerdp = { pkgs, lib, ... }: { services.xserver = { enable = true; - displayManager.sddm.enable = lib.mkDefault true; # Оставляем SDDM как вход desktopManager.xfce.enable = true; }; + services.displayManager.sddm.enable = lib.mkDefault true; - # Доп пакеты для Xfce, чтобы он не был совсем голым +/* ┌──────────────────────────────────────────┐ + │ доп пакеты │ + └──────────────────────────────────────────┘ */ environment.systemPackages = with pkgs; [ - xfce.xfce4-pulseaudio-plugin - xfce.xfce4-whiskermenu-plugin # Удобное меню "Пуск" + xfce4-pulseaudio-plugin + xfce4-whiskermenu-plugin # Удобное меню "Пуск" networkmanagerapplet # Иконка сети в трее ]; +/* ┌──────────────────────────────────────────┐ + │ RDP настройки │ + └──────────────────────────────────────────┘ */ services.xrdp = { enable = true; defaultWindowManager = "xfce4-session"; openFirewall = true; }; - }; } diff --git a/modules/theme.nix b/modules/theme.nix index be52121..4064076 100644 --- a/modules/theme.nix +++ b/modules/theme.nix @@ -1,8 +1,3 @@ -/* ┌──────────────────────────────────────────┐ - │ темы шрифты обои и тд │ - └──────────────────────────────────────────┘ */ - - { self, ... }: let wallpaper = "/home/${self.user}/Pictures/romashki.jpg"; @@ -10,8 +5,6 @@ let font = { mono = "JetBrainsMonoNerdFontMono"; propo = "JetBrainsMonoNerdFontPropo"; - # mono = "IBM Plex Mono"; - # propo = "IBM Plex Mono"; }; border = {