mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
refactor(rss): factor out hardcoded workspace name
This commit is contained in:
committed by
GitHub
parent
dacf38bad3
commit
85b16f2f48
@ -8,7 +8,7 @@
|
|||||||
(interactive)
|
(interactive)
|
||||||
(if (featurep! :ui workspaces)
|
(if (featurep! :ui workspaces)
|
||||||
(progn
|
(progn
|
||||||
(+workspace-switch "*rss*" t)
|
(+workspace-switch +rss-workspace-name t)
|
||||||
(doom/switch-to-scratch-buffer)
|
(doom/switch-to-scratch-buffer)
|
||||||
(elfeed)
|
(elfeed)
|
||||||
(+workspace/display))
|
(+workspace/display))
|
||||||
@ -99,7 +99,7 @@
|
|||||||
(kill-buffer b)))
|
(kill-buffer b)))
|
||||||
(mapc #'kill-buffer show-buffers))
|
(mapc #'kill-buffer show-buffers))
|
||||||
(if (featurep! :ui workspaces)
|
(if (featurep! :ui workspaces)
|
||||||
(+workspace/delete "rss")
|
(+workspace/delete +rss-workspace-name)
|
||||||
(when (window-configuration-p +rss--wconf)
|
(when (window-configuration-p +rss--wconf)
|
||||||
(set-window-configuration +rss--wconf))
|
(set-window-configuration +rss--wconf))
|
||||||
(setq +rss--wconf nil)))
|
(setq +rss--wconf nil)))
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
"Automatically slice images shown in elfeed-show-mode buffers, making them
|
"Automatically slice images shown in elfeed-show-mode buffers, making them
|
||||||
easier to scroll through.")
|
easier to scroll through.")
|
||||||
|
|
||||||
|
(defvar +rss-workspace-name "*rss*"
|
||||||
|
"Name of the workspace that contains the elfeed buffer.")
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Packages
|
;; Packages
|
||||||
@ -59,9 +61,9 @@ easier to scroll through.")
|
|||||||
"q" #'elfeed-kill-buffer
|
"q" #'elfeed-kill-buffer
|
||||||
"r" #'elfeed-search-update--force
|
"r" #'elfeed-search-update--force
|
||||||
(kbd "M-RET") #'elfeed-search-browse-url)
|
(kbd "M-RET") #'elfeed-search-browse-url)
|
||||||
(map! (:map elfeed-show-mode-map
|
(map! (:map elfeed-show-mode-map)
|
||||||
:n "gc" nil
|
:n "gc" nil
|
||||||
:n "gc" #'+rss/copy-link))))
|
:n "gc" #'+rss/copy-link)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user