summaryrefslogtreecommitdiff
path: root/.emacs.d/modules/thanos-aesthetics.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-10-08 16:17:36 +0300
committerThanos Apollo <[email protected]>2023-10-08 16:17:36 +0300
commit2802813d23c992a1513c474429312747c0232953 (patch)
tree5ffe3a3fa6f3621a68a4e5dd93160189809b92b9 /.emacs.d/modules/thanos-aesthetics.el
parentcc68fd92df4720a93536bd6861f5655c81507d10 (diff)
emacs:(aesthetics) Add thanos/set-wallpaper
Function to set wallpaper using feh
Diffstat (limited to '.emacs.d/modules/thanos-aesthetics.el')
-rw-r--r--.emacs.d/modules/thanos-aesthetics.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/.emacs.d/modules/thanos-aesthetics.el b/.emacs.d/modules/thanos-aesthetics.el
index ac848ee..3f468fe 100644
--- a/.emacs.d/modules/thanos-aesthetics.el
+++ b/.emacs.d/modules/thanos-aesthetics.el
@@ -245,5 +245,17 @@
(global-set-key (kbd "M-.") 'xref-find-definitions)
(global-set-key (kbd "C-c l") 'display-line-numbers-mode)
+;; wallpapers
+(defvar wallpapers-dir "~/wallpapers/")
+
+(defun thanos/set-wallpaper ()
+ "Set wallpaper."
+ (interactive)
+ (let ((wallpaper (completing-read "Choose wallpaper" (directory-files wallpapers-dir nil "^[^.].*"))))
+ (call-process-shell-command
+ (concat "feh --bg-scale " wallpapers-dir wallpaper) nil 0)))
+
+(define-key thanos/applications-map (kbd "w") 'thanos/set-wallpaper)
+
(provide 'thanos-aesthetics)
;;; thanos-aesthetics.el ends here