summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yeetube.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/yeetube.el b/yeetube.el
index e5f9ab5..3fd6291 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -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"))