Move applications into one heading

This commit is contained in:
contrapunctus 2021-02-18 15:01:40 +05:30
parent 08fad863e1
commit 9e9d07e7a0
1 changed files with 185 additions and 184 deletions

369
init.org
View File

@ -77,6 +77,7 @@ But after ironing out [[https://github.com/jingtaozf/literate-elisp/issues/7][so
(setq ag-highlight-search t))
#+END_SRC
** ido-mini
This needs to be before =boon=, or you get a "failed to define function ido-mini" error when you press the keybinding.
#+BEGIN_SRC emacs-lisp
@ -100,7 +101,6 @@ This needs to be before =boon=, or you get a "failed to define function ido-mini
;; (if (not (server-running-p)) (server-start))
(server-start)
#+END_SRC
** modal editing
*** active boon config
#+BEGIN_SRC emacs-lisp
@ -260,7 +260,9 @@ I'm pretty much using this to emulate `god-mode', which was great, but is no lon
(require 'cp-god)
#+END_SRC
** time tracking - chronometrist :application:
** Applications
*** time tracking - chronometrist
choice.el is required by =chronometrist-key-values=
#+BEGIN_SRC emacs-lisp
(use-package choice
@ -526,6 +528,187 @@ Return nil (and run `magit-status') if the user answers no."
(generate-new-buffer-name "sed-tangle")
(format "sed -n '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' ~s.org > ~s.el" base base)))))
#+END_SRC
*** WISH emms
1. [ ] make toggle command for emms-start/emms-stop
2. [ ] change mode line display - don't show the whole file path, just the name
#+BEGIN_SRC emacs-lisp
(use-package emms
:after hydra
:bind
("<f2> e" . #'hydra-emms/body)
("<f2> E" . #'emms)
(:map dired-mode-map
("E" . #'hydra-emms/body))
:commands
(emms-minimalistic emms emms-play-dired emms-add-dired)
:config
(emms-minimalistic)
(emms-default-players)
(setq emms-player-mpv-parameters
(lambda ()
(append
'("--fs"
"--quiet"
"--really-quiet"
;; "--vid=no"
"--force-window=yes"
"-ao=jack,alsa"
;; "--loop-file=inf"
)
(let* ((dir (->> (emms-playlist-current-selected-track)
(alist-get 'name)
(file-name-directory)))
(subs-in-dir (f-glob "*.srt" dir))
(subs-in-subdir (f-glob "*/*.srt" dir)))
(->> (append subs-in-dir subs-in-subdir)
(-interpose ":")
(append '("--sub-files="))
(apply #'concat)
(list))))))
;; ;; This won't work for `emms-random', because it runs in a `save-excursion'
;; (add-to-list 'emms-playlist-selection-changed-hook 'emms-playlist-mode-center-current)
;; (--map (add-to-list 'emms-player-mpv-parameters it)
;; '("--fs"))
(defun contrapunctus-emms-toggle-player ()
(interactive)
(if emms-player-stopped-p
(emms-start)
(emms-stop)))
:init (defhydra hydra-emms ()
("e" #'emms "EMMS")
("n" #'emms-next "Next")
("p" #'emms-previous "Previous")
("SPC" #'emms-pause "Pause")
("s" #'contrapunctus-emms-toggle-player "Start/Stop")
("0" #'emms-volume-raise)
("9" #'emms-volume-lower)
("<up>" #'emms-volume-raise)
("<down>" #'emms-volume-lower)
("<left>" #'emms-seek-backward)
("<right>" #'emms-seek-forward)
("l" #'emms-play-dired "Play file (dired)")
("a" #'emms-add-dired "Add file (dired)")
("A" #'emms-add-directory-tree "Add directory")
("u" #'emms-play-url)))
(use-package emms-playlist-mode
:bind
(:map emms-playlist-mode-map
("0" . #'emms-volume-raise)
("9" . #'emms-volume-lower)
("<up>" . #'emms-volume-raise)
("<down>" . #'emms-volume-lower)
("<left>" . #'emms-seek-backward)
("<right>" . #'emms-seek-forward)
("n" . #'next-line)
("p" . #'previous-line)
("N" . #'emms-next)
("P" . #'emms-previous)
("R" . #'emms-toggle-random-playlist)
("M-n" . #'emms-cue-next)
("M-p" . #'emms-cue-previous)
("SPC" . #'emms-pause))
:config
(setq emms-playlist-buffer-name "EMMS Playlist"))
(use-package emms-info-tinytag
:init
(setq emms-info-functions '(emms-info-tinytag))
:config
(setq emms-info-tinytag-python-name "python3"))
#+END_SRC
*** Internet
**** eww
#+BEGIN_SRC emacs-lisp
(use-package eww
:config
(setq shr-image-animate nil)
:bind
;; start boon-specific config
(:map shr-map
("v" . nil))
(:map shr-image-map
("i" . nil)
("v" . nil))
(:map eww-link-keymap
("i" . nil)
("v" . nil))
;; end boon-specific config
(:map eww-mode-map
("b" . #'eww-back-url)
("f" . #'eww-forward-url)
("v" . nil)))
#+END_SRC
**** url-cookie
Ask for confirmation before saving cookies. I'd rather just disallow them all though 🤔
#+BEGIN_SRC emacs-lisp
(use-package url-cookie
:config
(setq url-cookie-confirmation t))
#+END_SRC
**** elpher
#+BEGIN_SRC emacs-lisp
(use-package elpher
:bind (:map elpher-mode-map
("n" . elpher-next-link)
("p" . elpher-prev-link)
("b" . elpher-back)
("w" . elpher-copy-current-url)
("W" . elpher-copy-link-url)))
#+END_SRC
**** elfeed
#+BEGIN_SRC emacs-lisp
(use-package elfeed
:bind (:map elfeed-show-mode-map
("v" . nil))
:config
(add-to-list 'boon-special-mode-list 'elfeed-show-mode)
(add-to-list 'boon-special-mode-list 'elfeed-search-mode))
#+END_SRC
**** jabber :disabled:
#+BEGIN_SRC emacs-lisp
(use-package jabber
:disabled
:commands jabber-connect
:config (global-unset-key (kbd "C-x C-j"))
(global-set-key (kbd "C-x C-j") 'join-line)
(setq jabber-history-enabled t
jabber-history-muc-enabled t
jabber-alert-presence-message-function nil))
#+END_SRC
*** sxiv
#+BEGIN_SRC emacs-lisp
(use-package sxiv
:config (setq sxiv-exclude-strings '("meh" "\\.NEF$")))
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
;; (load "cp-adb")
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(require 'cp-editing)
;; (load "cp-evil")
(require 'cp-fm)
(require 'cp-lily)
(require 'cp-sfz)
(require 'cp-lisp)
(require 'cp-nav)
;; (ispell-change-dictionary "en")
(setq ispell-dictionary "en")
#+END_SRC
** comint
#+BEGIN_SRC emacs-lisp
@ -620,97 +803,6 @@ Add these common operations to the hydra -
("E" toggle-debug-on-error "tdoe")
("Q" toggle-debug-on-quit "tdoq"))
#+END_SRC
** WISH emms :application:
1. [ ] make toggle command for emms-start/emms-stop
2. [ ] change mode line display - don't show the whole file path, just the name
#+BEGIN_SRC emacs-lisp
(use-package emms
:after hydra
:bind
("<f2> e" . #'hydra-emms/body)
("<f2> E" . #'emms)
(:map dired-mode-map
("E" . #'hydra-emms/body))
:commands
(emms-minimalistic emms emms-play-dired emms-add-dired)
:config
(emms-minimalistic)
(emms-default-players)
(setq emms-player-mpv-parameters
(lambda ()
(append
'("--fs"
"--quiet"
"--really-quiet"
;; "--vid=no"
"--force-window=yes"
"-ao=jack,alsa"
;; "--loop-file=inf"
)
(let* ((dir (->> (emms-playlist-current-selected-track)
(alist-get 'name)
(file-name-directory)))
(subs-in-dir (f-glob "*.srt" dir))
(subs-in-subdir (f-glob "*/*.srt" dir)))
(->> (append subs-in-dir subs-in-subdir)
(-interpose ":")
(append '("--sub-files="))
(apply #'concat)
(list))))))
;; ;; This won't work for `emms-random', because it runs in a `save-excursion'
;; (add-to-list 'emms-playlist-selection-changed-hook 'emms-playlist-mode-center-current)
;; (--map (add-to-list 'emms-player-mpv-parameters it)
;; '("--fs"))
(defun contrapunctus-emms-toggle-player ()
(interactive)
(if emms-player-stopped-p
(emms-start)
(emms-stop)))
:init (defhydra hydra-emms ()
("e" #'emms "EMMS")
("n" #'emms-next "Next")
("p" #'emms-previous "Previous")
("SPC" #'emms-pause "Pause")
("s" #'contrapunctus-emms-toggle-player "Start/Stop")
("0" #'emms-volume-raise)
("9" #'emms-volume-lower)
("<up>" #'emms-volume-raise)
("<down>" #'emms-volume-lower)
("<left>" #'emms-seek-backward)
("<right>" #'emms-seek-forward)
("l" #'emms-play-dired "Play file (dired)")
("a" #'emms-add-dired "Add file (dired)")
("A" #'emms-add-directory-tree "Add directory")
("u" #'emms-play-url)))
(use-package emms-playlist-mode
:bind
(:map emms-playlist-mode-map
("0" . #'emms-volume-raise)
("9" . #'emms-volume-lower)
("<up>" . #'emms-volume-raise)
("<down>" . #'emms-volume-lower)
("<left>" . #'emms-seek-backward)
("<right>" . #'emms-seek-forward)
("n" . #'next-line)
("p" . #'previous-line)
("N" . #'emms-next)
("P" . #'emms-previous)
("R" . #'emms-toggle-random-playlist)
("M-n" . #'emms-cue-next)
("M-p" . #'emms-cue-previous)
("SPC" . #'emms-pause))
:config
(setq emms-playlist-buffer-name "EMMS Playlist"))
(use-package emms-info-tinytag
:init
(setq emms-info-functions '(emms-info-tinytag))
:config
(setq emms-info-tinytag-python-name "python3"))
#+END_SRC
** eshell
#+BEGIN_SRC emacs-lisp
@ -718,69 +810,6 @@ Add these common operations to the hydra -
:config (setq eshell-history-size 999))
#+END_SRC
** Internet
*** eww :application:
#+BEGIN_SRC emacs-lisp
(use-package eww
:config
(setq shr-image-animate nil)
:bind
;; start boon-specific config
(:map shr-map
("v" . nil))
(:map shr-image-map
("i" . nil)
("v" . nil))
(:map eww-link-keymap
("i" . nil)
("v" . nil))
;; end boon-specific config
(:map eww-mode-map
("b" . #'eww-back-url)
("f" . #'eww-forward-url)
("v" . nil)))
#+END_SRC
*** url-cookie
Ask for confirmation before saving cookies. I'd rather just disallow them all though 🤔
#+BEGIN_SRC emacs-lisp
(use-package url-cookie
:config
(setq url-cookie-confirmation t))
#+END_SRC
*** elpher :application:
#+BEGIN_SRC emacs-lisp
(use-package elpher
:bind (:map elpher-mode-map
("n" . elpher-next-link)
("p" . elpher-prev-link)
("b" . elpher-back)
("w" . elpher-copy-current-url)
("W" . elpher-copy-link-url)))
#+END_SRC
*** elfeed :application:
#+BEGIN_SRC emacs-lisp
(use-package elfeed
:bind (:map elfeed-show-mode-map
("v" . nil))
:config
(add-to-list 'boon-special-mode-list 'elfeed-show-mode)
(add-to-list 'boon-special-mode-list 'elfeed-search-mode))
#+END_SRC
*** jabber :disabled:
#+BEGIN_SRC emacs-lisp
(use-package jabber
:disabled
:commands jabber-connect
:config (global-unset-key (kbd "C-x C-j"))
(global-set-key (kbd "C-x C-j") 'join-line)
(setq jabber-history-enabled t
jabber-history-muc-enabled t
jabber-alert-presence-message-function nil))
#+END_SRC
** image-mode
#+BEGIN_SRC emacs-lisp
(use-package image-mode
@ -1861,34 +1890,6 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
(use-package powerline)
#+END_SRC
** sxiv :application:
#+BEGIN_SRC emacs-lisp
(use-package sxiv
:config (setq sxiv-exclude-strings '("meh" "\\.NEF$")))
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
;; (load "cp-adb")
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(require 'cp-editing)
;; (load "cp-evil")
(require 'cp-fm)
(require 'cp-lily)
(require 'cp-sfz)
(require 'cp-lisp)
(require 'cp-nav)
;; (ispell-change-dictionary "en")
(setq ispell-dictionary "en")
#+END_SRC
** undo-tree
#+BEGIN_SRC emacs-lisp
(use-package undo-tree