From 998d3b37d333b52f5b24fabce7364844731a6133 Mon Sep 17 00:00:00 2001 From: Buliway Date: Tue, 5 Aug 2025 15:33:00 +0300 Subject: [PATCH] new qemu setup (broken) --- BINDINGS.md | 107 +++++ NOTES.md | 204 ++++++++ PROBLEMS.md | 34 ++ README.md | 441 +---------------- SOFTWARE.md | 0 THEMES.md | 130 +++++ archive/README.md | 1 - archive/browsers/chromium.nix | 7 - archive/browsers/firefox.nix | 40 -- archive/browsers/librewolf.nix | 57 --- archive/bspwmrc | 105 ----- archive/default-apps.nix | 121 ----- archive/fish.nix | 82 ---- archive/strawberry.conf | 443 ------------------ archive/thunar.xml | 33 -- archive/yazi/init.lua | 2 - archive/yazi/keymap.toml | 18 - archive/yazi/plugins/exifaudio.yazi/LICENSE | 21 - archive/yazi/plugins/exifaudio.yazi/README.md | 32 -- archive/yazi/plugins/exifaudio.yazi/init.lua | 139 ------ archive/yazi/plugins/full-border.yazi/LICENSE | 21 - .../yazi/plugins/full-border.yazi/README.md | 28 -- .../yazi/plugins/full-border.yazi/init.lua | 40 -- archive/yazi/plugins/glow.yazi/LICENSE | 7 - archive/yazi/plugins/glow.yazi/README.md | 18 - archive/yazi/plugins/glow.yazi/init.lua | 66 --- archive/yazi/plugins/miller.yazi/LICENSE | 7 - archive/yazi/plugins/miller.yazi/README.md | 26 - archive/yazi/plugins/miller.yazi/init.lua | 59 --- archive/yazi/plugins/ouch.yazi/LICENSE | 21 - archive/yazi/plugins/ouch.yazi/README.md | 67 --- archive/yazi/plugins/ouch.yazi/init.lua | 143 ------ archive/yazi/plugins/starship.yazi/LICENSE | 21 - archive/yazi/plugins/starship.yazi/README.md | 99 ---- archive/yazi/plugins/starship.yazi/init.lua | 28 -- archive/yazi/yazi.nix | 46 -- archive/yazi/yazi.toml | 33 -- flake.lock | 87 ++-- flake.nix | 8 +- modules/home-manager/bundle.nix | 13 +- modules/home-manager/gui/vscode.nix | 12 +- modules/home-manager/mpv/README.md | 2 +- modules/home-manager/mpv/mpv.nix | 15 +- modules/home-manager/obs/obs.nix | 3 +- modules/home-manager/symlinks.nix | 27 +- modules/home-manager/terminal/starship.nix | 4 +- modules/home-manager/terminal/zsh.nix | 22 +- modules/home-manager/wm/bspwm/bspwm.nix | 10 +- modules/home-manager/wm/bspwm/polybar.nix | 9 +- modules/home-manager/wm/bspwm/sxhkd.nix | 2 +- modules/home-manager/wm/lockscreen.nix | 2 +- modules/nixos/bundle.nix | 7 +- modules/nixos/env.nix | 5 - modules/nixos/filesystems.nix | 10 +- modules/nixos/hardware.nix | 23 +- modules/nixos/hibernate.nix | 4 +- modules/nixos/network.nix | 23 +- modules/nixos/nix-glow-gruvbox.jpg | Bin 397711 -> 397705 bytes modules/nixos/sound.nix | 79 ++-- modules/nixos/stylix.nix | 16 +- modules/nixos/vr.nix | 6 +- modules/nixos/xserver.nix | 13 +- nixos/configuration.nix | 17 +- nixos/home.nix | 7 +- nixos/packages.nix | 231 +++++---- nvim/README.md | 211 +++++---- nvim/doc/kickstart.txt | 24 - nvim/ftplugin/javascript.lua | 4 + nvim/ftplugin/nix.lua | 4 + nvim/ftplugin/proto.lua | 4 + nvim/ftplugin/typescript.lua | 4 + nvim/ftplugin/typescriptreact.lua | 4 + nvim/init.lua | 35 +- nvim/kickstart.md | 233 --------- nvim/lazy-lock.json | 99 ++-- nvim/lua/custom/plugins/clip_history.lua | 14 + nvim/lua/custom/plugins/colorizer.lua | 63 +++ nvim/lua/custom/plugins/golang.lua | 14 +- nvim/lua/custom/plugins/rust.lua | 2 +- nvim/lua/custom/plugins/sessions.lua | 16 - nvim/lua/custom/plugins/symbol_usage.lua | 87 ++++ nvim/lua/custom/sessions.lua | 115 +++++ nvim/lua/kickstart/plugins/autoformat.lua | 38 +- nvim/lua/kickstart/plugins/autopairs.lua | 10 +- nvim/lua/kickstart/plugins/completion.lua | 176 ++++--- nvim/lua/kickstart/plugins/file-tree.lua | 8 +- nvim/lua/kickstart/plugins/lint.lua | 4 +- nvim/lua/kickstart/plugins/lsp.lua | 135 +++--- nvim/lua/kickstart/plugins/mini.lua | 24 +- nvim/lua/kickstart/plugins/telescope.lua | 5 +- nvim/lua/kickstart/plugins/themes.lua | 96 ++-- nvim/lua/kickstart/plugins/todo-comments.lua | 15 +- nvim/lua/kickstart/plugins/treesitter.lua | 53 ++- nvim/lua/kickstart/plugins/vim-sleuth.lua | 4 - nvim/lua/kickstart/plugins/which-key.lua | 7 +- nvim/lua/kickstart/settings.lua | 58 ++- nvim/shit.md | 61 --- shit/README.md | 4 +- shit/install.sh | 12 +- shit/mimeapps.list | 178 +++---- 100 files changed, 1795 insertions(+), 3430 deletions(-) create mode 100644 BINDINGS.md create mode 100644 NOTES.md create mode 100644 PROBLEMS.md create mode 100644 SOFTWARE.md create mode 100644 THEMES.md delete mode 100644 archive/README.md delete mode 100644 archive/browsers/chromium.nix delete mode 100644 archive/browsers/firefox.nix delete mode 100644 archive/browsers/librewolf.nix delete mode 100644 archive/bspwmrc delete mode 100644 archive/default-apps.nix delete mode 100644 archive/fish.nix delete mode 100644 archive/strawberry.conf delete mode 100644 archive/thunar.xml delete mode 100644 archive/yazi/init.lua delete mode 100644 archive/yazi/keymap.toml delete mode 100644 archive/yazi/plugins/exifaudio.yazi/LICENSE delete mode 100644 archive/yazi/plugins/exifaudio.yazi/README.md delete mode 100644 archive/yazi/plugins/exifaudio.yazi/init.lua delete mode 100644 archive/yazi/plugins/full-border.yazi/LICENSE delete mode 100644 archive/yazi/plugins/full-border.yazi/README.md delete mode 100644 archive/yazi/plugins/full-border.yazi/init.lua delete mode 100644 archive/yazi/plugins/glow.yazi/LICENSE delete mode 100644 archive/yazi/plugins/glow.yazi/README.md delete mode 100644 archive/yazi/plugins/glow.yazi/init.lua delete mode 100644 archive/yazi/plugins/miller.yazi/LICENSE delete mode 100644 archive/yazi/plugins/miller.yazi/README.md delete mode 100644 archive/yazi/plugins/miller.yazi/init.lua delete mode 100644 archive/yazi/plugins/ouch.yazi/LICENSE delete mode 100644 archive/yazi/plugins/ouch.yazi/README.md delete mode 100644 archive/yazi/plugins/ouch.yazi/init.lua delete mode 100644 archive/yazi/plugins/starship.yazi/LICENSE delete mode 100644 archive/yazi/plugins/starship.yazi/README.md delete mode 100644 archive/yazi/plugins/starship.yazi/init.lua delete mode 100644 archive/yazi/yazi.nix delete mode 100644 archive/yazi/yazi.toml delete mode 100644 modules/nixos/env.nix delete mode 100644 nvim/doc/kickstart.txt create mode 100644 nvim/ftplugin/javascript.lua create mode 100644 nvim/ftplugin/nix.lua create mode 100644 nvim/ftplugin/proto.lua create mode 100644 nvim/ftplugin/typescript.lua create mode 100644 nvim/ftplugin/typescriptreact.lua delete mode 100644 nvim/kickstart.md create mode 100644 nvim/lua/custom/plugins/clip_history.lua create mode 100644 nvim/lua/custom/plugins/colorizer.lua delete mode 100644 nvim/lua/custom/plugins/sessions.lua create mode 100644 nvim/lua/custom/plugins/symbol_usage.lua create mode 100644 nvim/lua/custom/sessions.lua delete mode 100644 nvim/lua/kickstart/plugins/vim-sleuth.lua delete mode 100644 nvim/shit.md diff --git a/BINDINGS.md b/BINDINGS.md new file mode 100644 index 0000000..6767460 --- /dev/null +++ b/BINDINGS.md @@ -0,0 +1,107 @@ +Тут будут описаны все бинды системы. Но мне может быть лень актуализировать эту огромную таблицу, так что лучше читай конфиги. + +Возможно бинды для скринов придётся настроить руками в ksnip + +# Минимально необходимые бинды + +Тут будет мелкий список биндов, с которым можно начать. Бинды из секции "все бинды" могут повторяться + +Клавиша `Super` это клавиша `Win` + +- `Super + A` - Запускатор приложений +- `Super + Q` - Закрыть приложение (если добавить shift, то это kill приложения, если оно зависло и не закрывается) +- `Super + 0-9` - Переключить воркспейс (если добавить shift, то кидает активное окно на указанный воркспейс) +- `Super + Esc` - Переключиться на прошлый воркспейс, удобно +- `Super + T` - Открыть терминал (если добавить shift, то получится floating терминал, а если ctrl, то откроется kitty вместо alacritty) +- `Super + ПКМ` - Менять размер окна, на котором зажал ПКМ и водишь мышкой +- `Super + ЛКМ` - Двигать окно, на котором зажал ЛКМ +- `Super + F` - Делает окно flotaing и обратно tiling при повторном нажатии (если забагалось и делает фулскрин, то добавь shift, чтоб переключить в tiling) +- `Super + Стрелки` - Меняет фокус приложения в указанном направлении +- `Дальняя боковая кнопка мыши` - Скрол. Зажимаешь эту кнопку и водишь мышкой по столу в ту сторону, куда хочешь скролить +- `CapsLock` - Сменить язык на клавиатуре (если нужен просто капс, то жми с shift) + + +# Все бинды + +Клавиша `Super` это клавиша `Win` + +| Bspwm | Описание | +| --------------------------------- | ------------------------------------------------------------------------------------------- | +| `Super + L` | Lock screen | +| `Super + Q` | Quit. Выключить приложение | +| `Super + Shift + Q` | Kill. Если приложение не отвечает, то убить его | +| `Super + F` | Floating toggle | +| `Super + Shift + F` | Tiled toggle | +| `Super + Enter` | Fullscreen toggle | +| `Super + Esc` | Прошлый воркспейс. Желательно внутри одного монитора | +| `Super + ЛКМ` | Переместить окно | +| `Super + ПКМ` | Ресайзить окно | +| `Super + Arrows` | Менять фокус приложения в указанном направлении | +| `Super + 0-9` | Переключить воркспейс на 1-10. Если они общие на все моники, то добавить F1-F12 для 11-22 | +| `Super + Shift + 0-9` | Перекинуть активное окно на воркспейс. Желательно silent, чтоб меня не перекидывало к проге | +| `Super + Ctrl + Down` | Переключает на первый пустой воркспейс | +| `Super + Ctrl + Left/Right` | Переключает на предыдущий/следующий воркспейс. То есть делает -1 или +1 от текущего | +| `Super + Ctrl + Alt + Down` | Свапает активное окно с самым большим на экране | +| `Super + Ctrl + Alt + Left/Right` | Перекидывает активное окно на предыдущий/следующий воркспейс и следует за ним | +| `Super + Alt + Arrows` | Move floating window | +| `Super + Shift + Arrows` | Resize window на 30 пикселей в указанном направлении наружу | +| `Super + Shift + Alt + Arrows` | Resize window на 30 пикселей в указанном направлении внутрь | +| `Super + Shift + Ctrl + Arrows` | Перемещает активное окно в указанном направлении | +| `Super + S` | Split toggle. Меняет позиционирование с горизонтального на вертикальный и обратно. | +| `Super + Ctrl + Shift + R` | Make sxhkd reload its config files | +| `Super + Alt + Ctrn + Shift + R` | Restart bspwm | +| `Super + Alt + Ctrn + Shift + Q` | Quit bspwm | + +| Rofi | Описание | Работает? | +| ------------------- | ---------------------------------------------------------------------------------------------- | --------- | +| `Super + A` | Applications. Запускатор софта | Да | +| `Super + C` | Calculator имбовый. Можно даже написать `5600 USD to BTC` или `500 + 25%`. | Да | +| `Super + P` | Passwords. Пароли из утилиты pass | Да | +| `Super + V` | История буфера обмена. Как ctrl+v, но через win. | Да | +| `Super + Backspace` | PowerMenu. Выключение пк | Да | +| `Super + Tab` | Как alt+tab, переключение окон. На нужный воркспейс само перекинет | Да | +| `Super + Alt + T` | Timer. Думаю сделать через утилиту timer |нет| +| `Super + Shift + N` | Notification history. История оповещений. Мб сделать только в баре кнопку? Мб не делать вообще |нет| + +| Applications | Описание | Работает? | +| -------------------------- | ----------------------------------------- | --------- | +| `Super + B` | Browser LibreWolf. Основа | Да | +| `Super + Shift + B` | Browser Firefox. Паблик активность | Да | +| `Super + Shift + Ctrl + B` | Browser Chromium. Пусть будет | Да | +| `Super + N` | Note taking app (obsidian) | Да | +| `Super + E` | Explorer. Thunar file manager | Да | +| `Super + I` | IDE, text editor | Да | +| `Super + M` | Monitor of resources (btop) | Да | +| `Super + G` | Goals. Todo manager. Task tracker | Да | +| `Super + Shift + C` | Color picker. Получить hex в буфер обмена | Да | +| `Super + Ctrl + C` | Color picker. Получить rgb в буфер обмена | Да | + +| Terminal | Описание | Работает? | +| -------------------------- | ---------------------------------------------------------------------------- | --------- | +| `Super + T` | Terminal основной | Да | +| `Super + Shift + T` | Floating Terminal основной в центре экрана с размерами треть на треть экрана | Да | +| `Super + Ctrl + T` | Terminal запасной | Да | +| `Super + Shift + Ctrl + T` | Floating Terminal запасной в центре экрана с размерами треть на треть экрана | Да | + +| Колдунские кнопки | Описание | Работает? | +| ----------------------- | ---------------------- | --------- | +| `XF86AudioMute` | Toggle audio mute |хз| +| `XF86AudioMicMute` | Toggle microphone mute |хз| +| `XF86AudioLowerVolume` | Decrease volume | Да | +| `XF86AudioRaiseVolume` | Increase volume | Да | +| `XF86AudioPlay` | Play/pause |хз| +| `XF86AudioPause` | Play/pause |хз| +| `XF86AudioNext` | Next track |хз| +| `XF86AudioPrev` | Previous track |хз| +| `XF86MonBrightnessUp` | Increase brightness |хз| +| `XF86MonBrightnessDown` | Decrease brightness |хз| + +| Not sxhkd | Описание | Работает? | +| --------------- | ---------------------- | --------- | +| `Print` | Выделить область | Да | +| `Print + Alt` | Все мониторы целиком | Да | +| `Print + Ctrl` | Активный монитор | Да | +| `Print + Shift` | Активное окно | Да | +| `CapsLock` | Switch keyboard layout | Да | + +Так же есть бинд на зажим дальней боковой кнопки мыши. Если эту кнопку нажимать, то она работает как обычно. Если её зажать и начать двигать мышку, то вместо движения курсора будет плавный скрол. Обычно такое делают на трекболах без колеса мыши, но я люблю этот метод скрола на любом девайсе. Можно скролить с нужной скоростью и точностью куда надо без долгого кручения колеса. diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..082b35f --- /dev/null +++ b/NOTES.md @@ -0,0 +1,204 @@ +Тут будут всякие заметки и доп информация по работе с NixOS + +Если не хочешь обновлять систему, но надо скачать пакеты последней версии, то используй `upd nixpkgs2` и перед именем пакета добавь `pkgs2.`. Команда в терминале обновить второй unstable репозиторий. А префикс `pkgs2.пакет` говорит "скачай `пакет` из репозитория `pkgs2`". + +Если ты обновил всю систему, но некоторые программы сломались, то можно не откатывать всю систему, а попробовать добавить к ним префикс `spkgs.`. Это скачает их из стабильной ветки репозитория + +В стоке используется браузер `LibreWolf`, который имеет неприятные настройки безопасности. Мне проще выключить некоторые настройки безопасности в нём, чем выключить лишний шлак в `Firefox`. `Chromium` стоит как запаска для некоторых сайтов, как основа он мне не нравится. Написать какие настройки безопасности я выключил в `LibreWolf` мне лень. Как минимум офнул удаление истории при каждом ребуте. Но могу сказать какие настройки я использую в `Firefox` и `LibreWolf`, связанные просто с удобством. Они в таблице ниже. + +| Настройка about:config | Значение | Описание | +| --------------------------------------- | -------- | ----------------------------------------------------- | +| browser.bookmarks.openInTabClosesMenu | false | Не закрывать меню закладок при открытии ссылки | +| browser.tabs.loadBookmarksInBackground | true | Не перекидывать на закладку, открытую в новой вкладке | +| layout.css.has-selector.enabled | true | Для кастом стилей | +| accessibility.typeaheadfind.enablesound | false | Чтоб не булькало на ухо | +| full-screen-api.warning.timeout | 0 | Чтоб фулскрин popup не вылазил | +| browser.tabs.insertAfterCurrent | true | Чтоб новые вкладки были справа от нынешней | + +Если хочешь сменить стоковый браузер, то мб надо поменять переменную в `./nixos/home.nix`. Если не помогает, то допом команда в терминале (замени `librewolf` на нужный браузер): +```sh +xdg-settings set default-web-browser librewolf.desktop +``` + + +Смена тем сейчас работает криво для qt приложений. Можно автоматизировать gtk темы, но qt придётся руками добавлять/менять. Возможно фикс уже вышел, но мне лень проверять. У меня везде `gruvbox` и менять не планирую. + +Чтоб задать аватарку юзера в SDDM (это меню ввода пароля при запуске пк), надо отправить png файл такой командой: +```sh +sudo cp image.png /var/lib/AccountsService/icons/username +``` +То есть именно `username`, без `.png` в конце + +Настройки смены языка, тачпада и мыши можно найти в файле `./modules/nixos/xserver.nix`. У меня там стоит необычный скрол мышкой. Я не использую колесо мыши. Я зажимаю дальнюю боковую кнопку мыши и двигаю мышку по столу. В какую сторону двигаешь мышку, в ту сторону и будет скрол. Так можно удобно регулировать скорость скрола и быстро оказываться где надо. Язык я меняю на капслок. Для активации капса надо жать шифт капслок. В этом же файле есть **настройка для amd видеокарт, которую надо выключить, если у тебя nvidia**. Не знаю надо ли что-то настраивать для nvidia после этого. + +В стоке выключены следующие конфиги (их можно включить в `bundle.nix` в разных каталогах): +- `filesystem.nix` - Конектить внешние диски автоматически. В стоке выкл, потому что у каждого свои айдишники дисков. +- `hibernate.nix` - Настройки гибернации. В стоке выкл, потому что у каждого свои айдишники файла подкачки. +- `vr.nix` - Пакеты для работы виара на linux. Нужно очень мало кому, потому выкл +- `vscode.nix` - Настройки vscode. Большинство предпочтёт настраивать его по старинке руками, а не через геморный конфиг +- `symlinks.nix` - Настройки симлинков. Не всем надо, плюс у каждого свои симлинки. Потому выкл в стоке +- Файл подкачки - У меня он в `/etc/nixos/hardware-configuration.nix`, который у каждого свой. Потом вынесу это в дотсы. + +Хоть тут и установлен `i3wm`, но он не настроен. Можешь удалить его из конфига, чтоб место не занимал. Я потом займусь его настройкой. + +Если обновил систему и спустя время с ней всё окей, всё стабильно, то советую запускать сборщик мусора. При обновлении nixos не удаляет старые пакеты, чтоб ты мог откатиться назад, в случае поломок, даже если нет интернета. Чтоб удалить пакеты, которые больше не используются, можно использовать команду `grb` (это мой алиас в zsh). + +Баш скрипты требуют другой шебанг в начале. Обязательно используй `#!/usr/bin/env bash` вместо `#!/bin/bash`. Первый вариант будет работать на любой OS с bash, а вот второй вариант ломается. + +Не юзай ИИ для поиска информации по NixOS, он всегда выдумывает параметры. Сколько бы я не тестил разные ИИ для настройки NixOS, они даже базовые вещи не могут дать, тут слишком часто всё меняется и в интернете слишком мало информации по данной OS, чтоб ИИ давал хоть что-то рабочее + + + +## TODO + +Надо сделать декларативную QT тему. Сейчас у меня есть файлы в каталоге `shit`. Их я могу скопировать в `~/.config`, нужная переменная окружения в `home.nix` стоит и всё заработает. Но это не то, что я хочу. Другой человек не сможет это юзать мб. Потому что там в коде написан путь `/home/buliway`. Не всем же быть буливеями. Хотя это изи исправляется, потом сделаю. Но пока что я не хочу тратить время на настройку QT, который нормально настроить невозможно. + +Надо добавить в polybar отображение: +- Заряд аккума. Сейчас проверить негде. Мб взять готовый вариант [тут](https://github.com/Zproger/bspwm-dotfiles/blob/main/config/polybar/modules.ini#L148) +- Яркость экрана. Тоже ноуты. Хз надо ли +- Температура и нагрузка на гп +- Температура цп +- Блютуз. Не знаю отображается ли он сейчас. Не могу проверить, негде + +Установить и настроить: +- i3wm с его экосистемой софта. Чтоб тот же polybar был лишь на bspwm, а на i3 работал i3bar +- Sway. Для тестов wayland на nixos +- Hyprland. Для тестов wayland на nixos + +## Описание + +Железо, на котором работают мои дотсы: +- CPU: i5 10400f +- GPU: AMD RX6600 +- RAM: 32gb (2x16) ddr4 3200 +- Motherboard: MSI Z590-A PRO +- Два монитора 1920x1080 на 165 и 100 герц + +Основной набор софта + +Изначально я написал конфиги для `bspwm` + `polybar`. Но потом хочу затестить другию WM. В теории между ними можно переключаться при запуске пк, так что проблем быть не должно. Если какой-то WM надо выключить, чтоб не засирать систему, то это можно делать в `modules/home-manager/bundle.nix` + +| Software | Name | +| ------------ | -------------------------------- | +| WM | bspwm | +| Hotkeys | sxhkd | +| Terminal | Alacritty, Kitty | +| Multiplexer | Zellij | +| Shell | oh-my-zsh with many plugins | +| Shell Prompt | Starship | +| Apps/Menus | Rofi | +| Bar | Polybar | +| ScreenLock | betterlockscreen | +| Notification | Dunst | +| Files | Thunar, Ranger | +| Images | qView, imv, feh | +| Video | mpv with plugins | +| Music | Strawberry, mpv | +| Browsers | Librewolf, Firefox, Chromium | +| Social | Discord, Telegram, Steam | +| Audio | PipeWire, pavucontrol | +| Color Theme | Gruvbox Dark Medium | +| Icons | Papirus Dark | +| DM | SDDM | +| Compositor | Нет. Мне не нужны анимации и прозрачность | +| Screenshare | OBS, Screenkey, ksnip | +| Code Editor | Neovim, VSCode | +| Video Editor | Blender | +| Fetch | fastfetch | +| Torrent | qBittorrent | +| Email client | Thunderbird | +| Color picker | xcolor, gcolor3 | +| Docs/eBook | Evince, LibreOffice, Calibre | +| Design | Gimp, Krita | +| Productivity | Obsidian, Planify | + +Чтоб узнать sha256 для гитхаб репы, пишем в терминал эту команду: +```sh +nix-prefetch-git link +``` + +Если хочется поменять цвета или шрифты в конфиге какой-то программы, но при ребилде получается конфликт, то дело в Stylix, который управляет системной темой и сам везде ставит шрифты и цвета. Если хочется заменить, не трогая stylix, то надо добавить `lib.mkForce` перед значением. Например так: +```nix +font = lib.mkForce "JetBrainsMono Nerd Font 11"; +``` + +Узнать localhost виртуалки, чтоб конектиться по ssh: +```sh +ip a +``` + +В бутменю биоса надо ставить не ссд диск, а `nixos boot`. У меня иначе не работало + +## Нюансы с JetBrains Toolbox + +В стоке тулбокс может всегда разлогинивать. Я не проверял, сразу сделал как просили на вики, чтоб это исправить. + +Надо скачать тулбокс (уже стоит), запустить его один раз, а потом: +- Изменить `~/.local/share/JetBrains/Toolbox/.storage.json` и добавить строку `"preferredKeychain": "linux-fallback"` (у меня было в стоке) +- Залогиниться как обычно, но остановиться после того, как JetBrains вебсайт откроется +- Перезапустить JetBrains Toolbox, открыть настройки и нажать `"Troubleshoot..."` +- Следуй инструкциям по ручному входу в систему, как указано в руководстве + +После выполнения этих действий JetBrains Toolbox сохранит учетные данные пользователя в зашифрованном файле (со статическим ключом) по адресу `~/.local/share/JetBrains/Toolbox/.securestorage`. Если этого не сделать, JetBrains Toolbox не сможет получить учетные данные через `libsecret` (из-за bwrap sandboxing?) и постоянно уведомляет пользователя о необходимости повторной авторизации. + +Если что-то не работает, то мб помогут эти ссылки: +- https://nixos.wiki/wiki/Jetbrains_Tools +- https://github.com/NixOS/nixpkgs/issues/240444 + +## Настройки для игр + +Я установил `MangoHud`, `gamemode` и `gamescope`. Ещё есть `proton-ge` в steam. Всё это можно по разному комбинировать между собой. + +### MangoHud + +Мониторинг ресурсов для vulkan и opengl приложений. Показывает fps и нагрузку на пк, включая температуры цп и гп. Можно использовать как полноценные бенчмарки, логируя всю его инфу и визуализируя данные другой утилитой. Чтоб использовать, надо написать `mangehud приложение`, если запускать через терминал, или `mangohud %command%`, если использовать через steam. Если используется вместе с `gamescope`, то надо писать `gamescope --mangoapp`. + +### gamemode + +Оптимизатор линукса для игр. В параметры запуска игры в стиме пишешь `gamemoderun %command%` и всё работает. + +### gamescope + +SteamOS session compositing window manager. Можно назвать мини wm внутри wm (хотя можно и в tty запустить, без стороннего wm). Не совсем понимаю когда его надо использовать. Иногда, если у игры есть проблемы с обычным linux, то она может нормально запускаться через `gamescope` + +### Параметры запуска Steam + +Если в параметры запуска захочется добавить что-то помимо того, что я напишу, то надо учитывать порядок написания. Как я понял, если надо используется переменная, то её надо писать в начале. Например, если в игре не работает печать на русском языке, то надо в начало добавить `LC_ALL="ru_RU.UTF-8"`. Если же речь про стандартные параметры запуска стима, по типу `-dev` или `-novid`, то их надо писать после `%command%`. Слово `%command%` скорее всего является игрой, то есть команда для запуска игры. То есть синтаксис как в обычном терминале. Сначала переменные окружения, потом команда, потом параметры запуска через `-параметр`. + +Параметры запуска для игр, чтоб использовать все доступные бафы, что я сделал: +Параметр запуска без использования gamescope - `mangohud gamemoderun %command%`. +Параметр запуска с использованием gamescope `gamescope --mangoapp gamemoderun %command%`. + +Вот пример параметров запуска для Apex Legends: `mangohud gamemoderun %command% +exec autoexec.cfg -dev` + +FSR в `proton-ge` включается только в фулскрине через `WINE_FULLSCREEN_FSR=1`. Регулировать резкость можно через переменную окружения `WINE_FULLSCREEN_FSR_STRENGTH=N`, где N - это уровень резкости изображения от 0 до 5. Чем выше значение, тем меньше резкость. По умолчанию установлено значение "2", рекомендуют использовать значение "3". + +## Настройка мониторов + +На иксах второй монитор может не работать или все мониторы могут сидеть на 60 герц. Изменить это один раз недостаточно, после ребута сбросится. Не знаю нормального способа, кроме как добавить настройки в автозапуск. Ниже пример того, как произвести начальную настройкy: + +```sh +# Увидеть список мониторов +xrandr +# Изменить настройки для основного монитора. Мб вместе с --primary для основного монитора +xrandr --output DisplayPort-2 --mode 1920x1080 --rate 165 +# Изменить настройки для второго (правого) монитора +xrandr --output HDMI-A-0 --mode 1920x1080 --rate 100 --right-of DisplayPort-2 +``` + +Есть ещё такая штука - https://github.com/phillipberndt/autorandr . Но мне лень с ней разбираться + + +## Системная тема на всех вебсайтах + +Если используется популярная системная тема, то, скорее всего, её можно выбрать в браузерном расширении DarkReader, чтоб все сайты в интернете выглядели как системная тема. Может быть я потом займусь синхронизацией темы stylix с настройками DarkReader + +## Запуск Waydroid на X11 + +Один раз написать в терминале `waydroid init` + +- Запустить `weston` +- В его терминале написать `waydroid session start &` +- Потом `waydroid show-full-ui` + +На weston всё работает сразу как надо. Но стоит изменить размеры окна, как waydroid ui пропадает. Приходится стопать и по новой запускать отображение diff --git a/PROBLEMS.md b/PROBLEMS.md new file mode 100644 index 0000000..3a9630c --- /dev/null +++ b/PROBLEMS.md @@ -0,0 +1,34 @@ +Тут будет список проблем, с которыми я столкнулся при настройке nixos. Возможно кому-то пригодится + +## Проблемы + +- Некоторые симлинки, созданные через home-manager, могут быть перезаписаны другим софтом, удалив мои настройки +- `Mimetypes` удаляют симлинк. Поэтому я сделал отдельный файл в каталоге `shit` и буду копировать готовый файл целиком в нужный каталог +- Могут быть проблемы с TUN модом в xray/singbox/clash клиентах. В теории это исправлено в новых версиях системы через использование параметров. Но мне лень обновляться, я просто запускаю с рутом Throne бинарь, скачанный с гитахаба, прокинув нужные зависимости через nix-ld, который имитирует обычную иерархию файловой системы для рандомных прог с инета +- `Thunar` удаляет мой конфиг, даже если это не симлинк и даже если я перезапишу настройки в его же собственный файл. Приходится руками всё делать при каждой переустановке системы +- `Thunar` крашится при работе с более чем одним окном. Не всегда, но в самый не нужный момент. А `dolphin` тянет 10 терабайт гей порно в зависимости и выводит blowjob по среди экрана. Хз даже что делать. Все файловый менеджеры гавно +- `Thunar` криво показывает превью видео. Он генерит рандом кадр из видео в качестве превью, вместо того чтоб взять данные из метаданных, куда все закидывают реальное превью. Они считают, что лучше генерить превью каждый раз, чем взять уже готовое + +Мелочи +- Пароли через rofi выдают меню ввода пароля от qt, но оно имеет светлую тему. Темы для qt приложений почти невозможно заставить нормально работать. Не могу починить и ладно +- В терминале ssh-agent палит мою почту. Но мб это только при первом запуске терминала + +### Ребилд крашит систему + +Эта проблема была раньше. Сейчас исправлена. Но заметку оставлю, вдруг пригодится в будущем + +Ребилд системы через `switch` или `test` кладёт систему. Чёрный экран без возможности переключить tty через `ctrl + alt + F1-F7`. Можно юзать `boot`, чтоб после ребута пк применялось. Тогда не крашит и после ребута всё работает. Но лучше найти какой сервис виноват и исправить проблему нормально. + +#### Потенциальный способ исправить проблему + +Есть следующие два параметра: +- `systemd.services..restartIfChanged` +- `systemd.user.services..restartIfChanged` + +Они указывают надо ли ребутать указанный сервис при ребилде системы. Мб надо туда что-то указать и сделать false + +Я сделал это для одного сервиса в `nixos/configuration.nix`. Мне помогло. Но если будут ещё сервисы, ребилд на которых зависает и после него крашится система, то можно пробовать запретить рестарт при ребилде. + +#### Реальный способ исправить проблему + +Походу дело было в сервисе `cage`. Когда я его удалил, то всё стало работать нормально diff --git a/README.md b/README.md index a91b314..b064447 100644 --- a/README.md +++ b/README.md @@ -1,303 +1,27 @@ ## Навигация -- [Бинды](#бинды) - [Другие README файлы в этих дотсах](#другие-readme-файлы-в-этих-дотсах) -- [Проблемы](#проблемы) - [TODO](#todo) -- [Описание](#описание) -- [Нюансы с JetBrains Toolbox](#нюансы-с-jetbrains-toolbox) -- [Настройки для игр](#настройки-для-игр) - - [MangeHud](#mangohud) - - [gamemode](#gamemode) - - [gamescope](#gamescope) - - [Параметры запуска Steam](#параметры-запуска-steam) -- [Настройки мониторов](#настройка-мониторов) -- [Системная тема на всех вебсайтах](#системная-тема-на-всех-вебсайтах) - [Мини гайд по NixOS](#мини-гайд-по-nixos) - [Процесс установки](#процесс-установки) - [Первый способ](#первый-способ) - [Второй способ](#второй-способ) - [После установки надо](#после-установки-надо) - [Изменения для виртуалок](#изменения-для-виртуалок) -- [Иконки](#иконки) -- [Темы](#темы) - - -## Бинды - -Клавиша `Super` это клавиша `Win` - -| Bspwm | Описание | Работает? | -| --------------------------------- | ------------------------------------------------------------------------------------------- | --------- | -| `Super + L` | Lock screen | Да | -| `Super + Q` | Quit. Выключить приложение | Да | -| `Super + Shift + Q` | Kill. Если приложение не отвечает, то убить его | Да | -| `Super + F` | Floating toggle | Да | -| `Super + Shift + F` | Tiled toggle | Да | -| `Super + Enter` | Fullscreen toggle | Да | -| `Super + Esc` | Прошлый воркспейс. Желательно внутри одного монитора | Да | -| `Super + ЛКМ` | Переместить окно | Да | -| `Super + ПКМ` | Ресайзить окно | Да | -| `Super + Arrows` | Менять фокус приложения в указанном направлении | Да | -| `Super + 0-9` | Переключить воркспейс на 1-10. Если они общие на все моники, то добавить F1-F12 для 11-22 | Да | -| `Super + Shift + 0-9` | Перекинуть активное окно на воркспейс. Желательно silent, чтоб меня не перекидывало к проге | Да | -| `Super + Ctrl + Down` | Переключает на первый пустой воркспейс | Да | -| `Super + Ctrl + Left/Right` | Переключает на предыдущий/следующий воркспейс. Тоесть делает -1 или +1 от текущего | Да | -| `Super + Ctrl + Alt + Down` | Свапает активное окно с самым большим на экране |хз| -| `Super + Ctrl + Alt + Left/Right` | Перекидывает активное окно на предыдущий/следующий воркспейс и следует за ним | Да | -| `Super + Alt + Arrows` | Move floating window | Да | -| `Super + Shift + Arrows` | Resize window на 30 пикселей в указанном направлении наружу | Да | -| `Super + Shift + Alt + Arrows` | Resize window на 30 пикселей в указанном направлении внутрь | Да | -| `Super + Shift + Ctrl + Arrows` | Перемещает активное окно в указанном направлении | Криво | -| `Super + S` | Split toggle. Меняет позиционирование с горизонтального на вертикальный и обратно. | Не понял | -| `Super + Ctrl + Shift + R` | Make sxhkd reload its config files | Да | -| `Super + Alt + Ctrn + Shift + R` | Restart bspwm | Да | -| `Super + Alt + Ctrn + Shift + Q` | Quit bspwm | Да | - -| Rofi | Описание | Работает? | -| ------------------- | ---------------------------------------------------------------------------------------------- | --------- | -| `Super + A` | Applications. Запускатор софта | Да | -| `Super + C` | Calculator имбовый. Можно даже написать `5600 USD to BTC` или `500 + 25%`. | Да | -| `Super + P` | Passwords. Пароли из утилиты pass | Да | -| `Super + V` | История буфера обмена. Как ctrl+v, но через win. | Да | -| `Super + Backspace` | PowerMenu. Выключение пк | Да | -| `Super + Tab` | Как alt+tab, переключение окон. На нужный воркспейс само перекинет | Да | -| `Super + Alt + T` | Timer. Думаю сделать через утилиту timer |нет| -| `Super + Shift + N` | Notification history. История оповещений. Мб сделать только в баре кнопку? Мб не делать вообще |нет| - -| Applications | Описание | Работает? | -| -------------------------- | ----------------------------------------- | --------- | -| `Super + B` | Browser LibreWolf. Основа | Да | -| `Super + Shift + B` | Browser Firefox. Паблик активность | Да | -| `Super + Shift + Ctrl + B` | Browser Chromium. Пусть будет | Да | -| `Super + N` | Note taking app (obsidian) | Да | -| `Super + E` | Explorer. Thunar file manager | Да | -| `Super + I` | IDE, text editor | Да | -| `Super + M` | Monitor of resources (btop) | Да | -| `Super + G` | Goals. Todo manager. Task tracker | Да | -| `Super + Shift + C` | Color picker. Получить hex в буфер обмена | Да | -| `Super + Ctrl + C` | Color picker. Получить rgb в буфер обмена | Да | - -| Terminal | Описание | Работает? | -| -------------------------- | ---------------------------------------------------------------------------- | --------- | -| `Super + T` | Terminal основной | Да | -| `Super + Shift + T` | Floating Terminal основной в центре экрана с размерами треть на треть экрана | Да | -| `Super + Ctrl + T` | Terminal запасной | Да | -| `Super + Shift + Ctrl + T` | Floating Terminal запасной в центре экрана с размерами треть на треть экрана | Да | - -| Колдунские кнопки | Описание | Работает? | -| ----------------------- | ---------------------- | --------- | -| `XF86AudioMute` | Toggle audio mute |хз| -| `XF86AudioMicMute` | Toggle microphone mute |хз| -| `XF86AudioLowerVolume` | Decrease volume | Да | -| `XF86AudioRaiseVolume` | Increase volume | Да | -| `XF86AudioPlay` | Play/pause |хз| -| `XF86AudioPause` | Play/pause |хз| -| `XF86AudioNext` | Next track |хз| -| `XF86AudioPrev` | Previous track |хз| -| `XF86MonBrightnessUp` | Increase brightness |хз| -| `XF86MonBrightnessDown` | Decrease brightness |хз| - -| Not sxhkd | Описание | Работает? | -| --------------- | ---------------------- | --------- | -| `Print` | Выделить область | Да | -| `Print + Alt` | Все мониторы целиком | Да | -| `Print + Ctrl` | Активный монитор | Да | -| `Print + Shift` | Активное окно | Да | -| `CapsLock` | Switch keyboard layout | Да | - -Так же есть бинд на зажим дальней боковой кнопки мыши. Если эту кнопку нажимать, то она работает как обычно. Если её зажать и начать двигать мышку, то вместо движения курсора будет плавный скрол. Обычно такое делают на трекболах без колеса мыши, но я люблю этот метод скрола на любом девайсе. Можно скролить с нужной скоростью и точностью куда надо без долгого кручения колеса. ## Другие README файлы в этих дотсах +- [Бинды системы](./BINDINGS.md) +- [Список базового софта в системе](./SOFTWARE.md) +- [Цвета и иконки тем, храню для себя](./THEMES.md) +- [Список известных проблем при настройке системы](./PROBLEMS.md) - [Копия man page для bspwm с доп инфой](./modules/home-manager/wm/bspwm/bspwm.md) - [Описание плагинов для mpv](./modules/home-manager/mpv/README.md) - [NeoVim config](./nvim/README.md) -## Проблемы - -- Некоторые симлинки, созданные через home-manager, могут быть перезаписаны другим софтом, удалив мои настройки -- `Mimetypes` удаляют симлинк. Поэтому я сделал отдельный файл в каталоге `shit` и буду копировать готовый файл целиком в нужный каталог -- Не работает TUN мод во всех xray/singbox клиентах. Например nekoray пишет, что не удалось `setcap` при вводе пароля. Испробовал все доступные методы подключения, даже голый `singbox` через сервис никса. У меня просто пропадает инет в системе после конекта. Сейчас единственный рабочий метод, это скачать appimage nekoray с гитхаба, обязательно именно версии `3.26`, иначе не заработает, и запустить через sudo. И в настройках tun надо обязательно выключить `strick route`. Обычно я с ним сидел, но тут с ним проблемы и не работает ничего. -- `Gitui` выёбывается. Не может запушить, ошибка ssh появляется -- `Thunar` удаляет мой конфиг, даже если это не симлинк и даже если я перезапишу настройки в его же собственный файл. Приходится руками всё делать при каждой переустановке системы -- `Thunar` крашится при работе с более чем одним окном. Не всегда, но в самый не нужный момент. А `dolphin` тянет 10 терабайт гей порно в зависимости и выводит blowjob по среди экрана, так что я рот ебал. Хз даже что делать. Все файловый менеджеры гавно ебаное -- `Thunar` криво показывает превью видео. Это ебло дырявое генерит рандом кадр из видео в качестве превью. Ебантропы не могут взять данные из метаданных, куда все закидывают реальное превью. Они считают, что лучше генерить превью каждый ёбаный раз, чем взять уже готовое -- `polybar` и `bspwm` создали пидарасы ебаные бездарные. Одни ломают floating окна и не умеют нормально отображать все символы без ручного указания двух сотен шрифтов, другие не имеют документации и не могут нормально реализовать слои в wm. Ебланы блять. Все floating окна находятся под tiling окнами при запуске ебаного гей бара. Ебантропы не могут даже элементарную работу слоёв реализовать нормально. И эти два куска дерьма называют лучшими wm и status bar? Та нахуй они кому нужны с такими далбаёбами на разрабах. Иногда даже фулскрин находится под флоатингом, а флоатинг под тилингом. Ёбаный олигофрен создал этот bspwm - -Мелочи -- Пароли через rofi выдают меню ввода пароля от qt, но оно имеет светлую тему. Ебал рот делать темы для qt, вечно всё через пизду работает -- В терминале ssh-agent палит мою почту. Но мб это только при первом запуске терминала -- В btop не работает статистика gpu. Установка зависимостей не помогла -- Не работает `git push` в `gitui`. Мб надо переподключить репу. Дело не в `ssh-agent`, его я исправил -- Не работает нечёткий поиск по истории комманд в терминале, если написать что-то и жать стрелку вверх - -### Ребилд крашит систему - -Эта проблема была раньше. Сейчас исправлена. Но заметку оставлю, вдруг пригодится в будущем - -Ребилд системы через `switch` или `test` кладёт нахуй систему. Чёрный экран без возможности переключить tty через `ctrl + alt + F1-F7`. Можно юзать `boot`, чтоб после ребута пк применялось. Тогда не крашит и после ребута всё работает. - -#### Потенциальный способ исправить проблему - -Есть следующие два параметра: -- `systemd.services..restartIfChanged` -- `systemd.user.services..restartIfChanged` - -Они указывают надо ли ребутать указанный сервис при ребилде системы. Мб надо туда что-то указать и сделать false - -Я сделал это для одного сервиса в `nixos/configuration.nix`. Мне помогло. Но если будут ещё сервисы, ребилд на которых зависает и после него крашится система, то можно пробовать запретить рестарт при ребилде. - -#### Реальный способ исправить проблему - -Походу дело было в сервисе `cage`. Когда я его удалил, то всё стало работать нормально - -## TODO - -Надо сделать декларативную QT тему (ебал их рты). Сейчас у меня есть три каталог в каталоге `shit`. Их я могу скопировать в `~/.config`, нужная переменная окружения в `home.nix` стоит и всё заработает. Но это залупа. Другой человек не сможет это юзать мб. Потому что там в коде написан путь `/home/buliway`. Не всем же быть буливеями. Хотя это изи исправляется, потом сделаю. Но пока что я рот ебал тратить 3 дня на настройку темы бездарных далбаёбов на QT. - -Надо сделать Nekoray нормально. Пока что только путь пидараса есть. Запускаешь `sudo ~/Downloads/VPN/nekoray-3.26-2023-12-09-linux-x64.AppImage`. В некобоксе офаешь у тян мода стрик роут. Систем тан. В меню жмёшь перезапустить прогу, она отлипла от терминала, перетащил на 10 воркспейс и сижу хуй сосу, ибо меня сайты в пермак кидают за такую хуйню - -Надо добавить в polybar отображение: -- Заряд аккума. Сейчас проверить негде. Мб взять готовый вариант [тут](https://github.com/Zproger/bspwm-dotfiles/blob/main/config/polybar/modules.ini#L148) -- Яркость экрана. Тоже ноуты. Хз надо ли -- Температура и нагрузка на гп -- Температура цп -- Блютуз. Не знаю отображается ли он сейчас. Не могу проверить, негде - -Установить и настроить: -- i3 с его экосистемой софта. Чтоб тот же polybar был лишь на bspwm, а на i3 работал i3bar -- Sway. Мб сделать через ags - -## Описание - -Железо, на котором это работает: -- CPU: i5 10400f -- GPU: AMD RX6600 -- RAM: 32gb (2x16) ddr4 3200 -- Motherboard: MSI Z590-A PRO -- Два монитора 1920x1080 на 165 и 100 герц - -Основной набор софта - -Изначально я написал конфиги для `bspwm` + `polybar`. Но так как оба эти проги созданы далбаёбами бездарными, я перееду на `i3` + `i3bar`. В теории между ними можно переключаться при запуске пк, так что проблем быть не должно. Если какой-то wm надо выключить, чтоб не засирать систему, то это можно делать в `modules/home-manager/bundle.nix` - -| Software | Name | -| ------------ | -------------------------------- | -| WM | bspwm/i3 | -| Hotkeys | sxhkd/i3 | -| Terminal | Alacritty, Kitty | -| Multiplexer | Zellij | -| Shell | oh-my-zsh with many plugins | -| Shell Prompt | Starship | -| Apps/Menus | Rofi | -| Bar | Polybar/i3bar | -| ScreenLock | betterlockscreen/i3lock | -| Notification | Dunst | -| Files | Thunar, Ranger | -| Images | qView, imv, feh | -| Video | mpv with plugins | -| Music | Strawberry, Picard, Mousai, spek | -| Browsers | Librewolf, Firefox, Chromium | -| Social | Discord, Telegram, Steam | -| Audio | PipeWire, pavucontrol | -| Color Theme | Gruvbox Dark Medium | -| Icons | Gruvbox Plus Dark | -| DM | LightDM | -| Compositor | Нет. Мб будет стоковый picom | -| Screenshare | OBS, Screenkey, ksnip | -| Code Editor | VSCode, JetBrains, nixvim, helix | -| Video Editor | Blender | -| Fetch | fastfetch | -| Torrent | qBittorrent | -| Email client | Thunderbird | -| Color picker | xcolor, gcolor3 | -| Docs/eBook | Evince, LibreOffice, Calibre | -| Design | Gimp, Krita | -| Productivity | Obsidian, Planify | - -Чтоб узнать sha256 для гитхаб репы, пишем в терминал эту команду: -```sh -nix-prefetch-git link -``` - -Если хочется поменять цвета или шрифты в конфиге какой-то программы, но при ребилде получается конфликт, то дело в Stylix, который управляет системной темой и сам везде ставит шрифты и цвета. Если хочется заменить, не трогая stylix, то надо добавить `lib.mkForce` перед значением. Например так: -```nix -font = lib.mkForce "JetBrainsMono Nerd Font 11"; -``` - -Узнать localhost виртуалки, чтоб конектиться по ssh: -```sh -ip a -``` - -## Нюансы с JetBrains Toolbox - -В стоке тулбокс может всегда разлогинивать. Я не проверял, сразу сделал как просили на вики, чтоб это исправить. - -Надо скачать тулбокс (уже стоит), запустить его один раз, а потом: -- Изменить `~/.local/share/JetBrains/Toolbox/.storage.json` и добавить строку `"preferredKeychain": "linux-fallback"` (у меня было в стоке) -- Залогиниться как обычно, но остановиться после того, как JetBrains вебсайт откроется -- Перезапустить JetBrains Toolbox, открыть настройки и нажать `"Troubleshoot..."` -- Следуй инструкциям по ручному входу в систему, как указано в руководстве - -После выполнения этих действий JetBrains Toolbox сохранит учетные данные пользователя в зашифрованном файле (со статическим ключом) по адресу `~/.local/share/JetBrains/Toolbox/.securestorage`. Если этого не сделать, JetBrains Toolbox не сможет получить учетные данные через `libsecret` (из-за bwrap sandboxing?) и постоянно уведомляет пользователя о необходимости повторной авторизации. - -Если что-то не работает, то мб помогут эти ссылки: -- https://nixos.wiki/wiki/Jetbrains_Tools -- https://github.com/NixOS/nixpkgs/issues/240444 - -## Настройки для игр - -Я установил `MangoHud`, `gamemode` и `gamescope`. Ещё есть `proton-ge` в steam. Всё это можно по разному комбинировать между собой. - -### MangoHud - -Мониторинг ресурсов для vulkan и opengl приложений. Показывает fps и нагрузку на пк, включая температуры цп и гп. Можно использовать как полноценные бенчмарки, логируя всю его инфу и визуализируя данные другой утилитой. Чтоб использовать, надо написать `mangehud приложение`, если запускать через терминал, или `mangohud %command%`, если использовать через steam. Если используется вместе с `gamescope`, то надо писать `gamescope --mangoapp`. - -### gamemode - -Оптимизатор линукса для игр - -### gamescope - -SteamOS session compositing window manager. Можно назвать мини wm внутри wm (хотя можно и в tty запустить, без стороннего wm). Не совсем понимаю когда его надо использовать. Иногда, если у игры есть проблемы с обычным linux, то она может нормально запускаться через `gamescope` - -### Параметры запуска Steam - -Если в параметры запуска захочется добавить что-то помимо того, что я напишу, то надо учитывать порядок написания. Как я понял, если надо используется переменная, то её надо писать в начале. Например, если в игре не работает печать на русском языке, то надо в начало добавить `LC_ALL="ru_RU.UTF-8"`. Если же речь про стандартные параметры запуска стима, по типу `-dev` или `-novid`, то их надо писать после `%command%`. Слово `%command%` скорее всего является игрой, тоесть команда для запуска игры. Тоесть синтаксис как в обычном терминале. Сначала переменные окружения, потом команда, потом параметры запуска через `-параметр`. - -Параметры запуска для игр, чтоб использовать все доступные бафы, что я сделал: -Параметр запуска без использования gamescope - `mangohud gamemoderun %command%`. -Параметр запуска с использованием gamescop `gamescope --mangoapp gamemoderun %command%`. - -Вот пример параметров запуска для Apex Legends: `mangohud gamemoderun %command% +exec autoexec.cfg -dev` - -FSR в `proton-ge` включается только в фулскрине через `WINE_FULLSCREEN_FSR=1`. Регулировать резкость можно через переменную окружения `WINE_FULLSCREEN_FSR_STRENGTH=N`, где N - это уровень резкости изображения от 0 до 5. Чем выше значение, тем меньше резкость. По умолчанию установлено значение "2", рекомендуют использовать значение "3". - -## Настройка мониторов - -На иксах второй монитор может не работать или все мониторы могут сидеть на 60 герц. Изменить это один раз недостаточно, после ребута сбросится. Не знаю нормального способа, кроме как добавить настройки в автозапуск. Ниже пример того, как произвести начальную настройкy: - -```sh -# Увидеть список мониторов -xrandr -# Изменить настройки для основного монитора. Мб вместе с --primary для основного монитора -xrandr --output DisplayPort-2 --mode 1920x1080 --rate 165 -# Изменить настройки для второго (правого) монитора -xrandr --output HDMI-A-0 --mode 1920x1080 --rate 100 --right-of DisplayPort-2 -``` - -Есть ещё такая штука - https://github.com/phillipberndt/autorandr . Но мне лень с ней разбираться - - -## Системная тема на всех вебсайтах - -Если используется популярная системная тема, то, скорее всего, её можно выбрать в браузерном расширении DarkReader, чтоб все сайты в интернете выглядели как системная тема. Может быть я потом займусь синхронизацией темы stylix с настройками DarkReader - ## Мини гайд по NixOS -- Одинаковые вещи могут делаться разными способами. Это норма. По началу меня это бесило, когда читал чужие дотсы +- Одинаковые вещи могут делаться разными способами. Это норма, ведь nix считается языком програмимрования. По началу меня это бесило, когда читал чужие дотсы - Нюансы работы NixOS в [этом](https://www.youtube.com/watch?v=7f19R8BWUnU&t=960s) видео. Мне понравилось - [Плейлист](https://www.youtube.com/playlist?list=PLko9chwSoP-15ZtZxu64k_CuTzXrFpxPE) с английскими видео. Мне больше всего понравились видео под номерами [16](https://youtu.be/a67Sv4Mbxmc), [18](https://youtu.be/b641h63lqy0), [21](https://youtu.be/rEovNpg7J0M), [27](https://youtu.be/ljHkWgBaQWU) и [28](https://youtu.be/JCeYq72Sko0). - Пакеты искать [тут](https://search.nixos.org/packages). Параметры для сток NixOS [тут](https://search.nixos.org/options). Параметры для home-manager [тут](https://home-manager-options.extranix.com/?query=&release=master). Для моих конфигов надо обязательно искать в unstable ветке, ибо параметры могут отличаться. @@ -341,7 +65,7 @@ sudo nano /etc/nixos/configuration.nix sudo nixos-rebuild switch ``` -Дальше есть два способа. Перед использованием любого из них я рекомендую сделать форк и внести следующие изменения в конфиг перед установкой (либо можно сделать гит клон и через nano внести изменения для первых трёх пунктов, остальное менять на готовой системе): +Дальше есть два способа. Перед использованием любого из них я рекомендую сделать форк и внести следующие изменения в конфиг перед установкой (либо можно сделать гит клон и через nano/vim внести изменения для первых трёх пунктов, остальное менять на готовой системе): - Переменную `username` в `nixos/configuration.nix`. - `username` и `homeDirectory` в `nixos/home.nix`. @@ -350,7 +74,7 @@ sudo nixos-rebuild switch А это можно донастроить уже в готовой системе - Путь до `home` в `shit/qt5ct/qt5ct.conf` и `shit/qt6ct/qt6ct.conf`. - Параметры мониторов закомментированы в файле `modules/home-manager/wm/bspwm/bspwm.nix`. Можно указать по желанию. Команда xrandr покажет доступные значения и имена мониторов. -- Если видеокарта от amd, то, чтоб не было тиринга, надо раскомментировать `videoDrivers` в `modules/nixos/xserver.nix`, `boot.initrd.kernelModules` и всю категорию настроек `amdgpu` в `modules/nixos/hardware.nix`. +- Если видеокарта не от amd, то, возможно, надо удалить `videoDrivers` в `modules/nixos/xserver.nix`, `boot.initrd.kernelModules` и всю категорию настроек `amdgpu` в `modules/nixos/hardware.nix`. Это настройки для amd gpu, чтоб не было тиринга на x11 - Если надо задать симлинки, то для этого есть файл `modules/home-manager/symlinks.nix`. Там сейчас мои симлинки, их лучше удалить. Чтоб файл заработал, надо раскомментировать `./symlinks.nix` в файле `modules/home-manager/bundle.nix`. - Если надо монтировать другие диски, то для этого есть файл `modules/nixos/filesystems.nix`. Там сейчас мой второй ссд. Чтоб файл заработал, надо раскомментировать `./filesystems.nix` в файле `modules/nixos/bundle.nix`. - Если нужна гибернация, то её можно настроить в `modules/nixos/hibernate.nix`. Там надо указать uuid и офсет для swap файла. Чтоб файл заработал, надо раскомментировать `./hibernate.nix` в файле `modules/nixos/bundle.nix`. @@ -379,7 +103,7 @@ sudo nixos-rebuild boot --impure --flake ~/nixos-private-dots ## После установки надо -Это заметка для меня. Каждый ставит то, что ему надо +Эта заметка частично для меня. Каждый ставит то, что ему надо - Включить подкачку на 64 гига в `/etc/nixos/hardware-configuration.nix` через такой синтаксис: ```nix @@ -391,7 +115,7 @@ sudo nixos-rebuild boot --impure --flake ~/nixos-private-dots - Настроить гибренацию в `modules/nixos/hibernate.nix` - Активировать скрипт в `shit` каталоге, чтоб скопировать нужные конфиги в нужные каталоги. Симлинки не работают - Настроить приложения `Qt5 Settings`, `Qt6 Settings` и `Kvantum`. Там надо выбрать свою системную тему. Вроде всё интуитивно понятно будет. Можно попробовать обновить систему, в надежде, что системная тема `stylix` начнёт работать с приложениями `qt`. Для этого надо будет закомментить настройки `qt` в конфиге `stylix`. -- Руками настроить `thunar`, бинды для `ksnip`, `discord`, `telegram`, `steam` и `strawberry` +- Руками настроить `thunar`, `discord`, `telegram`, `steam`, `strawberry` и бинды для `ksnip` - Добавить gpg ключи ```sh gpg --import /path/to/your-key.gpg @@ -410,7 +134,7 @@ gpg --edit-key ID-ключа В файле `modules/nixos/virtualisation.nix` раскомментировать эти строки: ```diff + services = { -+ openssh.enable = true; # Потом удали. Это ставится на виртуалку, чтоб к ней конект по ssh работал. ++ openssh.enable = true; # Это ставится на виртуалку, чтоб к ней конект по ssh работал. + spice-vdagentd.enable = true; # Clipboard sharing + qemuGuest = { + enable = true; # Fix resolution @@ -425,149 +149,4 @@ gpg --edit-key ID-ключа - xrandr --output HDMI-A-0 --mode 1920x1080 --rate 100 --right-of DisplayPort-2 + xrandr --output Virtual-1 --mode 1920x1080 --rate 60 ''; - - startupPrograms = [ -- # "spice-vdagent" # Для виртуалки -+ "spice-vdagent" # Для виртуалки - ]; ``` - -## Запуск Waydroid на X11 - -Один раз написать в терминале `waydroid init` - -- Запустить `weston` -- В его терминале написать `waydroid session start &` -- Потом `waydroid show-full-ui` - -На weston всё работает сразу как надо. Но стоит изменить размеры окна, как waydroid ui пропадает. Приходится стопать и по новой запускать отображение - - -## Иконки - -Искать иконки для nerd шрифта можно [тут](https://www.nerdfonts.com/cheat-sheet). - -Соберу сюда список nerd иконок, которые могут пригодиться. Для их отображения нужен специальный шрифт - -CPU (мб не юзать, а писать текстом и cpu и gpu) -  - -RAM -  - -CapsLock - 󰪛 - -Клавиатура -  или 󰌌 - -Громкость -    - -Яркость - 󰃟 󰃞 󰃝 - -Календарь -   󰸗 - -Выключение пк - ⏻ 󰐥  - -Приложения -  󰀻  󰵆 - -Блютуз -  󰂯 󰂲 󰥰 󰦋 󰏳 󰦢 󰗾 󰗿 - -Network - 󰈀  󰒍 - -Clipboard -   󱉧  - -Оповещения (bell) - 󰀦  󰀧 󰀨 󰅉 󰨱 󰵙  󰂚     - -Reload - 󰑓 󱄋 - - -Wifi - 󰖩 󱚵 󱚽 󱚼 󰖪 󱛄 -󰤭 󰤨 󰤥 󰤢 󰤟 󰤯 󰤫 󰤮 - -Батарейки -     -󰁹 󰂂 󰂁 󰂀 󰁿 󰁾 󰁽 󰁼 󰁻 󰁺 󰂎 -󱊣 󱊢 󱊡 󰂎 -󰂃 󱉝 󰂑 - -Батарейки зарядка -󰂅 󰂋 󰂊 󰢞 󰂉 󰢝 󰂈 󰂇 󰂆 󰢜 󰢟 -󱊦 󱊥 󱊤 󰢟 -󰂄 - -Батарейки блютуз -󰥈 󰥆 󰥅 󰥄 󰥃 󰥂 󰥁 󰥀 󰤿 󰤾 -󰥇 󰥊 󰥉 - -Температура -󰔄 - Температура по цельсию -     -  - - -## Темы - -У меня в vscode отображаются цвета. Так что я для себя сохраню разные варианты gruvbox - -Цвет это имя цвета в stylix. Потом идёт название gruvbox-вариант - -Я использую gruvbox-dark-medium - -|Цвет |dark-hard|dark-medium|dark-pale|dark-soft|material-dark-hard|material-dark-medium|material-dark-soft| -|------|---------|-----------|---------|---------|------------------|--------------------|------------------| -|base00| #1d2021 | #282828 | #262626 | #32302f | #202020 | #292828 | #32302f | -|base01| #3c3836 | #3c3836 | #3a3a3a | #3c3836 | #2a2827 | #32302f | #3c3836 | -|base02| #504945 | #504945 | #4e4e4e | #504945 | #504945 | #504945 | #5a524c | -|base03| #665c54 | #665c54 | #8a8a8a | #665c54 | #5a524c | #665c54 | #7c6f64 | -|base04| #bdae93 | #bdae93 | #949494 | #bdae93 | #bdae93 | #bdae93 | #bdae93 | -|base05| #d5c4a1 | #d5c4a1 | #dab997 | #d5c4a1 | #ddc7a1 | #ddc7a1 | #ddc7a1 | -|base06| #ebdbb2 | #ebdbb2 | #d5c4a1 | #ebdbb2 | #ebdbb2 | #ebdbb2 | #ebdbb2 | -|base07| #fbf1c7 | #fbf1c7 | #ebdbb2 | #fbf1c7 | #fbf1c7 | #fbf1c7 | #fbf1c7 | -|base08| #fb4934 | #fb4934 | #d75f5f | #fb4934 | #ea6962 | #ea6962 | #ea6962 | -|base09| #fe8019 | #fe8019 | #ff8700 | #fe8019 | #e78a4e | #e78a4e | #e78a4e | -|base0A| #fabd2f | #fabd2f | #ffaf00 | #fabd2f | #d8a657 | #d8a657 | #d8a657 | -|base0B| #b8bb26 | #b8bb26 | #afaf00 | #b8bb26 | #a9b665 | #a9b665 | #a9b665 | -|base0C| #8ec07c | #8ec07c | #85ad85 | #8ec07c | #89b482 | #89b482 | #89b482 | -|base0D| #83a598 | #83a598 | #83adad | #83a598 | #7daea3 | #7daea3 | #7daea3 | -|base0E| #d3869b | #d3869b | #d485ad | #d3869b | #d3869b | #d3869b | #d3869b | -|base0F| #d65d0e | #d65d0e | #d65d0e | #d65d0e | #bd6f3e | #bd6f3e | #bd6f3e | - -Сравнение цветов моей темы gruvbox с другими темами - -|Цвет |gruvbox-d-m| onedark | nord |catppuccin-mocha|catppuccin-latte|rose-pine|rose-pine-moon|tokyo-night-moon|everforest| dracula | -|------|-----------|---------|---------|----------------|----------------|---------|--------------|----------------|----------|---------| -|base00| #282828 | #282c34 | #2E3440 | #1e1e2e | #eff1f5 | #191724 | #232136 | #222436 | #2d353b | #282a36 | -|base01| #3c3836 | #353b45 | #3B4252 | #181825 | #e6e9ef | #1f1d2e | #2a273f | #1e2030 | #343f44 | #363447 | -|base02| #504945 | #3e4451 | #434C5E | #313244 | #ccd0da | #26233a | #393552 | #2d3f76 | #475258 | #44475a | -|base03| #665c54 | #545862 | #4C566A | #45475a | #bcc0cc | #6e6a86 | #6e6a86 | #636da6 | #859289 | #6272a4 | -|base04| #bdae93 | #565c64 | #D8DEE9 | #585b70 | #acb0be | #908caa | #908caa | #828bb8 | #9da9a0 | #9ea8c7 | -|base05| #d5c4a1 | #abb2bf | #E5E9F0 | #cdd6f4 | #4c4f69 | #e0def4 | #e0def4 | #3b4261 | #d3c6aa | #f8f8f2 | -|base06| #ebdbb2 | #b6bdca | #ECEFF4 | #f5e0dc | #dc8a78 | #e0def4 | #e0def4 | #828bb8 | #e6e2cc | #f0f1f4 | -|base07| #fbf1c7 | #c8ccd4 | #8FBCBB | #b4befe | #7287fd | #524f67 | #56526e | #c8d3f5 | #fdf6e3 | #ffffff | -|base08| #fb4934 | #e06c75 | #BF616A | #f38ba8 | #d20f39 | #eb6f92 | #eb6f92 | #ff757f | #e67e80 | #ff5555 | -|base09| #fe8019 | #d19a66 | #D08770 | #fab387 | #fe640b | #f6c177 | #f6c177 | #ffc777 | #e69875 | #ffb86c | -|base0A| #fabd2f | #e5c07b | #EBCB8B | #f9e2af | #df8e1d | #ebbcba | #ea9a97 | #ffc777 | #dbbc7f | #f1fa8c | -|base0B| #b8bb26 | #98c379 | #A3BE8C | #a6e3a1 | #40a02b | #31748f | #3e8fb0 | #c3e88d | #a7c080 | #50fa7b | -|base0C| #8ec07c | #56b6c2 | #88C0D0 | #94e2d5 | #179299 | #9ccfd8 | #9ccfd8 | #86e1fc | #83c092 | #8be9fd | -|base0D| #83a598 | #61afef | #81A1C1 | #89b4fa | #1e66f5 | #c4a7e7 | #c4a7e7 | #82aaff | #7fbbb3 | #80bfff | -|base0E| #d3869b | #c678dd | #B48EAD | #cba6f7 | #8839ef | #f6c177 | #f6c177 | #fca7ea | #d699b6 | #ff79c6 | -|base0F| #d65d0e | #be5046 | #5E81AC | #f2cdcd | #dd7878 | #524f67 | #56526e | #c53b53 | #9da9a0 | #bd93f9 | - -Цветовая схема **Base16** используется для унификации цветовых тем в разных приложениях. Она определяет 16 базовых цветов, каждый из которых играет определённую роль. Вот основные цвета и их назначения: - -- **Base00** – **Background**: Основной фоновый цвет. -- **Base01** – **Lighter Background**: Более светлый цвет для фона, часто используется для элементов вроде выделенных областей. -- **Base02** – **Selection Background**: Цвет фона выделений, обычно для текста или других активных областей. -- **Base03** – **Comments/Inactive Text**: Цвет для комментариев или неактивного текста, обычно более тусклый или нейтральный. -- **Base04** – **Dark Foreground**: Тёмный текст на светлом фоне или для элементов UI. -- **Base05** – **Default Foreground**: Основной цвет текста. -- **Base06** – **Light Foreground**: Более светлый текст, используется на более тёмных элементах. -- **Base07** – **Light Background/Foreground Accent**: Самый светлый цвет, часто используется для акцентированных областей или фона текста. -- **Base08** – **Variables/Errors**: Акцентный цвет для переменных или ошибок. Часто красный. -- **Base09** – **Integers/Warnings**: Используется для целых чисел или предупреждений. Оранжевый. -- **Base0A** – **Booleans/Keys**: Акцентный цвет для логических значений или ключей. Жёлтый. -- **Base0B** – **Strings/Success**: Цвет для строк или успешных операций. Зелёный. -- **Base0C** – **Support/Functions**: Цвет для поддерживающих элементов, функций или специальных значений. Бирюзовый. -- **Base0D** – **Keywords/Declarations**: Используется для ключевых слов или деклараций. Синий. -- **Base0E** – **Class Names/Constructors**: Акцентный цвет для имён классов или конструкторов. Фиолетовый. -- **Base0F** – **Deprecated Elements/Exceptions**: Обычно используется для устаревших элементов или исключений. Коричневый. - -Эти цвета обеспечивают чёткую структуру для создания тем, где легко отличить синтаксические элементы или UI-компоненты. \ No newline at end of file diff --git a/SOFTWARE.md b/SOFTWARE.md new file mode 100644 index 0000000..e69de29 diff --git a/THEMES.md b/THEMES.md new file mode 100644 index 0000000..81d50b6 --- /dev/null +++ b/THEMES.md @@ -0,0 +1,130 @@ + +## Themes + +У меня в IDE отображаются цвета. Так что я для себя сохраню разные варианты gruvbox + +Цвет это имя цвета в stylix. Потом идёт название gruvbox-вариант + +Я использую gruvbox-dark-medium + +|Цвет |dark-hard|dark-medium|dark-pale|dark-soft|material-dark-hard|material-dark-medium|material-dark-soft| +|------|---------|-----------|---------|---------|------------------|--------------------|------------------| +|base00| #1d2021 | #282828 | #262626 | #32302f | #202020 | #292828 | #32302f | +|base01| #3c3836 | #3c3836 | #3a3a3a | #3c3836 | #2a2827 | #32302f | #3c3836 | +|base02| #504945 | #504945 | #4e4e4e | #504945 | #504945 | #504945 | #5a524c | +|base03| #665c54 | #665c54 | #8a8a8a | #665c54 | #5a524c | #665c54 | #7c6f64 | +|base04| #bdae93 | #bdae93 | #949494 | #bdae93 | #bdae93 | #bdae93 | #bdae93 | +|base05| #d5c4a1 | #d5c4a1 | #dab997 | #d5c4a1 | #ddc7a1 | #ddc7a1 | #ddc7a1 | +|base06| #ebdbb2 | #ebdbb2 | #d5c4a1 | #ebdbb2 | #ebdbb2 | #ebdbb2 | #ebdbb2 | +|base07| #fbf1c7 | #fbf1c7 | #ebdbb2 | #fbf1c7 | #fbf1c7 | #fbf1c7 | #fbf1c7 | +|base08| #fb4934 | #fb4934 | #d75f5f | #fb4934 | #ea6962 | #ea6962 | #ea6962 | +|base09| #fe8019 | #fe8019 | #ff8700 | #fe8019 | #e78a4e | #e78a4e | #e78a4e | +|base0A| #fabd2f | #fabd2f | #ffaf00 | #fabd2f | #d8a657 | #d8a657 | #d8a657 | +|base0B| #b8bb26 | #b8bb26 | #afaf00 | #b8bb26 | #a9b665 | #a9b665 | #a9b665 | +|base0C| #8ec07c | #8ec07c | #85ad85 | #8ec07c | #89b482 | #89b482 | #89b482 | +|base0D| #83a598 | #83a598 | #83adad | #83a598 | #7daea3 | #7daea3 | #7daea3 | +|base0E| #d3869b | #d3869b | #d485ad | #d3869b | #d3869b | #d3869b | #d3869b | +|base0F| #d65d0e | #d65d0e | #d65d0e | #d65d0e | #bd6f3e | #bd6f3e | #bd6f3e | + +Сравнение цветов моей темы gruvbox с другими темами + +|Цвет |gruvbox-d-m| onedark | nord |catppuccin-mocha|catppuccin-latte|rose-pine|rose-pine-moon|tokyo-night-moon|everforest| dracula | +|------|-----------|---------|---------|----------------|----------------|---------|--------------|----------------|----------|---------| +|base00| #282828 | #282c34 | #2E3440 | #1e1e2e | #eff1f5 | #191724 | #232136 | #222436 | #2d353b | #282a36 | +|base01| #3c3836 | #353b45 | #3B4252 | #181825 | #e6e9ef | #1f1d2e | #2a273f | #1e2030 | #343f44 | #363447 | +|base02| #504945 | #3e4451 | #434C5E | #313244 | #ccd0da | #26233a | #393552 | #2d3f76 | #475258 | #44475a | +|base03| #665c54 | #545862 | #4C566A | #45475a | #bcc0cc | #6e6a86 | #6e6a86 | #636da6 | #859289 | #6272a4 | +|base04| #bdae93 | #565c64 | #D8DEE9 | #585b70 | #acb0be | #908caa | #908caa | #828bb8 | #9da9a0 | #9ea8c7 | +|base05| #d5c4a1 | #abb2bf | #E5E9F0 | #cdd6f4 | #4c4f69 | #e0def4 | #e0def4 | #3b4261 | #d3c6aa | #f8f8f2 | +|base06| #ebdbb2 | #b6bdca | #ECEFF4 | #f5e0dc | #dc8a78 | #e0def4 | #e0def4 | #828bb8 | #e6e2cc | #f0f1f4 | +|base07| #fbf1c7 | #c8ccd4 | #8FBCBB | #b4befe | #7287fd | #524f67 | #56526e | #c8d3f5 | #fdf6e3 | #ffffff | +|base08| #fb4934 | #e06c75 | #BF616A | #f38ba8 | #d20f39 | #eb6f92 | #eb6f92 | #ff757f | #e67e80 | #ff5555 | +|base09| #fe8019 | #d19a66 | #D08770 | #fab387 | #fe640b | #f6c177 | #f6c177 | #ffc777 | #e69875 | #ffb86c | +|base0A| #fabd2f | #e5c07b | #EBCB8B | #f9e2af | #df8e1d | #ebbcba | #ea9a97 | #ffc777 | #dbbc7f | #f1fa8c | +|base0B| #b8bb26 | #98c379 | #A3BE8C | #a6e3a1 | #40a02b | #31748f | #3e8fb0 | #c3e88d | #a7c080 | #50fa7b | +|base0C| #8ec07c | #56b6c2 | #88C0D0 | #94e2d5 | #179299 | #9ccfd8 | #9ccfd8 | #86e1fc | #83c092 | #8be9fd | +|base0D| #83a598 | #61afef | #81A1C1 | #89b4fa | #1e66f5 | #c4a7e7 | #c4a7e7 | #82aaff | #7fbbb3 | #80bfff | +|base0E| #d3869b | #c678dd | #B48EAD | #cba6f7 | #8839ef | #f6c177 | #f6c177 | #fca7ea | #d699b6 | #ff79c6 | +|base0F| #d65d0e | #be5046 | #5E81AC | #f2cdcd | #dd7878 | #524f67 | #56526e | #c53b53 | #9da9a0 | #bd93f9 | + +Цветовая схема **Base16** используется для унификации цветовых тем в разных приложениях. Она определяет 16 базовых цветов, каждый из которых играет определённую роль. Вот основные цвета и их назначения: + +- **Base00** – **Background**: Основной фоновый цвет. +- **Base01** – **Lighter Background**: Более светлый цвет для фона, часто используется для элементов вроде выделенных областей. +- **Base02** – **Selection Background**: Цвет фона выделений, обычно для текста или других активных областей. +- **Base03** – **Comments/Inactive Text**: Цвет для комментариев или неактивного текста, обычно более тусклый или нейтральный. +- **Base04** – **Dark Foreground**: Тёмный текст на светлом фоне или для элементов UI. +- **Base05** – **Default Foreground**: Основной цвет текста. +- **Base06** – **Light Foreground**: Более светлый текст, используется на более тёмных элементах. +- **Base07** – **Light Background/Foreground Accent**: Самый светлый цвет, часто используется для акцентированных областей или фона текста. +- **Base08** – **Variables/Errors**: Акцентный цвет для переменных или ошибок. Часто красный. +- **Base09** – **Integers/Warnings**: Используется для целых чисел или предупреждений. Оранжевый. +- **Base0A** – **Booleans/Keys**: Акцентный цвет для логических значений или ключей. Жёлтый. +- **Base0B** – **Strings/Success**: Цвет для строк или успешных операций. Зелёный. +- **Base0C** – **Support/Functions**: Цвет для поддерживающих элементов, функций или специальных значений. Бирюзовый. +- **Base0D** – **Keywords/Declarations**: Используется для ключевых слов или деклараций. Синий. +- **Base0E** – **Class Names/Constructors**: Акцентный цвет для имён классов или конструкторов. Фиолетовый. +- **Base0F** – **Deprecated Elements/Exceptions**: Обычно используется для устаревших элементов или исключений. Коричневый. + +Эти цвета обеспечивают чёткую структуру для создания тем, где легко отличить синтаксические элементы или UI-компоненты. + +## Icons + +Искать иконки для nerd шрифта можно [тут](https://www.nerdfonts.com/cheat-sheet). + +Соберу сюда список nerd иконок, которые могут пригодиться. Для их отображения нужен специальный шрифт + +CPU (мб не юзать, а писать текстом и cpu и gpu) -  + +RAM -  + +CapsLock - 󰪛 + +Клавиатура -  или 󰌌 + +Громкость -    + +Яркость - 󰃟 󰃞 󰃝 + +Календарь -   󰸗 + +Выключение пк - ⏻ 󰐥  + +Приложения -  󰀻  󰵆 + +Блютуз -  󰂯 󰂲 󰥰 󰦋 󰏳 󰦢 󰗾 󰗿 + +Network - 󰈀  󰒍 + +Clipboard -   󱉧  + +Оповещения (bell) - 󰀦  󰀧 󰀨 󰅉 󰨱 󰵙  󰂚     + +Reload - 󰑓 󱄋 + + +Wifi + 󰖩 󱚵 󱚽 󱚼 󰖪 󱛄 +󰤭 󰤨 󰤥 󰤢 󰤟 󰤯 󰤫 󰤮 + +Батарейки +     +󰁹 󰂂 󰂁 󰂀 󰁿 󰁾 󰁽 󰁼 󰁻 󰁺 󰂎 +󱊣 󱊢 󱊡 󰂎 +󰂃 󱉝 󰂑 + +Батарейки зарядка +󰂅 󰂋 󰂊 󰢞 󰂉 󰢝 󰂈 󰂇 󰂆 󰢜 󰢟 +󱊦 󱊥 󱊤 󰢟 +󰂄 + +Батарейки блютуз +󰥈 󰥆 󰥅 󰥄 󰥃 󰥂 󰥁 󰥀 󰤿 󰤾 +󰥇 󰥊 󰥉 + +Температура +󰔄 - Температура по цельсию +     +  + + diff --git a/archive/README.md b/archive/README.md deleted file mode 100644 index f9e4058..0000000 --- a/archive/README.md +++ /dev/null @@ -1 +0,0 @@ -Тут будут файлы, которые больше не нужны. Но может быть они мне пригодятся в будущем. \ No newline at end of file diff --git a/archive/browsers/chromium.nix b/archive/browsers/chromium.nix deleted file mode 100644 index 7635ef7..0000000 --- a/archive/browsers/chromium.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - programs.chromium = { - enable = true; - - # Пока что передумал настраивать браузер. Бекаплю каталог целиком - }; -} \ No newline at end of file diff --git a/archive/browsers/firefox.nix b/archive/browsers/firefox.nix deleted file mode 100644 index 80eb972..0000000 --- a/archive/browsers/firefox.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - programs.firefox = { # Пока что передумал настраивать браузер. Бекаплю каталог целиком - enable = true; - - # profiles.buliway = { - - # search = { - # engines = { - - # }; - - # force = true; - # }; - - # nativeMessagingHosts.ff2mpv = true; # Чтоб ff2mpv работал - - # settings = { - # # "extensions.autoDisableScopes" = 0; # To automatically enable extensions - # "browser.bookmarks.openInTabClosesMenu" = false; - # "browser.tabs.loadBookmarksInBackground" = true; - # "layout.css.has-selector.enabled" = true; - # # https://github.com/K3V1991/Disable-Firefox-Telemetry-and-Data-Collection - # "browser.newtabpage.activity-stream.feeds.telemetry" = false; - # "browser.newtabpage.activity-stream.telemetry" = false; - # "datareporting.healthreport.uploadEnabled" = false; - # "datareporting.policy.dataSubmissionEnabled" = false; - # "toolkit.telemetry.archive.enabled" = false; - # "toolkit.telemetry.bhrPing.enabled" = false; - # "toolkit.telemetry.enabled" = false; - # "toolkit.telemetry.firstShutdownPing.enabled" = false; - # "toolkit.telemetry.newProfilePing.enabled" = false; - # "toolkit.telemetry.reportingpolicy.firstRun" = false; - # "toolkit.telemetry.server" = ""; - # "toolkit.telemetry.shutdownPingSender.enabled" = false; - # "toolkit.telemetry.unified" = false; - # "toolkit.telemetry.updatePing.enabled" = false; - # }; - # }; - }; -} \ No newline at end of file diff --git a/archive/browsers/librewolf.nix b/archive/browsers/librewolf.nix deleted file mode 100644 index a24b649..0000000 --- a/archive/browsers/librewolf.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ pkgs, ... }: { - programs.librewolf = { # Пока что передумал настраивать браузер. Бекаплю каталог целиком - enable = true; - - # settings = { # Надо из about:config записать сюда свои изменения - # "browser.bookmarks.openInTabClosesMenu" = false; # Не закрывать каталог закладок при открытии через СКМ? Не помню - # "browser.tabs.loadBookmarksInBackground" = true; # Не перекидывать меня сразу на открытую закладку через СКМ? Не помню - # "layout.css.has-selector.enabled" = true; # Некоторые кастом стили это требуют - - # # General - - # # # Search (Если надо вернуть гугл поисковик в стоке) - # # "browser.policies.runOncePerModification.extensionsUninstall" = [ # Удалить расширения - # # "amazondotcom@search.mozilla.org" - # # "ebay@search.mozilla.org" - # # "twitter@search.mozilla.org" - # # ]; - # # "browser.policies.runOncePerModification.removeSearchEngines" = [ # Удалить поисковые движки - # # "Amazon.com" - # # "eBay" - # # "Twitter" - # # ]; - # # "browser.policies.runOncePerModification.setDefaultSearchEngine" = "Google"; # Стандартный поисковик - - # # Privacy & Security - - # # LibreWolf - # "clipboard.autocopy" = false; # Выкл копирование колесом мыши - # "middlemouse.paste" = false; # Выкл копирование колесом мыши - # "network.dns.disableIPv6" = true; # Выкл ivp6 - # "privacy.resistFingerprinting" = false; # Лайтовое и мб не ломает работу сайтов - # "privacy.fingerprintingProtection" = false; # Хардовее и может ломать работу сайтов? - # "webgl.disabled" = false; # Включить WebGL - - # # Extensions - # "browser.policies.runOncePerModification.extensionsInstall" = [ # Установка расширений - # "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi" # uBlock - # "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger/latest.xpi" # Privacy Badger - # ]; - # }; - }; - - # Чтоб ff2mpv работал. Не надо юзать их скрипт с гитхаба - # Надо будет потом написать "nix-build -A ff2mpv", чтоб проверить реальный путь до ff2mpv бинаря - # home.file.".librewolf/native-messaging-hosts/ff2mpv.json".text = '' - # { - # "name": "ff2mpv", - # "description": "ff2mpv's external manifest", - # "path": "${pkgs.ff2mpv}/bin/ff2mpv.py", - # "type": "stdio", - # "allowed_extensions": ["ff2mpv@yossarian.net"] - # } - # ''; - - # Ниже сделать настройки расширений декларативными - # home.file.".librewolf/?".source = ./?; -} \ No newline at end of file diff --git a/archive/bspwmrc b/archive/bspwmrc deleted file mode 100644 index d9261e3..0000000 --- a/archive/bspwmrc +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env bash - -# Дефолт конфиг https://github.com/baskerville/bspwm/blob/master/examples/bspwmrc -# Описание настроек можно найти тут https://manpages.debian.org/testing/bspwm/bspc.1.en.html -# Или через "man bspc" в терминале -# Или в ./bspwm.md -# https://my-take-on.tech/2020/07/03/some-tricks-for-sxhkd-and-bspwm/ - -################ -## Автозапуск ## -################ - -# Это по сути терминал. Пишем то, как запускается прога через терминал и в конце & обязательно - -# # Как я понял, их не надо запускать, ведь они активированы через services..enable = true; -# # Если в nixos что-то включается через services, а не через programs, то nixos сам отвечает за автозапуск сервисов -# pgrep -x sxhkd > /dev/null || sxhkd & # Запускаем sxhkd если он не запущен -# pgrep -x polybar > /dev/null || polybar & # Запускаем polybar если он не запущен -# pgrep -x dunst > /dev/null || dunst & # Запускаем dunst если он не запущен - -# Изменить настройки для основного монитора. Мб вместе с --primary надо -xrandr --output DisplayPort-2 --mode 1920x1080 --rate 165 -# Изменить настройки для второго (правого) монитора -xrandr --output HDMI-A-0 --mode 1920x1080 --rate 100 --right-of DisplayPort-2 - -ksnip & -# nekoray & -# obsidian & -# planify & -lxqt-policykit-agent & - -# Я ебал рот видеть инет в трее. Замени эту ёбань на rofi и отдельную кнопку в polybar -nm-applet & - -######################### -## Настройки мониторов ## -######################### - -# Получаем имена активных мониторов -MONITORS=( $(xrandr --listactivemonitors | grep -E '^ [0-9]+:' | cut -d' ' -f6 | sed 's/\n/ /') ) - -# Если переменная MONITOR уже задана, то используется её значение. -# Если она не задана (то есть пуста или не существует), то используется первый элемент из массива MONITORS (то есть, первый активный монитор). -# Это гарантирует, что переменная MONITOR всегда будет содержать значение: либо установленное ранее, либо первый активный монитор по умолчанию. -# ":-" Это оператор в Bash, который используется для установки значения по умолчанию. Если переменная не задана или пуста, используется значение после :- -MONITOR="${MONITOR:-${MONITORS[0]}}" - -# Для запуска приложений на втором мониторе, если он доступен. Если второго монитора нет, используем первый. -MONITOR2="${MONITORS[1]:-${MONITORS[0]}}" - -# # Устанавливаем рабочие столы с именами от 1 до 10 для каждого монитора -for mon in ${MONITORS[@]}; do - bspc monitor $mon -d {1,2,3,4,5,6,7,8,9,10} -done - -# Устанавливаем рабочие столы с именами от 1 до 10 для каждого монитора -#bspc monitor -d 1 2 3 4 5 6 7 8 9 10 # Можно заменить на {1,2,3,4,5,6,7,8,9,10} - -# Настройка автоматического удаления настроек для отключённых и отсоединённых мониторов -bspc config remove_disabled_monitors false -bspc config remove_unplugged_monitors false - -##################### -## Настройки bspwm ## -##################### - -# Syntax - bspc config [-m MONITOR_SEL|-d DESKTOP_SEL|-n NODE_SEL] [] - -# Устанавливает ширину границ окон в 2 пикселя. -bspc config border_width 2 - -# Задаёт расстояние между окнами (отступ) в 5 пикселей. -bspc config window_gap 5 - -# Настраивает коэффициент разделения окон при их разделении. Значение 0.52 означает, что при разделении окно будет занимать 52% доступного пространства. -bspc config split_ratio 0.52 - -# В режиме monocle (максимизация окна на весь экран) границы окон будут скрыты. -bspc config borderless_monocle true - -# В режиме monocle будет отсутствовать отступ между окнами. -bspc config gapless_monocle true - -# Eсли вы активируете режим "monocle" на одном мониторе, другие мониторы остаются в обычном режиме -bspc config single_monocle false - -# Фокусировка следует за курсором -bspc config focus_follows_pointer true - - -############################### -## Поведение конкретных окон ## -############################### - - -# Yдаляет все существующие правила для всех окон -# bspc rule -r '*' - -bspc rule -a "polybar" layer=above - -bspc rule -a "Screenkey" manage=off - -bspc rule -a "ksnip" state=floating center=true focus=on rectangle=1600x900+0+0 -bspc rule -a "org.kde.ark" state=floating center=true focus=on rectangle=1200x800+0+0 -bspc rule -a "floating-terminal" state=floating center=true focus=on rectangle=1200x800+0+0 diff --git a/archive/default-apps.nix b/archive/default-apps.nix deleted file mode 100644 index a7361ef..0000000 --- a/archive/default-apps.nix +++ /dev/null @@ -1,121 +0,0 @@ -# Команды для терминала -# Узнать тип файла - xdg-mime query filetype foo.pdf -# Узнать нынешнее дефолт приложения - xdg-mime query default application/pdf -# Узнать имя приложения. Для примера взять evince - fd evince.desktop / -# Выведет пути, по которым можно понять как называется приложение -# В список [] можно через пробел добавить другие варианты. Если первая прога не откроет, то попытается вторая -# Список mime types смотрел тут https://mimetype.io/all-types -# Нагуглить значение "x-scheme-handler" невозможно. Как я понял, это кастом типы - -############################################################################## -# Как система готова, то замени имена прог на реальные. Сейчас на абум стоят # -############################################################################## - -{ - xdg.mimeApps = { # Конфиг для `~/.config/mimeapps.list` - enable = true; - defaultApplications = { # Стандартные приложения для открытия нужного файла - # Browser - "application/x-extension-htm" = [ "librewolf.desktop" ]; - "application/x-extension-html" = [ "librewolf.desktop" ]; - "application/x-extension-shtml" = [ "librewolf.desktop" ]; - "application/x-extension-xht" = [ "librewolf.desktop" ]; - "application/x-extension-xhtml" = [ "librewolf.desktop" ]; - "application/xhtml+xml" = [ "librewolf.desktop" ]; - "x-scheme-handler/about" = [ "librewolf.desktop" ]; - "x-scheme-handler/chrome" = [ "librewolf.desktop" ]; - "x-scheme-handler/http" = [ "librewolf.desktop" ]; - "x-scheme-handler/https" = [ "librewolf.desktop" ]; - "x-scheme-handler/unknown" = [ "librewolf.desktop" ]; - # Images - "image/*" = [ "qview.desktop" "imv.desktop" ]; - "image/avif" = [ "imv.desktop" "qview.desktop" ]; - "image/gif" = [ "qview.desktop" "imv.desktop" ]; - "image/jpeg" = [ "qview.desktop" "imv.desktop" ]; # Обычный jpeg, прогрузка сверху вниз - "image/pjpeg" = [ "qview.desktop" "imv.desktop" ]; # Сначала размытый и постепенной лучше видно, для медленного инета - "image/apng" = [ "qview.desktop" "imv.desktop" ]; # Анимированный png - "image/png" = [ "qview.desktop" "imv.desktop" ]; - "image/svg+xml" = [ "qview.desktop" "imv.desktop" ]; - "image/webp" = [ "qview.desktop" "imv.desktop" ]; - "image/x-icon" = [ "qview.desktop" "imv.desktop" ]; - "image/vnd.microsoft.icon" = [ "qview.desktop" "imv.desktop" ]; - # Video - "video/*" = [ "mpv.desktop" ]; - "video/mp4" = [ "mpv.desktop" ]; - "video/mpeg" = [ "mpv.desktop" ]; - "video/quicktime" = [ "mpv.desktop" ]; - "video/webm" = [ "mpv.desktop" ]; - "video/x-matroska" = [ "mpv.desktop" ]; - # Audio - "audio/*" = [ "mpv.desktop" ]; - "audio/aac" = [ "mpv.desktop" ]; - "audio/flac" = [ "mpv.desktop" ]; - "audio/mp4" = [ "mpv.desktop" ]; - "audio/mpeg" = [ "mpv.desktop" ]; - "audio/ogg" = [ "mpv.desktop" ]; - "audio/opus" = [ "mpv.desktop" ]; - "audio/vnd.wav" = [ "mpv.desktop" ]; - "audio/webm" = [ "mpv.desktop" ]; - "audio/x-matroska" = [ "mpv.desktop" ]; - "audio/x-mpegurl" = [ "mpv.desktop" ]; # Для .m3u. Это файл-плейлист - "audio/x-opus+ogg" = [ "mpv.desktop" ]; # What's this? Why not "audio/ogg" and "audio/opus"? - # Text - "text/*" = [ "nvim.desktop" "code.desktop" ]; - "text/css" = [ "nvim.desktop" "code.desktop" ]; - "text/csv" = [ "nvim.desktop" "code.desktop" ]; - "text/html" = [ "nvim.desktop" "code.desktop" "librewolf.desktop" "firefox.desktop" "chromium.desktop" ]; - "text/javascript" = [ "nvim.desktop" "code.desktop" ]; - "text/markdown" = [ "nvim.desktop" "code.desktop" ]; - "text/plain" = [ "nvim.desktop" "code.desktop" ]; - "text/x-asm" = [ "nvim.desktop" "code.desktop" ]; - "text/x-c" = [ "nvim.desktop" "code.desktop" ]; - "text/x-python" = [ "nvim.desktop" "code.desktop" ]; - "application/json" = [ "nvim.desktop" "code.desktop" "librewolf.desktop" "firefox.desktop" "chromium.desktop" ]; - "application/x-sh" = [ "nvim.desktop" "code.desktop" ]; - "application/x-shellscript" = [ "nvim.desktop" "code.desktop" ]; - "application/xml" = [ "nvim.desktop" "code.desktop" ]; - "application/yaml" = [ "nvim.desktop" "code.desktop" ]; - # Мб потом добавить для docs варианты и разные виды архивов и ebook - # Other - "application/pdf" = [ "org.gnome.Evince.desktop" ]; - "application/x-zerosize" = [ "nvim.desktop" "code.desktop" ]; # Файл нулевого размера - "application/zip" = [ "ark.desktop" ]; - "application/x-bittorrent" = [ "qbittorrent.desktop" ]; - "x-scheme-handler/magnet" = [ "qbittorrent.desktop" ]; - "inode/directory" = [ "thunar.desktop" ]; - "x-scheme-handler/mailto" = [ "thunderbird.desktop" ]; - "x-scheme-handler/jetbrains" = [ "jetbrains-toolbox.desktop" ]; - }; - - associations.added = { # Дополнительные приложения для нужного файла. Будет в меню "Открыть с помощью" - # Images - "image/*" = [ "qview.desktop" "imv.desktop" ]; - "image/avif" = [ "imv.desktop" "qview.desktop" ]; - "image/gif" = [ "qview.desktop" "imv.desktop" ]; - "image/jpeg" = [ "qview.desktop" "imv.desktop" ]; # Обычный jpeg, прогрузка сверху вниз - "image/pjpeg" = [ "qview.desktop" "imv.desktop" ]; # Сначала размытый и постепенной лучше видно, для медленного инета - "image/apng" = [ "qview.desktop" "imv.desktop" ]; # Анимированный png - "image/png" = [ "qview.desktop" "imv.desktop" ]; - "image/svg+xml" = [ "qview.desktop" "imv.desktop" ]; - "image/webp" = [ "qview.desktop" "imv.desktop" ]; - "image/x-icon" = [ "qview.desktop" "imv.desktop" ]; - "image/vnd.microsoft.icon" = [ "qview.desktop" "imv.desktop" ]; - # Text - "text/*" = [ "nvim.desktop" "code.desktop" ]; - "text/css" = [ "nvim.desktop" "code.desktop" ]; - "text/csv" = [ "nvim.desktop" "code.desktop" ]; - "text/html" = [ "nvim.desktop" "code.desktop" "librewolf.desktop" "firefox.desktop" "chromium.desktop" ]; - "text/javascript" = [ "nvim.desktop" "code.desktop" ]; - "text/markdown" = [ "nvim.desktop" "code.desktop" ]; - "text/plain" = [ "nvim.desktop" "code.desktop" ]; - "text/x-asm" = [ "nvim.desktop" "code.desktop" ]; - "text/x-c" = [ "nvim.desktop" "code.desktop" ]; - "text/x-python" = [ "nvim.desktop" "code.desktop" ]; - "application/json" = [ "nvim.desktop" "code.desktop" "librewolf.desktop" "firefox.desktop" "chromium.desktop" ]; - "application/x-sh" = [ "nvim.desktop" "code.desktop" ]; - "application/x-shellscript" = [ "nvim.desktop" "code.desktop" ]; - "application/xml" = [ "nvim.desktop" "code.desktop" ]; - "application/yaml" = [ "nvim.desktop" "code.desktop" ]; - }; - }; -} \ No newline at end of file diff --git a/archive/fish.nix b/archive/fish.nix deleted file mode 100644 index 9c0883a..0000000 --- a/archive/fish.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ pkgs, ... }: { - programs.fish = { - enable = true; - - shellAliases = let - flakeDir = "~/dots"; - in { - rb = "sudo nixos-rebuild switch --flake ${flakeDir}"; # Применить новый конфиг - - # Можно назвать аналогом "sudo pacman -Su", не "Syu", репу не обновляет - upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}"; # Обновить пакеты, но не репозиторий во fleke.lock - - # Возможно это аналог "sudo pacman -Sy". Обновить репозиторий, чтоб потом на него обновиться? Пакеты не обновляет - upd = "nix flake update ${flakeDir}"; # Обновляет flake.lock на последние коммиты с гитхаба? - - pkgs = "nvim ${flakeDir}/nixos/packages.nix"; - - v = "nvim"; - t = "timer"; - r = "ranger"; - ff = "fastfetch"; - yt = "cd /mnt/backups/Media/yt-dlp"; # Бекапить YouTube - qb = "cd /mnt/backups/Media/Music/Qobux/qdl"; # Бекапить музыку с Qobuz - }; - - # Всё, что в комментах ниже, лишнее. Я нашёл норм способ. Пишем "nix-prefetch-git link" и получаем всю инфу - # Узнать rev - git ls-remote https://github.com/{owner}/{repo}.git HEAD - # На гитхабе вроде можно просто на странице коммитов нажать ... и copy full SHA - # Узнать sha256 - sudo nix-prefetch-url --unpack https://github.com/{owner}/{repo}/archive/{rev}.tar.gz - # Ссылку проще получить, открыв страницу релизов и оттуда скопировать ссылку на архив - # Если нет релизов - sudo nix-prefetch-url --unpack https://github.com/{owner}/{repo}/archive/refs/heads/{branch}.zip - plugin = [ - { # The Node.js version manager you'll adore, crafted just for Fish - name = "nvm.fish"; # https://github.com/jorgebucaran/nvm.fish - src = pkgs.fetchFromGitHub { - owner = "jorgebucaran"; - repo = "nvm.fish"; - rev = "b8edb1ee24cbbf7259196b0cb3c6c4ab65b07929"; - sha256 = "17vk608mbmb9mwvvm18hs63iy7vzdrd1ymia94szy1hy5d0li77c"; - }; - } - { # Utility functions to start your ssh agent when using fish shell - name = "fish-ssh-agent"; # https://github.com/danhper/fish-ssh-agent - src = pkgs.fetchFromGitHub { - owner = "danhper"; - repo = "fish-ssh-agent"; - rev = "fd70a2afdd03caf9bf609746bf6b993b9e83be57"; - sha256 = "1fvl23y9lylj4nz6k7yfja6v9jlsg8jffs2m5mq0ql4ja5vi5pkv"; - }; - } - ]; - }; - - home = { - packages = with pkgs.fishPlugins; [ # Плагины для Fish из репы никса - z # Частые директории https://github.com/jethrokuan/z/blob/master/man/man1/z.md - plugin-git # Алиасы для гита https://github.com/jhillyerd/plugin-git - fzf-fish # https://github.com/PatrickF1/fzf.fish - done # Оповещения для длительных процессов https://github.com/franciscolourenco/done - bass # Позволяет юзать bash в fish https://github.com/edc/bass - ]; - - # Чтоб при выходе из ranger я всегда cd в каталог, из которого вышел - file.".config/fish/functions/ranger.fish".text = '' - function ranger - set tempfile (mktemp -t tmp.XXXXXX) - command ranger --choosedir=$tempfile $argv - set return_value $status - - if test -s $tempfile - set ranger_pwd (cat $tempfile) - if test -n $ranger_pwd -a -d $ranger_pwd - builtin cd -- $ranger_pwd - end - end - - command rm -f -- $tempfile - return $return_value - end - ''; - }; -} \ No newline at end of file diff --git a/archive/strawberry.conf b/archive/strawberry.conf deleted file mode 100644 index 70e92ee..0000000 --- a/archive/strawberry.conf +++ /dev/null @@ -1,443 +0,0 @@ -[Analyzer] -framerate=25 -type=BlockAnalyzer - -[Appearance] -background_image_do_not_cut=true -background_image_keep_aspect_ratio=true -background_image_max_size=0 -background_image_position=5 -background_image_stretch=false -background_image_type=1 -blur_radius=0 -icon_size_configure_buttons=16 -icon_size_left_panel_buttons=22 -icon_size_play_control_buttons=32 -icon_size_playlist_buttons=20 -icon_size_tabbar_large_mode=40 -icon_size_tabbar_small_mode=32 -opacity_level=40 -playlist_playing_song_color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0) -style=default -system_icons=false -tab_color=@Variant(\0\0\0\x43\x2\xff\xffOL\x87\x87\x92+\0\0) -tab_gradient=true -tab_system_color=true - -[Backend] -AutoCrossfadeEnabled=false -CrossfadeEnabled=false -FadeoutDuration=2000 -FadeoutEnabled=false -FadeoutPauseDuration=250 -FadeoutPauseEnabled=false -NoCrossfadeSameAlbum=true -alsaplugin=3 -bs2b=false -bufferduration=4000 -bufferhighwatermark=0.99 -bufferlowwatermark=0.33 -channels=2 -channels_enabled=false -device=@Invalid() -ebur128_loudness_normalization=false -ebur128_target_level_lufs=-23 -engine=gstreamer -http2=false -output=autoaudiosink -rgcompression=true -rgenabled=false -rgfallbackgain=0 -rgmode=1 -rgpreamp=0 -strict_ssl=false -volume_control=true - -[Behaviour] -doubleclick_addmode=1 -doubleclick_playlist_addmode=1 -doubleclick_playmode=1 -keeprunning=false -language= -menu_playmode=1 -menu_previousmode=1 -playing_widget=true -resumeplayback=false -seek_step_sec=10 -showtrayicon=true -startupbehaviour=1 -trayicon_progress=false - -[Collection] -auto_open=true -cache_size=160 -cache_size_unit=1 -cover_art_patterns=front, cover -delete_files=true -disk_cache_enable=false -disk_cache_size=360 -disk_cache_size_unit=1 -expire_unavailable_songs=60 -group_by1=1 -group_by2=4 -group_by3=0 -group_by_version=1 -last_path=/home/buliway/backups/Media/Music -mark_songs_unavailable=true -monitor=true -overwrite_playcount=false -overwrite_rating=false -pretty_covers=true -save_playcounts=true -save_ratings=true -separate_albums_by_grouping=false -show_dividers=true -song_ebur128_loudness_analysis=false -song_tracking=false -startup_scan=true - -[Context] -AlbumEnable=true -SearchCoverEnable=true -SearchLyricsEnable=true -SongLyricsEnable=true -SummaryFmt=%album% -TechnicalDataEnable=false -TitleFmt=%title% - %artist% -font_headline=Noto Sans -font_normal=Noto Sans -font_size_headline=11 -font_size_normal=9 - -[Covers] -providers=Last.fm, MusicBrainz, Deezer, Musixmatch, Spotify, Tidal, Qobuz -save_filename=2 -save_lowercase=true -save_overwrite=false -save_pattern=%albumartist-%album -save_replace_spaces=true -save_type=1 -types=art_unset, art_manual, art_automatic, art_embedded - -[EditTagDialog] -current_tab=1 -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\xf\x1\0\0\0\x19\0\0\x12\xb1\0\0\x4\x10\0\0\xf\x1\0\0\0\x19\0\0\x12\xc0\0\0\x4$\0\0\0\x1\x2\0\0\0\a\x80\0\0\xf\x1\0\0\0\x19\0\0\x12\xb1\0\0\x4\x10) - -[Equalizer] -enable_stereo_balancer=false -enabled=false -presets\1\name=Classical -presets\1\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xd8\xff\xff\xff\xd8\xff\xff\xff\xd8\xff\xff\xff\xce) -presets\10\name=Live -presets\10\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\xff\xff\xff\xe7\0\0\0\0\0\0\0\x14\0\0\0\x19\0\0\0\x1e\0\0\0\x1e\0\0\0\x14\0\0\0\xf\0\0\0\xf\0\0\0\n) -presets\11\name=Party -presets\11\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0#\0\0\0#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#\0\0\0#) -presets\12\name=Pop -presets\12\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\xff\xff\xff\xf6\0\0\0\x19\0\0\0#\0\0\0(\0\0\0\x19\xff\xff\xff\xfb\xff\xff\xff\xf1\xff\xff\xff\xf1\xff\xff\xff\xf6\xff\xff\xff\xf6) -presets\13\name=Reggae -presets\13\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\0\0\0\0\0\xff\xff\xff\xfb\xff\xff\xff\xe2\0\0\0\0\xff\xff\xff\xdd\xff\xff\xff\xdd\0\0\0\0\0\0\0\0\0\0\0\0) -presets\14\name=Rock -presets\14\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0(\0\0\0\x19\xff\xff\xff\xe2\xff\xff\xff\xd8\xff\xff\xff\xec\0\0\0\x14\0\0\0-\0\0\0\x37\0\0\0\x37\0\0\0\x37) -presets\15\name=Ska -presets\15\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\xff\xff\xff\xf1\xff\xff\xff\xe7\xff\xff\xff\xe7\xff\xff\xff\xfb\0\0\0\x14\0\0\0\x1e\0\0\0-\0\0\0\x32\0\0\0\x37\0\0\0\x32) -presets\16\name=Soft -presets\16\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x19\0\0\0\n\xff\xff\xff\xfb\xff\xff\xff\xf1\xff\xff\xff\xfb\0\0\0\x14\0\0\0-\0\0\0\x32\0\0\0\x37\0\0\0<) -presets\17\name=Soft Rock -presets\17\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x14\0\0\0\x14\0\0\0\n\xff\xff\xff\xfb\xff\xff\xff\xe7\xff\xff\xff\xe2\xff\xff\xff\xec\xff\xff\xff\xfb\0\0\0\xf\0\0\0-) -presets\18\name=Techno -presets\18\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0(\0\0\0\x1e\0\0\0\0\xff\xff\xff\xe2\xff\xff\xff\xe7\0\0\0\0\0\0\0(\0\0\0\x32\0\0\0\x32\0\0\0-) -presets\19\name=Zero -presets\19\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0) -presets\2\name=Club -presets\2\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x14\0\0\0\x1e\0\0\0\x1e\0\0\0\x1e\0\0\0\x14\0\0\0\0\0\0\0\0\0\0\0\0) -presets\3\name=Custom -presets\3\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0) -presets\4\name=Dance -presets\4\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x32\0\0\0#\0\0\0\n\0\0\0\0\0\0\0\0\xff\xff\xff\xe2\xff\xff\xff\xd8\xff\xff\xff\xd8\0\0\0\0\0\0\0\0) -presets\5\name=Full Bass -presets\5\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x46\0\0\0\x46\0\0\0\x46\0\0\0(\0\0\0\x14\xff\xff\xff\xd3\xff\xff\xff\xce\xff\xff\xff\xc9\xff\xff\xff\xc9\xff\xff\xff\xc9) -presets\6\name=Full Bass + Treble -presets\6\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0#\0\0\0\x1e\0\0\0\0\xff\xff\xff\xd8\xff\xff\xff\xe7\0\0\0\n\0\0\0-\0\0\0\x37\0\0\0<\0\0\0<) -presets\7\name=Full Treble -presets\7\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\xff\xff\xff\xce\xff\xff\xff\xce\xff\xff\xff\xce\xff\xff\xff\xe7\0\0\0\xf\0\0\0\x37\0\0\0P\0\0\0P\0\0\0P\0\0\0U) -presets\8\name=Laptop/Headphones -presets\8\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x19\0\0\0\x32\0\0\0\x19\xff\xff\xff\xec\0\0\0\0\xff\xff\xff\xe2\xff\xff\xff\xd8\xff\xff\xff\xd8\0\0\0\0\0\0\0\0) -presets\9\name=Large Hall -presets\9\params=@Variant(\0\0\0\x7f\0\0\0\x12\x45qualizer::Params\0\0\0\0\0\0\0\0\x32\0\0\0\x32\0\0\0\x1e\0\0\0\x1e\0\0\0\0\xff\xff\xff\xe7\xff\xff\xff\xe7\xff\xff\xff\xe7\0\0\0\0\0\0\0\0) -presets\size=19 -selected_preset=Custom -stereo_balance=0 - -[GlobalShortcuts] -dec_volume= -inc_volume= -love= -mute= -next_track=Media Next -pause= -play= -play_pause=Media Play -prev_track=Media Previous -repeat_mode= -seek_backward= -seek_forward= -show_hide= -show_osd= -shuffle_mode= -stop=Media Stop -stop_after= -toggle_pretty_osd= -toggle_scrobbling= -use_gnome=false -use_kde=true -use_mate=false -use_x11=false - -[LastFM] -enabled=false - -[LibreFM] -enabled=false - -[ListenBrainz] -enabled=false -user_token= - -[Lyrics] -providers=Genius, Lyrics.ovh, LoloLyrics, Musixmatch, songlyrics.com, azlyrics.com, elyrics.net, lyricsmode.com - -[MainWindow] -add_folder_path=/home/buliway/backups/Media/Music -current_tab=1 -do_not_show_sponsor_message=true -file_path=/home/buliway -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\xf\0\0\0\0\0\0\0\x16k\0\0\x4\a\0\0\xf\0\0\0\0\0\0\0\x16\x7f\0\0\x4\x37\0\0\0\x1\x2\0\0\0\a\x80\0\0\xf\0\0\0\0\0\0\0\x16k\0\0\x4\a) -hidden=false -maximized=true -minimized=false -search_for_cover_auto=true -show_sidebar=true -splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1>\0\0\x4W\0\xff\xff\xff\xff\x1\0\0\0\x1\0) -tab_collection=1 -tab_context=0 -tab_devices=7 -tab_files=5 -tab_mode=1 -tab_playlists=3 -tab_queue=2 -tab_radios=6 -tab_smartplaylists=4 - -[Moodbar] -enabled=false -save=false -show=false -style=0 - -[NetworkProxy] -engine=true -hostname= -mode=0 -password= -port=0 -type=3 -use_authentication=false -username= - -[OSD] -Behaviour=0 -CustomText1= -CustomText2= -CustomTextEnabled=false -ShowArt=true -ShowOnPausePlayback=false -ShowOnPlayModeChange=false -ShowOnResumePlayback=false -ShowOnVolumeChange=false -Timeout=5000 - -[OSDPretty] -background_color=4284913379 -background_opacity=0.8500000238418579 -disable_duration=false -fading=false -font="Verdana,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1" -foreground_color=4278190080 -popup_pos=@Point(1460 0) -popup_screen=DP-3 - -[Player] -playback_playlist=22 -playback_position=37 -playback_state=3 -volume=6 - -[Playlist] -alternating_row_colors=true -auto_sort=false -column_alignments=@Variant(\0\0\0\x7f\0\0\0\x13\x43olumnAlignmentMap\0\0\0\0\v\0\0\0\x6\0\0\0\x82\0\0\0\a\0\0\0\x82\0\0\0\b\0\0\0\x82\0\0\0\t\0\0\0\x82\0\0\0\n\0\0\0\x82\0\0\0\f\0\0\0\x82\0\0\0\r\0\0\0\x82\0\0\0\xe\0\0\0\x82\0\0\0\x11\0\0\0\x82\0\0\0\x15\0\0\0\x82\0\0\0\x16\0\0\0\x82) -continue_on_error=false -current_playlist=22 -delete_files=true -editmetadatainline=false -glow_effect=true -greyout_songs_play=true -greyout_songs_startup=true -last_load_playlist=/home/buliway/backups/Media/Music/Strawberry/Rofl.xspf -last_save_all_extension=xspf -last_save_all_path=/home/buliway/backups/Media/Music/Strawberry -last_save_extension=xspf -last_save_filter=XSPF playlists (*.xspf) -last_save_path=/home/buliway/backups/Media/Music/Strawberry -path_type=2 -playlist_clear=true -rating_locked=false -select_track=false -show_bars=true -show_toolbar=true -state="@ByteArray(P,\x95\xf\x1\0\0\0 \0\0\x1\xc4\0\0\0\xdc\0\0\0\0\0\0\0\xdc\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0,\0\0\0\0\0\0\0R\0\0\0\0\0\0\0\x82\0\0\0\x36\0\0\0R\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0K\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\b\0\0\0\0\0\0\0\x2\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\a\0\0\0\t\0\0\0\x1\0\0\0\n\0\0\0\v\0\0\0\f\0\0\0\r\0\0\0\xe\0\0\0\xf\0\0\0\x10\0\0\0\x11\0\0\0\x12\0\0\0\x13\0\0\0\x14\0\0\0\x15\0\0\0\x16\0\0\0\x17\0\0\0\x18\0\0\0\x19\0\0\0\x1a\0\0\0\x1b\0\0\0\x1c\0\0\0\x1d\0\0\0\x1e\0\0\0\x1f\0\0\0 ?\xd3\xb4\xaa\x33\x9eW\xe4?\xc3@\x1a\xf9\xf9<\xa4\0\0\0\0\0\0\0\0?\xc3\x41\b\xc4\x39@\x5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\x9e\xd3)\"~\x95\xa7\0\0\0\0\0\0\0\0?\xac\xbb\x86<\xb6:\xdd\0\0\0\0\0\0\0\0?\xb6\xc0\x15\x89h\xe7X?\xa2\xd8)B\xc5\xa6\x33?\xac\xdb\x2\x96\xb7[\x9f\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\xaaJ?\x87\x39\x9b<\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\xb2Y\xb7\x14\x62\xae`\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\n)" -state_version=1 -warn_close_playlist=true -write_metadata=true - -[PlaylistSequence] -repeat_mode=0 -shuffle_mode=0 - -[Qobuz] -albums_group_by1=1 -albums_group_by2=4 -albums_group_by3=0 -albums_group_by_version=1 -albums_separate_albums_by_grouping=false -artists_group_by1=1 -artists_group_by2=4 -artists_group_by3=0 -artists_group_by_version=1 -artists_separate_albums_by_grouping=false -search_group_by1=1 -search_group_by2=4 -search_group_by3=0 -search_group_by_version=1 -songs_group_by1=1 -songs_group_by2=4 -songs_group_by3=0 -songs_group_by_version=1 -songs_separate_albums_by_grouping=false -tab=artists - -[Scrobbler] -albumartist=false -enabled=false -love_button=false -offline=false -scrobble_button=false -show_error_dialog=true -sources=collection, file, cd, device, subsonic, tidal, qobuz, stream, somafm, radioparadise, unknown -submit=0 - -[SerializedSmartPlaylists] -songs\1\data=@ByteArray(\0\0\0\0\x2\x11\0\0\0\x14\x2\0) -songs\1\name=Newest tracks -songs\1\type=1 -songs\10\data=@ByteArray(\0\0\0\0\0\x3\0\0\0\x14\x2\x1) -songs\10\name=Dynamic random mix -songs\10\type=1 -songs\2\data=@ByteArray(\0\0\0\0\0\x3\0\0\0\x32\x2\0) -songs\2\name=50 random tracks -songs\2\type=1 -songs\3\data=@ByteArray(\0\0\0\x1\x13\x4\0\0\0\x2\0\0\0\0\0\0\0\0\0\x1\0\0\x3\0\0\0\x14\0\0) -songs\3\name=Ever played -songs\3\type=1 -songs\4\data=@ByteArray(\0\0\0\x1\x13\x6\0\0\0\x2\0\0\0\0\0\0\0\0\0\x1\0\0\x3\0\0\0\x14\0\0) -songs\4\name=Never played -songs\4\type=1 -songs\5\data=@ByteArray(\0\0\0\0\x2\x15\0\0\0\x14\x2\0) -songs\5\name=Last played -songs\5\type=1 -songs\6\data=@ByteArray(\0\0\0\0\x2\x13\0\0\0\x14\x2\0) -songs\6\name=Most played -songs\6\type=1 -songs\7\data=@ByteArray(\0\0\0\0\x2\x16\0\0\0\x14\x2\0) -songs\7\name=Favourite tracks -songs\7\type=1 -songs\8\data=@ByteArray(\0\0\0\x2\x16\x5\0\0\0\x6\0?\xe0\0\0\0\0\0\0\0\0\0\0\x1\0\x14\x4\0\0\0\x2\0\0\0\0\x4\0\0\0\0\x1\0\x2\x14\0\0\0\x14\x1\0) -songs\8\name=Least favourite tracks -songs\8\type=1 -songs\9\data=@ByteArray(\0\0\0\0\x1\x1\xff\xff\xff\xff\x2\0) -songs\9\name=All tracks -songs\9\type=1 -songs\size=10 -songs_version=3 - -[SettingsDialog] -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x11\"\0\0\0\x9c\0\0\x14\\\0\0\x3\x9b\0\0\x11\"\0\0\0\x9c\0\0\x14\\\0\0\x3\x9b\0\0\0\x1\x2\0\0\0\a\x80\0\0\x11\"\0\0\0\x9c\0\0\x14\\\0\0\x3\x9b) - -[Subsonic] -authmethod=1 -downloadalbumcovers=false -enabled=false -group_by1=1 -group_by2=4 -group_by3=0 -group_by_version=1 -http2=false -password= -separate_albums_by_grouping=false -serversidescrobbling=true -url=@Variant(\0\0\0\x11\xff\xff\xff\xff) -username= -verifycertificate=true - -[Tidal] -albums_group_by1=1 -albums_group_by2=4 -albums_group_by3=0 -albums_group_by_version=1 -albums_separate_albums_by_grouping=false -artists_group_by1=1 -artists_group_by2=4 -artists_group_by3=0 -artists_group_by_version=1 -artists_separate_albums_by_grouping=false -search_group_by1=1 -search_group_by2=4 -search_group_by3=0 -search_group_by_version=1 -songs_group_by1=1 -songs_group_by2=4 -songs_group_by3=0 -songs_group_by_version=1 -songs_separate_albums_by_grouping=false -tab=artists - -[Transcoder] -faac\bitrate=320000 -faac\midside=true -faac\profile=2 -faac\shortctl=0 -faac\tns=false -ffenc_wmav2\bitrate=320000 -flacenc\quality=5 -geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\xf\0\0\0\0\0\0\0\x12\xb0\0\0\x4\a\0\0\xf\0\0\0\0\0\0\0\x12\xbf\0\0\x4\x1b\0\0\0\x1\x2\0\0\0\a\x80\0\0\xf\0\0\0\0\0\0\0\x12\xb0\0\0\x4\a) -lamemp3enc\bitrate=320 -lamemp3enc\cbr=false -lamemp3enc\encoding-engine-quality=2 -lamemp3enc\mono=false -lamemp3enc\quality=10 -lamemp3enc\target=1 -opusenc\bitrate=320000 -speexenc\abr=0 -speexenc\bitrate=0 -speexenc\complexity=3 -speexenc\dtx=false -speexenc\mode=0 -speexenc\nframes=1 -speexenc\quality=10 -speexenc\vad=false -speexenc\vbr=false -vorbisenc\bitrate=-1 -vorbisenc\managed=false -vorbisenc\max-bitrate=-1 -vorbisenc\min-bitrate=-1 -vorbisenc\quality=1 diff --git a/archive/thunar.xml b/archive/thunar.xml deleted file mode 100644 index 1e17fe3..0000000 --- a/archive/thunar.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archive/yazi/init.lua b/archive/yazi/init.lua deleted file mode 100644 index cd855dd..0000000 --- a/archive/yazi/init.lua +++ /dev/null @@ -1,2 +0,0 @@ -require("starship"):setup() -require("full-border"):setup() \ No newline at end of file diff --git a/archive/yazi/keymap.toml b/archive/yazi/keymap.toml deleted file mode 100644 index 05f68fd..0000000 --- a/archive/yazi/keymap.toml +++ /dev/null @@ -1,18 +0,0 @@ -# [[manager.prepend_keymap]] -# on = [ "y" ] -# run = [ "yank", ''' -# shell --confirm 'for path in "$@"; do echo "file://$path"; done | wl-copy -t text/uri-list' -# ''' ] -# desc = "Copy to clipboard on Wayland" # https://yazi-rs.github.io/docs/tips - -[[manager.prepend_keymap]] -on = [ "y" ] -run = [ "yank", ''' - shell --confirm 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' -''' ] -desc = "Copy to clipboard on Xorg" # https://yazi-rs.github.io/docs/tips - -[[manager.prepend_keymap]] -on = ["C"] -run = "plugin ouch --args=zip" -desc = "Compress with ouch" diff --git a/archive/yazi/plugins/exifaudio.yazi/LICENSE b/archive/yazi/plugins/exifaudio.yazi/LICENSE deleted file mode 100644 index 78aae84..0000000 --- a/archive/yazi/plugins/exifaudio.yazi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Sonico98 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/archive/yazi/plugins/exifaudio.yazi/README.md b/archive/yazi/plugins/exifaudio.yazi/README.md deleted file mode 100644 index 69a1597..0000000 --- a/archive/yazi/plugins/exifaudio.yazi/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# exifaudio.yazi - -Preview audio metadata and cover on [Yazi](https://github.com/sxyazi/yazi). - -![image](https://github.com/Sonico98/exifaudio.yazi/assets/61394886/53c1492c-9f05-4c80-a4e7-94fb36f35ca9) - -## Installation - -```sh -# Linux/macOS -git clone https://github.com/Sonico98/exifaudio.yazi.git ~/.config/yazi/plugins/exifaudio.yazi - -# Windows -git clone https://github.com/Sonico98/exifaudio.yazi.git %AppData%\yazi\config\plugins\exifaudio.yazi -``` - -## Usage - -Add the following to your `yazi.toml`: - -```toml -[plugin] -prepend_previewers = [ - { mime = "audio/*", run = "exifaudio"} -] -``` - -Make sure you have [exiftool](https://exiftool.org/) installed and in your `PATH`. - -## Thanks - -Thanks to [sxyazi](https://github.com/sxyazi) for the PDF previewer code, on which this previewer is based on. diff --git a/archive/yazi/plugins/exifaudio.yazi/init.lua b/archive/yazi/plugins/exifaudio.yazi/init.lua deleted file mode 100644 index 521ff33..0000000 --- a/archive/yazi/plugins/exifaudio.yazi/init.lua +++ /dev/null @@ -1,139 +0,0 @@ -local M = {} - -function M:peek() - local cache = ya.file_cache(self) - if not cache then - return - end - - local child = Command("exiftool") - :args({ - "-q", "-q", "-S", "-Title", "-SortName", - "-TitleSort", "-TitleSortOrder", "-Artist", - "-SortArtist", "-ArtistSort", "-PerformerSortOrder", - "-Album", "-SortAlbum", "-AlbumSort", "-AlbumSortOrder", - "-AlbumArtist", "-SortAlbumArtist", "-AlbumArtistSort", - "-AlbumArtistSortOrder", "-Genre", "-TrackNumber", - "-Year", "-Duration", "-SampleRate", - "-AudioSampleRate", "-AudioBitrate", "-AvgBitrate", - "-Channels", "-AudioChannels", tostring(self.file.url), - }) - :stdout(Command.PIPED) - :stderr(Command.NULL) - :spawn() - - local limit = self.area.h - local i, metadata = 0, {} - repeat - local next, event = child:read_line() - if event == 1 then - return self:fallback_to_builtin() - elseif event ~= 0 then - break - end - - i = i + 1 - if i > self.skip then - local m_title, m_tag = prettify(next) - local ti = ui.Span(m_title):bold() - local ta = ui.Span(m_tag) - table.insert(metadata, ui.Line{ti, ta}) - table.insert(metadata, ui.Line{}) - end - until i >= self.skip + limit - - local p = ui.Paragraph(self.area, metadata):wrap(ui.Paragraph.WRAP) - ya.preview_widgets(self, { p }) - - local cover_width = self.area.w / 2 - 5 - local cover_height = (self.area.h / 4) + 3 - - local bottom_right = ui.Rect { - x = self.area.right - cover_width, - y = self.area.bottom - cover_height, - w = cover_width, - h = cover_height, - } - - if self:preload() == 1 then - ya.image_show(cache, bottom_right) - end -end - -function prettify(metadata) - local substitutions = { - Sortname = "Sort Title:", - SortName = "Sort Title:", - TitleSort = "Sort Title:", - TitleSortOrder = "Sort Title:", - ArtistSort = "Sort Artist:", - SortArtist = "Sort Artist:", - Artist = "Artist:", - ARTIST = "Artist:", - PerformerSortOrder = "Sort Artist:", - SortAlbumArtist = "Sort Album Artist:", - AlbumArtistSortOrder = "Sort Album Artist:", - AlbumArtistSort = "Sort Album Artist:", - AlbumSortOrder = "Sort Album:", - AlbumSort = "Sort Album:", - SortAlbum = "Sort Album:", - Album = "Album:", - ALBUM = "Album:", - AlbumArtist = "Album Artist:", - Genre = "Genre:", - GENRE = "Genre:", - TrackNumber = "Track Number:", - Year = "Year:", - Duration = "Duration:", - AudioBitrate = "Bitrate:", - AvgBitrate = "Average Bitrate:", - AudioSampleRate = "Sample Rate:", - SampleRate = "Sample Rate:", - AudioChannels = "Channels:" - } - - for k, v in pairs(substitutions) do - metadata = metadata:gsub(tostring(k)..":", v, 1) - end - - -- Separate the tag title from the tag data - local t={} - for str in string.gmatch(metadata , "([^"..":".."]+)") do - table.insert(t, str) - end - - -- Add back semicolon to title, rejoin tag data if it happened to contain a semicolon - return t[1]..":", table.concat(t, ":", 2) - -end - -function M:seek(units) - local h = cx.active.current.hovered - if h and h.url == self.file.url then - ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + units)), - only_if = tostring(self.file.url), - }) - end -end - -function M:preload() - local cache = ya.file_cache(self) - if not cache or fs.cha(cache) then - return 1 - end - - local output = Command("exiftool") - :args({ "-b", "-CoverArt", "-Picture", tostring(self.file.url) }) - :stdout(Command.PIPED) - :stderr(Command.PIPED) - :output() - - if not output then - return 0 - end - - return fs.write(cache, output.stdout) and 1 or 2 -end - -return M diff --git a/archive/yazi/plugins/full-border.yazi/LICENSE b/archive/yazi/plugins/full-border.yazi/LICENSE deleted file mode 100644 index fb5b1d6..0000000 --- a/archive/yazi/plugins/full-border.yazi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 yazi-rs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/archive/yazi/plugins/full-border.yazi/README.md b/archive/yazi/plugins/full-border.yazi/README.md deleted file mode 100644 index b1c9a52..0000000 --- a/archive/yazi/plugins/full-border.yazi/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# full-border.yazi - -Add a full border to Yazi to make it look fancier. - -![full-border](https://github.com/yazi-rs/plugins/assets/17523360/ef81b560-2465-4d36-abf2-5d21dcb7b987) - -## Installation - -```sh -ya pack -a yazi-rs/plugins#full-border -``` - -## Usage - -Add this to your `init.lua` to enable the plugin: - -```lua -require("full-border"):setup() -``` - -Or you can customize the border type: - -```lua -require("full-border"):setup { - -- Available values: ui.Border.PLAIN, ui.Border.ROUNDED - type = ui.Border.PLAIN, -} -``` diff --git a/archive/yazi/plugins/full-border.yazi/init.lua b/archive/yazi/plugins/full-border.yazi/init.lua deleted file mode 100644 index fcd0cbe..0000000 --- a/archive/yazi/plugins/full-border.yazi/init.lua +++ /dev/null @@ -1,40 +0,0 @@ -local function setup(_, opts) - local type = opts and opts.type or ui.Border.ROUNDED - local old_build = Tab.build - - Tab.build = function(self, ...) - local bar = function(c, x, y) - if x <= 0 or x == self._area.w - 1 then - return ui.Bar(ui.Rect.default, ui.Bar.TOP) - end - - return ui.Bar( - ui.Rect { x = x, y = math.max(0, y), w = ya.clamp(0, self._area.w - x, 1), h = math.min(1, self._area.h) }, - ui.Bar.TOP - ):symbol(c) - end - - local c = self._chunks - self._chunks = { - c[1]:padding(ui.Padding.y(1)), - c[2]:padding(ui.Padding(c[1].w > 0 and 0 or 1, c[3].w > 0 and 0 or 1, 1, 1)), - c[3]:padding(ui.Padding.y(1)), - } - - local style = THEME.manager.border_style - self._base = ya.list_merge(self._base or {}, { - ui.Border(self._area, ui.Border.ALL):type(type):style(style), - ui.Bar(self._chunks[1], ui.Bar.RIGHT):style(style), - ui.Bar(self._chunks[3], ui.Bar.LEFT):style(style), - - bar("┬", c[1].right - 1, c[1].y), - bar("┴", c[1].right - 1, c[1].bottom - 1), - bar("┬", c[2].right, c[2].y), - bar("┴", c[2].right, c[2].bottom - 1), - }) - - old_build(self, ...) - end -end - -return { setup = setup } diff --git a/archive/yazi/plugins/glow.yazi/LICENSE b/archive/yazi/plugins/glow.yazi/LICENSE deleted file mode 100644 index de882e5..0000000 --- a/archive/yazi/plugins/glow.yazi/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright © 2024 Reledia - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archive/yazi/plugins/glow.yazi/README.md b/archive/yazi/plugins/glow.yazi/README.md deleted file mode 100644 index fdfefa2..0000000 --- a/archive/yazi/plugins/glow.yazi/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# glow.yazi - -Plugin for [Yazi](https://github.com/sxyazi/yazi) to preview markdown files with [glow](https://github.com/charmbracelet/glow). To install, clone the repo inside your `~/.config/yazi/plugins/`: - -```bash -git clone https://github.com/Reledia/glow.yazi.git -``` - -then include it in your `yazi.toml` to use: - -```toml -[plugin] -prepend_previewers = [ - { name = "*.md", run = "glow" }, -] -``` - -Make sure you have [glow](https://github.com/charmbracelet/glow) installed, and can be found in `PATH`. diff --git a/archive/yazi/plugins/glow.yazi/init.lua b/archive/yazi/plugins/glow.yazi/init.lua deleted file mode 100644 index bad70d2..0000000 --- a/archive/yazi/plugins/glow.yazi/init.lua +++ /dev/null @@ -1,66 +0,0 @@ -local M = {} - -function M:peek() - local child = Command("glow") - :args({ - "--style", - "dark", - "--width", - tostring(self.area.w), - tostring(self.file.url), - }) - :stdout(Command.PIPED) - :stderr(Command.PIPED) - :spawn() - - if not child then - return self:fallback_to_builtin() - end - - local limit = self.area.h - local i, lines = 0, "" - repeat - local next, event = child:read_line() - if event == 1 then - return self:fallback_to_builtin() - elseif event ~= 0 then - break - end - - i = i + 1 - if i > self.skip then - lines = lines .. next - end - until i >= self.skip + limit - - child:start_kill() - if self.skip > 0 and i < self.skip + limit then - ya.manager_emit( - "peek", - { tostring(math.max(0, i - limit)), only_if = tostring(self.file.url), upper_bound = "" } - ) - else - lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size)) - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) }) - end -end - -function M:seek(units) - local h = cx.active.current.hovered - if h and h.url == self.file.url then - local step = math.floor(units * self.area.h / 10) - ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + step)), - only_if = tostring(self.file.url), - }) - end -end - -function M:fallback_to_builtin() - local _, bound = ya.preview_code(self) - if bound then - ya.manager_emit("peek", { tostring(bound), only_if = tostring(self.file.url), upper_bound = "" }) - end -end - -return M diff --git a/archive/yazi/plugins/miller.yazi/LICENSE b/archive/yazi/plugins/miller.yazi/LICENSE deleted file mode 100644 index de882e5..0000000 --- a/archive/yazi/plugins/miller.yazi/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright © 2024 Reledia - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archive/yazi/plugins/miller.yazi/README.md b/archive/yazi/plugins/miller.yazi/README.md deleted file mode 100644 index 172674e..0000000 --- a/archive/yazi/plugins/miller.yazi/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# miller.yazi - -[Miller](https://github.com/johnkerl/miller) now in [yazi](https://github.com/sxyazi/yazi). To install, clone the repo inside `~/.config/yazi/plugins/`: - -```toml -[plugin] -prepend_previewers = [ - { mime = "text/csv", run = "miller"}, -] -``` - -## Preview - -![preview](https://github.com/Reledia/miller.yazi/blob/main/preview.png?raw=true) - -## Color - -To change colors of keys and values, edit the `init.lua` file after the `--key-color` and `--value-color` flags. To view a list of possible colors, use `mlr --list-color-names`. Make sure to have miller installed and inside your PATH. - -## Other types of file - -To adapt this plugin to the other format supported from miller (like json): -- copy the plugin folder -- change the name of the copied folder into miller_(fmt) -- change the `--icsv` flag inside `init.lua` to `--i(fmt)` -- add the correct mime/name rule into `prepend_previewers` and the exec as `miller_(fmt)` diff --git a/archive/yazi/plugins/miller.yazi/init.lua b/archive/yazi/plugins/miller.yazi/init.lua deleted file mode 100644 index 9a4a752..0000000 --- a/archive/yazi/plugins/miller.yazi/init.lua +++ /dev/null @@ -1,59 +0,0 @@ -local M = {} - -function M:peek() - local child = Command("mlr") - :args({ - "--icsv", - "--opprint", - "-C", - "--key-color", - "darkcyan", - "--value-color", - "grey70", - "cat", - tostring(self.file.url), - }) - :stdout(Command.PIPED) - :stderr(Command.PIPED) - :spawn() - - local limit = self.area.h - local i, lines = 0, "" - repeat - local next, event = child:read_line() - if event == 1 then - ya.err(tostring(event)) - elseif event ~= 0 then - break - end - - i = i + 1 - if i > self.skip then - lines = lines .. next - end - until i >= self.skip + limit - - child:start_kill() - if self.skip > 0 and i < self.skip + limit then - ya.manager_emit( - "peek", - { tostring(math.max(0, i - limit)), only_if = tostring(self.file.url), upper_bound = "" } - ) - else - lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size)) - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) }) - end -end - -function M:seek(units) - local h = cx.active.current.hovered - if h and h.url == self.file.url then - local step = math.floor(units * self.area.h / 10) - ya.manager_emit("peek", { - tostring(math.max(0, cx.active.preview.skip + step)), - only_if = tostring(self.file.url), - }) - end -end - -return M diff --git a/archive/yazi/plugins/ouch.yazi/LICENSE b/archive/yazi/plugins/ouch.yazi/LICENSE deleted file mode 100644 index 3f9d766..0000000 --- a/archive/yazi/plugins/ouch.yazi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 ndtoan96 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/archive/yazi/plugins/ouch.yazi/README.md b/archive/yazi/plugins/ouch.yazi/README.md deleted file mode 100644 index 2b49af2..0000000 --- a/archive/yazi/plugins/ouch.yazi/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# ouch.yazi - -[ouch](https://github.com/ouch-org/ouch) plugin for [Yazi](https://github.com/sxyazi/yazi). - -![ouch.yazi](https://github.com/ndtoan96/ouch.yazi/assets/33489972/946397ec-b37b-4bf4-93f1-c676fc8e59f2) - -## Features -- Archive preview -- Compression - -## Installation - -```bash -# Linux/macOS -git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi - -# Windows -git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yazi -``` - -Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`. - -## Usage - -### Preview -For archive preview, add this to your `yazi.toml`: - -```toml -[plugin] -prepend_previewers = [ - # Archive previewer - { mime = "application/*zip", run = "ouch" }, - { mime = "application/x-tar", run = "ouch" }, - { mime = "application/x-bzip2", run = "ouch" }, - { mime = "application/x-7z-compressed", run = "ouch" }, - { mime = "application/x-rar", run = "ouch" }, - { mime = "application/x-xz", run = "ouch" }, -] -``` - -Now go to an archive on Yazi, you should see the archive's content in the preview pane. You can use `Alt-j` and `Alt-k` to roll up and down the preview. - -If you want to change the icon or the style of text, you can modify the `peek` function in `init.lua` file (all of them are stored in the `lines` variable). - -### Compression -For compession, add this to your `keymap.toml`: - -```toml -[[manager.prepend_keymap]] -on = ["C"] -run = "plugin ouch --args=zip" -desc = "Compress with ouch" -``` - -The `--args=zip` part tells the plugin that default format is `zip`. You can change that to whatever format you want. - -### Decompression -This plugin does not provide a decompression feature because it already is supported by Yazi. -To decompress with `ouch`, configure the opener in `yazi.toml`. - -```toml -[opener] -extract = [ - { run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" }, - { run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" }, -] -``` diff --git a/archive/yazi/plugins/ouch.yazi/init.lua b/archive/yazi/plugins/ouch.yazi/init.lua deleted file mode 100644 index c6f2e69..0000000 --- a/archive/yazi/plugins/ouch.yazi/init.lua +++ /dev/null @@ -1,143 +0,0 @@ -local M = {} - -function M:peek() - local child = Command("ouch") - :args({ "l", "-t", "-y", tostring(self.file.url) }) - :stdout(Command.PIPED) - :stderr(Command.PIPED) - :spawn() - local limit = self.area.h - local file_name = string.match(tostring(self.file.url), ".*[/\\](.*)") - local lines = string.format("\x1b[2m📁 %s\x1b[0m\n", file_name) - local num_lines = 1 - local num_skip = 0 - repeat - local line, event = child:read_line() - if event == 1 then - ya.err(tostring(event)) - elseif event ~= 0 then - break - end - - if line:find('Archive', 1, true) ~= 1 and line:find('[INFO]', 1, true) ~= 1 then - if num_skip >= self.skip then - lines = lines .. line - num_lines = num_lines + 1 - else - num_skip = num_skip + 1 - end - end - until num_lines >= limit - - child:start_kill() - if self.skip > 0 and num_lines < limit then - ya.manager_emit( - "peek", - { tostring(math.max(0, self.skip - (limit - num_lines))), only_if = tostring(self.file.url), upper_bound = "" } - ) - else - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) }) - end -end - -function M:seek(units) - local h = cx.active.current.hovered - if h and h.url == self.file.url then - local step = math.floor(units * self.area.h / 10) - ya.manager_emit("peek", { - math.max(0, cx.active.preview.skip + step), - only_if = tostring(self.file.url), - }) - end -end - --- Check if file exists -local function file_exists(name) - local f = io.open(name, "r") - if f ~= nil then - io.close(f) - return true - else - return false - end -end - --- Get the files that need to be compressed and infer a default archive name -local get_compression_target = ya.sync(function() - local tab = cx.active - local default_name - local paths = {} - if #tab.selected == 0 then - if tab.current.hovered then - local name = tab.current.hovered.name - default_name = name - table.insert(paths, name) - else - return - end - else - default_name = tab.current.cwd:name() - for _, url in pairs(tab.selected) do - table.insert(paths, tostring(url)) - end - -- The compression targets are aquired, now unselect them - ya.manager_emit("escape", {}) - end - return paths, default_name -end) - -local function invoke_compress_command(paths, name) - local cmd_output, err_code = Command("ouch") - :args({ "c", "-y" }) - :args(paths) - :arg(name) - :stderr(Command.PIPED) - :output() - if err_code ~= nil then - ya.notify({ - title = "Failed to run ouch command", - content = "Status: " .. err_code, - timeout = 5.0, - level = "error", - }) - elseif not cmd_output.status.success then - ya.notify({ - title = "Compression failed: status code " .. cmd_output.status.code, - content = cmd_output.stderr, - timeout = 5.0, - level = "error", - }) - end -end - -function M:entry(args) - local default_fmt = args[1] - - -- Get the files that need to be compressed and infer a default archive name - local paths, default_name = get_compression_target() - - -- Get archive name from user - local output_name, name_event = ya.input({ - title = "Create archive:", - value = default_name .. "." .. default_fmt, - position = { "top-center", y = 3, w = 40 }, - }) - if name_event ~= 1 then - return - end - - -- Get confirmation if file exists - if file_exists(output_name) then - local confirm, confirm_event = ya.input({ - title = "Overwrite " .. output_name .. "? (y/N)", - position = { "top-center", y = 3, w = 40 }, - }) - if not (confirm_event == 1 and confirm:lower() == "y") then - return - end - end - - invoke_compress_command(paths, output_name) -end - -return M diff --git a/archive/yazi/plugins/starship.yazi/LICENSE b/archive/yazi/plugins/starship.yazi/LICENSE deleted file mode 100644 index c03ce66..0000000 --- a/archive/yazi/plugins/starship.yazi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2024 Rolv Apneseth - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/archive/yazi/plugins/starship.yazi/README.md b/archive/yazi/plugins/starship.yazi/README.md deleted file mode 100644 index cc75d15..0000000 --- a/archive/yazi/plugins/starship.yazi/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# starship.yazi - -Starship prompt plugin for [Yazi](https://github.com/sxyazi/yazi) - - - -## Requirements - -- [Yazi](https://github.com/sxyazi/yazi) - latest main branch -- [starship](https://github.com/starship/starship) - -### Package manager - -```bash -ya pack -a Rolv-Apneseth/starship -``` - -### Manual - -#### Linux / MacOS - -```sh -git clone https://github.com/Rolv-Apneseth/starship.yazi.git ~/.config/yazi/plugins/starship.yazi -``` - -#### Windows - -```sh -git clone https://github.com/Rolv-Apneseth/starship.yazi.git %AppData%\yazi\config\plugins\starship.yazi -``` - -## Usage - -Add this to `~/.config/yazi/init.lua`: - -```lua -require("starship"):setup() -``` - -Make sure you have [starship](https://github.com/starship/starship) installed and in your `PATH`. - -## Extra - -If you use a `starship` theme with a background colour, it might look a bit to cramped on just the one line `Yazi` gives the header by default. To fix this, you can add this to your `init.lua`: - -
-Click to expand - -```lua -local old_build = Tab.build -Tab.build = function(self, ...) - local bar = function(c, x, y) - if x <= 0 or x == self._area.w - 1 then - return ui.Bar(ui.Rect.default, ui.Bar.TOP) - end - - return ui.Bar( - ui.Rect({ - x = x, - y = math.max(0, y), - w = ya.clamp(0, self._area.w - x, 1), - h = math.min(1, self._area.h), - }), - ui.Bar.TOP - ):symbol(c) - end - - local c = self._chunks - self._chunks = { - c[1]:padding(ui.Padding.y(1)), - c[2]:padding(ui.Padding(c[1].w > 0 and 0 or 1, c[3].w > 0 and 0 or 1, 1, 1)), - c[3]:padding(ui.Padding.y(1)), - } - - local style = THEME.manager.border_style - self._base = ya.list_merge(self._base or {}, { - -- Enable for full border - --[[ ui.Border(self._area, ui.Border.ALL):type(ui.Border.ROUNDED):style(style), ]] - ui.Bar(self._chunks[1], ui.Bar.RIGHT):style(style), - ui.Bar(self._chunks[3], ui.Bar.LEFT):style(style), - - bar("┬", c[1].right - 1, c[1].y), - bar("┴", c[1].right - 1, c[1].bottom - 1), - bar("┬", c[2].right, c[2].y), - bar("┴", c[2].right, c[1].bottom - 1), - }) - - old_build(self, ...) -end -``` - -
- -> [!NOTE] -> This works by overriding your `Tab.build` function so make sure this is the only place you're doing that in your config. For example, this would be incompatible with the [full-border plugin](https://github.com/yazi-rs/plugins/tree/main/full-border.yazi) - -## Thanks - -- [sxyazi](https://github.com/sxyazi) for providing the code for this plugin and the demo video [in this comment](https://github.com/sxyazi/yazi/issues/767#issuecomment-1977082834) diff --git a/archive/yazi/plugins/starship.yazi/init.lua b/archive/yazi/plugins/starship.yazi/init.lua deleted file mode 100644 index 87d97c0..0000000 --- a/archive/yazi/plugins/starship.yazi/init.lua +++ /dev/null @@ -1,28 +0,0 @@ -local save = ya.sync(function(st, cwd, output) - if cx.active.current.cwd == Url(cwd) then - st.output = output - ya.render() - end -end) - -return { - setup = function(st) - Header:children_remove(1, Header.LEFT) - Header:children_add(function() return ui.Line.parse(st.output or "") end, 1000, Header.LEFT) - - ps.sub("cd", function() - local cwd = cx.active.current.cwd - if st.cwd ~= cwd then - st.cwd = cwd - ya.manager_emit("plugin", { st._id, args = ya.quote(tostring(cwd), true) }) - end - end) - end, - - entry = function(_, args) - local output = Command("starship"):arg("prompt"):cwd(args[1]):env("STARSHIP_SHELL", ""):output() - if output then - save(args[1], output.stdout:gsub("^%s+", "")) - end - end, -} diff --git a/archive/yazi/yazi.nix b/archive/yazi/yazi.nix deleted file mode 100644 index f6052bf..0000000 --- a/archive/yazi/yazi.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, ... }: { - - # yazi хуже ranger для моих потребностей, стоит на тесты. Ниже один из примеров, где yazi уступает - # Если открыть картинку через yazi, то он просто передаст картинку или каталог в качестве аргумента, - # из-за чего сортировка при пролистывании картинок будет "рандомной" - # Если же открыть картинку через ranger, то в качетве аргумента он передаст список файлов, - # где они отсортированы в том порядке, в котором отображаются у меня на экране в самом ranger - - home = { - packages = with pkgs; [ - ffmpegthumbnailer # for video thumbnails - unar # for archive preview - jq # for JSON preview - poppler # for PDF preview - fd # for file searching - ripgrep # for file content searching - fzf # for quick file subtree navigation - zoxide # for historical directories navigation - xclip # for system clipboard support on x11 - #xsel # как xclip, но вроде как функционал больше - #wl-clipboard # for system clipboard support on wayland - - # for plugins - exiftool # for exifaudio.yazi - glow # for glow.yazi - ouch # for ouch.yazi - miller # for miller.yazi - starship # for starship.yazi - ]; - - file = { - ".config/yazi/yazi.toml".source = ./yazi.toml; - ".config/yazi/keymap.toml".source = ./keymap.toml; - ".config/yazi/plugins".source = ./plugins; # https://yazi-rs.github.io/docs/resources/#functional - }; - }; - - programs.yazi = { # Файловый менеджер в терминале https://yazi-rs.github.io/features - enable = true; - - enableBashIntegration = true; - enableZshIntegration = true; - # enableFishIntegration = true; - # enableNushellIntegration = true; - }; -} \ No newline at end of file diff --git a/archive/yazi/yazi.toml b/archive/yazi/yazi.toml deleted file mode 100644 index c89a599..0000000 --- a/archive/yazi/yazi.toml +++ /dev/null @@ -1,33 +0,0 @@ -# Тут будут мои настройки - -[manager] -sort_by = "natural" # Как алфавит, но не "1 < 10 < 2", а "1 < 2 < 10" -sort_dir_first = true # Чтоб директории были первыми, не смотря на сортировку -#show_hidden = true # Показывать скрытые файлы. Спорно, потому что они первые в списке, бесит. Мб проще бинд юзать - -[plugin] -prepend_previewers = [ - # Preview markdown files - { name = "*.md", run = "glow" }, - # Preview audio metadata and cover - { mime = "audio/*", run = "exifaudio"}, - # Preview csv files - { mime = "text/csv", run = "miller"}, - # Preview archives - { mime = "application/*zip", run = "ouch" }, - { mime = "application/x-tar", run = "ouch" }, - { mime = "application/x-bzip2", run = "ouch" }, - { mime = "application/x-7z-compressed", run = "ouch" }, - { mime = "application/x-rar", run = "ouch" }, - { mime = "application/x-xz", run = "ouch" }, -] - -[opener] -view = [ - { run = 'imv "$@"', desc = "View selected images", orphan = true }, -] - -[open] -prepend_rules = [ # Чтоб мои настройки были в приоритете - { mime = "image/*", use = "view" }, -] \ No newline at end of file diff --git a/flake.lock b/flake.lock index 94f42b1..45d03d4 100644 --- a/flake.lock +++ b/flake.lock @@ -87,11 +87,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1741352980, + "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", "type": "github" }, "original": { @@ -198,17 +198,14 @@ "nix-gaming": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "umu": "umu" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1733622933, - "narHash": "sha256-DspyRdaFEPy8QHAONFfqG+EprRFYBe4ro5c6+1JaPqA=", + "lastModified": 1741657497, + "narHash": "sha256-2X7d94f9QcRnBKz1jJQfumATe8w4gXjwRly150ERnek=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "b15e082eeea1afdf6bfe7aa0dbe4758097958f80", + "rev": "64a949349294543a48b3f946c9fca84332d1398b", "type": "github" }, "original": { @@ -219,30 +216,33 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", - "owner": "nixos", + "lastModified": 1741678040, + "narHash": "sha256-rmBsz7BBcDwfvDkxnKHmolKceGJrr0nyz5PQYZg0kMk=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "rev": "3ee8818da146871cd570b164fc4f438f78479a50", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-lib": { "locked": { - "lastModified": 1733096140, - "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "lastModified": 1740877520, + "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "147dee35aab2193b174e4c0868bd80ead5ce755c", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" } }, "nixpkgs-stable": { @@ -262,6 +262,22 @@ } }, "nixpkgs2": { + "locked": { + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "94def634a20494ee057c76998843c015909d6311", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1733392399, "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", @@ -281,7 +297,7 @@ "inputs": { "home-manager": "home-manager", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs2": "nixpkgs2", "stylix": "stylix" @@ -383,31 +399,6 @@ "repo": "tinted-tmux", "type": "github" } - }, - "umu": { - "inputs": { - "nixpkgs": [ - "nix-gaming", - "nixpkgs" - ] - }, - "locked": { - "dir": "packaging/nix", - "lastModified": 1733509971, - "narHash": "sha256-LZIrb7HNWyLMU+dSI4fhbo2dMzJbbKKFWwYOpJwVXKE=", - "ref": "refs/heads/main", - "rev": "562e3900eebde0fb276dd2f425c097c8b44ccb92", - "revCount": 865, - "submodules": true, - "type": "git", - "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" - }, - "original": { - "dir": "packaging/nix", - "submodules": true, - "type": "git", - "url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4a8ad9c..dc8524b 100644 --- a/flake.nix +++ b/flake.nix @@ -19,20 +19,18 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # nixvim = - nix-gaming = { # Удобно ставить некоторые игры url = "github:fufexan/nix-gaming"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, ... }@inputs: let - system = "x86_64-linux"; # Не понимаю зачем, если это в hardware.nix указывается - # pkgs = nixpkgs.legacyPackages.${system}; + system = "x86_64-linux"; config = { allowUnfree = true; + rocmSupport = true; permittedInsecurePackages = [ "python-2.7.18.8" "electron-25.9.0" diff --git a/modules/home-manager/bundle.nix b/modules/home-manager/bundle.nix index daa9ea9..18af5cc 100644 --- a/modules/home-manager/bundle.nix +++ b/modules/home-manager/bundle.nix @@ -2,7 +2,7 @@ imports = [ ./ranger/ranger.nix - ./gui/vscode.nix + # ./gui/vscode.nix ./imv/imv.nix ./mpv/mpv.nix @@ -28,21 +28,12 @@ ./wm/dunst.nix ./wm/lockscreen.nix - # Для выключения i3 комментируй все строки ниже + # Для выключения i3wm комментируй все строки ниже ./wm/i3.nix # Для выключения bspwm комментируй все строки ниже ./wm/bspwm/bspwm.nix ./wm/bspwm/polybar.nix ./wm/bspwm/sxhkd.nix - - ################## - ## WM (Wayland) ## - ################## - - # Wayland гавно лаганое, но мб на NixOS дела будут лучше - # Мб я сделаю конфиги для sway и hyprland на ags - # Каталог wm мб переименовать в X11 и создать отдельный Wayland - ]; } diff --git a/modules/home-manager/gui/vscode.nix b/modules/home-manager/gui/vscode.nix index 719359b..ffee404 100644 --- a/modules/home-manager/gui/vscode.nix +++ b/modules/home-manager/gui/vscode.nix @@ -32,12 +32,12 @@ version = "1.3.1"; sha256 = "f5da7cfe02c06fc3899e6b0b55b380280619e7085abcf5b6024f9684ba846c99"; } - { # https://marketplace.visualstudio.com/items?itemName=dlasagno.rasi - name = "rasi"; - publisher = "dlasagno"; - version = "1.0.0"; - sha256 = "b3ad1a95e8f770d01b489c6c4652111364216baa00b2670e05b5a8aa9fb0e9f9"; - } + # { # https://marketplace.visualstudio.com/items?itemName=dlasagno.rasi + # name = "rasi"; + # publisher = "dlasagno"; + # version = "1.0.0"; + # sha256 = "b3ad1a95e8f770d01b489c6c4652111364216baa00b2670e05b5a8aa9fb0e9f9"; + # } # { # https://marketplace.visualstudio.com/items?itemName=a-h.templ # name = "templ"; # publisher = "a-h"; diff --git a/modules/home-manager/mpv/README.md b/modules/home-manager/mpv/README.md index ae2fea8..4f2e369 100644 --- a/modules/home-manager/mpv/README.md +++ b/modules/home-manager/mpv/README.md @@ -74,7 +74,7 @@ sudo chmod a+rx /usr/local/bin/yt-dlp ### Включение нескольких звуковых дорожек -Я немного изменил `menus.lua` в визуальной теме `uosc`. Теперь там появилась возможность включать несколько звуковых дорожек разом. Израдка это может вызывать визуальные артефакты видеоряда в течении 1-2 секунд. Не знаю от чего это зависит. Вот как это работает: +Я немного изменил `menus.lua` в визуальной теме `uosc`. Теперь там появилась возможность включать несколько звуковых дорожек разом. Изредка это может вызывать визуальные артефакты видеоряда в течении 1-2 секунд. Не знаю от чего это зависит. Вот как это работает: - Если просто нажимать на звуковую дорожку в меню выбора аудио, то она будет переключаться. Если была активна - выключится, если была не активна - включится - Если хочется не переключать, а активировать одну конкретную звуковую дорожку, то на неё надо нажать с зажатым `Ctrl` diff --git a/modules/home-manager/mpv/mpv.nix b/modules/home-manager/mpv/mpv.nix index 67f5465..4d68201 100644 --- a/modules/home-manager/mpv/mpv.nix +++ b/modules/home-manager/mpv/mpv.nix @@ -1,12 +1,13 @@ -{ pkgs, ... }: { +{ programs.mpv.enable = true; home = { - packages = with pkgs; [ - yt-dlp # Смотреть онлайн видео через mpv - xclip # Буфер обмена на x11 для некоторых плагинов - #wl-clipboard # Буфер обмена на wayland для некоторых плагинов - ]; + # Решил нужные зависимости писать в packages.nix + # packages = with pkgs; [ + # yt-dlp # Смотреть онлайн видео через mpv + # xclip # Буфер обмена на x11 для некоторых плагинов + # #wl-clipboard # Буфер обмена на wayland для некоторых плагинов + # ]; file = { ".config/mpv/mpv.conf".source = ./mpv.conf; @@ -16,4 +17,4 @@ ".config/mpv/fonts".source = ./fonts; }; }; -} \ No newline at end of file +} diff --git a/modules/home-manager/obs/obs.nix b/modules/home-manager/obs/obs.nix index 71cd221..31e7db6 100644 --- a/modules/home-manager/obs/obs.nix +++ b/modules/home-manager/obs/obs.nix @@ -5,7 +5,6 @@ #wlrobs # Allows you to screen capture on wlroots based wayland compositors obs-vkcapture # Linux Vulkan/OpenGL game capture #obs-vaapi # VAAPI support via GStreamer. FFMPEG VAAPI implementation shows performance bottlenecks on some AMD hardware. - #obs-tuna # Выводить инфу о треке, который сейчас играет #obs-pipewire-audio-capture # Capture using PipeWire (разве этого нет в сток обс?) #obs-mute-filter # Mute audio of a source #obs-multi-rtmp # Multi-site simultaneous broadcast. Имба? Рестрим локальный? @@ -17,4 +16,4 @@ }; # home.file."config?".source = ./config?; # Мб потом добавлю конфиги obs сюда -} \ No newline at end of file +} diff --git a/modules/home-manager/symlinks.nix b/modules/home-manager/symlinks.nix index 86c40b2..6c0396e 100644 --- a/modules/home-manager/symlinks.nix +++ b/modules/home-manager/symlinks.nix @@ -1,15 +1,16 @@ # Надо удалить оригинальный файл, прежде чем делать симлинк -# Некоторые проги клали хуй на симлинки и заменяют их своими файлами -# Таких прог я ебал рот и проклинал хуесосов разработчиков +# Некоторые проги забивают на симлинки и заменяют их своими файлами (например thunar) +# Тут уж ничего не поделать, придётся руками настраивать # Если выдаёт ошибку про home-manager сервис при ребилде, -# Значит такой файл уже существует и симлинк туда кинуть нельзя +# значит такой файл уже существует и симлинк туда кинуть нельзя # Для таких файлов я сделал каталог shit # Я не уверен надо ли писать "config.lib.file.mkOutOfStoreSymlink" # Вроде это более простой симлинк, чем просто ссылка на файл +# Типо он напрямую симлинк кидает, а не через 100500 симлинков в nix/store # Но мб меня обманули -{ pkgs, config, ... }: let +{ config, ... }: let home-dir = "backups"; # Имя каталога для бекапов. Мб захочу поменять dir = "${config.home.homeDirectory}/${home-dir}"; in { @@ -20,28 +21,14 @@ in { ".password-store".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Backups/.password-store"; # Для утилиты pass ".ssh".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Backups/.ssh"; - # Games - # ".local/share/osu-wine/osu!/Replays".source = config.lib.file.mkOutOfStoreSymlink "${dir}/games/osu!/Replays"; - # ".local/share/osu-wine/osu!/Skins".source = config.lib.file.mkOutOfStoreSymlink "${dir}/games/osu!/Skins"; - # ".local/share/osu-wine/osu!/Songs".source = config.lib.file.mkOutOfStoreSymlink "${dir}/games/osu!/Songs"; - # ".local/share/osu-wine/osu!/collection.db".source = config.lib.file.mkOutOfStoreSymlink "${dir}/games/osu!/collection.db"; - # ".local/share/osu-wine/osu!/osu!.buliway.cfg".source = config.lib.file.mkOutOfStoreSymlink "${dir}/games/osu!/osu!.buliway.cfg"; - # Browsers. Мб сделать .force, чтоб удалить сток. А мб руками удалить сток перед этим ".mozilla".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Backups/Apps/.mozilla"; ".librewolf".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Backups/Apps/.librewolf"; "Downloads/Telegram Desktop".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Telegram Desktop"; - - # Не знаю на счёт obs, chatbox, planify, calibre, discord, nekobox }; xdg.configFile = { # Это для каталога .config - "qobuz-dl".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Media/Music/Qobuz/.config/qobuz-dl"; # Конфиг для бекапа Qobuz музыки - - # Ебаный qt, как я тебя ненавижу - # "Kvantum".source = ../shit/Kvantum; - # "qt5ct".source = ../shit/qt5ct - # "qt6ct".source = ../shit/qt6ct + # "chromium".source = config.lib.file.mkOutOfStoreSymlink "${dir}/Backups/Apps/chromium"; }; -} \ No newline at end of file +} diff --git a/modules/home-manager/terminal/starship.nix b/modules/home-manager/terminal/starship.nix index 8b0d78e..c82278d 100644 --- a/modules/home-manager/terminal/starship.nix +++ b/modules/home-manager/terminal/starship.nix @@ -5,10 +5,10 @@ enableBashIntegration = true; enableZshIntegration = true; # enableFishIntegration = true; - # enableNushellIntegration = true; + enableNushellIntegration = true; enableTransience = true; # Fish Shell only. Отображает пустую строку при нажатии enter? }; xdg.configFile."starship.toml".source = ./starship.toml; -} \ No newline at end of file +} diff --git a/modules/home-manager/terminal/zsh.nix b/modules/home-manager/terminal/zsh.nix index d7e69fa..4a3a552 100644 --- a/modules/home-manager/terminal/zsh.nix +++ b/modules/home-manager/terminal/zsh.nix @@ -36,12 +36,9 @@ v = "nvim"; t = "timer"; - r = "ranger"; + r = "ranger --choosedir=/tmp/choosedir && cd \"$(cat /tmp/choosedir)\""; g = "gitui"; f = "fastfetch"; - yt = "cd /mnt/backups/Media/yt-dlp"; # Конфиги для бекапа YouTube - qb = "cd /mnt/backups/Media/Music/Qobuz/qdl"; # Бекапить музыку с Qobuz - html = "python3 /mnt/backups/html-library/generate_gallery.py --path"; # Html image gallery }; history = { @@ -50,16 +47,25 @@ }; # Environment variables that will be set for zsh session. - sessionVariables = { - HISTORY_SUBSTRING_SEARCH_FUZZY = "не работает блять"; # Нечёткий поиск для стрелок вверх/вниз. - }; + # sessionVariables = { + # }; # Extra commands that should be added to .zshrc initExtra = '' source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh ''; - historySubstringSearch.enable = true; # Чтоб вверх/вниз учитывал уже написанную команду + historySubstringSearch = { + enable = true; # Чтоб вверх/вниз учитывал уже написанную команду + searchUpKey = [ + "^[[A" + "$terminfo[kcuu1]" + ]; + searchDownKey = [ + "^[[B" + "$terminfo[kcud1]" + ]; + }; oh-my-zsh = { # https://github.com/ohmyzsh/ohmyzsh enable = true; diff --git a/modules/home-manager/wm/bspwm/bspwm.nix b/modules/home-manager/wm/bspwm/bspwm.nix index 60bc461..214e5a1 100644 --- a/modules/home-manager/wm/bspwm/bspwm.nix +++ b/modules/home-manager/wm/bspwm/bspwm.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: { +{ config, lib, ... }: { # xsession.enable = true; # Хз надо ли xsession.windowManager.bspwm = { enable = true; @@ -8,7 +8,7 @@ # Ниже настройки для основного монитора. Мб вместе с --primary надо # И настройки для второго (правого) монитора extraConfigEarly = '' - xrandr --output Virtual-1 --mode 1920x1080 --rate 60 + xrandr --output Virtual-1 --mode 1920x1080 --rate 60 ''; # Эти команды выполняются в конце bspwmrc @@ -23,9 +23,7 @@ "sxhkd" "nm-applet" "ksnip" - # "nekoray" - # "obsidian" - # "planify" + "xset s off -dpms" # Отменить затухание экрана через X минут "spice-vdagent" # Для виртуалки ]; @@ -70,12 +68,10 @@ "librewolf:librewolf:Save Image" = floating; "SshAskpass" = floating; "Nm-connection-editor" = floating; - "nekoray" = floating; "Kvantum Manager" = floating; "qt5ct" = floating; "qt6ct" = floating; "ksnip" = floating1600x900; - # "ark" = floating1200x800; # Удалил, чтоб blowjob на экран не выдавало "file-roller" = floating; "floating-terminal" = floating1200x800; "pavucontrol" = floating900x600; diff --git a/modules/home-manager/wm/bspwm/polybar.nix b/modules/home-manager/wm/bspwm/polybar.nix index 5ab992a..18955c7 100644 --- a/modules/home-manager/wm/bspwm/polybar.nix +++ b/modules/home-manager/wm/bspwm/polybar.nix @@ -24,7 +24,7 @@ { pkgs, config, ... }: let rofiApps = "${config.home.homeDirectory}/.config/rofi/launcher.rasi"; rofiPower = "${config.home.homeDirectory}/.config/rofi/power.rasi"; - monitor = "$\{env:MONITOR:\}"; + # monitor = "$\{env:MONITOR:\}"; in { # Статус бар внизу services.polybar = { enable = true; @@ -34,7 +34,7 @@ in { # Статус бар внизу sleep 0 ''; - settings = { # Или переимоневать в "config"? Не понял в чём разница + settings = { # Или переимeнoвать в "config"? Не понял в чём разница "bar/bspwm" = { monitor = "\${env:MONITOR:}"; @@ -64,9 +64,8 @@ in { # Статус бар внизу font-0 = "NotoSans Nerd Font:style=Regular:size=12;3"; - # Выблядки не могут юзать все Noto Sans при указании одного шрифта - # А ещё дауны не могут отображать смайлики нормально - # Там кусок дерьма на пол экрана + # Polybar не может юзать все Noto Sans при указании одного шрифта + # А ещё оно не может отображать смайлики нормально, залупа на пол экрана font-1 = "Noto Sans:size=12;3"; font-2 = "Noto Sans CJK HK:size=12;3"; font-3 = "Noto Sans CJK JP:size=12;3"; diff --git a/modules/home-manager/wm/bspwm/sxhkd.nix b/modules/home-manager/wm/bspwm/sxhkd.nix index 331625b..6681346 100644 --- a/modules/home-manager/wm/bspwm/sxhkd.nix +++ b/modules/home-manager/wm/bspwm/sxhkd.nix @@ -111,7 +111,7 @@ in { bspc desktop -f next.!occupied # Меняет позиционирование с горизонтального на вертикальный и обратно. Мб надо -R - # (хуй, и то и то требует аргументы, а не делает toggle, и даже с аргументами нихуя не работает) + # (и то и то требует аргументы, а не делает toggle, и даже с аргументами не работает) # super + s # bspc node -F diff --git a/modules/home-manager/wm/lockscreen.nix b/modules/home-manager/wm/lockscreen.nix index f95eb0b..d824e66 100644 --- a/modules/home-manager/wm/lockscreen.nix +++ b/modules/home-manager/wm/lockscreen.nix @@ -75,6 +75,6 @@ { pkgs, ... }: { home.packages = with pkgs; [ - betterlockscreen + betterlockscreen ]; } diff --git a/modules/nixos/bundle.nix b/modules/nixos/bundle.nix index 0074ec6..5c9325d 100644 --- a/modules/nixos/bundle.nix +++ b/modules/nixos/bundle.nix @@ -1,15 +1,14 @@ { imports = [ - # ./env.nix # Мб не надо, ибо редачу через home.nix? -# ./filesystems.nix + # ./filesystems.nix ./hardware.nix -# ./hibernate.nix + # ./hibernate.nix ./locale.nix ./network.nix ./sound.nix ./stylix.nix ./virtualisation.nix - ./vr.nix + # ./vr.nix ./xserver.nix ]; } diff --git a/modules/nixos/env.nix b/modules/nixos/env.nix deleted file mode 100644 index bef770d..0000000 --- a/modules/nixos/env.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - environment.variables = { - EDITOR = "nvim"; - }; -} \ No newline at end of file diff --git a/modules/nixos/filesystems.nix b/modules/nixos/filesystems.nix index 1dbb44b..848901d 100644 --- a/modules/nixos/filesystems.nix +++ b/modules/nixos/filesystems.nix @@ -1,3 +1,6 @@ +# Тут настраивается автомаунт нужных дисков +# Замени значения на свои. Узнать uuid можно через `lsblk -f` + { fileSystems = { "/mnt/backups" = { @@ -5,5 +8,10 @@ fsType = "ext4"; options = [ "defaults" "noatime" ]; #"uid=1000" "gid=1000" "dmask=007" "fmask=117" ]; }; + "/mnt/shit" = { + device = "/dev/disk/by-uuid/234dc4ed-ade3-447f-af5a-4d254835cc66"; + fsType = "ext4"; + options = [ "defaults" "noatime" ]; #"uid=1000" "gid=1000" "dmask=007" "fmask=117" ]; + }; }; -} \ No newline at end of file +} diff --git a/modules/nixos/hardware.nix b/modules/nixos/hardware.nix index cf0560a..ad27518 100644 --- a/modules/nixos/hardware.nix +++ b/modules/nixos/hardware.nix @@ -3,22 +3,22 @@ { pkgs, ... }: { hardware = { # Параметры для 24.05 и unstable могут сильно отличаться - -# amdgpu = { -# opencl.enable = true; # # Enable OpenCL support using ROCM runtime library. + amdgpu = { + opencl.enable = true; # Enable OpenCL support using ROCM runtime library. # amdvlk = { # Гавно лаганое, лучше radv юзать (radeon vulkan) # enable = true; # Enable AMDVLK Vulkan driver. # support32Bit.enable = true; # Enable 32-bit driver support. # supportExperimental.enable = true; # Enable Experimental features support. # # settings = {}; # Runtime settings for AMDVLK to be configured /etc/amd/amdVulkanSettings.cfg. # }; -# }; + }; graphics = { # hardware.opengl переименован в hardware.graphics в unstable ветке enable = true; enable32Bit = true; # install 32-bit drivers for 32-bit applications (such as Wine). extraPackages = with pkgs; [ libva # VAAPI (Video Acceleration API) + rocmPackages.clr.icd # OpenCL ]; }; @@ -47,11 +47,22 @@ # HIP # Most software has the HIP libraries hard-coded. You can work around it on NixOS by using: - # systemd.tmpfiles.rules = [ + # systemd.tmpfiles.rules = [ # Legacy # "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" # ]; + systemd.tmpfiles.rules = let + rocmEnv = pkgs.symlinkJoin { + name = "rocm-combined"; + paths = with pkgs.rocmPackages; [ + rocblas + hipblas + clr + ]; + }; in [ + "L+ /opt/rocm - - - - ${rocmEnv}" + ]; -# boot.initrd.kernelModules = [ "amdgpu" ]; # Мб не обязательно + boot.initrd.kernelModules = [ "amdgpu" ]; # Мб не обязательно # Для AMD существует два драйвера Vulkan # Один официальный от AMD - amdvlk diff --git a/modules/nixos/hibernate.nix b/modules/nixos/hibernate.nix index 1b5c986..4a6fe8c 100644 --- a/modules/nixos/hibernate.nix +++ b/modules/nixos/hibernate.nix @@ -12,8 +12,8 @@ { boot = { - resumeDevice = "/dev/disk/by-uuid/15630f8d-edf8-4e0b-8df4-9ac20f80fc88"; - kernelParams = [ "resume_offset=18745344" ]; + resumeDevice = "/dev/disk/by-uuid/0951089a-fd89-4647-9ddb-0e3ff63d7b49"; + kernelParams = [ "resume_offset=6799360" ]; }; # Не знаю надо ли это. На виртуалке я не могу забутиться в любом случае diff --git a/modules/nixos/network.nix b/modules/nixos/network.nix index 3977ce3..c88b638 100644 --- a/modules/nixos/network.nix +++ b/modules/nixos/network.nix @@ -1,12 +1,6 @@ -{ pkgs, ... }: { # Блютуз, интернет, wifi +{ # Блютуз, интернет, wifi hardware.bluetooth = { enable = true; - # settings = { - # General = { - # Enable = "Source,Sink,Media,Socket"; - # Experimental = true; - # }; - # }; }; networking = { @@ -16,22 +10,7 @@ # wireless.enable = true; # Enables wireless support via wpa_supplicant. firewall.enable = false; - # firewall = { - # allowedTCPPorts = [ 2080 ]; # For nekoray - # allowedUDPPorts = [ 2080 ]; # Clients and peers can use the same port, see listenport - # }; - # firewall = { - # # allowedUDPPorts = [ 53 2017 2080 20170 20171 20172 46067 55084 57282 58374 ]; # For nekoray - # # allowedTCPPorts = [ 53 2017 2080 20170 20171 20172 46067 55084 57282 58374 ]; # Clients and peers can use the same port, see listenport - # allowedUDPPortRanges = [ { from = 1; to = 65535; } ]; - # allowedTCPPortRanges = [ { from = 1; to = 65535; } ]; - # }; }; services.blueman.enable = true; # Tray for bluetooth - - # services.sing-box = { # Тоже блочит инет, как и nekoray - # enable = true; - # settings = builtins.fromJSON (builtins.readFile "/home/buliway/nixos-private-dots/modules/nixos/singbox.json"); - # }; } diff --git a/modules/nixos/nix-glow-gruvbox.jpg b/modules/nixos/nix-glow-gruvbox.jpg index 67009e25134c5085f447ff1462d3dbcb8e5c3dc8..4225af2cef7db53be9e80bc359a26acd43891b8c 100644 GIT binary patch delta 47 zcmeBQEYZ1GLg@dE{|^`hyxct97#JCu7-Se^8YNmK7+WQnS|ylUC0JS|Shq^Bl?ws@ DZXpcT delta 53 zcmeBNEYZJMLgN38{|_0&Tq`ou7#Mtg8MGJ}7&w5Kp;4$+h_O|Osa1%%Rfwfkh;^$F HTe% ⚠️ **Warning**: 27.04.2025 произошли большие изменения в конфиге, которые мне очень лень описывать в ридми. Документировать изменения сложнее, чем эти самые изменения вносить. Проще по коммитам ориентироваться. Поменялось много биндов и кор плагинов. Адаптировано для работы на neovim 0.11. Тут будет лежать мой конфиг nvim. Я хочу, чтоб он был отдельно от nix конфигов, чтоб не надо было ничего ребилдить. +Первый запуск конфига может быть долгим. Не прерывай этот процесс, пока не появится меню плагин манагера + Для выбора варианта из автокомплита надо жать ctrl+y, а не enter. Это можно исправить в конфиге, но я решил оставить так, как советует разраб kickstart.nvim, потому что я часто был в ситуации, когда готовая ide даёт мне вариант, но он мне не нужен, я уже написал свой, и мне надо перейти на новую строку, я жму enter и получаю комплит, который мне не нужен, мне новая строка нужна была. -Вкладки как в vscode я решил не делать, тут есть более удобный инструмент для этого. Например два раза нажать пробел в нормал моде, откроется меню буферов, тоесть файлов, которые в данный момент открыты. Отображаются они в порядке последнего открытия. Ныне открытый файл там не отображается. Это аналог ctrl+tab в vscode. Можно легко и быстро переключаться между "вкладками". Если надо искать что-то среди файлов проекта, то можно нажать пробел sf, от слов search files. В целом пробел+s это поиск чего-то. Подсказки на экране скажут поиск чего будет происходить. Grep поиск это поиск по содержимому всех файлов проекта. +Вкладки как в vscode я решил не делать, тут есть более удобный инструмент для этого. Например два раза нажать пробел в нормал моде, откроется меню буферов, то есть файлов, которые в данный момент открыты. Отображаются они в порядке последнего открытия. Ныне открытый файл там не отображается. Это аналог ctrl+tab в vscode. Можно легко и быстро переключаться между "вкладками". Если надо искать что-то среди файлов проекта, то можно нажать пробел sf, от слов search files. В целом пробел+s это поиск чего-то. Подсказки на экране скажут поиск чего будет происходить. Grep поиск это поиск по содержимому всех файлов проекта. https://medium.com/@jogarcia/you-dont-need-tabs-in-neovim-c6ba5ee44e3e Если будут проблемы с сессиями, то можно написать `:SessionDelete`. Для выхода из проекта лучше использовать `:qa`, а не `:q`, чтоб закрыть все буферы и не ломать сессии @@ -28,6 +44,9 @@ LSP list - https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.txt ln -s ~/nixos-private-dots/nvim ~/.config/nvim ``` ### Зависимости + +Для работы этого конфига надо установить некоторые пакеты в систему. Часть из них я напишу ниже, часть находится в `packages.nix` в категории `программирование` + Это мне пришлось скачать для работы конфига на NixOS с нужными мне инструментами: - `neovim` - `git` @@ -36,38 +55,33 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim - `fd` - `xclip` на X11 или `wl-clipboard` на Wayland - `tree-sitter` +- `ueberzugpp` - Любой nerd font -- C/C++: - - `gcc` - - `gnumake` - - `rocmPackages.llvm.clang` - - `ccls` (lsp, нет в mason) -- Lua: - - `lua5_1` - - `luajit` - - `luajitPackages.luarocks` (package manager) - - `lua-language-server` (lsp, из mason не работает на NixOS) - - `stylua` (formatter, из mason не работает на NixOS) -- Rust: - - `rustup` и потом запустить `rustup default stable` + `rustup component add rust-analyzer` в терминале - - `rust-analyzer` (lsp) -- JS/TS: - - `nodejs_23` для npm (package manager) -- Python: - - `python3Full` - - `python3Packages.pip` (package manager) - - `ruff` (linter/formatter, из mason не работает на NixOS) -- Golang: - - `go` - - `golangci-lint` (linter) - - `templ` (HTML UI in Go) -- Nix: - - `nixd` (lsp, нет в mason) -- Bash: - - `shellcheck` (linter) - - `shfmt` (formatter) -Чтоб понять есть ли проблемы с конфигом, может какие-то пакеты отсутствуют, можно запустить `:healthcheck`. +Пакеты для разных языков могут часть меняться, так что ищем в `packages.nix` + +Чтоб понять есть ли проблемы с конфигом, может какие-то пакеты отсутствуют, можно запустить `:checkhealth`. + +## Изменить в будущем + +Сейчас я сделал в стоке везде табуляцию в 4 символа на таб. Не пробелы. Если захочу это исправить и сделать per language настройки, то это можно сделать по разному. Сейчас у меня lsp/formatter сами заменяют табы на пробелы при сохранении файла. + +Use `:h ftplugin` together with `:h :setlocal` +В каталоге nvim надо сделать каталог `ftplugin` и в него добавлять файлы `filetype.lua`. Например для python будет `python.lua`. И там можно писать настройки для каждого отдельного языка: +```lua +vim.bo.tabstop = 4 -- size of a hard tabstop (ts). +vim.bo.shiftwidth = 4 -- size of an indentation (sw). +vim.bo.expandtab = true -- always uses spaces instead of tab characters (et). +vim.bo.softtabstop = 4 -- number of spaces a counts for. When 0, feature is off (sts) +``` + +Если не хочется возиться с тонной файлов, то можно добавить это в init.vim (надо переписать для init.lua): +```vim +autocmd BufEnter *.py :setlocal tabstop=4 shiftwidth=4 expandtab +autocmd BufEnter *.js :setlocal tabstop=2 shiftwidth=2 expandtab +``` + +Per project можно использовать `.editorconfig` файл в корне проекта. Нвим должен работать с его настройками. ## Бинды @@ -75,69 +89,81 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim ### Мои бинды -Все бинды можно искать прям в neovim, если нажать `Space s k`, тоесть `S`earch `K`eymaps +Все бинды можно искать прям в neovim, если нажать `Space s k`, то есть `S`earch `K`eymaps Я не помню откуда эти бинды, может они есть в стоке, а может нет, но они полезные. -| Bind | Description | -| -------------- | ---------------------------------- | -| `K` | Hover documentation | -| `ctrl+o` | Go back | -| `ctrl+i` | Go forward (if you went backwards) | -| `p` | Paste from nvim register | -| `ctrl+shift+v` | Paste from system clipboard | -| `y` | Yank(copy) to nvim register | -| `space y` | Yank(copy) to system clipboard | -| `d` | Delete(copy) to nvim register | -| `space d` | Delete(copy) to system clipboard | -| `alt + up/down/j/k` | Move lines in visual mode | +| Bind | Description | +|---------------------|---------------------------------------------------------| +| `K` | Hover documentation | +| `ctrl+o` | Go back | +| `ctrl+i` | Go forward (if you went backwards) | +| `p` | Paste from nvim register | +| `ctrl+shift+v` | Paste from system clipboard | +| `y` | Yank(copy) to nvim register | +| `space y` | Yank(copy) to system clipboard | +| `d` | Delete(copy) to nvim register | +| `space d` | Delete(copy) to system clipboard | +| `alt + up/down/j/k` | Move lines in visual mode | +| `[d` | Go to previous `D`iagnostic message | +| `]d` | Go to next `D`iagnostic message | +| `space e` | Show diagnostic `E`rror message | +| `space q` | Open diagnostic `Q`uickfix | +| `ctrl+l` | Перейти к следующему плейсхолдеру сниппета в insert mod | + Бинды в таблице ниже нажимаются без пробела перед ними. Просто бинд -| Bind | Description | File | -| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -| `esc esc` | Exit terminal mode (This won't work in all terminal emulators/tmux/etc. Try your own mapping or use `` to exit terminal mode) | settings.lua | -| `esc` | Creal highlights on search when pressing Esc in normal mode | settings.lua | -| `gp` | `G`oto context (`p`arent) | treesitter.lua | -| `gd` | `G`oto `D`efinition | lsp.lua | -| `gr` | `G`oto `R`eferences | lsp.lua | -| `gI` | `G`oto `I`mplementation | lsp.lua | -| `gD` | `G`oto `D`eclaration. This is not Goto Definition, this is Goto Declaration. For example, in C this would take you to the header | lsp.lua | -| `gc` | Toggle Comment from mini-comment plugin | - | -| `\` | Toggle file tree | file-tree.lua | +| Bind | Description | File | +|-----------|----------------------------------------------------------------------------------------------------------------------------------|----------------| +| `esc esc` | Exit terminal mode (Or use `` to exit terminal mode) | settings.lua | +| `esc` | Creal highlights on search when pressing Esc in normal mode | settings.lua | +| `gp` | `G`oto context (`p`arent) | treesitter.lua | +| `gd` | `G`oto `D`efinition | lsp.lua | +| `gr` | `G`oto `R`eferences | lsp.lua | +| `gI` | `G`oto `I`mplementation | lsp.lua | +| `gD` | `G`oto `D`eclaration. This is not Goto Definition, this is Goto Declaration. For example, in C this would take you to the header | lsp.lua | +| `gc` | Toggle Comment from mini-comment plugin | - | +| `\` | Toggle file tree | file-tree.lua | Перед каждым из биндов в нижней таблице надо нажать `leader`, что есть `space`, пробел. -| Bind | Description | File | -| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -| `tt` | `T`oggle `T`erminal | terminal.lua | -| `gta` | `G`o `T`ag `A`dd. Add json tags for struct | golang.lua | -| `gtr` | `G`o `T`ag `R`emove. Remove json tags for struct | golang.lua | -| `gfs` | `G`o `F`ill `S`truct | golang.lua | -| `gfc` | `G`o `F`ill Switch `C`ase | golang.lua | -| `gie` | `G`o `I`f `E`rr | golang.lua | -| `gfp` | `G`o `F`ix `P`lurals | golang.lua | -| `D` | Type `D`efinition. Jump to the typo of the word under your cursor. Useful when you're not sure what type a variable is and you want to see the definition of its *type*, not where it was *defined*. | lsp.lua | -| `ds` | `D`ocument `S`ymbols. Fuzzy find all the symbols in your current document. Symbols are things like variables, funckions, types, etc. | lsp.lua | -| `ws` | `W`orkspace `S`ymbols. Fuzzy find all the symbols in your currend workspace. Similar to document symbols, except searches over you entire project | lsp.lua | -| `rn` | `R`e`n`ame. Rename the variable under your cursor. Most Language Servers support renaming across files, etc. | lsp.lua | -| `ca` | `C`ode `A`ction. Execute a code action, usually your cursor needs to be on top of an error or a suggestion from your LSP for this to activate | lsp.lua | -| `sh` | `S`earch `H`elp | health.lua | -| `sk` | `S`earch `K`eymaps | health.lua | -| `sf` | `S`earch `F`iles | health.lua | -| `ss` | `S`earch `S`elect Telescope | health.lua | -| `sw` | `S`earch current `W`ord | health.lua | -| `sg` | `S`earch by `G`rep | health.lua | -| `sd` | `S`earch `D`iagnostics | health.lua | -| `sr` | `S`earch `R`esume | health.lua | -| `s.` | `S`earch Recent Files ("." for repeat) | health.lua | -| `space` | Find existing buffers. Аналог перелючения между вкладками | health.lua | -| `/` | Fuzzily search in current buffer | health.lua | -| `s/` | `S`earch `/` in Open Files. Live Grep in Open Files | health.lua | -| `sn` | `S`earch `N`eovim files. Shortcut for searching your Neovim configuration files | health.lua | -| `st` | `S`earch `T`hemes | health.lua | -| `q` | Open diagnostic `Q`uicfix list | settings.lua | -| `f` | `F`ormat buffer | autoformat.lua | +| Bind | Description | File | +|---------|---------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| `tt` | `T`oggle `T`erminal | terminal.lua | +| `gta` | `G`o `T`ag `A`dd. Add json tags for struct | golang.lua | +| `gtr` | `G`o `T`ag `R`emove. Remove json tags for struct | golang.lua | +| `gs` | `G`o fill `S`truct | golang.lua | +| `gc` | `G`o fill Switch `C`ase | golang.lua | +| `gp` | `G`o fix `P`lurals (change func foo(b int, a int, r int) -> func foo(b, a, r int)) | golang.lua | +| `ge` | `G`o if `E`rr | golang.lua | +| `gi` | `G`o `I`mports | golang.lua | +| `D` | Type `D`efinition. Jump to the typo of the word under your cursor. | lsp.lua | +| | Useful when you're not sure what type a variable is and you want to see the definition of its *type*, not where it was *defined*. | | +| `ds` | `D`ocument `S`ymbols. Fuzzy find all the symbols in your current document. Symbols are things like variables, funckions, types, etc. | lsp.lua | +| `ws` | `W`orkspace `S`ymbols. Fuzzy find all the symbols in your currend workspace. Similar to document symbols, except searches over you entire project | lsp.lua | +| `rn` | `R`e`n`ame. Rename the variable under your cursor. Most Language Servers support renaming across files, etc. | lsp.lua | +| `ca` | `C`ode `A`ction. Execute a code action, usually your cursor needs to be on top of an error or a suggestion from your LSP for this to activate | lsp.lua | +| `ss` | `S`earch Document `S`ymbols | lsp.lua | +| `sS` | `S`earch `S`elect Telescope | health.lua | +| `sh` | `S`earch `H`elp | health.lua | +| `sk` | `S`earch `K`eymaps | health.lua | +| `sf` | `S`earch `F`iles | health.lua | +| `sw` | `S`earch current `W`ord | health.lua | +| `sg` | `S`earch by `G`rep | health.lua | +| `sd` | `S`earch `D`iagnostics | health.lua | +| `sr` | `S`earch `R`esume | health.lua | +| `s.` | `S`earch Recent Files ("." for repeat) | health.lua | +| `space` | Find existing buffers. Аналог перелючения между вкладками | health.lua | +| `/` | Fuzzily search in current buffer | health.lua | +| `s/` | `S`earch `/` in Open Files. Live Grep in Open Files | health.lua | +| `sn` | `S`earch `N`eovim files. Shortcut for searching your Neovim configuration files | health.lua | +| `st` | `S`earch `T`hemes | health.lua | +| `q` | Open diagnostic `Q`uicfix list | settings.lua | +| `f` | `F`ormat buffer | autoformat.lua | +| `Sd` | `S`ession `D`elete | session.lua | +| `Sc` | `S`ession `C`reate | session.lua | +| `Backspace` | Session restore | session.lua | ### Git @@ -147,19 +173,19 @@ ln -s ~/nixos-private-dots/nvim ~/.config/nvim Без пробела | Bind | Description | File | -| ---- | ----------------------------- | ------------ | +|------|-------------------------------|--------------| | `]c` | Jump to next git `C`hange | gitsigns.lua | | `[c` | Jump to previous git `C`hange | gitsigns.lua | Visual mode. С пробелом | Bind | Description | File | -| ---- | ---------------- | ------------ | +|------|------------------|--------------| | `hs` | `S`tage git hunk | gitsigns.lua | | `hr` | `R`eset git hunk | gitsigns.lua | Normal mode. С пробелом | Bind | Description | File | -| ---- | ------------------------------ | ------------ | +|------|--------------------------------|--------------| | `hs` | Git `S`tage hunk | gitsigns.lua | | `hr` | Git `R`eset hunk | gitsigns.lua | | `hS` | Git `S`tage buffer | gitsigns.lua | @@ -176,7 +202,7 @@ Normal mode. С пробелом Без пробела | Bind | Description | File | -| ---- | ------------------------------ | --------- | +|------|--------------------------------|-----------| | `F5` | Debug: Start/Continue | debug.lua | | `F1` | Debug: Step Into | debug.lua | | `F2` | Debug: Step Over | debug.lua | @@ -185,7 +211,7 @@ Normal mode. С пробелом С пробелом | Bind | Description | File | -| ---- | -------------------------- | --------- | +|------|----------------------------|-----------| | `b` | Debug: Toggle `B`reakpoint | debug.lua | | `B` | Debug: Set `B`reakpoint | debug.lua | @@ -198,7 +224,7 @@ Normal mode. С пробелом ``` Чтоб выключить форматирование у LSP, можно заглянуть в `lsp.lua` и увидеть примеры кода. Например я выключил форматирование у `sqls` везде и у `html` в файлах `templ`. Если у всех выкл, но что-то форматирует, значит форматтер установлен отдельно. -Некоторые LSP/Linter/Formatter не могут просто взять и заработать на каком-то файле. Например для работы `tailwindcss lsp` обязательным условием является `конфиг файл tailwind` в каталоге проекта, иначе ничего не будет работать. Для многих lsp важно находить `root dir`, который определяется по наличию каталога `.git` в проекте, иначе никаких подсказок в коде не будет. Разные инструменты для работы с SQL зачастую требуют делать конект к базе данных, иначе ничего работать не будет. Тоесть с удобством написать тестовый SQL код вне проекта не получится. +Некоторые LSP/Linter/Formatter не могут просто взять и заработать на каком-то файле. Например для работы `tailwindcss lsp` обязательным условием является `конфиг файл tailwind` в каталоге проекта, иначе ничего не будет работать. Для многих lsp важно находить `root dir`, который определяется по наличию каталога `.git` в проекте, иначе никаких подсказок в коде не будет. Разные инструменты для работы с SQL зачастую требуют делать конект к базе данных, иначе ничего работать не будет. То есть с удобством написать тестовый SQL код вне проекта не получится. Я постарался исправить это там, где возможно. Например мне пришлось использовать `sqls` вместо `postgres_lsp`, чтоб подсказки работали даже вне проекта. Но зачастую придётся создавать проект и настраивать его, чтоб получить полноценный опыт IDE @@ -207,6 +233,7 @@ Normal mode. С пробелом - `YAML LSP` имеет [опциональные настройки](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.txt#yamlls) - `JSON LSP` имеет [опциональные настройки](https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.txt#jsonls) - `rust-analyzer` имеет много опциональных настроек +- Чтоб `sql` работал внутри `.go` файлов, sql запросы надо писать внутри \`` так `\`. То есть внутри \` с пробелом в начале и конце, а не просто строка. - `sqlfluff` требует иметь `.sqlfluff` в директории проекта. Вот пример конфига: ```toml [sqlfluff] diff --git a/nvim/doc/kickstart.txt b/nvim/doc/kickstart.txt deleted file mode 100644 index cb87ac3..0000000 --- a/nvim/doc/kickstart.txt +++ /dev/null @@ -1,24 +0,0 @@ -================================================================================ -INTRODUCTION *kickstart.nvim* - -Kickstart.nvim is a project to help you get started on your neovim journey. - - *kickstart-is-not* -It is not: -- Complete framework for every plugin under the sun -- Place to add every plugin that could ever be useful - - *kickstart-is* -It is: -- Somewhere that has a good start for the most common "IDE" type features: - - autocompletion - - goto-definition - - find references - - fuzzy finding - - and hinting at what more can be done :) -- A place to _kickstart_ your journey. - - You should fork this project and use/modify it so that it matches your - style and preferences. If you don't want to do that, there are probably - other projects that would fit much better for you (and that's great!)! - - vim:tw=78:ts=8:ft=help:norl: diff --git a/nvim/ftplugin/javascript.lua b/nvim/ftplugin/javascript.lua new file mode 100644 index 0000000..55de27d --- /dev/null +++ b/nvim/ftplugin/javascript.lua @@ -0,0 +1,4 @@ +vim.bo.expandtab = true +vim.bo.tabstop = 2 +vim.bo.shiftwidth = 2 +vim.bo.softtabstop = 2 diff --git a/nvim/ftplugin/nix.lua b/nvim/ftplugin/nix.lua new file mode 100644 index 0000000..55de27d --- /dev/null +++ b/nvim/ftplugin/nix.lua @@ -0,0 +1,4 @@ +vim.bo.expandtab = true +vim.bo.tabstop = 2 +vim.bo.shiftwidth = 2 +vim.bo.softtabstop = 2 diff --git a/nvim/ftplugin/proto.lua b/nvim/ftplugin/proto.lua new file mode 100644 index 0000000..55de27d --- /dev/null +++ b/nvim/ftplugin/proto.lua @@ -0,0 +1,4 @@ +vim.bo.expandtab = true +vim.bo.tabstop = 2 +vim.bo.shiftwidth = 2 +vim.bo.softtabstop = 2 diff --git a/nvim/ftplugin/typescript.lua b/nvim/ftplugin/typescript.lua new file mode 100644 index 0000000..55de27d --- /dev/null +++ b/nvim/ftplugin/typescript.lua @@ -0,0 +1,4 @@ +vim.bo.expandtab = true +vim.bo.tabstop = 2 +vim.bo.shiftwidth = 2 +vim.bo.softtabstop = 2 diff --git a/nvim/ftplugin/typescriptreact.lua b/nvim/ftplugin/typescriptreact.lua new file mode 100644 index 0000000..55de27d --- /dev/null +++ b/nvim/ftplugin/typescriptreact.lua @@ -0,0 +1,4 @@ +vim.bo.expandtab = true +vim.bo.tabstop = 2 +vim.bo.shiftwidth = 2 +vim.bo.softtabstop = 2 diff --git a/nvim/init.lua b/nvim/init.lua index 93e5717..42c9b97 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,9 +1,11 @@ -- [[ Базовые настройки. Не плагины ]] require 'kickstart.settings' require 'custom.terminal' +require 'custom.sessions' -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info +-- git clone https://github.com/folke/lazy.nvim.git ~/.local/share/nvim/lazy/lazy.nvim local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not (vim.uv or vim.loop).fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' @@ -31,9 +33,6 @@ require('lazy').setup({ -- Установлены из коробки в kickstart.nvim -- --------------------------------------------- - -- Detect expandtab and shiftwidth automatically - require 'kickstart.plugins.vim-sleuth', - -- Git integration for buffers require 'kickstart.plugins.gitsigns', @@ -89,12 +88,36 @@ require('lazy').setup({ -- Feature-Rich Go Plugin for Neovim require 'custom.plugins.golang', - -- Automated session manager - require 'custom.plugins.sessions', - -- Plugins for git require 'custom.plugins.git', + -- Plugins for color highlight + require 'custom.plugins.colorizer', + + -- Symbol usage plugin + require 'custom.plugins.symbol_usage', + + -- Adding history for nvim clipboard + require 'custom.plugins.clip_history', + + -- Autoformat markdown tables + { + 'Kicamon/markdown-table-mode.nvim', + config = function() + require('markdown-table-mode').setup { + filetype = { + '*.md', + }, + options = { + insert = true, -- when typing "|" + insert_leave = true, -- when leaving insert + pad_separator_line = false, -- add space in separator line + alig_style = 'default', -- default, left, center, right + }, + } + end, + }, + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- diff --git a/nvim/kickstart.md b/nvim/kickstart.md deleted file mode 100644 index 800ca99..0000000 --- a/nvim/kickstart.md +++ /dev/null @@ -1,233 +0,0 @@ -# kickstart.nvim - -## Introduction - -A starting point for Neovim that is: - -* Small -* Single-file -* Completely Documented - -**NOT** a Neovim distribution, but instead a starting point for your configuration. - -## Installation - -### Install Neovim - -Kickstart.nvim targets *only* the latest -['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest -['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. -If you are experiencing issues, please make sure you have the latest versions. - -### Install External Dependencies - -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) -- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on platform) -- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - - if you have it set `vim.g.have_nerd_font` in `init.lua` to true -- Language Setup: - - If you want to write Typescript, you need `npm` - - If you want to write Golang, you will need `go` - - etc. - -> **NOTE** -> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes -> and quick install snippets - -### Install Kickstart - -> **NOTE** -> [Backup](#FAQ) your previous configuration (if any exists) - -Neovim's configurations are located under the following paths, depending on your OS: - -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | - -#### Recommended Step - -[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo -so that you have your own copy that you can modify, then install by cloning the -fork to your machine using one of the commands below, depending on your OS. - -> **NOTE** -> Your fork's url will be something like this: -> `https://github.com//kickstart.nvim.git` - -You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file -too - it's ignored in the kickstart repo to make maintenance easier, but it's -[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile). - -#### Clone kickstart.nvim -> **NOTE** -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below - -
Linux and Mac - -```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim -``` - -
- -
Windows - -If you're using `cmd.exe`: - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` - -If you're using `powershell.exe` - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" -``` - -
- -### Post Installation - -Start Neovim - -```sh -nvim -``` - -That's it! Lazy will install all the plugins you have. Use `:Lazy` to view -current plugin status. Hit `q` to close the window. - -Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That also includes -examples of adding popularly requested plugins. - - -### Getting Started - -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) - -### FAQ - -* What should I do if I already have a pre-existing neovim configuration? - * You should back it up and then delete all associated files. - * This includes your existing init.lua and the neovim files in `~/.local` - which can be deleted with `rm -rf ~/.local/share/nvim/` -* Can I keep my existing configuration in parallel to kickstart? - * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` - to maintain multiple configurations. For example, you can install the kickstart - configuration in `~/.config/nvim-kickstart` and create an alias: - ``` - alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' - ``` - When you run Neovim using `nvim-kickstart` alias it will use the alternative - config directory and the matching local directory - `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim - distribution that you would like to try out. -* What if I want to "uninstall" this configuration: - * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information -* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? - * The main purpose of kickstart is to serve as a teaching tool and a reference - configuration that someone can easily use to `git clone` as a basis for their own. - As you progress in learning Neovim and Lua, you might consider splitting `init.lua` - into smaller parts. A fork of kickstart that does this while maintaining the - same functionality is available here: - * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) - * Discussions on this topic can be found here: - * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) - * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) - -### Install Recipes - -Below you can find OS specific install instructions for Neovim and dependencies. - -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. - -#### Windows Installation - -
Windows with Microsoft C++ Build Tools and CMake -Installation may require installing build tools and updating the run command for `telescope-fzf-native` - -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) - -This requires: - -- Install CMake and the Microsoft C++ Build Tools on Windows - -```lua -{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -``` -
-
Windows with gcc/make using chocolatey -Alternatively, one can install gcc and make which don't require changing the config, -the easiest way is to use choco: - -1. install [chocolatey](https://chocolatey.org/install) -either follow the instructions on the page or use winget, -run in cmd as **admin**: -``` -winget install --accept-source-agreements chocolatey.chocolatey -``` - -2. install all requirements using choco, exit previous cmd and -open a new one so that choco path is set, and run in cmd as **admin**: -``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make -``` -
-
WSL (Windows Subsystem for Linux) - -``` -wsl --install -wsl -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
- -#### Linux Install -
Ubuntu Install Steps - -``` -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-
Debian Install Steps - -``` -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl - -# Now we install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz -sudo rm -rf /opt/nvim-linux64 -sudo mkdir -p /opt/nvim-linux64 -sudo chmod a+rX /opt/nvim-linux64 -sudo tar -C /opt -xzf nvim-linux64.tar.gz - -# make it available in /usr/local/bin, distro installs to /usr/bin -sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ -``` -
-
Fedora Install Steps - -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
- -
Arch Install Steps - -``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
- diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index cefc078..3023d9a 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,55 +1,56 @@ { - "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, - "auto-session": { "branch": "main", "commit": "021b64ed7d4ac68a37be3ad28d8e1cba5bec582c" }, - "catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "9180320205d250429f0f80e073326c674e2a7149" }, - "edge": { "branch": "master", "commit": "12ff979b43e3660053e14cd65101d5928e56f422" }, - "everforest": { "branch": "master", "commit": "730f9dd8ee698ad166d7abfca5dc06e90d4acf5b" }, - "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, + "blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" }, + "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, + "conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, + "edge": { "branch": "master", "commit": "04b2e25fa08b81e071ad512bdec6e5af114b01b3" }, + "everforest": { "branch": "master", "commit": "29d1f4f8b63dc91db277e977068f912939c8cae8" }, + "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, - "go.nvim": { "branch": "master", "commit": "c6d5ca26377d01c4de1f7bff1cd62c8b43baa6bc" }, - "gruvbox-material": { "branch": "master", "commit": "055aefde5fd49018f3a858bca7b529bc2e08c02b" }, + "gitsigns.nvim": { "branch": "main", "commit": "011dc6718bcebdf92a5336bb0da79189c3afe621" }, + "go.nvim": { "branch": "master", "commit": "da15ca55705c57ca10de1fbc1f0b6d6327c13e55" }, + "gruvbox-material": { "branch": "master", "commit": "146f40fd42cbef30fed69b4ef51329aeeaceb909" }, + "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" }, - "image.nvim": { "branch": "master", "commit": "b991fc7f845bc6ab40c6ec00b39750dcd5190010" }, - "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, - "kanagawa.nvim": { "branch": "master", "commit": "18ae5771b22d8f913ef541c827a8180b4cb12c8a" }, - "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, - "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, - "luvit-meta": { "branch": "main", "commit": "55709f183b0742a7e4f47688c284f81148ad4dc0" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "e91e854299429c986888711668743711acd8a14b" }, - "monokai-pro.nvim": { "branch": "master", "commit": "6c15e36834a624a32f46c6db8f9fc063995b24b6" }, - "neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, - "nightfox.nvim": { "branch": "main", "commit": "595ffb8f291fc4a9bef3201a28b7c0379a41cdee" }, - "nordic.nvim": { "branch": "main", "commit": "1ee4044077059b34eacd18d93613495a602c131f" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, - "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, - "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, - "nvim-dap": { "branch": "master", "commit": "0e673accbb512e1e191dfb4fecea89cc38c1bcdd" }, - "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, - "nvim-dap-ui": { "branch": "master", "commit": "e94d98649dccb6a3884b66aabc2e07beb279e535" }, - "nvim-lint": { "branch": "master", "commit": "1fea92f1d9908eaa5eb8bafe08b4293d7aadaa55" }, - "nvim-lspconfig": { "branch": "master", "commit": "8b15a1a597a59f4f5306fad9adfe99454feab743" }, - "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "5f78e989243f9fb0fb55e0cf54820920d86dfd30" }, - "nvim-treesitter-context": { "branch": "master", "commit": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0" }, - "nvim-web-devicons": { "branch": "master", "commit": "4adeeaa7a32d46cf3b5833341358c797304f950a" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "rose-pine": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" }, - "rustaceanvim": { "branch": "master", "commit": "6db1fe9e3f005b2e0921c7302d2c195eeb90a451" }, - "sonokai": { "branch": "master", "commit": "1d7ca954792dfddd9e73c53563d85adaeb8c8437" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, + "image.nvim": { "branch": "master", "commit": "6ffafab2e98b5bda46bf227055aa84b90add8cdc" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, + "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, + "markdown-table-mode.nvim": { "branch": "main", "commit": "fe207ea7cef615ccaf2c0f1257c58ffa0a50a9f5" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.nvim": { "branch": "main", "commit": "2d873a0eaa9f37b105c7751bb0a2e30eb448120d" }, + "monokai-pro.nvim": { "branch": "master", "commit": "872f774303f79416000e8049630052f4124d9534" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "1ef260eb4f54515fe121a2267b477efb054d108a" }, + "nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" }, + "nordic.nvim": { "branch": "main", "commit": "62acfd4eb008153180670daf81874eb47dd37739" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, + "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, + "nvim-dap": { "branch": "master", "commit": "a720d4966f758ab22e8ec28812b6df90a53e0f02" }, + "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, + "nvim-lspconfig": { "branch": "master", "commit": "8a1529e46eef5efc86c34c8d9bdd313abc2ecba0" }, + "nvim-neoclip.lua": { "branch": "main", "commit": "831a97c7697736411a05ff8b91e8798ea4c2d6fb" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "2586ea65faf45dcf1caf8d34510d50bb545c215a" }, + "nvim-treesitter-context": { "branch": "master", "commit": "129fcc94fa986692926366e940a46f00d2a4abbe" }, + "nvim-web-devicons": { "branch": "master", "commit": "d0cafff5c4347a604a07edf7bb9a91fda7eb577e" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "rose-pine": { "branch": "main", "commit": "7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3" }, + "rustaceanvim": { "branch": "master", "commit": "2b0f0b7e03751cf8ed123322f9b02d8f73fa9df7" }, + "sonokai": { "branch": "master", "commit": "9679341d4141ed81376f2bdf5e69b78dc348d212" }, + "symbol-usage.nvim": { "branch": "main", "commit": "e07c07dfe7504295a369281e95a24e1afa14b243" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, - "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" } + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/nvim/lua/custom/plugins/clip_history.lua b/nvim/lua/custom/plugins/clip_history.lua new file mode 100644 index 0000000..65eec75 --- /dev/null +++ b/nvim/lua/custom/plugins/clip_history.lua @@ -0,0 +1,14 @@ +-- Adding history for nvim clipboard + +return { + { + 'AckslD/nvim-neoclip.lua', + dependencies = { + { 'nvim-telescope/telescope.nvim' }, + }, + config = function() + require('neoclip').setup() + vim.keymap.set('n', 'sc', ':Telescope neoclip', { desc = '[S]earch [C]lip history' }) + end, + }, +} diff --git a/nvim/lua/custom/plugins/colorizer.lua b/nvim/lua/custom/plugins/colorizer.lua new file mode 100644 index 0000000..5be4349 --- /dev/null +++ b/nvim/lua/custom/plugins/colorizer.lua @@ -0,0 +1,63 @@ +-- A high-performance color highlighter + +return { + { + 'catgoose/nvim-colorizer.lua', + event = 'BufReadPre', + opts = { -- set to setup table + filetypes = { '*' }, -- Filetype options. Accepts table like `user_default_options` + buftypes = {}, -- Buftype options. Accepts table like `user_default_options` + -- Boolean | List of usercommands to enable. See User commands section. + user_commands = true, -- Enable all or some usercommands + lazy_load = false, -- Lazily schedule buffer highlighting setup function + user_default_options = { + names = true, -- "Name" codes like Blue or red. Added from `vim.api.nvim_get_color_map()` + names_opts = { -- options for mutating/filtering names. + lowercase = true, -- name:lower(), highlight `blue` and `red` + camelcase = true, -- name, highlight `Blue` and `Red` + uppercase = false, -- name:upper(), highlight `BLUE` and `RED` + strip_digits = false, -- ignore names with digits, + -- highlight `blue` and `red`, but not `blue3` and `red4` + }, + -- Expects a table of color name to #RRGGBB value pairs. # is optional + -- Example: { cool = "#107dac", ["notcool"] = "ee9240" } + -- Set to false to disable, for example when setting filetype options + names_custom = false, -- Custom names to be highlighted: table|function|false + RGB = true, -- #RGB hex codes + RGBA = true, -- #RGBA hex codes + RRGGBB = true, -- #RRGGBB hex codes + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS *features*: + -- names, RGB, RGBA, RRGGBB, RRGGBBAA, AARRGGBB, rgb_fn, hsl_fn + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Tailwind colors. boolean|'normal'|'lsp'|'both'. True sets to 'normal' + tailwind = false, -- Enable tailwind colors + tailwind_opts = { -- Options for highlighting tailwind names + update_names = false, -- When using tailwind = 'both', update tailwind names from LSP results. See tailwind section + }, + -- parsers can contain values used in `user_default_options` + sass = { enable = false, parsers = { 'css' } }, -- Enable sass colors + -- Highlighting mode. 'background'|'foreground'|'virtualtext' + mode = 'background', -- Set the display mode + -- Virtualtext character to use + virtualtext = '■', + -- Display virtualtext inline with color. boolean|'before'|'after'. True sets to 'after' + virtualtext_inline = false, + -- Virtualtext highlight mode: 'background'|'foreground' + virtualtext_mode = 'foreground', + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false, + -- hooks to invert control of colorizer + hooks = { + -- called before line parsing. Accepts boolean or function that returns boolean + -- see hooks section below + disable_line_highlight = false, + }, + }, + }, + }, +} diff --git a/nvim/lua/custom/plugins/golang.lua b/nvim/lua/custom/plugins/golang.lua index 9edbb6b..1df6504 100644 --- a/nvim/lua/custom/plugins/golang.lua +++ b/nvim/lua/custom/plugins/golang.lua @@ -9,13 +9,17 @@ return { 'nvim-treesitter/nvim-treesitter', }, config = function() - require('go').setup() + require('go').setup { + tag_options = '', -- sets options sent to gomodifytags, i.e., json=omitempty + } vim.keymap.set({ 'n' }, 'gta', ':GoAddTag', { desc = '[G]o [T]ag [A]dd' }) vim.keymap.set({ 'n' }, 'gtr', ':GoRmTag', { desc = '[G]o [T]ag [R]emove' }) - vim.keymap.set({ 'n' }, 'gfs', ':GoFillStruct', { desc = '[G]o [F]ill [S]truct' }) - vim.keymap.set({ 'n' }, 'gfc', ':GoFillSwitch', { desc = '[G]o [F]ill Switch [C]ase' }) - vim.keymap.set({ 'n' }, 'gie', ':GoIfErr', { desc = '[G]o [I]f [E]rr' }) - vim.keymap.set({ 'n' }, 'gfp', ':GoFixPlurals', { desc = '[G]o [F]ix [P]lurals' }) + vim.keymap.set({ 'n' }, 'gs', ':GoFillStruct', { desc = '[G]o fill [S]truct' }) + vim.keymap.set({ 'n' }, 'gc', ':GoFillSwitch', { desc = '[G]o fill Switch [C]ase' }) + -- Go Fix Plurals - change func foo(b int, a int, r int) -> func foo(b, a, r int) + vim.keymap.set({ 'n' }, 'gp', ':GoFixPlurals', { desc = '[G]o fix [P]lurals' }) + vim.keymap.set({ 'n' }, 'ge', ':GoIfErr', { desc = '[G]o if [E]rr' }) + vim.keymap.set({ 'n' }, 'gi', ':GoImports', { desc = '[G]o [I]mports' }) end, event = { 'CmdlineEnter' }, ft = { 'go', 'gomod' }, diff --git a/nvim/lua/custom/plugins/rust.lua b/nvim/lua/custom/plugins/rust.lua index 610dfe1..1c041d6 100644 --- a/nvim/lua/custom/plugins/rust.lua +++ b/nvim/lua/custom/plugins/rust.lua @@ -3,7 +3,7 @@ return { { 'mrcjkb/rustaceanvim', - version = '^5', -- Recommended + version = '^5', -- For nvim0.11 use '^6' lazy = false, -- This plugin is already lazy }, } diff --git a/nvim/lua/custom/plugins/sessions.lua b/nvim/lua/custom/plugins/sessions.lua deleted file mode 100644 index ba4d10d..0000000 --- a/nvim/lua/custom/plugins/sessions.lua +++ /dev/null @@ -1,16 +0,0 @@ --- A small automated session manager for Neovim - -return { - { - 'rmagatti/auto-session', - lazy = false, - - ---enables autocomplete for opts - ---@module "auto-session" - ---@type AutoSession.Config - opts = { - suppressed_dirs = { '~/', '~/Projects', '~/Downloads', '/' }, - -- log_level = 'debug', - }, - }, -} diff --git a/nvim/lua/custom/plugins/symbol_usage.lua b/nvim/lua/custom/plugins/symbol_usage.lua new file mode 100644 index 0000000..23a0e63 --- /dev/null +++ b/nvim/lua/custom/plugins/symbol_usage.lua @@ -0,0 +1,87 @@ +-- Symbol usage plugin + +local SymbolKind = vim.lsp.protocol.SymbolKind + +local function h(name) + return vim.api.nvim_get_hl(0, { name = name }) +end + +-- hl-groups can have any name +vim.api.nvim_set_hl(0, 'SymbolUsageRounding', { fg = h('CursorLine').bg, italic = true }) +vim.api.nvim_set_hl(0, 'SymbolUsageContent', { bg = h('CursorLine').bg, fg = h('Comment').fg, italic = true }) +vim.api.nvim_set_hl(0, 'SymbolUsageRef', { fg = h('Function').fg, bg = h('CursorLine').bg, italic = true }) +vim.api.nvim_set_hl(0, 'SymbolUsageDef', { fg = h('Type').fg, bg = h('CursorLine').bg, italic = true }) +vim.api.nvim_set_hl(0, 'SymbolUsageImpl', { fg = h('@keyword').fg, bg = h('CursorLine').bg, italic = true }) + +local function text_format(symbol) + local res = {} + + local round_start = { '', 'SymbolUsageRounding' } + local round_end = { '', 'SymbolUsageRounding' } + + -- Indicator that shows if there are any other symbols in the same line + local stacked_functions_content = symbol.stacked_count > 0 and ('+%s'):format(symbol.stacked_count) or '' + + if symbol.references then + local usage = symbol.references <= 1 and 'usage' or 'usages' + local num = symbol.references == 0 and 'no' or symbol.references + table.insert(res, round_start) + table.insert(res, { '󰌹 ', 'SymbolUsageRef' }) + table.insert(res, { ('%s %s'):format(num, usage), 'SymbolUsageContent' }) + table.insert(res, round_end) + end + + if symbol.definition then + if #res > 0 then + table.insert(res, { ' ', 'NonText' }) + end + table.insert(res, round_start) + table.insert(res, { '󰳽 ', 'SymbolUsageDef' }) + table.insert(res, { symbol.definition .. ' defs', 'SymbolUsageContent' }) + table.insert(res, round_end) + end + + if symbol.implementation then + if #res > 0 then + table.insert(res, { ' ', 'NonText' }) + end + table.insert(res, round_start) + table.insert(res, { '󰡱 ', 'SymbolUsageImpl' }) + table.insert(res, { symbol.implementation .. ' impls', 'SymbolUsageContent' }) + table.insert(res, round_end) + end + + if stacked_functions_content ~= '' then + if #res > 0 then + table.insert(res, { ' ', 'NonText' }) + end + table.insert(res, round_start) + table.insert(res, { ' ', 'SymbolUsageImpl' }) + table.insert(res, { stacked_functions_content, 'SymbolUsageContent' }) + table.insert(res, round_end) + end + + return res +end + +return { + { + 'Wansmer/symbol-usage.nvim', + event = 'LspAttach', -- need run before LspAttach if you use nvim 0.9. On 0.10 use 'LspAttach' + config = function() + require('symbol-usage').setup { + filetypes = {}, + log = { enabled = false, level = 'INFO', stdout = {}, log_file = {}, notify = {} }, + text_format = text_format, + kinds = { + SymbolKind.Function, + SymbolKind.Method, + SymbolKind.Class, + SymbolKind.Struct, + -- SymbolKind.Variable, + -- SymbolKind.Constant, + }, + } + end, + }, +} diff --git a/nvim/lua/custom/sessions.lua b/nvim/lua/custom/sessions.lua new file mode 100644 index 0000000..d22b5b6 --- /dev/null +++ b/nvim/lua/custom/sessions.lua @@ -0,0 +1,115 @@ +-- Add auto-sessions to mini.sessions plugin +-- Session names are generated dynamically based on the project directory and Git branch (if available) +-- Auto-save session on exit will only work if there is an active session in the project, +-- which can be set up, for example, via a custom key binding +-- When starting `nvim` with no arguments, will try to save session on exit +-- Whet starting `nvim .` (or another directory), will try to save session on exit +-- When starting `nvim some_file.txt` (or multiple files), won't do anything + +-- Generate session name per project and per git branch for mini.sessions +local function get_git_branch() + local branch = vim.fn.systemlist('git branch --show-current')[1] or '' + return (vim.v.shell_error == 0 and branch ~= '') and branch or nil +end + +local function session_name() + local cwd = vim.fn.getcwd() -- current working directory + local branch = get_git_branch() + local name = cwd + + local sha = vim.fn.sha256(name) + + if branch then + sha = sha .. '-' .. branch + end + + return sha +end + +-- Auto save session per project and per git branch on exit +local function should_save_session() + -- argc() returns the number of command line arguments + local argc = vim.fn.argc() + + -- Case 1: nvim with no arguments + if argc == 0 then + return true + end + + -- Case 2: nvim . (argument is a directory) + if argc == 1 then + local first_arg = vim.fn.argv(0) -- Get the first argument + return vim.fn.isdirectory(first_arg) == 1 + end + + return false +end + +local function session_exist() + local session_dir = vim.fn.stdpath 'data' .. '/session/' + local session_path = session_dir .. session_name() + return vim.fn.filereadable(session_path) == 1 +end + +local function save_session() + if not should_save_session() then + return -- Do not save if there were files in the arguments + end + + local name = session_name() + require('mini.sessions').write(name) + print('💾 Session Saved: ' .. name) +end + +vim.api.nvim_create_autocmd('VimLeavePre', { + desc = 'Auto save session on exit if session exists', + callback = function() + if not session_exist() then + return -- Do not autosave session if there is no session in the project + end + + save_session() + end, +}) + +-- Session restore +local function restore_session() + if not should_save_session() then + return + end + if not session_exist() then + return -- Do not restore session if there is no session in the project + end + + local name = session_name() + require('mini.sessions').read(name) + print('💾 Session Restored: ' .. name) +end + +vim.api.nvim_create_autocmd('User', { + pattern = 'VeryLazy', -- Lazy.nvim event + desc = 'Auto restore session after plugin load', + callback = function() + -- Adding a small delay for stability + vim.defer_fn(function() + restore_session() + end, 50) + end, + nested = true, +}) + +-- vim.keymap.set('n', '', function() +-- restore_session() +-- end, { desc = 'Restore session' }) + +-- Session delete +vim.keymap.set('n', 'Sd', function() + local name = session_name() + require('mini.sessions').delete(name) + print('💾 Session Deleted: ' .. name) +end, { desc = '[S]ession [D]elete' }) + +-- Session create +vim.keymap.set('n', 'Sc', function() + save_session() +end, { desc = '[S]ession [C]reate' }) diff --git a/nvim/lua/kickstart/plugins/autoformat.lua b/nvim/lua/kickstart/plugins/autoformat.lua index f0fe22b..2f0a516 100644 --- a/nvim/lua/kickstart/plugins/autoformat.lua +++ b/nvim/lua/kickstart/plugins/autoformat.lua @@ -27,22 +27,19 @@ return { -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. local disable_filetypes = { c = true, cpp = true } - local lsp_format_opt if disable_filetypes[vim.bo[bufnr].filetype] then - lsp_format_opt = 'never' + return nil else - lsp_format_opt = 'fallback' + return { + timeout_ms = 5000, + lsp_format = 'fallback', + } end - return { - timeout_ms = 5000, - lsp_format = lsp_format_opt, - } end, formatters_by_ft = { lua = { 'stylua' }, - sql = { 'sqlfluff' }, - -- sql = { 'sql_formatter' }, - -- ["*"] = { "injected" }, -- enables injected-lang formatting for all filetypes + go = { 'gofmt', 'injected' }, + -- ['*'] = { 'injected' }, -- enables injected-lang formatting for all filetypes -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, @@ -50,24 +47,7 @@ return { -- You can use 'stop_after_first' to run the first available formatter from the list -- javascript = { "prettierd", "prettier", stop_after_first = true }, }, - formatters = { - -- sql_formatter = { - -- -- prepend_args = { "-c", vim.fn.expand("~/.config/sql_formatter.json"), - -- args = function() - -- -- Создаём временный JSON-файл конфигурации - -- local config_path = vim.fn.tempname() .. ".json" - -- local config_content = vim.fn.json_encode({ - -- tabWidth = 4, - -- }) - -- local file = io.open(config_path, "w") - -- file:write(config_content) - -- file:close() - -- -- Возвращаем аргументы для форматтера с указанием конфигурационного файла - -- return { "-c", config_path } - -- end, - -- stdin = true, - -- }, - }, + formatters = {}, }, }, -} \ No newline at end of file +} diff --git a/nvim/lua/kickstart/plugins/autopairs.lua b/nvim/lua/kickstart/plugins/autopairs.lua index 5feec88..00db21b 100644 --- a/nvim/lua/kickstart/plugins/autopairs.lua +++ b/nvim/lua/kickstart/plugins/autopairs.lua @@ -4,13 +4,5 @@ return { 'windwp/nvim-autopairs', event = 'InsertEnter', - -- Optional dependency - dependencies = { 'hrsh7th/nvim-cmp' }, - config = function() - require('nvim-autopairs').setup {} - -- If you want to automatically add `(` after selecting a function or method - local cmp_autopairs = require 'nvim-autopairs.completion.cmp' - local cmp = require 'cmp' - cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) - end, + opts = {}, } diff --git a/nvim/lua/kickstart/plugins/completion.lua b/nvim/lua/kickstart/plugins/completion.lua index 5b0d3aa..819bc08 100644 --- a/nvim/lua/kickstart/plugins/completion.lua +++ b/nvim/lua/kickstart/plugins/completion.lua @@ -2,12 +2,14 @@ return { { - 'hrsh7th/nvim-cmp', - event = 'InsertEnter', + 'saghen/blink.cmp', + event = 'VimEnter', + version = '1.*', dependencies = { - -- Snippet Engine & its associated nvim-cmp source + -- Snippet Engine { 'L3MON4D3/LuaSnip', + version = '2.*', build = (function() -- Build Step is needed for regex support in snippets. -- This step is not supported in many windows environments. @@ -28,106 +30,96 @@ return { end, }, }, + opts = {}, }, - 'saadparwaiz1/cmp_luasnip', - - -- Adds other completion capabilities. - -- nvim-cmp does not ship with all sources by default. They are split - -- into multiple repos for maintenance purposes. - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', + 'folke/lazydev.nvim', }, - config = function() - -- See `:help cmp` - local cmp = require 'cmp' - local luasnip = require 'luasnip' - luasnip.config.setup {} - - cmp.setup { - preselect = cmp.PreselectMode.None, - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { completeopt = 'menu,menuone,noinsert' }, - - -- For an understanding of why these mappings were - -- chosen, you will need to read `:help ins-completion` - -- + --- @module 'blink.cmp' + --- @type blink.cmp.Config + opts = { + keymap = { -- No, but seriously. Please read `:help ins-completion`, it is really good! - mapping = cmp.mapping.preset.insert { - -- (enabled by default in nvim-cmp) - -- Select the [n]ext item - -- [''] = cmp.mapping.select_next_item(), - -- Select the [p]revious item - -- [''] = cmp.mapping.select_prev_item(), + -- + -- All presets have the following mappings: + -- /: move to right/left of your snippet expansion + -- : Open menu or open docs if already open + -- / or /: Select next/previous item + -- : Hide menu + -- : Toggle signature help + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + -- preset = 'default', - -- Accept ([y]es) the completion. - -- This will auto-import if your LSP supports it. - -- This will expand snippets if the LSP sent a snippet. - -- [''] = cmp.mapping.confirm { select = true }, + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps - -- If you prefer more traditional completion keymaps, - -- you can uncomment the following lines - -- [''] = cmp.mapping.confirm { select = true }, - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), + -- Удалил все сток бинды и добавил сам что надо + -- https://cmp.saghen.dev/configuration/keymap.html + preset = 'none', - -- Allows Up arrow to fall back without interacting with cmp - [''] = cmp.mapping(function(fallback) - cmp.close() - fallback() - end, { 'i', 'c' }), + -- Open menu or open docs if already open + [''] = { 'show', 'show_documentation', 'hide_documentation' }, + -- Hide menu + [''] = { 'hide' }, + -- Accept the completion + [''] = { 'select_and_accept' }, + [''] = { 'select_and_accept' }, - -- Allows Up arrow to fall back without interacting with cmp - [''] = cmp.mapping(function(fallback) - cmp.close() - fallback() - end, { 'i', 'c' }), + -- Select next/previous item + [''] = { 'select_next', 'fallback' }, + [''] = { 'select_prev', 'fallback' }, - -- Scroll the documentation window [b]ack / [f]orward - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), + -- Scroll the documentation window [b]ack / [f]orward + [''] = { 'scroll_documentation_up', 'fallback' }, + [''] = { 'scroll_documentation_down', 'fallback' }, - -- Manually trigger a completion from nvim-cmp. - -- Generally you don't need this, because nvim-cmp will display - -- completions whenever it has completion options available. - [''] = cmp.mapping.complete {}, + -- Think of as moving to the right of your snippet expansion. + -- So if you have a snippet that's like: + -- function $name($args) + -- $body + -- end + -- + -- will move you to the right of each of the expansion locations. + -- is similar, except moving you backwards. + [''] = { 'snippet_forward', 'fallback' }, + [''] = { 'snippet_backward', 'fallback' }, - -- Think of as moving to the right of your snippet expansion. - -- So if you have a snippet that's like: - -- function $name($args) - -- $body - -- end - -- - -- will move you to the right of each of the expansion locations. - -- is similar, except moving you backwards. - [''] = cmp.mapping(function() - if luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function() - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - end - end, { 'i', 's' }), + -- Toggle signature help + [''] = { 'show_signature', 'hide_signature', 'fallback' }, + }, - -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: - -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = 'mono', + }, + + completion = { + -- By default, you may press `` to show the documentation. + -- Optionally, set `auto_show = true` to show the documentation after a delay. + documentation = { auto_show = true, auto_show_delay_ms = 500 }, + }, + + sources = { + default = { 'lsp', 'path', 'snippets', 'lazydev' }, + providers = { + lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, }, - sources = { - { - name = 'lazydev', - -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it - group_index = 0, - }, - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - }, - } - end, + }, + + snippets = { preset = 'luasnip' }, + + -- Blink.cmp includes an optional, recommended rust fuzzy matcher, + -- which automatically downloads a prebuilt binary when enabled. + -- + -- By default, we use the Lua implementation instead, but you may enable + -- the rust implementation via `'prefer_rust_with_warning'` + -- + -- See :h blink-cmp-config-fuzzy for more information + fuzzy = { implementation = 'lua' }, + + -- Shows a signature help window while you type arguments for a function + signature = { enabled = true }, + }, }, } diff --git a/nvim/lua/kickstart/plugins/file-tree.lua b/nvim/lua/kickstart/plugins/file-tree.lua index da9df01..17c0ddb 100644 --- a/nvim/lua/kickstart/plugins/file-tree.lua +++ b/nvim/lua/kickstart/plugins/file-tree.lua @@ -1,10 +1,11 @@ -- Neo-tree is a Neovim plugin to browse the file system +-- Не умеет работать со сессиями -- https://github.com/nvim-neo-tree/neo-tree.nvim return { { 'nvim-neo-tree/neo-tree.nvim', - version = '*', + branch = 'v3.x', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended @@ -18,11 +19,14 @@ return { }, }, }, - cmd = 'Neotree', + lazy = false, -- neo-tree will lazily load itself keys = { { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, }, + ---@module "neo-tree" + ---@type neotree.Config? opts = { + close_if_last_window = true, filesystem = { window = { mappings = { diff --git a/nvim/lua/kickstart/plugins/lint.lua b/nvim/lua/kickstart/plugins/lint.lua index 7e7b595..a46d852 100644 --- a/nvim/lua/kickstart/plugins/lint.lua +++ b/nvim/lua/kickstart/plugins/lint.lua @@ -6,8 +6,8 @@ return { local lint = require 'lint' lint.linters_by_ft = { -- markdown = { 'markdownlint' }, - sql = { 'sqlfluff' }, - go = { 'golangcilint' }, + -- go = { 'golangcilint' }, + -- proto = { 'buf_lint' }, -- Крашит } -- To allow other plugins to add linters to require('lint').linters_by_ft, diff --git a/nvim/lua/kickstart/plugins/lsp.lua b/nvim/lua/kickstart/plugins/lsp.lua index 695c852..1bd3b02 100644 --- a/nvim/lua/kickstart/plugins/lsp.lua +++ b/nvim/lua/kickstart/plugins/lsp.lua @@ -27,8 +27,8 @@ return { -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, - -- Allows extra capabilities provided by nvim-cmp - 'hrsh7th/cmp-nvim-lsp', + -- Allows extra capabilities provided by blink.cmp + 'saghen/blink.cmp', }, config = function() -- Brief aside: **What is LSP?** @@ -73,43 +73,57 @@ return { vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) end - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + -- Rename the variable under your cursor. + -- Most Language Servers support renaming across files, etc. + map('grn', vim.lsp.buf.rename, '[R]e[n]ame') + + -- Execute a code action, usually your cursor needs to be on top of an error + -- or a suggestion from your LSP for this to activate. + map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) -- Find references for the word under your cursor. - map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. - map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + + -- WARN: This is not Goto Definition, this is Goto Declaration. + -- For example, in C this would take you to the header. + map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols') + -- Было ds [D]ocument [S]ymbols + -- map('ss', require('telescope.builtin').lsp_document_symbols, 'Document [S]ymbols') + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see -- the definition of its *type*, not where it was *defined*. - map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') + map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - -- Было ds [D]ocument [S]ymbols - map('S', require('telescope.builtin').lsp_document_symbols, 'Document [S]ymbols') - - -- Fuzzy find all the symbols in your current workspace. - -- Similar to document symbols, except searches over your entire project. - map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - - -- Rename the variable under your cursor. - -- Most Language Servers support renaming across files, etc. - map('rn', vim.lsp.buf.rename, '[R]e[n]ame') - - -- Execute a code action, usually your cursor needs to be on top of an error - -- or a suggestion from your LSP for this to activate. - map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) - - -- WARN: This is not Goto Definition, this is Goto Declaration. - -- For example, in C this would take you to the header. - map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) + ---@param client vim.lsp.Client + ---@param method vim.lsp.protocol.Method + ---@param bufnr? integer some lsp support methods only in specific files + ---@return boolean + local function client_supports_method(client, method, bufnr) + if vim.fn.has 'nvim-0.11' == 1 then + return client:supports_method(method, bufnr) + else + return client.supports_method(method, { bufnr = bufnr }) + end + end -- The following two autocommands are used to highlight references of the -- word under your cursor when your cursor rests there for a little while. @@ -117,7 +131,8 @@ return { -- -- When you move your cursor, the highlights will be cleared (the second autocommand). local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then + -- if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then + if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, @@ -144,7 +159,8 @@ return { -- code, if the language server you are using supports them -- -- This may be unwanted, since they displace some of your code - if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then + -- if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then + if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then map('th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints') @@ -164,10 +180,9 @@ return { -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. - -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) + -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities. + -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers. + local capabilities = require('blink.cmp').get_lsp_capabilities() -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. @@ -190,28 +205,29 @@ return { -- taplo } + -- local util = require 'lspconfig.util' local lspconfig = require 'lspconfig' -- Nix lspconfig.nixd.setup {} -- Golang - lspconfig.gopls.setup {} - lspconfig.templ.setup {} - - -- SQL - -- lspconfig.postgres_lsp.setup {} - lspconfig.sqls.setup { - on_attach = function(client, bufnr) - -- Выключить форматирование - client.server_capabilities.documentFormattingProvider = false - end, + lspconfig.gopls.setup { + completion = { + unimported = false, + }, } + lspconfig.templ.setup {} -- Frontend lspconfig.tailwindcss.setup {} - lspconfig.ts_ls.setup {} + lspconfig.ts_ls.setup { + on_attach = function(client, bufnr) -- Выключить форматирование + client.server_capabilities.documentFormattingProvider = false + end, + } lspconfig.htmx.setup {} + lspconfig.svelte.setup {} lspconfig.emmet_language_server.setup { filetypes = { 'templ', 'css', 'eruby', 'html', 'javascript', 'javascriptreact', 'less', 'sass', 'scss', 'pug', 'typescriptreact' }, } @@ -247,14 +263,9 @@ return { } -- C/C++ - -- lspconfig.ccls.setup { - -- init_options = { - -- cache = { - -- directory = ".ccls-cache"; - -- }; - -- } - -- } - lspconfig.clangd.setup {} + lspconfig.clangd.setup { + filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' }, -- Удалил "proto" + } lspconfig.cmake.setup {} -- Python @@ -266,10 +277,17 @@ return { } -- Rust - -- lspconfig.rust_analyzer.setup {} + lspconfig.rust_analyzer.setup {} -- Bash - lspconfig.bashls.setup {} + lspconfig.bashls.setup { + on_attach = function(client, bufnr) + local filename = vim.api.nvim_buf_get_name(bufnr) + if filename:match '/%.env$' or filename:match '/%.env%..+$' then + client.stop() -- отключить LSP только для .env + end + end, + } -- JSON local cap_json = vim.lsp.protocol.make_client_capabilities() @@ -282,6 +300,9 @@ return { lspconfig.taplo.setup {} lspconfig.vimls.setup {} lspconfig.yamlls.setup {} + lspconfig.protols.setup {} + lspconfig.gdscript.setup {} -- Сам LSP в двигло встроен. Для линтера gdtoolkit_4 нужен + -- lspconfig.buf_ls.setup {} -- Ensure the servers and tools above are installed -- To check the current status of installed tools and/or manually install @@ -300,6 +321,8 @@ return { require('mason-tool-installer').setup { ensure_installed = ensure_installed } require('mason-lspconfig').setup { + ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) + automatic_installation = false, handlers = { function(server_name) local server = servers[server_name] or {} diff --git a/nvim/lua/kickstart/plugins/mini.lua b/nvim/lua/kickstart/plugins/mini.lua index cf3d2cd..1cfade1 100644 --- a/nvim/lua/kickstart/plugins/mini.lua +++ b/nvim/lua/kickstart/plugins/mini.lua @@ -19,6 +19,29 @@ return { -- - sr)' - [S]urround [R]eplace [)] ['] require('mini.surround').setup() + -- Sessions + require('mini.sessions').setup { + -- Whether to read default session if Neovim opened without file arguments + autoread = false, + + -- Whether to write currently read session before quitting Neovim + autowrite = false, + + -- Whether to force possibly harmful actions (meaning depends on function) + force = { read = false, write = true, delete = true }, + + -- Hook functions for actions. Default `nil` means 'do nothing'. + hooks = { + -- Before successful action + pre = { read = nil, write = nil, delete = nil }, + -- After successful action + post = { read = nil, write = nil, delete = nil }, + }, + + -- Whether to print session path after action + verbose = { read = false, write = true, delete = true }, + } + -- Simple and easy statusline. -- You could remove this setup call if you don't like it, -- and try some other statusline plugin @@ -39,4 +62,3 @@ return { end, }, } - diff --git a/nvim/lua/kickstart/plugins/telescope.lua b/nvim/lua/kickstart/plugins/telescope.lua index c6bf852..a34e508 100644 --- a/nvim/lua/kickstart/plugins/telescope.lua +++ b/nvim/lua/kickstart/plugins/telescope.lua @@ -11,7 +11,6 @@ return { { 'nvim-telescope/telescope.nvim', event = 'VimEnter', - branch = '0.1.x', dependencies = { 'nvim-lua/plenary.nvim', { -- If encountering errors, see telescope-fzf-native README for installation instructions @@ -84,7 +83,7 @@ return { vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) - vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) + vim.keymap.set('n', 'sS', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) @@ -92,7 +91,7 @@ return { vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set('n', '', function() builtin.buffers { sort_mru = true, ignore_current_buffer = true } - end, { desc = '[ ] Find etisting buffers' }) + end, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', 'st', ':Telescope colorscheme', { desc = '[S]earch [T]hemes' }) -- Slightly advanced example of overriding default behavior and theme diff --git a/nvim/lua/kickstart/plugins/themes.lua b/nvim/lua/kickstart/plugins/themes.lua index 52de299..9a92e28 100644 --- a/nvim/lua/kickstart/plugins/themes.lua +++ b/nvim/lua/kickstart/plugins/themes.lua @@ -1,13 +1,13 @@ -- You can easily change to a different colorscheme. -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. --- Cмена тем тут сделана уёбищно --- Чтоб сменить стандартную тему, надо раскомментировать vim.cmd.colorscheme пад именем темы +-- Cмена тем тут сделана неудобно +-- Чтоб сменить стандартную тему, надо раскомментировать vim.cmd.colorscheme под именем темы -- и закомментировать это же у прошлой темы --- В lazy.nvim параметр priority определяет порядок загрузки плагинов. --- Чем выше значение priority, тем раньше загружается плагин. --- Это особенно важно для тем, поскольку они часто требуют загрузки до других плагинов, +-- В lazy.nvim параметр priority определяет порядок загрузки плагинов. +-- Чем выше значение priority, тем раньше загружается плагин. +-- Это особенно важно для тем, поскольку они часто требуют загрузки до других плагинов, -- чтобы корректно применить стили. -- https://dotfyle.com/neovim/colorscheme/top @@ -17,18 +17,17 @@ local variants = { 'default', 'atlantis', 'andromeda', 'shusia', 'maia', 'espres -- Создаем псевдонимы для каждой темы for _, variant in ipairs(variants) do - local alias = "sonokai-" .. variant - vim.api.nvim_create_user_command("Colorscheme" .. variant, function() - vim.g.sonokai_style = variant - vim.cmd("colorscheme sonokai") - end, {}) + local alias = 'sonokai-' .. variant + vim.api.nvim_create_user_command('Colorscheme' .. variant, function() + vim.g.sonokai_style = variant + vim.cmd 'colorscheme sonokai' + end, {}) - -- Регистрируем в Neovim как отдельный colorscheme - vim.api.nvim_set_hl(0, alias, {}) - vim.cmd(string.format("autocmd ColorSchemePre %s let g:sonokai_style = '%s' | colorscheme sonokai", alias, variant)) + -- Регистрируем в Neovim как отдельный colorscheme + vim.api.nvim_set_hl(0, alias, {}) + vim.cmd(string.format("autocmd ColorSchemePre %s let g:sonokai_style = '%s' | colorscheme sonokai", alias, variant)) end - return { { 'folke/tokyonight.nvim', @@ -62,7 +61,7 @@ return { name = 'catppuccin', priority = 1000, config = function() - -- 'catppuccin', 'catppuccin-latte', 'catppuccin-frappe', + -- 'catppuccin', 'catppuccin-latte', 'catppuccin-frappe', -- 'catppuccin-macchiato', 'catppuccin-mocha' -- vim.cmd.colorscheme 'catppuccin' end, @@ -71,12 +70,12 @@ return { 'rebelot/kanagawa.nvim', priority = 1000, config = function() - -- 'kanagawa-wave', 'kanagawa-dragon', 'kanagawa-lotus', + -- 'kanagawa-wave', 'kanagawa-dragon', 'kanagawa-lotus', -- vim.cmd.colorscheme 'kanagawa-dragon' end, }, { - "EdenEast/nightfox.nvim", + 'EdenEast/nightfox.nvim', priority = 1000, config = function() -- 'nightfox', 'dayfox', 'dawnfox', 'duskfox' @@ -97,20 +96,57 @@ return { -- Приходится конфиг переписывать ради выбора расцветок -- ---------------------------------------------------------- { - 'sainnhe/gruvbox-material', + 'ellisonleao/gruvbox.nvim', priority = 1000, + config = true, + -- opts = ... init = function() - -- 'hard', 'medium', 'soft' - vim.g.gruvbox_material_background = 'medium' - -- 'material', 'mix', 'original' - vim.g.gruvbox_material_foreground = 'mix' - -- 'grey', 'colored', 'highlighted' - vim.g.gruvbox_material_diagnostic_virtual_text = 'colored' - vim.g.gruvbox_material_better_performance = 1 - vim.g.gruvbox_material_diagnostic_line_highlight = 1 - vim.g.gruvbox_material_diagnostic_text_highlight = 1 - -- vim.g.gruvbox_material_enable_italic = true - vim.cmd.colorscheme 'gruvbox-material' + local colors = require('gruvbox').palette + colors.neutral_aqua = '#8bba7f' + colors.bright_red = '#f2594b' + colors.bright_green = '#a4ab43' + -- Default options: + require('gruvbox').setup { + terminal_colors = true, -- add neovim terminal colors + undercurl = true, -- underline errors + underline = true, -- underline links + bold = false, -- bold keywords + italic = { + strings = true, + emphasis = true, -- курсив выделения + comments = true, + operators = false, + folds = true, -- курсив для сворачиваемых блоков кода + }, + strikethrough = true, -- зачёркиваниe удалённых или устаревших элементов + invert_selection = false, + invert_signs = false, + invert_tabline = false, + invert_intend_guides = false, + inverse = true, -- invert background for search, diffs, statuslines and errors + contrast = '', -- can be "hard", "soft" or empty string + palette_overrides = {}, + overrides = { + LspReferenceText = { -- ссылки на элементы под курсором + bg = '#504945', + }, + LspReferenceWrite = { + bg = '#504945', + }, + LspReferenceRead = { + bg = '#504945', + }, + String = { + fg = colors.neutral_aqua, + }, + ['@keyword.import.go'] = { + fg = colors.bright_red, + }, + }, + dim_inactive = false, + transparent_mode = false, + } + vim.cmd.colorscheme 'gruvbox' end, }, { @@ -147,4 +183,4 @@ return { -- vim.cmd.colorscheme 'edge' end, }, -} \ No newline at end of file +} diff --git a/nvim/lua/kickstart/plugins/todo-comments.lua b/nvim/lua/kickstart/plugins/todo-comments.lua index 3b65db0..9363ead 100644 --- a/nvim/lua/kickstart/plugins/todo-comments.lua +++ b/nvim/lua/kickstart/plugins/todo-comments.lua @@ -1,11 +1,22 @@ -- Highlight todo, notes, etc in comments +-- NOTE: adding a note +-- PERF: fully optimised +-- TODO: What else? +-- TEST: +-- HACK: hmmm, this looks a bit funky +-- WARNING: ???? +-- WARN: +-- FIXME: +-- FIX: this needs fixing +-- BUG: test return { { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, - opts = { signs = false }, + opts = { + -- signs = false + }, }, } - diff --git a/nvim/lua/kickstart/plugins/treesitter.lua b/nvim/lua/kickstart/plugins/treesitter.lua index ef3464d..0c80789 100644 --- a/nvim/lua/kickstart/plugins/treesitter.lua +++ b/nvim/lua/kickstart/plugins/treesitter.lua @@ -3,6 +3,34 @@ return { { 'nvim-treesitter/nvim-treesitter', + dependencies = { + { + 'nvim-treesitter/nvim-treesitter-context', + config = function() + require('treesitter-context').setup { + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + multiwindow = false, -- Enable multiwindow support. + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + line_numbers = true, + multiline_threshold = 3, -- Maximum number of lines to show for a single context + trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' + -- Separator between context and content. Should be a single character string, like '-'. + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + separator = nil, + zindex = 20, -- The Z-index of the context window + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching + } + vim.keymap.set('n', 'gp', function() + require('treesitter-context').go_to_context(vim.v.count1) + end, { silent = true, desc = '[G]oto context ([P]arent)' }) + end, + }, + -- { + -- 'nvim-treesitter/nvim-treesitter-textobjects', + -- }, + }, build = ':TSUpdate', main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` @@ -34,6 +62,7 @@ return { 'toml', 'yaml', 'cmake', + 'printf', }, -- Autoinstall languages that are not installed auto_install = true, @@ -53,28 +82,4 @@ return { -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, - { - 'nvim-treesitter/nvim-treesitter-context', - dependencies = { 'nvim-treesitter/nvim-treesitter' }, - config = function() - require('treesitter-context').setup { - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - multiwindow = false, -- Enable multiwindow support. - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - line_numbers = true, - multiline_threshold = 3, -- Maximum number of lines to show for a single context - trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - zindex = 20, -- The Z-index of the context window - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching - } - vim.keymap.set('n', 'gp', function() - require('treesitter-context').go_to_context(vim.v.count1) - end, { silent = true, desc = '[G]oto context ([P]arent)' }) - end, - }, } diff --git a/nvim/lua/kickstart/plugins/vim-sleuth.lua b/nvim/lua/kickstart/plugins/vim-sleuth.lua deleted file mode 100644 index a9c0705..0000000 --- a/nvim/lua/kickstart/plugins/vim-sleuth.lua +++ /dev/null @@ -1,4 +0,0 @@ --- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -return { - 'tpope/vim-sleuth', -- Detect expandtab and shiftwidth automatically -} \ No newline at end of file diff --git a/nvim/lua/kickstart/plugins/which-key.lua b/nvim/lua/kickstart/plugins/which-key.lua index 8fd2e8e..231d49a 100644 --- a/nvim/lua/kickstart/plugins/which-key.lua +++ b/nvim/lua/kickstart/plugins/which-key.lua @@ -59,11 +59,12 @@ return { -- Document existing key chains spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + -- { 'c', group = '[C]ode', mode = { 'n', 'x' } }, -- { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, + -- { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, + { 'S', group = '[S]ession' }, + -- { 'w', group = '[W]orkspace' }, { 't', group = '[T]oggle' }, { 'g', group = '[G]olang' }, { 'gt', group = '[G]olang [T]ag' }, diff --git a/nvim/lua/kickstart/settings.lua b/nvim/lua/kickstart/settings.lua index 11190af..4ff92ff 100644 --- a/nvim/lua/kickstart/settings.lua +++ b/nvim/lua/kickstart/settings.lua @@ -19,6 +19,46 @@ vim.opt.relativenumber = true -- Табуляция в 4 символа vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 +-- Юзать пробелы вместо табов +vim.opt.expandtab = true + +-- yaml lsp за меня решают сколько пробелов мне надо. Это фикс +-- Их параметры конфига для переназначения не работают. Пришлось костыль сделать +vim.cmd [[ + autocmd FileType yaml setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab +]] +vim.cmd [[ + autocmd FileType nix setlocal shiftwidth=2 tabstop=2 softtabstop=2 expandtab +]] + +-- Комментировать .proto код биндом +vim.api.nvim_create_autocmd('FileType', { + pattern = 'proto', + callback = function() + vim.bo.commentstring = '// %s' + end, +}) +-- Комментировать .sql код биндом +vim.api.nvim_create_autocmd('FileType', { + pattern = 'sql', + callback = function() + vim.bo.commentstring = '-- %s' + end, +}) + +-- Fix .sqlfluff highlight +vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = '*.sqlfluff', + command = 'set filetype=toml', +}) + +-- Disable netrw for file tree +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +-- optionally enable 24-bit colour +-- vim.opt.termguicolors = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -26,6 +66,9 @@ vim.opt.mouse = 'a' -- Don't show the mode, since it's already in the status line vim.opt.showmode = false +-- greatest remap ever +vim.keymap.set('x', 'p', '"_dP', { desc = '[P]aste' }) + -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. @@ -38,8 +81,8 @@ vim.opt.showmode = false vim.keymap.set('n', 'y', '"+y', { desc = '[Y]ank to system clipboard' }) vim.keymap.set('v', 'y', '"+y', { desc = '[Y]ank to system clipboard' }) -- vim.keymap.set('n', 'Y', '"+Y', { desc = '[Y]ank to system clipboard' }) -vim.keymap.set('n', 'd', '"_d', { desc = '[D]elete to system clipboard' }) -vim.keymap.set('v', 'd', '"_d', { desc = '[D]elete to system clipboard' }) +vim.keymap.set('n', 'd', '"+d', { desc = '[D]elete to system clipboard' }) +vim.keymap.set('v', 'd', '"+d', { desc = '[D]elete to system clipboard' }) -- Change `K` hover documentation size vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { @@ -102,6 +145,11 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 +-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), +-- instead raise a dialog asking if you wish to save the current file(s) +-- See `:help 'confirm'` +-- vim.opt.confirm = true + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -140,6 +188,12 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes +-- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) +-- vim.keymap.set("n", "", "L", { desc = "Move window to the right" }) +-- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) +-- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` diff --git a/nvim/shit.md b/nvim/shit.md deleted file mode 100644 index 7bcc33d..0000000 --- a/nvim/shit.md +++ /dev/null @@ -1,61 +0,0 @@ -Тут будут куски текста из разных источников. Я не хочу засирать ими свои заметки, кину сюда - -## На будущее - -Fix C/C++ - https://www.reddit.com/r/NixOS/comments/1d7zvgu/nvim_cant_find_standard_library_headers/ -Запишу некоторые комменты из этого поста на реддите - ---- - - -Haven't seen it mentioned, so here is an alternative option. - -I use nix-ld which basically makes the listed libraries available in their expected locations. - -The simple config below fixed Mason for me. it also works with Doom Emacs so it's a more general solution. You can add more packages to the list and any libs will be made available for all external apps. - -```nix -nix-ld = { - enable = true; - libraries = with pkgs; [ - stdenv.cc.cc - ]; -}; -``` - -Since then, I have also been able to get X-Plane running natively by adding missing libraries to the list. It can be a bit tedious figuring out which libraries are missing and what packages need to be added, but it only needs to be done once. To figure out what libraries an app needs and which packages they belong to, do the following: - - run nix-index (takes about 5 minutes) which you only need to do the first time to create a file database of nixpkgs. - - Find the libraries an executable needs and whether they are found or missing. ldd ./your_executable_file - - Use nix-locate to find packages that contain that library. For example: nix-locate -w ./libX11.so.6 --top-level It may show several packages.. pick the one that looks most appropriate. In this case it was xorg.libX11 - - Add that package to the nix-ld libraries list. - - Once all libraries are added, rebuild your system. - - You may need to reboot or log out and back in again before ldd will find the libraries. - -The nice thing about nix-ld, is once you have a nice collection of common libraries setup, many apps will just work like on other distros. - ---- - -Hello, sorry for the late response. I've been using that nix-ld setup for Rust, Lua, and Bash, LSPs for a while. Funnily enough it was thanks to one of your previous comments that I first tried it. - -For any of the mentioned languages I didn't have to put anything into nix-ld, even the clangd LSPs in Mason installed correctly, literally the only issue is that NVim doesn't see the standard library headers. I've tried putting every package in there: clang, clang-tools, clangStdenv, libclang, and ccls. - -I'm gonna be completely honest, I'm not sure I understand the instructions, especially the ldd part, I'm not sure what executable I should point to with that command. - -Are there any libraries that you'd recommend I'd put in nix-ld? Like a base line? - -Also as a further question. I'm not using NixOS to manage my NVim config whatsoever, meaning I just put my the nvim config into the ~/.config directory, could that be the issue, or is that ok as a practice? - ---- - -Yeah, I'm a bit of a nix-ld fanboy as it saved NixOS for me when I was feeling like giving up. - -I gotta admit, I'm not a developer, so I'm not an expert on dev tools. Maybe try creating a dev shell with nix (or a flake)? You can specify exactly what libraries you need and they should be available when you instantiate the shell. - -This post on github may give you some ideas: https://github.com/NixOS/nixpkgs/issues/92739#issuecomment-861248463. It's a bit old, but it may be worth trying. Try running nvim inside of the dev shell.. maybe the standard libraries will be available then? - diff --git a/shit/README.md b/shit/README.md index 0d060a9..caed1fc 100644 --- a/shit/README.md +++ b/shit/README.md @@ -1,9 +1,9 @@ Тут будут файлы, которые через nix нельзя сделать нормально. Например некоторые симлинки перезаписываются почти пустыми файлами, если делать их через nix. Так как nix не имеет возможности один раз именно создать файл, а не симлинк, мне приходится делать этот скрипт -Ебучий конфиг для thunar всегда будет класть хуй на мои настройки. Всегда эта блядь будет удалять мои настройки и заменять пустыми, чтоб я восстанавливал всё через gui +Конфиг для thunar всегда будет забивать на мои настройки. Всегда будет удалять мои настройки и заменять пустыми, чтоб я восстанавливал всё через gui Конфиг для `strawberry` может меняться. Так что прям фул бекапить его мб смысла мало. Надо будет потом симлинк сделать себе в бекапы на ссд (`strawberry` игнорит все мои конфиги, надо через гуи настраивать) ## Применение скрипта -Когда система готова и все симлинки отправлены куда надо, этот скрипт именно скопирует нужные файлы в нужные каталоги. В теории, тогда программы не будут перезаписывать, а будут дополнять этот файл. Но это не точно. Разрабы далбаёбы \ No newline at end of file +Когда система готова и все симлинки отправлены куда надо, этот скрипт именно скопирует нужные файлы в нужные каталоги. В теории, тогда программы не будут перезаписывать, а будут дополнять этот файл. Но это не точно. Разрабы далбаёбы diff --git a/shit/install.sh b/shit/install.sh index e3f5eed..5cf22f0 100755 --- a/shit/install.sh +++ b/shit/install.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash -mkdir -p $HOME/.config/xfce4/ -cp $HOME/nixos-private-dots/shit/helpers.rc $HOME/.config/xfce4/helpers.rc -cp $HOME/nixos-private-dots/shit/mimeapps.list $HOME/.config/mimeapps.list +mkdir -p "$HOME/.config/xfce4/" +cp "$HOME/nixos-private-dots/shit/helpers.rc" "$HOME/.config/xfce4/helpers.rc" +cp "$HOME/nixos-private-dots/shit/mimeapps.list" "$HOME/.config/mimeapps.list" -cp -r $HOME/nixos-private-dots/shit/Kvantum $HOME/.config/Kvantum -cp -r $HOME/nixos-private-dots/shit/qt5ct $HOME/.config/qt5ct -cp -r $HOME/nixos-private-dots/shit/qt6ct $HOME/.config/qt6ct +cp -r "$HOME/nixos-private-dots/shit/Kvantum" "$HOME/.config/Kvantum" +cp -r "$HOME/nixos-private-dots/shit/qt5ct" "$HOME/.config/qt5ct" +cp -r "$HOME/nixos-private-dots/shit/qt6ct" "$HOME/.config/qt6ct" diff --git a/shit/mimeapps.list b/shit/mimeapps.list index 8b2c0a9..2314f26 100644 --- a/shit/mimeapps.list +++ b/shit/mimeapps.list @@ -1,94 +1,94 @@ [Added Associations] -application/json=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop -application/x-sh=nvim.desktop;code.desktop -application/x-shellscript=nvim.desktop;code.desktop -application/xml=nvim.desktop;code.desktop -application/yaml=nvim.desktop;code.desktop -image/*=com.interversehq.qView.desktop;imv.desktop -image/apng=com.interversehq.qView.desktop;imv.desktop -image/avif=imv.desktop -image/gif=com.interversehq.qView.desktop;imv.desktop -image/jpeg=;com.interversehq.qView.desktop;imv.desktop; -image/pjpeg=com.interversehq.qView.desktop;imv.desktop -image/png=com.interversehq.qView.desktop;imv.desktop;; -image/svg+xml=com.interversehq.qView.desktop;imv.desktop -image/vnd.microsoft.icon=com.interversehq.qView.desktop;imv.desktop -image/webp=com.interversehq.qView.desktop;imv.desktop -image/x-icon=com.interversehq.qView.desktop;imv.desktop -text/*=nvim.desktop;code.desktop -text/css=nvim.desktop;code.desktop -text/csv=nvim.desktop;code.desktop -text/html=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop -text/javascript=nvim.desktop;code.desktop -text/markdown=nvim.desktop;code.desktop -text/plain=nvim.desktop;code.desktop -text/x-asm=nvim.desktop;code.desktop -text/x-c=nvim.desktop;code.desktop -text/x-python=nvim.desktop;code.desktop +application/json=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop; +application/x-sh=nvim.desktop;code.desktop; +application/x-shellscript=nvim.desktop;code.desktop; +application/xml=nvim.desktop;code.desktop; +application/yaml=nvim.desktop;code.desktop; +image/*=com.interversehq.qView.desktop;imv-dir.desktop; +image/apng=com.interversehq.qView.desktop;imv-dir.desktop; +image/avif=com.interversehq.qView.desktop;imv-dir.desktop; +image/gif=com.interversehq.qView.desktop;imv-dir.desktop; +image/jpeg=;com.interversehq.qView.desktop;imv-dir.desktop; +image/pjpeg=com.interversehq.qView.desktop;imv-dir.desktop; +image/png=com.interversehq.qView.desktop;imv-dir.desktop; +image/svg+xml=com.interversehq.qView.desktop;imv-dir.desktop; +image/vnd.microsoft.icon=com.interversehq.qView.desktop;imv-dir.desktop; +image/webp=com.interversehq.qView.desktop;imv-dir.desktop; +image/x-icon=com.interversehq.qView.desktop;imv-dir.desktop; +text/*=nvim.desktop;code.desktop; +text/css=nvim.desktop;code.desktop; +text/csv=nvim.desktop;code.desktop; +text/html=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop; +text/javascript=nvim.desktop;code.desktop; +text/markdown=nvim.desktop;code.desktop; +text/plain=nvim.desktop;code.desktop; +text/x-asm=nvim.desktop;code.desktop; +text/x-c=nvim.desktop;code.desktop; +text/x-python=nvim.desktop;code.desktop; [Default Applications] -application/json=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop -application/pdf=org.gnome.Evince.desktop -application/x-bittorrent=qbittorrent.desktop -application/x-extension-htm=librewolf.desktop -application/x-extension-html=librewolf.desktop -application/x-extension-shtml=librewolf.desktop -application/x-extension-xht=librewolf.desktop -application/x-extension-xhtml=librewolf.desktop -application/x-sh=nvim.desktop;code.desktop -application/x-shellscript=nvim.desktop;code.desktop -application/x-zerosize=nvim.desktop;code.desktop -application/xhtml+xml=librewolf.desktop -application/xml=nvim.desktop;code.desktop -application/yaml=nvim.desktop;code.desktop -application/zip=ark.desktop -audio/*=mpv.desktop -audio/aac=mpv.desktop -audio/flac=mpv.desktop -audio/mp4=mpv.desktop -audio/mpeg=mpv.desktop -audio/ogg=mpv.desktop -audio/opus=mpv.desktop -audio/vnd.wav=mpv.desktop -audio/webm=mpv.desktop -audio/x-matroska=mpv.desktop -audio/x-mpegurl=mpv.desktop -audio/x-opus+ogg=mpv.desktop -image/*=com.interversehq.qView.desktop;imv.desktop -image/apng=com.interversehq.qView.desktop;imv.desktop -image/avif=imv.desktop -image/gif=com.interversehq.qView.desktop;imv.desktop -image/jpeg=com.interversehq.qView.desktop;imv.desktop -image/pjpeg=com.interversehq.qView.desktop;imv.desktop -image/png=com.interversehq.com.interversehq.qView.desktop -image/svg+xml=com.interversehq.qView.desktop;imv.desktop -image/vnd.microsoft.icon=com.interversehq.qView.desktop;imv.desktop -image/webp=com.interversehq.qView.desktop;imv.desktop -image/x-icon=com.interversehq.qView.desktop;imv.desktop -inode/directory=thunar.desktop -text/*=nvim.desktop;code.desktop -text/css=nvim.desktop;code.desktop -text/csv=nvim.desktop;code.desktop -text/html=librewolf.desktop;firefox.desktop;chromium.desktop;nvim.desktop;code.desktop -text/javascript=nvim.desktop;code.desktop -text/markdown=nvim.desktop;code.desktop -text/plain=nvim.desktop;code.desktop -text/x-asm=nvim.desktop;code.desktop -text/x-c=nvim.desktop;code.desktop -text/x-python=nvim.desktop;code.desktop -video/*=mpv.desktop -video/mp4=mpv.desktop -video/mpeg=mpv.desktop -video/quicktime=mpv.desktop -video/webm=mpv.desktop -video/x-matroska=mpv.desktop -x-scheme-handler/about=librewolf.desktop -x-scheme-handler/chrome=librewolf.desktop -x-scheme-handler/http=librewolf.desktop -x-scheme-handler/https=librewolf.desktop -x-scheme-handler/jetbrains=jetbrains-toolbox.desktop -x-scheme-handler/magnet=qbittorrent.desktop -x-scheme-handler/mailto=thunderbird.desktop -x-scheme-handler/unknown=librewolf.desktop +application/json=nvim.desktop;code.desktop;librewolf.desktop;firefox.desktop;chromium.desktop; +application/pdf=org.gnome.Evince.desktop; +application/x-bittorrent=qbittorrent.desktop; +application/x-extension-htm=librewolf.desktop; +application/x-extension-html=librewolf.desktop; +application/x-extension-shtml=librewolf.desktop; +application/x-extension-xht=librewolf.desktop; +application/x-extension-xhtml=librewolf.desktop; +application/x-sh=nvim.desktop;code.desktop; +application/x-shellscript=nvim.desktop;code.desktop; +application/x-zerosize=nvim.desktop;code.desktop; +application/xhtml+xml=librewolf.desktop; +application/xml=nvim.desktop;code.desktop; +application/yaml=nvim.desktop;code.desktop; +application/zip=ark.desktop; +audio/*=mpv.desktop; +audio/aac=mpv.desktop; +audio/flac=mpv.desktop; +audio/mp4=mpv.desktop; +audio/mpeg=mpv.desktop; +audio/ogg=mpv.desktop; +audio/opus=mpv.desktop; +audio/vnd.wav=mpv.desktop; +audio/webm=mpv.desktop; +audio/x-matroska=mpv.desktop; +audio/x-mpegurl=mpv.desktop; +audio/x-opus+ogg=mpv.desktop; +image/*=com.interversehq.qView.desktop;imv-dir.desktop; +image/apng=com.interversehq.qView.desktop;imv-dir.desktop; +image/avif=com.interversehq.qView.desktop;imv-dir.desktop; +image/gif=com.interversehq.qView.desktop;imv-dir.desktop; +image/jpeg=com.interversehq.qView.desktop;imv-dir.desktop; +image/pjpeg=com.interversehq.qView.desktop;imv-dir.desktop; +image/png=com.interversehq.com.interversehq.qView.desktop; +image/svg+xml=com.interversehq.qView.desktop;imv-dir.desktop; +image/vnd.microsoft.icon=com.interversehq.qView.desktop;imv-dir.desktop; +image/webp=com.interversehq.qView.desktop;imv-dir.desktop; +image/x-icon=com.interversehq.qView.desktop;imv-dir.desktop; +inode/directory=thunar.desktop; +text/*=nvim.desktop;code.desktop; +text/css=nvim.desktop;code.desktop; +text/csv=nvim.desktop;code.desktop; +text/html=librewolf.desktop;firefox.desktop;chromium.desktop;nvim.desktop;code.desktop; +text/javascript=nvim.desktop;code.desktop; +text/markdown=nvim.desktop;code.desktop; +text/plain=nvim.desktop;code.desktop; +text/x-asm=nvim.desktop;code.desktop; +text/x-c=nvim.desktop;code.desktop; +text/x-python=nvim.desktop;code.desktop; +video/*=mpv.desktop; +video/mp4=mpv.desktop; +video/mpeg=mpv.desktop; +video/quicktime=mpv.desktop; +video/webm=mpv.desktop; +video/x-matroska=mpv.desktop; +x-scheme-handler/about=librewolf.desktop; +x-scheme-handler/chrome=librewolf.desktop; +x-scheme-handler/http=librewolf.desktop; +x-scheme-handler/https=librewolf.desktop; +x-scheme-handler/jetbrains=jetbrains-toolbox.desktop; +x-scheme-handler/magnet=qbittorrent.desktop; +x-scheme-handler/mailto=thunderbird.desktop; +x-scheme-handler/unknown=librewolf.desktop; [Removed Associations]