diff --git a/emacs/.config/emacs/config.el b/emacs/.config/emacs/config.el index 9710668..76d788e 100644 --- a/emacs/.config/emacs/config.el +++ b/emacs/.config/emacs/config.el @@ -513,48 +513,33 @@ DIR must include a .project file to be considered a project." :config (direnv-mode)) -(defun kylekrein/project-enable-direnv-flake () - "Add `use flake` to .envrc and run `direnv allow` in the project root." +(defun kylekrein/project-enable-direnv-guix () + "Add `use guix` 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 flake\n") + (insert "use guix\n") (write-file envrc-path))) - (unless (string-match-p "use flake" (with-temp-buffer + (unless (string-match-p "use guix" (with-temp-buffer (insert-file-contents envrc-path) (buffer-string))) (with-temp-buffer (insert-file-contents envrc-path) (goto-char (point-max)) - (insert "\nuse flake\n") + (insert "\nuse guix\n") (write-file envrc-path))) (let ((default-directory root)) (direnv-allow)) - (message "Added 'use flake' to .envrc and ran direnv allow in %s" root))) + (message "Added 'use guix' to .envrc and ran direnv allow in %s" root))) (use-package glsl-mode :ensure t) -(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)) +(add-to-list 'auto-mode-alist '("\\.rml\\'" . html-mode)) +(add-to-list 'auto-mode-alist '("\\.rcss\\'" . css-mode)) (use-package eldoc :init @@ -580,7 +565,7 @@ DIR must include a .project file to be considered a project." (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '((c-ts-mode c++-ts-mode) + '((c-mode c++-mode) . ("clangd" "-j=8" "--log=error" @@ -592,8 +577,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-ts-mode-hook #'eglot-ensure) - (add-hook 'c++-ts-mode-hook #'eglot-ensure)) + (add-hook 'c-mode-hook #'eglot-ensure) + (add-hook 'c++-mode-hook #'eglot-ensure)) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs @@ -620,15 +605,15 @@ DIR must include a .project file to be considered a project." (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '(csharp-ts-mode + '(csharp-mode . ("csharp-ls"))) - (add-hook 'csharp-ts-mode-hook #'eglot-ensure)) + (add-hook 'csharp-mode-hook #'eglot-ensure)) (with-eval-after-load 'eglot (add-to-list 'eglot-server-programs - '(python-ts-mode + '(python-mode . ("ty"))) - (add-hook 'python-ts-mode-hook #'eglot-ensure)) + (add-hook 'python-mode-hook #'eglot-ensure)) (use-package nerd-icons :ensure t @@ -1030,8 +1015,6 @@ 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) @@ -1041,9 +1024,6 @@ 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 ec92b11..9bc197a 100644 --- a/guix/.config/guix/home-anaconda.scm +++ b/guix/.config/guix/home-anaconda.scm @@ -12,6 +12,7 @@ #: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) @@ -21,8 +22,10 @@ #: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) @@ -60,7 +63,9 @@ librewolf emacs-pgtk alacritty git +pidgin ark +rsync cliphist quickshell nextcloud-client @@ -68,6 +73,7 @@ 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 21767e9..0dfaee1 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 new file mode 100755 index 0000000..e8ec901 --- /dev/null +++ b/scripts/bin/upload-to-server @@ -0,0 +1,22 @@ +#!/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/"