diff --git a/README.org b/README.org index 324348b3..eafc5a1a 100644 --- a/README.org +++ b/README.org @@ -1859,25 +1859,14 @@ interfere with the default `bongo-playlist-buffer'." (use-package bongo :commands (bongo bongo-playlist-buffer) :config - ;; (define-bongo-backend mpv-slow - ;; :program-name 'mpv - ;; :constructor 'bongo-start-mpv-player - ;; :extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket") - ;; :matcher '((local-file "file:" "http:" "ftp:" "lbry:") - ;; "ogg" "flac" "mp3" "mka" "wav" - ;; "ogm" "opus" ) - ;; :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" - ;; "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" - ;; "cue:" "sdp:" "mpst:" "tivo:") . t) - ;; :matcher '(("http:" "https:" "lbry:") . t)) - (define-bongo-backend mpv :constructor 'bongo-start-mpv-player :program-name 'mpv :extra-program-arguments '("--profile=fast --input-ipc-server=/tmp/mpvsocket") :matcher '((local-file "file:" "http:" "ftp:" "lbry:") - "wma" "ogg" "flac" "mp3" "mka" "wav" - "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" + "mka" "wav" "wma" "ogm" "opus" + "ogg" "flac" "mp3" "mka" "wav" + "mpg" "mpeg" "vob" "avi" "ogm" "mp4" "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" @@ -1897,6 +1886,10 @@ interfere with the default `bongo-playlist-buffer'." (interactive) (bongo-mpv-player-pause/resume bongo-player)) + (defun chris/bongo-mpv-speed-up () + (interactive) + (bongo--run-mpv-command bongo-player "speed" "set" "speed" "1.95")) + :general (chris/leader-keys :states 'normal @@ -1910,6 +1903,7 @@ interfere with the default `bongo-playlist-buffer'." "P" 'bongo-yank "H" 'bongo-switch-buffers "q" 'bury-buffer + "+" 'chris/bongo-mpv-speed-up "m" 'chris/bongo-mark-line-forward) (general-def 'normal bongo-library-mode-map "RET" 'bongo-dwim diff --git a/init.el b/init.el index 9dff6483..e002031b 100644 --- a/init.el +++ b/init.el @@ -2,9 +2,9 @@ (defun chris/display-startup-time () (message "Emacs loaded in %s with %d garbage collections." (format "%.2f seconds" - (float-time - (time-subtract after-init-time before-init-time))) - gcs-done)) + (float-time + (time-subtract after-init-time before-init-time))) + gcs-done)) (add-hook 'emacs-startup-hook #'chris/display-startup-time) (setq inhibit-startup-message t) @@ -48,7 +48,7 @@ (with-selected-frame frame (chris/set-font-faces) (chris/set-transparency))) - (chris/set-font-faces)) + (chris/set-font-faces)) (chris/set-transparency)) (setq display-line-numbers-type 'relative) @@ -65,7 +65,7 @@ ;; ...especially on linux (setq x-gtk-use-system-tooltips nil) - ;; Favor vertical splits over horizontal ones. Screens are usually wide. +;; Favor vertical splits over horizontal ones. Screens are usually wide. (setq split-width-threshold 160 split-height-threshold nil) @@ -99,8 +99,8 @@ (straight-use-package 'use-package) (setq use-package-verbose t) - (use-package command-log-mode - :commands command-log-mode) +(use-package command-log-mode + :commands command-log-mode) (use-package all-the-icons) @@ -293,19 +293,19 @@ ;; We need to fix selectrums minibuffer handling for Emacs 28 (defun selectrum--set-window-height (window &optional height) - "Set window height of WINDOW to HEIGHT pixel. + "Set window height of WINDOW to HEIGHT pixel. If HEIGHT is not given WINDOW will be updated to fit its content vertically." - (let* ((lines (length - (split-string - (overlay-get selectrum--candidates-overlay 'after-string) - "\n" t))) - (dheight (or height - (* lines selectrum--line-height))) - (wheight (window-pixel-height window)) - (window-resize-pixelwise t)) - (window-resize - window (- dheight wheight) nil nil 'pixelwise))) + (let* ((lines (length + (split-string + (overlay-get selectrum--candidates-overlay 'after-string) + "\n" t))) + (dheight (or height + (* lines selectrum--line-height))) + (wheight (window-pixel-height window)) + (window-resize-pixelwise t)) + (window-resize + window (- dheight wheight) nil nil 'pixelwise))) :general ('selectrum-minibuffer-map "C-j" 'selectrum-next-candidate @@ -338,10 +338,10 @@ vertically." (use-package marginalia :bind (:map minibuffer-local-map - ("C-M-a" . marginalia-cycle) - ;; :map embark-general-map - ;; ("A" . marginalia-cycle) - ) + ("C-M-a" . marginalia-cycle) + ;; :map embark-general-map + ;; ("A" . marginalia-cycle) + ) ;; The :init configuration is always executed (Not lazy!) :init @@ -449,7 +449,7 @@ vertically." (use-package friar :straight (:host github :repo "warreq/friar" :branch "master" - :files (:defaults "*.lua" "*.fnl")) + :files (:defaults "*.lua" "*.fnl")) :after fennel-mode) (use-package yaml-mode @@ -767,17 +767,17 @@ vertically." :after org :init (setq org-super-agenda-groups '((:name "Today" - :time-grid t - :scheduled today) + :time-grid t + :scheduled today) (:name "Due Today" - :deadline today) + :deadline today) (:name "Important" - :priority "A") + :priority "A") (:name "Overdue" - :time-grid t - :scheduled today) + :time-grid t + :scheduled today) (:name "Due soon" - :deadline future))) + :deadline future))) :config (org-super-agenda-mode) (setq org-super-agenda-header-map nil)) @@ -1276,20 +1276,20 @@ If on a: (add-hook 'eshell-mode-hook '(display-line-numbers-mode -1)) (setq eshell-command-aliases-list - '(("ls" "exa $1") - ("la" "exa -la $1") - ("q" "exit") - ("f" "find-file $1") - ("ff" "find-file $1") - ("d" "dired $1") - ("bd" "eshell-up $1") - ("rg" "rg --color=always $*") - ("ll" "ls -lah $*") - ("gg" "magit-status") - ("clear" "clear-scrollback") - ("!c" "eshell-previous-input 2") - ("yay" "paru") - ("yeet" "paru -Rns"))) + '(("ls" "exa $1") + ("la" "exa -la $1") + ("q" "exit") + ("f" "find-file $1") + ("ff" "find-file $1") + ("d" "dired $1") + ("bd" "eshell-up $1") + ("rg" "rg --color=always $*") + ("ll" "ls -lah $*") + ("gg" "magit-status") + ("clear" "clear-scrollback") + ("!c" "eshell-previous-input 2") + ("yay" "paru") + ("yeet" "paru -Rns"))) :general (chris/leader-keys @@ -1304,8 +1304,8 @@ If on a: (use-package pdf-tools :straight (:host github - :repo "flatwhatson/pdf-tools" - :branch "fix-macros") + :repo "flatwhatson/pdf-tools" + :branch "fix-macros") :defer 1 :config (pdf-tools-install) @@ -1392,25 +1392,14 @@ interfere with the default `bongo-playlist-buffer'." (use-package bongo :commands (bongo bongo-playlist-buffer) :config - ;; (define-bongo-backend mpv-slow - ;; :program-name 'mpv - ;; :constructor 'bongo-start-mpv-player - ;; :extra-program-arguments '("--profile=slow --input-ipc-server=/tmp/mpvsocket") - ;; :matcher '((local-file "file:" "http:" "ftp:" "lbry:") - ;; "ogg" "flac" "mp3" "mka" "wav" - ;; "ogm" "opus" ) - ;; :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" - ;; "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" - ;; "cue:" "sdp:" "mpst:" "tivo:") . t) - ;; :matcher '(("http:" "https:" "lbry:") . t)) - (define-bongo-backend mpv :constructor 'bongo-start-mpv-player :program-name 'mpv :extra-program-arguments '("--profile=fast --input-ipc-server=/tmp/mpvsocket") :matcher '((local-file "file:" "http:" "ftp:" "lbry:") - "wma" "ogg" "flac" "mp3" "mka" "wav" - "mpg" "mpeg" "vob" "avi" "ogm" "opus" "mp4" + "mka" "wav" "wma" "ogm" "opus" + "ogg" "flac" "mp3" "mka" "wav" + "mpg" "mpeg" "vob" "avi" "ogm" "mp4" "mkv" "mov" "asf" "wmv" "rm" "rmvb" "ts") :matcher '(("mms:" "mmst:" "rtp:" "rtsp:" "udp:" "unsv:" "dvd:" "vcd:" "tv:" "dvb:" "mf:" "cdda:" "cddb:" @@ -1430,6 +1419,10 @@ interfere with the default `bongo-playlist-buffer'." (interactive) (bongo-mpv-player-pause/resume bongo-player)) + (defun chris/bongo-mpv-speed-up () + (interactive) + (bongo--run-mpv-command bongo-player "speed" "set" "speed" "1.95")) + :general (chris/leader-keys :states 'normal @@ -1443,6 +1436,7 @@ interfere with the default `bongo-playlist-buffer'." "P" 'bongo-yank "H" 'bongo-switch-buffers "q" 'bury-buffer + "+" 'chris/bongo-mpv-speed-up "m" 'chris/bongo-mark-line-forward) (general-def 'normal bongo-library-mode-map "RET" 'bongo-dwim @@ -1470,11 +1464,11 @@ interfere with the default `bongo-playlist-buffer'." transmission-files-mode transmission-info-mode transmission-peers-mode))) - :general - (chris/leader-keys - :states 'normal - :keymaps 'override - "ot" 'transmission)) + :general + (chris/leader-keys + :states 'normal + :keymaps 'override + "ot" 'transmission)) (use-package auth-source-pass :defer 1