mirror of https://github.com/Flinner/dots.git
feat emacs org mode and stuff
This commit is contained in:
parent
00e4620c81
commit
e98d93993f
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
emacsclient -e '(make-orgcapture-frame)'
|
|
@ -141,9 +141,10 @@ Actuall Theme:
|
|||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(flycheck-warning ((t (:background "#282828" :underline "#fabd2f"))))
|
||||
;; '(flycheck-warning ((t (:background "#282828" :underline "#fabd2f"))))
|
||||
'(org-date ((t (:inherit fixed-pitch))))
|
||||
'(ivy-posframe-border ((t (:background "#ffffff")))))
|
||||
;; '(ivy-posframe-border ((t (:background "#ffffff")))))
|
||||
)
|
||||
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
|
@ -233,6 +234,12 @@ Single Esc to Quit, instead of *three*
|
|||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
#+end_src
|
||||
|
||||
** Function keys
|
||||
#+begin_src emacs-lisp
|
||||
(global-set-key (kbd "M-<f8>") '(lambda () (interactive) (org-agenda nil "a")))
|
||||
(global-set-key (kbd "M-<f6>") 'elfeed-dashboard)
|
||||
#+end_src
|
||||
|
||||
** General.el
|
||||
Eval First and Last at least block!
|
||||
E: honestly I have no clue wtf that meant, but I will keep it
|
||||
|
@ -341,6 +348,12 @@ E: honestly I have no clue wtf that meant, but I will keep it
|
|||
"rcR" '(org-clock-report :which-key "Clock Report")
|
||||
"rcg" '(org-clock-goto :which-key "Goto Clock")
|
||||
|
||||
;; Anki
|
||||
"rn" '(:ignore t :which-key "AnKi")
|
||||
"rnp" '(anki-editor-push-notes :which-key "Clock In")
|
||||
"rni" '(anki-editor-insert-notes :which-key "Clock In")
|
||||
|
||||
|
||||
;; Schedules and Deadlines
|
||||
;; TODO!
|
||||
#+end_src
|
||||
|
@ -595,6 +608,7 @@ Capture
|
|||
(evil-snipe-mode +1))
|
||||
#+end_src
|
||||
|
||||
|
||||
* Completions
|
||||
** ivy
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -722,6 +736,18 @@ better sorting for ivy, company..
|
|||
#+end_src
|
||||
|
||||
* Org-Mode
|
||||
** Set directories
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-directory "~/Documents/gtd/"
|
||||
org-roam-directory "~/Documents/roam/"
|
||||
org-agenda-files (list org-directory (concat org-roam-directory "life.org"))
|
||||
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org")
|
||||
elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org"
|
||||
org-preview-latex-image-directory "/tmp/ltximg"
|
||||
org-my-anki-file (concat org-roam-directory "anki.org")
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** use-package
|
||||
Modes To Start
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -759,6 +785,7 @@ use-package
|
|||
(set-face-attribute (car face) nil :font my/ui/varfont :weight 'regular :height (cdr face)))
|
||||
|
||||
|
||||
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
|
||||
;; Ensure that anything that should be fixed-pitch in Org files appears that way
|
||||
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
|
||||
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
|
||||
|
@ -769,17 +796,6 @@ use-package
|
|||
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
|
||||
#+end_src
|
||||
|
||||
** Set directories
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-directory "~/Documents/gtd/"
|
||||
org-roam-directory "~/Documents/roam/"
|
||||
org-agenda-files (list org-directory (concat org-roam-directory "life.org"))
|
||||
rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org")
|
||||
elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org"
|
||||
org-preview-latex-image-directory "/tmp/ltximg"
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Appearance
|
||||
*** Symbols
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -824,19 +840,11 @@ use-package
|
|||
(org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●")))
|
||||
#+end_src
|
||||
|
||||
** CANCELED Auto Tangle Configuration Files
|
||||
CLOSED: [2021-07-30 Fri 12:52]
|
||||
Automatically tangle our Emacs.org config file when we save it
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(defun my/org-mode/org-babel-tangle-config ()
|
||||
(when (string-equal (buffer-file-name)
|
||||
(expand-file-name "~/.config/emacs/init.org"))
|
||||
;; Dynamic scoping to the rescue
|
||||
(let ((org-confirm-babel-evaluate nil))
|
||||
(org-babel-tangle))))
|
||||
|
||||
(add-hook 'org-mode-hook
|
||||
(lambda () (add-hook 'after-save-hook #'my/org-mode/org-babel-tangle-config)))
|
||||
*** Latex
|
||||
scale inline
|
||||
#+begin_src emacs-lisp
|
||||
; moved to use -package
|
||||
; (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
|
||||
#+end_src
|
||||
|
||||
** Babel
|
||||
|
@ -866,12 +874,35 @@ Allow fast code insertion
|
|||
(add-to-list 'org-structure-template-alist '("scm" . "src scheme"))
|
||||
#+end_src
|
||||
|
||||
** Capture Templates
|
||||
** Capture
|
||||
*** Templates
|
||||
#+begin_src emacs-lisp
|
||||
(setq org-capture-templates
|
||||
`(
|
||||
("d" "Distraction" entry (file+headline ,(concat org-directory "distractions.org") "Inbox")
|
||||
"* %?\n%T")))
|
||||
"* %?\n%T")
|
||||
("a" "Anki basic"
|
||||
entry
|
||||
(file+headline org-my-anki-file "Dispatch Shelf")
|
||||
"* %<%H:%M> \n:PROPERTIES:\n:ANKI_NOTE_TYPE: Basic\n:ANKI_DECK: Math::Calculus-III\n:END:\n** Front\n%?\n** Back\n%x\n")
|
||||
|
||||
("A" "Anki cloze"
|
||||
entry
|
||||
(file+headline org-my-anki-file "Dispatch Shelf")
|
||||
"* %<%H:%M> \n:PROPERTIES:\n:ANKI_NOTE_TYPE: Cloze\n:ANKI_DECK: Mega\n:END:\n** Text\n%x\n** Extra\n")))
|
||||
#+end_src
|
||||
|
||||
*** Utils
|
||||
launch with =emacsclient -e '(make-orgcapture-frame)'=
|
||||
#+begin_src emacs-lisp
|
||||
(defun make-orgcapture-frame ()
|
||||
"Create a new frame and run org-capture."
|
||||
(interactive)
|
||||
(make-frame '((name . "org-capture") (window-system . x)))
|
||||
(select-frame-by-name "org-capture")
|
||||
(counsel-org-capture)
|
||||
(delete-other-windows)
|
||||
)
|
||||
#+end_src
|
||||
|
||||
** Agenda
|
||||
|
@ -976,6 +1007,7 @@ Allow fast code insertion
|
|||
#+end_src
|
||||
|
||||
** org-roam
|
||||
*** use-package
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-roam
|
||||
:defer t
|
||||
|
@ -999,7 +1031,7 @@ Allow fast code insertion
|
|||
(no-delete-other-windows . t))))))
|
||||
#+end_src
|
||||
|
||||
** org roam server
|
||||
*** org roam server
|
||||
#+begin_src emacs-lisp
|
||||
(use-package websocket
|
||||
:after org-roam)
|
||||
|
@ -1019,7 +1051,7 @@ Allow fast code insertion
|
|||
|
||||
#+end_src
|
||||
|
||||
** Deft
|
||||
*** Deft
|
||||
#+begin_src emacs-lisp
|
||||
(use-package deft
|
||||
:after org
|
||||
|
@ -1037,6 +1069,23 @@ Allow fast code insertion
|
|||
|
||||
#+end_src
|
||||
|
||||
** Anki
|
||||
#+begin_src emacs-lisp
|
||||
(use-package anki-editor
|
||||
:after org
|
||||
:bind (:map org-mode-map
|
||||
("<f12>" . anki-editor-cloze-region-auto-incr))
|
||||
:init
|
||||
(setq-default anki-editor-use-math-jax t)
|
||||
|
||||
:config
|
||||
|
||||
(setq anki-editor-create-decks nil ;; Allow anki-editor to create a new deck if it doesn't exist
|
||||
anki-editor-org-tags-as-anki-tags t)
|
||||
|
||||
)
|
||||
#+end_src
|
||||
|
||||
* Development
|
||||
** General
|
||||
*** Brackets setup
|
||||
|
@ -1206,7 +1255,8 @@ Get treemacs-lsp
|
|||
:bind (:map rustic-mode-map
|
||||
("C-c C-c l" . lsp-ui-flycheck-list)
|
||||
("C-c C-c s" . lsp-rust-analyzer-status)
|
||||
("<f5>" . rustic-cargo-test))
|
||||
("<f5>" . rustic-cargo-test)
|
||||
("C-<f5>" . rustic-cargo-run))
|
||||
:config
|
||||
;; uncomment for less flashiness
|
||||
;; (setq lsp-eldoc-hook nil)
|
||||
|
@ -1362,9 +1412,9 @@ Better Diff in header sizes
|
|||
*** Scheme (guile)
|
||||
#+begin_src emacs-lisp
|
||||
(use-package geiser
|
||||
:bind
|
||||
([remap eval-last-sexp] . geiser-eval-last-sexp))
|
||||
(use-package geiser-guile)
|
||||
:bind ([remap eval-last-sexp] . geiser-eval-last-sexp))
|
||||
|
||||
(use-package geiser-guile)
|
||||
#+end_src
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1392,22 +1442,6 @@ Better Diff in header sizes
|
|||
:ensure t)
|
||||
#+end_src
|
||||
|
||||
** Elfeed org
|
||||
#+begin_src emacs-lisp
|
||||
(use-package elfeed-dashboard
|
||||
:config
|
||||
;; (setq elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org")
|
||||
;; update feed counts on elfeed-quit
|
||||
(advice-add 'elfeed-search-quit-window :after #'elfeed-dashboard-update-links))
|
||||
|
||||
(use-package elfeed-org
|
||||
:commands elfeed
|
||||
:hook (elfeed . elfeed-org)
|
||||
:config)
|
||||
;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))
|
||||
|
||||
#+end_src
|
||||
|
||||
** ranger
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ranger
|
||||
|
@ -1449,6 +1483,46 @@ Better Diff in header sizes
|
|||
`([,(cdr char-regexp) 0 font-shape-gstring]))))
|
||||
#+end_src
|
||||
|
||||
* Elfeed org
|
||||
=;; (setq rmh-elfeed-org-files (list "~/Documents/private.el/elfeed.org"))=
|
||||
** Elfeed-org
|
||||
#+begin_src emacs-lisp
|
||||
(use-package elfeed-org
|
||||
:commands elfeed
|
||||
:config (elfeed-org))
|
||||
|
||||
#+end_src
|
||||
|
||||
** Elfeed Dashboard
|
||||
#+begin_src emacs-lisp
|
||||
(use-package elfeed-dashboard
|
||||
:commands elfeed-dashboard
|
||||
:config
|
||||
;; (setq elfeed-dashboard-file "~/Documents/private.el/elfeed-dashboard.org")
|
||||
;; update feed counts on elfeed-quit
|
||||
(advice-add 'elfeed-search-quit-window :after #'elfeed-dashboard-update-links)
|
||||
(evil-set-initial-state 'elfeed-dashboard-mode 'emacs)
|
||||
:hook (elfeed-dashboard-mode . (lambda () (variable-pitch-mode -1))))
|
||||
|
||||
#+end_src
|
||||
|
||||
** Visual
|
||||
#+begin_src emacs-lisp
|
||||
(use-package elfeed
|
||||
:config
|
||||
(defun my/elfeed/visual ()
|
||||
(interactive)
|
||||
(set-face-attribute 'variable-pitch (selected-frame) :font (font-spec :family my/ui/varfont :size 13))
|
||||
(setq visual-fill-column-width 110
|
||||
visual-fill-column-center-text t
|
||||
fill-column 90)
|
||||
(visual-fill-column-mode 1)
|
||||
(visual-line-mode 1))
|
||||
:hook (elfeed-show-mode . my/elfeed/visual))
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
* IRC
|
||||
** unsused 'erc'
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
####################
|
||||
# General settings #
|
||||
####################
|
||||
|
||||
# Anki deck for new cards. Subdecks are supported.
|
||||
deck_name=Japanese::Mining
|
||||
|
||||
# Model names are listed in `Tools -> Manage note types` menu in Anki.
|
||||
model_name=Japanese sentences
|
||||
|
||||
# Field names as they appear in the selected note type.
|
||||
sentence_field=SentKanji
|
||||
audio_field=SentAudio
|
||||
image_field=Image
|
||||
|
||||
# The tag(s) added to new notes. Spaces separate multiple tags.
|
||||
# Leave nothing after `=` to disable tagging completely.
|
||||
# The following substitutions are supported:
|
||||
# %n - the name of the video
|
||||
# %t - timestamp
|
||||
# %d - episode number (if none, returns nothing)
|
||||
# %e - SUBS2SRS_TAGS environment variable
|
||||
note_tag=subs2srs
|
||||
#note_tag=%n %t %e
|
||||
#note_tag=
|
||||
|
||||
# Size of the font used in the menu
|
||||
menu_font_size=24
|
||||
|
||||
##############################################
|
||||
# Togglebles. Possble values: `yes` or `no`. #
|
||||
##############################################
|
||||
|
||||
# Automatically create the deck for new cards (see deck_name option)
|
||||
create_deck=yes
|
||||
|
||||
# When mpv starts, automatically copy subs to the clipboard as they appear on screen.
|
||||
# This option can be also toggled in the addon's OSD menu.
|
||||
autoclip=no
|
||||
|
||||
# Remove all spaces from the subtitle text.
|
||||
# Only makes sense for languages without spaces like Japanese.
|
||||
nuke_spaces=yes
|
||||
|
||||
# if set to `yes`, the volume of the outputted audio file
|
||||
# depends on the volume of the player at the time of export
|
||||
tie_volumes=no
|
||||
|
||||
# Remove text in parentheses that may interfere with Yomichan
|
||||
# before copying subtitles to the clipboard
|
||||
clipboard_trim_enabled=yes
|
||||
|
||||
# Add media to fields before or after existing data
|
||||
append_media=yes
|
||||
|
||||
# Remove text in brackets before substituting %n into tag
|
||||
tag_nuke_brackets=yes
|
||||
|
||||
# Remove text in brackets before substituting %n into tag
|
||||
tag_nuke_parentheses=no
|
||||
|
||||
# Remove the episode number before substituting %n into tag
|
||||
tag_del_episode_num=yes
|
||||
|
||||
# Remove everything after the episode number before substituting %n into tag
|
||||
# Does nothing if the previous option tag_del_episode_num is disabled.
|
||||
tag_del_after_episode_num=yes
|
||||
|
||||
# Convert filename to lowercase for tagging.
|
||||
tag_filename_lowercase=no
|
||||
|
||||
##################
|
||||
# Image settings #
|
||||
##################
|
||||
|
||||
# Snapshot format.
|
||||
snapshot_format=webp
|
||||
#snapshot_format=jpg
|
||||
|
||||
# Quality of produced image files. 0 = lowest, 100=highest.
|
||||
snapshot_quality=15
|
||||
|
||||
# Image dimensions
|
||||
# If either (but not both) of the width or height parameters is -2,
|
||||
# the value will be calculated preserving the aspect-ratio.
|
||||
snapshot_width=-2
|
||||
snapshot_height=200
|
||||
|
||||
##################
|
||||
# Audio settings #
|
||||
##################
|
||||
|
||||
# Audio format.
|
||||
audio_format=opus
|
||||
#audio_format=mp3
|
||||
|
||||
# Sane values are 16k-32k for opus, 64k-128k for mp3.
|
||||
audio_bitrate=18k
|
||||
|
||||
# Set a pad to the dialog timings. 0.5 = half a second
|
||||
audio_padding=0.0
|
||||
#audio_padding=0.5
|
||||
|
||||
#######################################
|
||||
# Forvo support (Yomichan users only) #
|
||||
#######################################
|
||||
|
||||
# yes - fetch audio from Forvo if Yomichan couldn't find the audio (default)
|
||||
# always - always fetch audio from Forvo and replace the audio added by Yomichan
|
||||
# no - never use Forvo
|
||||
use_forvo=yes
|
||||
|
||||
# Vocab field should be equal to {expression} field in Yomichan
|
||||
vocab_field=VocabKanji
|
||||
|
||||
# Vocab Audio field should be equal to {audio} field in Yomichan
|
||||
vocab_audio_field=VocabAudio
|
||||
|
||||
#######################################
|
||||
# Misc info #
|
||||
#######################################
|
||||
|
||||
# By enabling miscinfo you can add certain context information to your cards.
|
||||
miscinfo_enable=yes
|
||||
|
||||
# Field name
|
||||
miscinfo_field=Notes
|
||||
|
||||
# Format string used to fill the miscinfo_field.
|
||||
# It supports the same substitutions as note_tag. HTML is supported.
|
||||
miscinfo_format=%n EP%d (%t)
|
||||
#miscinfo_format=From <b>mpvacious</b> %n at %t.
|
|
@ -0,0 +1 @@
|
|||
/etc/mpv/scripts/mpvacious/
|
|
@ -49,6 +49,8 @@ super + e
|
|||
emacsclient -nc -alternate-editor="emacs"
|
||||
#emacsclient -nc -alternate-editor=""
|
||||
|
||||
super + shift + e
|
||||
~/bin/org-capture
|
||||
# show poly-bar
|
||||
super + b
|
||||
polybar-msg cmd show; bspc config -m focused top_padding 20
|
||||
|
|
Loading…
Reference in New Issue