diff --git a/.config.d/05-basic.el b/.config.d/05-basic.el index f1ab44a..5a66d7b 100644 --- a/.config.d/05-basic.el +++ b/.config.d/05-basic.el @@ -88,8 +88,16 @@ :commands (elfeed) :init (setq elfeed-feeds - '("https://sachachua.com/blog/category/emacs-news/feed" - "https://planet.emacslife.com/atom.xml")) + '(("https://sachachua.com/blog/category/emacs-news/feed" emacs) + ("https://planet.emacslife.com/atom.xml" emacs) + ("https://ria.ru/export/rss2/archive/index.xml" ru-news) + ("https://rssexport.rbc.ru/rbcnews/news/30/full.rss" ru-news) + ("https://lenta.ru/rss" ru-news) + ("https://rg.ru/xml/index.xml" ru-news) + ("https://portamur.ru/news/rss.php" ru-news local-news) + ("https://kagi.com/smallweb/appreciated" small-web) + ("https://kagi.com/api/v1/smallweb/feed/?gh" small-web) + ("https://scour.ing/@DiToast/rss.xml" scour))) :bind (("C-c f" . elfeed))) ;; Setting this to true makes it so that Emacs saves existing clipboard text diff --git a/.config.d/07-org.el b/.config.d/07-org.el index f14fa3c..d6775b6 100644 --- a/.config.d/07-org.el +++ b/.config.d/07-org.el @@ -2,8 +2,13 @@ (use-package org :ensure nil - :defer t - :commands (org-mode)) + :defer nil + :commands (org-mode) + :bind (:map org-mode-map + ("C-c c" . org-fc-cloze-dwim))) + +(setq org-format-latex-options (plist-put org-format-latex-options ':scale 2.0)) + (use-package org-roam :ensure t :defer t @@ -34,4 +39,17 @@ `(("s" "Slipbox" entry (file "~/data2/Notes/inbox.org") "* %?\n"))) +(use-package org-fc + :straight (org-fc + :type git + :host nil + :repo "https://git.sr.ht/~l3kn/org-fc" + :branch "main" + :files (:defaults "awk" "demo.org")) + :after org + :ensure t + :defer nil + :custom + (org-fc-directories '("~/data2/Notes/"))) + ;;; 07-org.el ends here diff --git a/.config.d/15-lsp.el b/.config.d/15-lsp.el index 98a04cf..3eeaeca 100644 --- a/.config.d/15-lsp.el +++ b/.config.d/15-lsp.el @@ -26,6 +26,23 @@ (fset #'jsonrpc--log-event #'ignore) (setq jsonrpc-event-hook nil)) +;; This function raises the window to the front using KDE KWin. +(defun my/raise-window () + (call-process-shell-command "~/wayland-window -f emacs &" nil 0)) + +;; Usually, when I open a file with emacsclient and the frame already exists, I +;; want it to be raised to the top. Unfortunately, that does not happen by +;; default. Here is my solution. +(add-hook 'server-visit-hook #'my/raise-window) + +;; This package provides syntax highlighting for gdscript. +(use-package gdscript-mode + :ensure t + :defer t + :commands (gdscript-mode)) + +(add-hook 'gdscript-mode-hook #'eglot-ensure) + ;; This package provides syntax highlighting and some utilities for ;; working with rust code. (use-package rust-mode diff --git a/.config.d/99-misc.el b/.config.d/99-misc.el index fd3bbc8..2710809 100644 --- a/.config.d/99-misc.el +++ b/.config.d/99-misc.el @@ -25,6 +25,20 @@ column." (let ((name (buffer-name))) (insert name))) +(defun my/create-org-fc-word-card () + "Inserts and initialzes an org-fc double card with a word and its +translation at point." + (interactive) + (let* ((engw (read-from-minibuffer "Enter English word: ")) + (rusw (read-from-minibuffer "Enter Russian word: "))) + (insert "* " engw) + (newline) + (insert rusw) + (previous-line) + (org-fc-type-double-init))) + +(keymap-set org-mode-map "C-c C-n" 'my/create-org-fc-word-card) + (setq margins-map (make-sparse-keymap)) (keymap-set margins-map "f" 'my/resize-margins-to-fill) (keymap-set margins-map "r" 'my/reset-margins) diff --git a/init.el b/init.el index 8b9b90a..7101c0b 100644 --- a/init.el +++ b/init.el @@ -154,7 +154,7 @@ (setq make-backup-files nil) (setq backup-directory-alist - `(("." . ,(expand-file-name "backup" user-emacs-directory)))) + `((".*" . ,(expand-file-name "backup" user-emacs-directory)))) (setq tramp-backup-directory-alist backup-directory-alist) (setq backup-by-copying-when-linked t) (setq backup-by-copying t) ; Backup by copying rather renaming