From 6de64e79e68d5b89e7504ac76736289342814a4a Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 17 Dec 2024 02:06:41 +0000 Subject: [PATCH] Configure sqlite mode, mpd client --- config.org | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index 91b5944..e00f67f 100644 --- a/config.org +++ b/config.org @@ -482,7 +482,7 @@ Install the package, enable it and ensure that it always is installed: (use-package pdf-tools :ensure t ;;:hook (pdf-tools-enabled . pdf-view-midnight-minor-mode) - ::hook (pdf-tools-enabled . pdf-view-themed-minor-mode) + :hook (pdf-tools-enabled . pdf-view-themed-minor-mode) ;;:hook (pdf-tools-enabled . hide-mode-line-mode) :init (pdf-loader-install) @@ -1487,5 +1487,34 @@ MPDel is an Emacs client for Music Player Daemon (MPD), a flexible, powerful, se Mingus is a frontend for GNU Emacs to the Music Player daemon. The interface closely, though not strictly, resembles that of ncmpc. #+BEGIN_SRC emacs-lisp (use-package mingus - :ensure t) + :ensure t + :config + (define-key mingus-global-map (kbd "") 'mingus-vol-up) + (define-key mingus-global-map (kbd "") 'mingus-vol-down) + ) +#+END_SRC + +** Sqlite Mode +Emacs has a built in sqlite mode to view sqlite database files and modify them. Configure to be a bit nicer +#+BEGIN_SRC emacs-lisp + (with-eval-after-load 'sqlite-mode + (define-key sqlite-mode-map (kbd "") 'sqlite-mode-list-data) + ) + ;; Hook into find-file, basically allows us to open the sqlite db file directly instead of using sqlite-mode-open-file function + (defun sqlite-find-file-hook () + (when (string= (file-name-extension buffer-file-name) "sqlite") + (let + ( + (sql-original-buffer-name (buffer-name)) + (sql-original-buffer-file-name (buffer-file-name)) + ) + + (kill-buffer sql-original-buffer-name) + (sqlite-mode-open-file sql-original-buffer-file-name) + ) + ) + ) + + (add-hook 'find-file-hook 'sqlite-find-file-hook) + #+END_SRC