diff --git a/README.org b/README.org index 75a29add..b55590e5 100644 --- a/README.org +++ b/README.org @@ -555,9 +555,9 @@ Here let's try to add ligatures to our font system since the VictorMono Nerd Fon ;; __ ___ ____ _|_ __|____|_ ("_" (rx (+ (or "_" "|")))) ;; Fira code: 0xFF 0x12 - ("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9"))))) + ;; ("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9"))))) ;; Fira code: - "Fl" "Tl" "fi" "fj" "fl" "ft" + ;; "Fl" "Tl" "fi" "fj" "fl" "ft" ;; The few not covered by the regexps. "{|" "[|" "]#" "(*" "}#" "$>" "^=")) ;; Enables ligature checks globally in all buffers. You can also do it @@ -740,6 +740,7 @@ This evil-collection package includes a lot of other evil based things. "ov" '(vterm :which-key "vterm") "wo" '(other-window :which-key "other window") "wn" '(evil-window-next :which-key "other window") + "wm" '(maximize-window :which-key "maximize window") "wd" '(delete-window :which-key "other window") "wv" '(evil-window-vsplit :which-key "split window vertically") "ws" '(evil-window-split :which-key "split window horizontally") @@ -754,7 +755,8 @@ This evil-collection package includes a lot of other evil based things. ";" '(execute-extended-command :which-key "execute command") "d" '(execute-extended-command :which-key "execute command") "&" '(async-shell-command :which-key "async shell command") - ":" '(eval-expression :which-key "evaluate expression")) + ":" '(eval-expression :which-key "evaluate expression") + "gc" '(project-compile :which-key "compile project")) (chris/leader-keys :states 'normal :keymaps 'lisp-mode @@ -3434,7 +3436,7 @@ I'd like to start learning and using rust if I can. "gt" 'rustic-cargo-test) (chris/leader-keys :states 'normal - :keymaps '(rustic-mode override) + :keymaps '(rustic-mode) "gc" 'rustic-compile "gr" 'projectile-run-project "si" 'consult-imenu-multi)) diff --git a/init.el b/init.el index 4761f87a..b84a0678 100644 --- a/init.el +++ b/init.el @@ -310,9 +310,9 @@ ;; __ ___ ____ _|_ __|____|_ ("_" (rx (+ (or "_" "|")))) ;; Fira code: 0xFF 0x12 - ("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9"))))) + ;; ("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9"))))) ;; Fira code: - "Fl" "Tl" "fi" "fj" "fl" "ft" + ;; "Fl" "Tl" "fi" "fj" "fl" "ft" ;; The few not covered by the regexps. "{|" "[|" "]#" "(*" "}#" "$>" "^=")) ;; Enables ligature checks globally in all buffers. You can also do it @@ -472,6 +472,7 @@ "ov" '(vterm :which-key "vterm") "wo" '(other-window :which-key "other window") "wn" '(evil-window-next :which-key "other window") + "wm" '(maximize-window :which-key "maximize window") "wd" '(delete-window :which-key "other window") "wv" '(evil-window-vsplit :which-key "split window vertically") "ws" '(evil-window-split :which-key "split window horizontally") @@ -486,7 +487,8 @@ ";" '(execute-extended-command :which-key "execute command") "d" '(execute-extended-command :which-key "execute command") "&" '(async-shell-command :which-key "async shell command") - ":" '(eval-expression :which-key "evaluate expression")) + ":" '(eval-expression :which-key "evaluate expression") + "gc" '(project-compile :which-key "compile project")) (chris/leader-keys :states 'normal :keymaps 'lisp-mode @@ -2551,7 +2553,7 @@ targets." "gt" 'rustic-cargo-test) (chris/leader-keys :states 'normal - :keymaps '(rustic-mode override) + :keymaps '(rustic-mode) "gc" 'rustic-compile "gr" 'projectile-run-project "si" 'consult-imenu-multi)) diff --git a/lumina.el b/lumina.el index c0e9b9de..d9fcba1b 100644 --- a/lumina.el +++ b/lumina.el @@ -48,23 +48,66 @@ "Select which song to edit" (interactive) (with-current-buffer (get-buffer-create "*lumina*") - (fundamental-mode) + (org-mode) (delete-region (point-min) (point-max)) (point-min) (let* ((title (completing-read "Select a song: " (cl-loop for song in lumina-songs collect (cadr song)))) - (lyrics (cl-loop for song in lumina-songs - when (string= (cadr song) title) - return (caddr song)))) - (insert lyrics) - (setf lumina-current-song title))) + (song (cl-loop for song in lumina-songs + when (string= (cadr song) title) + return song)) + (lyrics (elt song 2)) + (author (elt song 3)) + (ccli (elt song 4)) + (audio (elt song 5)) + (verse-order (elt song 6)) + (background (elt song 7)) + (background-type (elt song 8)) + (halign (elt song 9)) + (valign (elt song 10)) + (font (elt song 11)) + (font-size (elt song 12))) + (insert (concat "#+TITLE: " title)) + (newline) + (insert (concat "#+AUTHOR: " author)) + (newline) + (insert (concat "#+AUDIO: " audio)) + (newline) + (insert (concat "#+VERSE_ORDER: " verse-order)) + (newline) + (insert (concat "#+BACKGROUND: " background)) + (newline) + (insert (concat "#+BACKGROUND_TYPE: " background-type)) + (newline) + (insert (concat "#+HALIGN: " halign)) + (newline) + (insert (concat "#+VALIGN: " valign)) + (newline) + (insert (concat "#+FONT: " font)) + (newline) + (insert (concat "#+FONT_SIZE: " (number-to-string font-size))) + (newline) + (newline) + (insert (concat "* Lyrics\n" lyrics)) + (print song) + (setf lumina-current-song title))) (switch-to-buffer "*lumina*")) (defvar lumina-current-song) (defun lumina-grab-lyrics () - (with-current-buffer (get-buffer-create "*lumina*") - (buffer-substring-no-properties (point-min) (point-max)))) + (with-current-buffer (get-buffer "*lumina*") + (goto-char (point-min)) + (search-forward "* Lyrics") + (next-line) + (move-to-left-margin) + (buffer-substring-no-properties (point) (point-max)))) + +(defun lumina-get-verse-order () + (with-current-buffer (get-buffer "*lumina*") + (goto-char (point-min)) + (search-forward "#+VERSE_ORDER: ") + (buffer-substring-no-properties (point) nil))) (defvar lumina-lyrics-update-query (concat "update songs set lyrics = \"?" (lumina-grab-lyrics) "\" where title = " lumina-current-song))