Dashboard
(use-package all-the-icons)
(use-package page-break-lines)
(use-package dashboard
:if window-system
:ensure t
:after all-the-icons
:init
(setq dashboard-startup-banner-logo-title "välkommen"
dashboard-banner-logo-title "🎀 välkommen 🎀"
dashboard-footer-messages '("Linque tuas sedes, alienaque littora quaere, O iuuenis! maior rerum tibi nascitur ordo" "Quod placet. Hic spinas colligit, ille rosas." "in girum imus nocte et consumimur igni" "Quisquis peccat inops, minor est reus." "saepe peccasse; nam et homo sum et adhuc iuvenis. Numquam tamen ante hunc diem usque ad mortem deliqui." "quam male est extra legem viventibus! quicquid meruerunt, semper expectant" "Noveram hominem olim oliorum, et adhuc salax erat.")
dashboard-items '((recents . 10))
dashboard-init-info
#[0 "\305\306 \307\300!\203\21\0\10\203\21\0\11G\262\2\307\302!\203\36\0\310\12!\2\\\262\2\311\312!\2034\0\313\314\315\316\13\14\"!\"\262\1\312 G\262\2\1\305U\203?\0\313\317\2\"\207\313\320\3\3#\207"
[package-alist package-activated-list straight--profile-cache elpaca-after-init-time before-init-time 0 emacs-init-time boundp hash-table-count fboundp elpaca--queued format "%f sekunder" float-time time-subtract "Emacs startade efter %s" "%d paket laddade på %s"]
8]
dashboard-startup-banner "~/.emacs.d/splash.png"
dashboard-item-names '(("Recent Files:" . "Senaste filer:")
("Agenda for today:" . "Dagens agenda:")
("Agenda for the coming week:" . "Agenda:"))
dashboard-center-content t
dashboard-item-shortcuts nil
; dashboard-set-heading-icons f
dashboard-startupify-list '(dashboard-insert-banner
dashboard-insert-newline
dashboard-insert-banner-title
dashboard-insert-newline
dashboard-insert-navigator
dashboard-insert-newline
dashboard-insert-init-info
dashboard-insert-items
dashboard-insert-newline
dashboard-insert-footer)
dashboard-navigator-buttons
`((
(,(all-the-icons-faicon "firefox" :height 1.1 :v-adjust 0.0)
"Hemsida"
""
(lambda (&rest _) (browse-url "https://hjalmarbjerner.com"))))
((,(all-the-icons-faicon "music" :height 1.1 :v-adjust 0.0)
"Starta jackd & fluidsynth"
""
(lambda (&rest _) (shell-command "audio start" nil nil))))
((,(all-the-icons-faicon "superscript" :height 1.1 :v-adjust 0.0)
"Starta SC"
""
(lambda (&rest _) (interactive) (cd "/home/hjallis/Kod/SuperCollider") (sclang-start))))))
:config
(dashboard-setup-startup-hook)
)
(setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))Musikprogram
Lilypond, sclang, csound
Lilypond
(add-to-list 'load-path "/home/hjallis/.emacs.d/lilypond-ts-mode/")
(require 'lilypond-ts-mode)
(add-to-list 'auto-mode-alist '("\\.ly\\'" . lilypond-ts-mode))
(add-to-list 'auto-mode-alist '("\\.ily\\'" . lilypond-ts-mode))
(setq lilypond-ts-repl-includes '("~/Projektfiler/Stylesheets/variabler.ily"))
(defun my-lilypond-measure (n)
"Go to bar with designated bar number."
(interactive "nGo to bar: ")
(beginning-of-buffer)
;; If current measure is lower than target measure (due to voice-splitting or similar, try moving forward by the
(lilypond-ts-forward-measure 1)
(while (< (get-char-property (point) :bar-number) n)
(lilypond-ts-forward-measure 1)
)
)
(defun my-open-lily-pdf ()
(interactive)
(let
((pdf-adress
(concat
(substring
(buffer-file-name (window-buffer (minibuffer-selected-window))) 0 -3)
".pdf"
)
))
(call-process (pcase system-type
(_ "xdg-open"))
nil 0 nil pdf-adress)
)
)
(add-hook 'lilypond-ts-mode-hook (lambda () (electric-pair-mode 1)))
(add-hook 'lilypond-ts-mode-hook (lambda () (rainbow-delimiters-mode 1)))
(add-hook 'lilypond-ts-mode-hook (lambda () (lilypond-ts-navigation-mode 1)))
(add-hook 'lilypond-ts-mode-hook (lambda () (load-library "~/.emacs.d/lilypond-skeletons.el")))
(add-hook 'lilypond-ts-mode-hook (lambda () (define-key lilypond-ts-mode-map (kbd "M-p") #'my-open-lily-pdf)))
(add-hook 'lilypond-ts-mode-hook (lambda () (define-key lilypond-ts-mode-map (kbd "M-g M-b") #'my-lilypond-measure)))
;;;; Auto-compilation
(add-hook 'lilypond-ts-mode-hook (lambda () (add-hook 'after-save-hook (lambda () (lilypond-ts-compile) nil t) nil t)))Geiser guile för lilypond
(setq inferior-lisp-program "/usr/bin/sbcl")
(use-package geiser-mit :ensure t)
(use-package geiser-guile)
(add-to-list 'load-path "/home/hjallis/.emacs.d/lilypond-ts-mode/")
;(add-to-list 'load-path "/home/hjallis/.emacs.d/lilypond-ts-mode/navigation/navigation.scm")Supercollider
(add-to-list 'load-path "/home/hjallis/.local/share/SuperCollider/downloaded-quarks/scel/el/")
(require 'sclang)CSound
(use-package csound-mode)
(setq csound-font-lock-rainbow-score-parameters-p t)
(setq csound-indentation-aggressive-score t)
(setq csound-play-flags "-odac")