From f1d0f9d77bd7545979d381e541a04df3d1e05878 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 10 Dec 2024 09:29:59 -0600 Subject: [PATCH] adding emms shuffle and wayland environment stuff --- README.org | 9 +++------ init.el | 25 +++++++++++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.org b/README.org index daa09d81..575e4fc7 100644 --- a/README.org +++ b/README.org @@ -444,11 +444,7 @@ I am currently using NixOS. In order for emacs to have access to certain program Also due to using greetd, emacs isn't started with the environment from the system, so let's make sure it knows which wayland display we are using #+begin_src emacs-lisp -(let ((desktop (getenv "XDG_CURRENT_DESKTOP"))) - (setenv "WAYLAND_DISPLAY" (if (or (string= desktop "COSMIC") - (string= desktop "Hyprland")) - "wayland-1" - "wayland-0"))) +(setenv "WAYLAND_DISPLAY" "wayland-1") #+end_src #+RESULTS: @@ -4821,7 +4817,7 @@ Let's use pdf-tools for a lot better interaction with pdfs. "-o sides=two-sided-long-edge" "")))) (message "printing %s copies." copies) - (async-shell-command (format "lpr %s %s" (string-join pdf-misc-print-program-args " ") (buffer-file-name))))) + (async-shell-command (format "lpr %s '%s'" (string-join pdf-misc-print-program-args " ") (buffer-file-name))))) (custom-set-variables '(pdf-misc-print-program-executable "lpr") '(pdf-misc-print-program-args (quote ("-o media=Letter" "-o fit-to-page" "-o sides=two-sided-long-edge")))) @@ -5387,6 +5383,7 @@ Since Bongo seems kinda difficult I shall give EMMS another try. "mr" 'emms-toggle-repeat-track "mn" 'emms-next "mb" 'emms-previous + "ms" 'emms-shuffle "m]" 'emms-seek-forward "m[" 'emms-seek-backward) (general-def 'normal emms-playlist-mode-map diff --git a/init.el b/init.el index c320b008..8efd8a6f 100644 --- a/init.el +++ b/init.el @@ -224,11 +224,7 @@ (when (boundp 'native-comp-eln-load-path) (add-to-list 'native-comp-eln-load-path (expand-file-name "native-lisp/" store-path))))) -(let ((desktop (getenv "XDG_CURRENT_DESKTOP"))) - (setenv "WAYLAND_DISPLAY" (if (or (string= desktop "COSMIC") - (string= desktop "Hyprland")) - "wayland-1" - "wayland-0"))) +(setenv "WAYLAND_DISPLAY" "wayland-1") (executable-find "ssh") (setq ispell-program-name "hunspell" @@ -3507,7 +3503,7 @@ targets." "-o sides=two-sided-long-edge" "")))) (message "printing %s copies." copies) - (async-shell-command (format "lpr %s %s" (string-join pdf-misc-print-program-args " ") (buffer-file-name))))) + (async-shell-command (format "lpr %s '%s'" (string-join pdf-misc-print-program-args " ") (buffer-file-name))))) (custom-set-variables '(pdf-misc-print-program-executable "lpr") '(pdf-misc-print-program-args (quote ("-o media=Letter" "-o fit-to-page" "-o sides=two-sided-long-edge")))) @@ -3951,6 +3947,7 @@ interfere with the default `bongo-playlist-buffer'." "mr" 'emms-toggle-repeat-track "mn" 'emms-next "mb" 'emms-previous + "ms" 'emms-shuffle "m]" 'emms-seek-forward "m[" 'emms-seek-backward) (general-def 'normal emms-playlist-mode-map @@ -4144,3 +4141,19 @@ interfere with the default `bongo-playlist-buffer'." gcmh-verbose nil)) (setq warning-suppress-types '((comp))) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(pdf-misc-print-program-args + '("-o media=Letter" "-o fit-to-page" "-o sides=two-sided-long-edge")) + '(pdf-misc-print-program-executable "lpr") + '(safe-local-variable-values '((rustic-rustfmt-args . "--edition 2021")))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(markdown-code-face ((t (:inherit org-block)))) + '(org-modern-tag ((t :background "#9aedfe" :foreground "#282a36"))))