diff options
author | Thanos Apollo <[email protected]> | 2023-09-29 02:51:57 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-29 02:51:57 +0300 |
commit | 4431a7a1d214390c426f17ed43d997b97edb9828 (patch) | |
tree | d654592489ccf8b090152d0f2089f330cad916e6 | |
parent | 5782e7ab0f9f862aeb4ac2fddab3b3468302cef5 (diff) |
yeetube: Redo yeetube-mode as derived from special-mode
-rw-r--r-- | yeetube.el | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -85,16 +85,18 @@ Example Usage: :safe #'booleanp :group 'yeetube) -;; TODO: Make it as derived from special mode -(define-minor-mode yeetube-mode +(define-derived-mode yeetube-mode special-mode "Yeetube" "Yeetube mode." :init-value nil + :interactive nil + (abbrev-mode 0) + (setf buffer-read-only nil) + (display-line-numbers-mode 0) :lighter " yeetube-mode" :keymap (let ((yeetube-mode-map (make-sparse-keymap))) (define-key yeetube-mode-map (kbd "RET") 'yeetube-play) (define-key yeetube-mode-map (kbd "d") 'yeetube-download-video) (define-key yeetube-mode-map (kbd "u") 'yeetube-change-platform) - (define-key yeetube-mode-map (kbd "q") 'kill-current-buffer) (define-key yeetube-mode-map (kbd "D") 'yeetube-change-download-directory) (define-key yeetube-mode-map (kbd "a") 'yeetube-change-download-audio-format) (define-key yeetube-mode-map (kbd "p") 'yeetube-mpv-toggle-pause) @@ -102,6 +104,7 @@ Example Usage: (define-key yeetube-mode-map (kbd "V") 'yeetube-mpv-toggle-no-video-flag) (define-key yeetube-mode-map (kbd "s") 'yeetube-save-video) (define-key yeetube-mode-map (kbd "P") 'yeetube-play-saved-video) + (define-key yeetube-mode-map (kbd "q") 'quit-window) yeetube-mode-map)) (defvar yeetube-yt-dlp (executable-find "yt-dlp")) |