Compare commits
2 commits
6ff414839c
...
9ff88721dc
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ff88721dc | |||
| ca80ee6a82 |
4 changed files with 44 additions and 36 deletions
|
|
@ -513,48 +513,33 @@ DIR must include a .project file to be considered a project."
|
||||||
:config
|
:config
|
||||||
(direnv-mode))
|
(direnv-mode))
|
||||||
|
|
||||||
(defun kylekrein/project-enable-direnv-flake ()
|
(defun kylekrein/project-enable-direnv-guix ()
|
||||||
"Add `use flake` to .envrc and run `direnv allow` in the project root."
|
"Add `use guix` to .envrc and run `direnv allow` in the project root."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((project (project-current t))
|
(let* ((project (project-current t))
|
||||||
(root (project-root project))
|
(root (project-root project))
|
||||||
(envrc-path (expand-file-name ".envrc" root)))
|
(envrc-path (expand-file-name ".envrc" root)))
|
||||||
(unless (file-exists-p envrc-path)
|
(unless (file-exists-p envrc-path)
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert "use flake\n")
|
(insert "use guix\n")
|
||||||
(write-file envrc-path)))
|
(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)
|
(insert-file-contents envrc-path)
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert-file-contents envrc-path)
|
(insert-file-contents envrc-path)
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(insert "\nuse flake\n")
|
(insert "\nuse guix\n")
|
||||||
(write-file envrc-path)))
|
(write-file envrc-path)))
|
||||||
(let ((default-directory root))
|
(let ((default-directory root))
|
||||||
(direnv-allow))
|
(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
|
(use-package glsl-mode
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.rml\\'" . html-ts-mode))
|
(add-to-list 'auto-mode-alist '("\\.rml\\'" . html-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.rcss\\'" . css-ts-mode))
|
(add-to-list 'auto-mode-alist '("\\.rcss\\'" . css-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
|
(use-package eldoc
|
||||||
:init
|
:init
|
||||||
|
|
@ -580,7 +565,7 @@ DIR must include a .project file to be considered a project."
|
||||||
|
|
||||||
(with-eval-after-load 'eglot
|
(with-eval-after-load 'eglot
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'((c-ts-mode c++-ts-mode)
|
'((c-mode c++-mode)
|
||||||
. ("clangd"
|
. ("clangd"
|
||||||
"-j=8"
|
"-j=8"
|
||||||
"--log=error"
|
"--log=error"
|
||||||
|
|
@ -592,8 +577,8 @@ DIR must include a .project file to be considered a project."
|
||||||
"--pch-storage=memory"
|
"--pch-storage=memory"
|
||||||
"--header-insertion=never"
|
"--header-insertion=never"
|
||||||
"--header-insertion-decorators=0")))
|
"--header-insertion-decorators=0")))
|
||||||
(add-hook 'c-ts-mode-hook #'eglot-ensure)
|
(add-hook 'c-mode-hook #'eglot-ensure)
|
||||||
(add-hook 'c++-ts-mode-hook #'eglot-ensure))
|
(add-hook 'c++-mode-hook #'eglot-ensure))
|
||||||
|
|
||||||
(with-eval-after-load 'eglot
|
(with-eval-after-load 'eglot
|
||||||
(add-to-list 'eglot-server-programs
|
(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
|
(with-eval-after-load 'eglot
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(csharp-ts-mode
|
'(csharp-mode
|
||||||
. ("csharp-ls")))
|
. ("csharp-ls")))
|
||||||
(add-hook 'csharp-ts-mode-hook #'eglot-ensure))
|
(add-hook 'csharp-mode-hook #'eglot-ensure))
|
||||||
|
|
||||||
(with-eval-after-load 'eglot
|
(with-eval-after-load 'eglot
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(python-ts-mode
|
'(python-mode
|
||||||
. ("ty")))
|
. ("ty")))
|
||||||
(add-hook 'python-ts-mode-hook #'eglot-ensure))
|
(add-hook 'python-mode-hook #'eglot-ensure))
|
||||||
|
|
||||||
(use-package nerd-icons
|
(use-package nerd-icons
|
||||||
:ensure t
|
:ensure t
|
||||||
|
|
@ -1030,8 +1015,6 @@ one, an error is signaled."
|
||||||
|
|
||||||
;; Enable flashing mode-line on errors
|
;; Enable flashing mode-line on errors
|
||||||
(doom-themes-visual-bell-config)
|
(doom-themes-visual-bell-config)
|
||||||
;; Enable custom neotree theme (nerd-icons must be installed!)
|
|
||||||
(doom-themes-neotree-config)
|
|
||||||
;; or for treemacs users
|
;; or for treemacs users
|
||||||
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
|
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme
|
||||||
(doom-themes-treemacs-config)
|
(doom-themes-treemacs-config)
|
||||||
|
|
@ -1041,9 +1024,6 @@ one, an error is signaled."
|
||||||
(unless (kylekrein/detect-wsl)
|
(unless (kylekrein/detect-wsl)
|
||||||
(add-to-list 'default-frame-alist '(alpha-background . 90))) ; For all new frames henceforth
|
(add-to-list 'default-frame-alist '(alpha-background . 90))) ; For all new frames henceforth
|
||||||
|
|
||||||
(use-package sudo-edit
|
|
||||||
:ensure t)
|
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
#:use-module (gnu packages freedesktop)
|
#:use-module (gnu packages freedesktop)
|
||||||
#:use-module (gnu packages wm)
|
#:use-module (gnu packages wm)
|
||||||
#:use-module (gnu packages audio)
|
#:use-module (gnu packages audio)
|
||||||
|
#:use-module (gnu packages video)
|
||||||
#:use-module (gnu packages xdisorg)
|
#:use-module (gnu packages xdisorg)
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
#:use-module (gnu packages monitoring)
|
#:use-module (gnu packages monitoring)
|
||||||
|
|
@ -21,8 +22,10 @@
|
||||||
#:use-module (gnu packages golang)
|
#:use-module (gnu packages golang)
|
||||||
#:use-module (gnu packages rust-apps)
|
#:use-module (gnu packages rust-apps)
|
||||||
#:use-module (gnu packages qt)
|
#:use-module (gnu packages qt)
|
||||||
|
#:use-module (gnu packages messaging)
|
||||||
#:use-module (gnu packages glib)
|
#:use-module (gnu packages glib)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
|
#:use-module (gnu packages rsync)
|
||||||
#:use-module (gnu packages gnome)
|
#:use-module (gnu packages gnome)
|
||||||
#:use-module (gnu packages fonts)
|
#:use-module (gnu packages fonts)
|
||||||
#:use-module (gnu packages kde-plasma)
|
#:use-module (gnu packages kde-plasma)
|
||||||
|
|
@ -60,7 +63,9 @@ librewolf
|
||||||
emacs-pgtk
|
emacs-pgtk
|
||||||
alacritty
|
alacritty
|
||||||
git
|
git
|
||||||
|
pidgin
|
||||||
ark
|
ark
|
||||||
|
rsync
|
||||||
cliphist
|
cliphist
|
||||||
quickshell
|
quickshell
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
|
|
@ -68,6 +73,7 @@ stow
|
||||||
pavucontrol
|
pavucontrol
|
||||||
nautilus
|
nautilus
|
||||||
neochat
|
neochat
|
||||||
|
yt-dlp
|
||||||
ripgrep
|
ripgrep
|
||||||
;additional apps and dependencies
|
;additional apps and dependencies
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ input {
|
||||||
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
||||||
// focus-follows-mouse max-scroll-amount="0%"
|
// 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
|
// You can configure outputs by their name, which you can find
|
||||||
|
|
|
||||||
22
scripts/bin/upload-to-server
Executable file
22
scripts/bin/upload-to-server
Executable file
|
|
@ -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/"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue