Merge branch 'main' of git.sr.ht:~marcuskammer/emacs.d

This commit is contained in:
Marcus Kammer 2024-09-20 08:37:36 +02:00
commit 91834b571e
3 changed files with 39 additions and 12 deletions

View file

@ -504,5 +504,21 @@ an ALIAS and SERVICE as arguments and call
(add-hook 'org-babel-after-execute-hook 'mk/babel-ansi)
(defun mk/toggle-frame-decorations ()
"Toggle the window decorations (title bar, menu bar, tool bar, scroll bar) for the current frame."
(interactive)
(let* ((frame (selected-frame))
(current-undecorated (frame-parameter frame 'undecorated))
(new-undecorated (not current-undecorated)))
(set-frame-parameter frame 'undecorated new-undecorated)
(if new-undecorated
(progn
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)))
(message "Window decorations %s" (if new-undecorated "disabled" "enabled"))))
(global-set-key (kbd "<f12>") 'mk/toggle-frame-decorations)
(provide 'bundle-mk)
;;; bundle-mk.el ends here

View file

@ -4,4 +4,4 @@
(width . 85)
(height . 50)
(and (eq system-type 'gnu/linux)
(undecorated . t))))
(undecorated . t))))

33
init.el
View file

@ -97,11 +97,17 @@
;; (fido-mode 1) ; replace icomplete mode
;; (fido-vertical-mode 1)
;; UTF-8 FTW
(prefer-coding-system 'utf-8-unix)
(set-default-coding-systems 'utf-8-unix)
;; Prefer UTF-8 encoding
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(setq-default default-buffer-file-coding-system 'utf-8-unix)
;; Treat clipboard input as UTF-8 string first; compound text next, etc.
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))
;; Set default file encoding to UTF-8
(setq-default buffer-file-coding-system 'utf-8)
;; Force UTF-8 for new files
(setq default-buffer-file-coding-system 'utf-8)
(setenv "PYTHONIOENCODING" "UTF-8")
(when (eq system-type 'gnu/linux)
@ -202,8 +208,7 @@
(height . 50)
(vertical-scroll-bars)
,@(cond ((eq system-type 'gnu/linux)
'((fullscreen . maximized)
(undecorated . t))))))
'((fullscreen . maximized))))))
(setq frame-resize-pixelwise t)
@ -314,11 +319,15 @@
(use-package doc-view
:ensure nil
:custom
(doc-view-continuous nil)
(doc-view-scale-internally nil)
(doc-view-cache-size 32)
(doc-view-prefetch-pages t)
(doc-view-dvipdfm-program "mutool")
(doc-view-odf->odf-converter-program "soffice")
(dov-view-odf->pdf-converter-function 'doc-view-odf->pdf-converter-soffice)
(doc-view-pdf->png-converter-function 'doc-view-pdf->png-converter-mupdf)
(doc-view-resolution 300))
(doc-view-resolution 200))
(use-package hideshow
:hook ((prog-mode . (lambda () (hs-minor-mode 1))))
@ -651,15 +660,17 @@
(use-package jabber
:defer t
:bind (("C-x j c" . jabber-connect)
("C-x j d" . jabber-disconnect))
:init
(setq jabber-activity-mode nil)
(setq jabber-account-list '(("marcus.kammer@mailbox.org")))
:custom
(jabber-muc-decorate-presence-patterns
'(("enters the room" . nil)
("has entered the room" . nil)
("joined the room" . nil)
("has left the chatroom" . nil)))
(jabber-activity-mode nil)
(jabber-account-list
'(("marcus.kammer@mailbox.org")))
(jabber-muc-autojoin
'("lisp@conference.a3.pm"
"emacs@conference.conversations.im"
@ -761,7 +772,7 @@
("C-c C-k" . gptel-abort))
:config
(when (eq system-type 'windows-nt)
(setq gptel-use-curl t))
(setq gptel-use-curl nil))
(setq gptel-prompt-prefix-alist
'((markdown-mode . "# ")
(org-mode . "* ")
@ -1312,7 +1323,6 @@ Uses `mk/hyperspec-dir-locations' to find the directory."
("https://www.copernicus.eu/news/rss" klima)
("https://gegenblende.dgb.de/@@rss?count=10&feed=b3b8f76e-53f1-11e6-a380-525400e5a74a" arbeit gewerkschaft news)
("https://drewdevault.com/blog/index.xml" blog programming computer)
("https://www.inverse.com/rss" culture magazin journalism)
("https://inkppl.com/en/rss.xml" tattoo magazin people culture)
("https://novaramedia.com/feed/" politics capitalism climate left media)
("https://www.youtube.com/feeds/videos.xml?channel_id=UCN29LJGZ8FY30ysxdTnDsaw" youtube video)
@ -1324,6 +1334,7 @@ Uses `mk/hyperspec-dir-locations' to find the directory."
("https://ourworldindata.org/atom-data-insights.xml" data world)
("https://ourworldindata.org/atom.xml" data world)
("https://www.amazon.science/index.rss" science blog amazon data)
("https://feed.theregister.com/atom?a=Liam%20Proven" register foss)
))
(setq elfeed-search-filter "@7-day-ago +unread")
(let ((feeds (expand-file-name "~/feeds.el")))