diff --git a/emacs/.config/emacs/config.el b/emacs/.config/emacs/config.el index 76d788e..9710668 100644 --- a/emacs/.config/emacs/config.el +++ b/emacs/.config/emacs/config.el @@ -513,33 +513,48 @@ DIR must include a .project file to be considered a project." :config (direnv-mode)) -(defun kylekrein/project-enable-direnv-guix () - "Add `use guix` to .envrc and run `direnv allow` in the project root." +(defun kylekrein/project-enable-direnv-flake () + "Add `use flake` to .envrc and run `direnv allow` in the project root." (interactive) (let* ((project (project-current t)) (root (project-root project)) (envrc-path (expand-file-name ".envrc" root))) (unless (file-exists-p envrc-path) (with-temp-buffer - (insert "use guix\n") + (insert "use flake\n") (write-file envrc-path))) - (unless (string-match-p "use guix" (with-temp-buffer + (unless (string-match-p "use flake" (with-temp-buffer (insert-file-contents envrc-path) (buffer-string))) (with-temp-buffer (insert-file-contents envrc-path) (goto-char (point-max)) - (insert "\nuse guix\n") + (insert "\nuse flake\n") (write-file envrc-path))) (let ((default-directory root)) (direnv-allow)) - (message "Added 'use guix' to .envrc and ran direnv allow in %s" root))) + (message "Added 'use flake' to .envrc and ran direnv allow in %s" root))) (use-package glsl-mode :ensure t) -(add-to-list 'auto-mode-alist '("\\.rml\\'" . html-mode)) -(add-to-list 'auto-mode-alist '("\\.rcss\\'" . css-mode)) +(add-to-list 'auto-mode-alist '("\\.rml\\'" . html-ts-mode)) +(add-to-list 'auto-mode-alist '("\\.rcss\\'" . css-ts-mode)) + +(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-ts-mode)) +(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-ts-mode)) + +(use-package zig-mode + :ensure t) + +(autoload 'zig-mode "zig-mode" nil t) +(add-to-list 'auto-mode-alist '("\\.\\(zig\\|zon\\)\\'" . zig-mode)) + +(use-package treesit-auto + :ensure t + :demand t + :config + (global-treesit-auto-mode)) (use-package eldoc :init @@ -565,7 +580,7 @@ DIR must include a .project file to be considered a project." (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '((c-mode c++-mode) + '((c-ts-mode c++-ts-mode) . ("clangd" "-j=8" "--log=error" @@ -577,8 +592,8 @@ DIR must include a .project file to be considered a project." "--pch-storage=memory" "--header-insertion=never" "--header-insertion-decorators=0"))) - (add-hook 'c-mode-hook #'eglot-ensure) - (add-hook 'c++-mode-hook #'eglot-ensure)) + (add-hook 'c-ts-mode-hook #'eglot-ensure) + (add-hook 'c++-ts-mode-hook #'eglot-ensure)) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs @@ -605,15 +620,15 @@ DIR must include a .project file to be considered a project." (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '(csharp-mode + '(csharp-ts-mode . ("csharp-ls"))) - (add-hook 'csharp-mode-hook #'eglot-ensure)) + (add-hook 'csharp-ts-mode-hook #'eglot-ensure)) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '(python-mode + '(python-ts-mode . ("ty"))) - (add-hook 'python-mode-hook #'eglot-ensure)) + (add-hook 'python-ts-mode-hook #'eglot-ensure)) (use-package nerd-icons :ensure t @@ -1015,6 +1030,8 @@ one, an error is signaled." ;; Enable flashing mode-line on errors (doom-themes-visual-bell-config) + ;; Enable custom neotree theme (nerd-icons must be installed!) + (doom-themes-neotree-config) ;; or for treemacs users (setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme (doom-themes-treemacs-config) @@ -1024,6 +1041,9 @@ one, an error is signaled." (unless (kylekrein/detect-wsl) (add-to-list 'default-frame-alist '(alpha-background . 90))) ; For all new frames henceforth +(use-package sudo-edit + :ensure t) + (use-package which-key :ensure t :init diff --git a/guix/.config/guix/home-anaconda.scm b/guix/.config/guix/home-anaconda.scm index 9bc197a..ec92b11 100644 --- a/guix/.config/guix/home-anaconda.scm +++ b/guix/.config/guix/home-anaconda.scm @@ -12,7 +12,6 @@ #:use-module (gnu packages freedesktop) #:use-module (gnu packages wm) #:use-module (gnu packages audio) - #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) #:use-module (gnu packages monitoring) @@ -22,10 +21,8 @@ #:use-module (gnu packages golang) #:use-module (gnu packages rust-apps) #:use-module (gnu packages qt) - #:use-module (gnu packages messaging) #:use-module (gnu packages glib) #:use-module (gnu packages linux) - #:use-module (gnu packages rsync) #:use-module (gnu packages gnome) #:use-module (gnu packages fonts) #:use-module (gnu packages kde-plasma) @@ -63,9 +60,7 @@ librewolf emacs-pgtk alacritty git -pidgin ark -rsync cliphist quickshell nextcloud-client @@ -73,7 +68,6 @@ stow pavucontrol nautilus neochat -yt-dlp ripgrep ;additional apps and dependencies xdg-desktop-portal-gtk diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 0dfaee1..21767e9 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -69,7 +69,7 @@ input { // Setting max-scroll-amount="0%" makes it work only on windows already fully on screen. // focus-follows-mouse max-scroll-amount="0%" - disable-power-key-handling + //disable-power-key-handling } // You can configure outputs by their name, which you can find diff --git a/scripts/bin/upload-to-server b/scripts/bin/upload-to-server deleted file mode 100755 index e8ec901..0000000 --- a/scripts/bin/upload-to-server +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env sh - -if [ "$#" -ne 2 ]; then - echo "Ошибка: требуется 2 аргумента." - echo "Использование: $0 {movies|series|music} /путь/к/источнику" - exit 1 -fi - -TYPE="$1" -SRC="$2" - -case "$TYPE" in - movies|series|music) - ;; - *) - echo "Ошибка: первый аргумент должен быть 'movies', 'series' или 'music'." - echo "Использование: $0 {movies|series|music} /путь/к/источнику" - exit 1 - ;; -esac - -rsync -rhvP "$SRC" "mediamanager@jellyfin.kylekrein.com:/zstorage/media/$TYPE/"