From ec7d57ff1cc9606fd69d610d4c0527a8c510757d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 3 Mar 2021 16:59:21 -0600 Subject: [PATCH] Adding Bongo and making mu4e work with icons --- README.org | 69 +++++++++++++++++++++++++++++++++++++++++++++++++- eshell/history | 45 ++++++++++++++++++++++++++++++++ init.el | 63 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 175 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index cca98668..a915a74c 100644 --- a/README.org +++ b/README.org @@ -24,6 +24,7 @@ - [[#pdf-tools][PDF-Tools]] - [[#window-management][Window Management]] - [[#elfeed][Elfeed]] + - [[#bongo][Bongo]] - [[#garbage-collection][Garbage Collection]] - [[#early-init][Early Init]] @@ -1032,7 +1033,8 @@ If on a: mu4e-change-filenames-when-moving t mu4e-get-mail-command "mbsync -a" mu4e-update-interval (* 15 60) - mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments") + mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments" + mu4e-completing-read-function #'completing-read) (setq mu4e-contexts (list @@ -1111,6 +1113,18 @@ If on a: :key 112))) (setq mu4e-mu-binary "/usr/bin/mu") + (setq mu4e-use-fancy-chars t + mu4e-headers-draft-mark '("D" . "") + mu4e-headers-flagged-mark '("F" . "") + mu4e-headers-new-mark '("N" . "") + mu4e-headers-passed-mark '("P" . "") + mu4e-headers-replied-mark '("R" . "") + mu4e-headers-seen-mark '("S" . "") + mu4e-headers-trashed-mark '("T" . "") + mu4e-headers-attach-mark '("a" . "") + mu4e-headers-encrypted-mark '("x" . "") + mu4e-headers-signed-mark '("s" . "") + mu4e-headers-unread-mark '("u" . "")) (defun chris/setup-mu4e-headers () (toggle-truncate-lines -1) @@ -1128,6 +1142,15 @@ If on a: :ensure t) #+end_src +Let's add org-msg to write emails in org-mode +#+begin_src emacs-lisp +(use-package org-msg + :hook (mu4e-compose-pre . org-msg-mode) + :config + (setq org-msg-startup "inlineimages" + org-msg-greeting-name-limit 3 + org-msg-default-alternatives '(html text))) +#+end_src ** Calendar #+begin_src emacs-lisp (use-package calfw @@ -1307,6 +1330,50 @@ Let's use pdf-tools for a lot better interaction with pdfs. (setq rmh-elfeed-org-files (list "~/org/elfeed.org"))) #+end_src +** Bongo +#+begin_src emacs-lisp +(use-package bongo + :commands (bongo) + :config + (define-bongo-backend mpv + ;; :constructor 'bongo-start-mpv-player + :program-name 'mpv + :constructor 'bongo-start-mpv-player + :extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket") + :matcher '((local-file "file:" "http:" "ftp:" "lbry:") + "ogg" "flac" "mp3" "mka" "wav" "wma" + "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" + "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") + :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" + "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" + "cue:" "sdp:" "mpst:" "tivo:") . t) + :matcher '(("http:" "https:" "lbry:") . t)) + + (setq bongo-enabled-backends '(mpv) + bongo-track-mark-icon-file-name "sun-solid.png") + + (defun chris/bongo-mark-line-forward () + (interactive) + (bongo-mark-line) + (goto-char (bongo-point-after-object)) + (next-line)) + + (defun chris/bongo-mpv-pause/resume () + (interactive) + (bongo-mpv-player-pause/resume bongo-player)) + + :general + (chris/leader-keys + "ob" 'bongo) + (general-def 'normal bongo-playlist-mode-map + "RET" 'bongo-dwim + "d" 'bongo-kill + "u" 'bongo-unmark-region + "p" 'bongo-pause/resume + "H" 'bongo-switch-buffers + "m" 'chris/bongo-mark-line-forward)) +#+end_src + ** Garbage Collection We set the =gc-cons-threshold= variable to really high, now lets set it back low to make sure emacs performs properly. diff --git a/eshell/history b/eshell/history index 5a0261c3..fa516375 100644 --- a/eshell/history +++ b/eshell/history @@ -62,3 +62,48 @@ ls -a curl https://raw.githubusercontent.com/Chocobozzz/PeerTube/develop/support/docker/production/.env > .env ls ls -a +curl rate.sx/ +curl rate.sx/btc +curl rate.sx/ +curl rate.sx/ +curl rate.sx/ +man kdeconnect +kdeconnect-cli --help +kdeconnect-cli -l +kdeconnect-cli -n PH-1 --share RoyalKing.png +kdeconnect-cli -n PH-1 --share RoyalKing.png +paru xmr +paru httpd +paru hwloc +paru xmr +paru xmr +paru httpd +paru xmr +paru +paru xmr +paru xmr +paru --makepkg DMICROHTTPD_ENABLE=OFF -S xmr-stak-git +paru --makepkg -DMICROHTTPD_ENABLE=OFF -S xmr-stak-git +paru -S xmr-stak-git +paru xmr +ls +uncompress xmr-stak-rx-linux-1.0.5-cpu.tgz +ls +man tar +tar -x xmr-stak-rx-linux-1.0.5-cpu.tar +ls +tar -xf xmr-stak-rx-linux-1.0.5-cpu.tar +ls +cd xmr-stak-rx-linux-1.0.5-cpu/ +ls +ls +(* 16 60) +(* 960 60) +(/ 57600 100) +ls +sudo chmod +755 xmrig.json +xmrig --help +ls +ls +ls /tmp +cat /tmp/bongo-mpv.socket diff --git a/init.el b/init.el index 9fd0db16..f7456d29 100644 --- a/init.el +++ b/init.el @@ -746,7 +746,8 @@ If on a: mu4e-change-filenames-when-moving t mu4e-get-mail-command "mbsync -a" mu4e-update-interval (* 15 60) - mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments") + mu4e-attachment-dir "/home/chris/Documents/PersonalImportant/attachments" + mu4e-completing-read-function #'completing-read) (setq mu4e-contexts (list @@ -825,6 +826,18 @@ If on a: :key 112))) (setq mu4e-mu-binary "/usr/bin/mu") + (setq mu4e-use-fancy-chars t + mu4e-headers-draft-mark '("D" . "") + mu4e-headers-flagged-mark '("F" . "") + mu4e-headers-new-mark '("N" . "") + mu4e-headers-passed-mark '("P" . "") + mu4e-headers-replied-mark '("R" . "") + mu4e-headers-seen-mark '("S" . "") + mu4e-headers-trashed-mark '("T" . "") + mu4e-headers-attach-mark '("a" . "") + mu4e-headers-encrypted-mark '("x" . "") + mu4e-headers-signed-mark '("s" . "") + mu4e-headers-unread-mark '("u" . "")) (defun chris/setup-mu4e-headers () (toggle-truncate-lines -1) @@ -841,6 +854,13 @@ If on a: (use-package org-mime :ensure t) +(use-package org-msg + :hook (mu4e-compose-pre . org-msg-mode) + :config + (setq org-msg-startup "inlineimages" + org-msg-greeting-name-limit 3 + org-msg-default-alternatives '(html text))) + (use-package calfw :commands chris/calfw-calendar-open :config @@ -989,4 +1009,45 @@ If on a: :config (setq rmh-elfeed-org-files (list "~/org/elfeed.org"))) +(use-package bongo + :commands (bongo) + :config + (define-bongo-backend mpv + ;; :constructor 'bongo-start-mpv-player + :program-name 'mpv + :constructor 'bongo-start-mpv-player + :extra-program-arguments '("--input-ipc-server=/tmp/mpvsocket") + :matcher '((local-file "file:" "http:" "ftp:" "lbry:") + "ogg" "flac" "mp3" "mka" "wav" "wma" + "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" + "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") + :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" + "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" + "cue:" "sdp:" "mpst:" "tivo:") . t) + :matcher '(("http:" "https:" "lbry:") . t)) + + (setq bongo-enabled-backends '(mpv) + bongo-track-mark-icon-file-name "sun-solid.png") + + (defun chris/bongo-mark-line-forward () + (interactive) + (bongo-mark-line) + (goto-char (bongo-point-after-object)) + (next-line)) + + (defun chris/bongo-mpv-pause/resume () + (interactive) + (bongo-mpv-player-pause/resume bongo-player)) + + :general + (chris/leader-keys + "ob" 'bongo) + (general-def 'normal bongo-playlist-mode-map + "RET" 'bongo-dwim + "d" 'bongo-kill + "u" 'bongo-unmark-region + "p" 'bongo-pause/resume + "H" 'bongo-switch-buffers + "m" 'chris/bongo-mark-line-forward)) + (setq gc-cons-threshold 2000000)