20250317.1742200339

This commit is contained in:
fz0x1 2025-03-17 09:32:19 +01:00
parent 9e7a87d056
commit 35aa22421c
8 changed files with 758 additions and 32 deletions

View file

@ -23,6 +23,7 @@
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 13.0))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
@ -55,25 +56,25 @@
(concat
(mapcar #'(lambda (c) (if (equal c ?\[) ?\( (if (equal c ?\]) ?\) c))) string-to-transform)))
(defun get-current-layout ()
"Получить текущую раскладку клавиатуры для текущего окна с помощью xkb-switch."
(string-trim (shell-command-to-string "xkb-switch")))
(defun set-layout (layout)
"Установить раскладку клавиатуры для текущего окна с помощью xkb-switch."
(shell-command (concat "xkb-switch -s " layout)))
(defvar prev-lang "us"
"Хранит текущую раскладку перед переключением в insert mode.")
(add-hook 'evil-insert-state-entry-hook
(lambda ()
(setq prev-lang (get-current-layout))
(set-layout "us"))) ;; Переключаем на английский в insert mode
(add-hook 'evil-insert-state-exit-hook
(lambda ()
(set-layout prev-lang))) ;; Восстанавливаем предыдущую раскладку
;; (defun get-current-layout ()
;; "Получить текущую раскладку клавиатуры для текущего окна с помощью xkb-switch."
;; (string-trim (shell-command-to-string "xkb-switch")))
;;
;; (defun set-layout (layout)
;; "Установить раскладку клавиатуры для текущего окна с помощью xkb-switch."
;; (shell-command (concat "xkb-switch -s " layout)))
;;
;; (defvar prev-lang "us"
;; "Хранит текущую раскладку перед переключением в insert mode.")
;;
;; (add-hook 'evil-insert-state-entry-hook
;; (lambda ()
;; (setq prev-lang (get-current-layout))
;; (set-layout "us"))) ;; Переключаем на английский в insert mode
;;
;; (add-hook 'evil-insert-state-exit-hook
;; (lambda ()
;; (set-layout prev-lang))) ;; Восстанавливаем предыдущую раскладку
(setq org-attach-method 'cp) ;; copy file to an attachments dir.
(setq org-attach-id-dir "~/org/attachments/")