docs(*): some restructuring

This commit is contained in:
Pavel Korytov 2021-12-03 17:55:00 +03:00
parent ff990dc889
commit 9b0bee3ddd
5 changed files with 115 additions and 143 deletions

View file

@ -2047,6 +2047,47 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set
(car (find-file-read-args "Directory: " t))) (car (find-file-read-args "Directory: " t)))
(display-buffer my/tensorboard-buffer)) (display-buffer my/tensorboard-buffer))
(use-package json-mode
:straight t
:mode "\\.json\\'"
:config
(add-hook 'json-mode #'smartparens-mode)
(add-hook 'json-mode #'hs-minor-mode)
(my/set-smartparens-indent 'json-mode))
(use-package csv-mode
:straight t
:mode "\\.csv\\'")
(use-package yaml-mode
:straight t
:mode "\\.yml\\'"
:config
(add-hook 'yaml-mode-hook 'smartparens-mode)
(add-hook 'yaml-mode-hook 'highlight-indent-guides-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
(use-package dotenv-mode
:straight t
:mode "\\.env\\..*\\'")
(use-package dockerfile-mode
:mode "Dockerfile\\'"
:straight t
:config
(add-hook 'dockerfile-mode 'smartparens-mode))
(use-package crontab-mode
:straight t)
(add-hook 'sh-mode-hook #'smartparens-mode)
(use-package fish-mode
:straight t
:mode "\\.fish\\'"
:config
(add-hook 'fish-mode-hook #'smartparens-mode))
(use-package lsp-java (use-package lsp-java
:straight t :straight t
:after (lsp) :after (lsp)
@ -2081,14 +2122,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set
:config :config
(add-hook 'csproj-mode #'smartparens-mode)) (add-hook 'csproj-mode #'smartparens-mode))
(use-package fish-mode
:straight t
:mode "\\.fish\\'"
:config
(add-hook 'fish-mode-hook #'smartparens-mode))
(add-hook 'sh-mode-hook #'smartparens-mode)
(use-package haskell-mode (use-package haskell-mode
:straight t :straight t
:mode "\\.hs\\'") :mode "\\.hs\\'")
@ -2104,14 +2137,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set
(my/set-smartparens-indent 'lua-mode) (my/set-smartparens-indent 'lua-mode)
(use-package json-mode
:straight t
:mode "\\.json\\'"
:config
(add-hook 'json-mode #'smartparens-mode)
(add-hook 'json-mode #'hs-minor-mode)
(my/set-smartparens-indent 'json-mode))
(setq my/sqlformatter-dialect-choice (setq my/sqlformatter-dialect-choice
'("db2" "mariadb" "mysql" "n1ql" "plsql" "postgresql" "redshift" "spark" "sql" "tsql")) '("db2" "mariadb" "mysql" "n1ql" "plsql" "postgresql" "redshift" "spark" "sql" "tsql"))
@ -2134,31 +2159,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set
(use-package sparql-mode (use-package sparql-mode
:straight t) :straight t)
(use-package yaml-mode
:straight t
:mode "\\.yml\\'"
:config
(add-hook 'yaml-mode-hook 'smartparens-mode)
(add-hook 'yaml-mode-hook 'highlight-indent-guides-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
(use-package dotenv-mode
:straight t
:mode "\\.env\\..*\\'")
(use-package csv-mode
:straight t
:mode "\\.csv\\'")
(use-package dockerfile-mode
:mode "Dockerfile\\'"
:straight t
:config
(add-hook 'dockerfile-mode 'smartparens-mode))
(use-package crontab-mode
:straight t)
(use-package org (use-package org
:straight t :straight t
:if (not my/remote-server) :if (not my/remote-server)

View file

@ -407,7 +407,7 @@ if [[ ! -z "$INIT_CONDA" ]]; then
init_conda init_conda
fi fi
#+end_src #+end_src
*** Starship prompt *** Starship
#+begin_src bash #+begin_src bash
if [[ -z "$SIMPLE" ]]; then if [[ -z "$SIMPLE" ]]; then
eval "$(starship init bash)" eval "$(starship init bash)"

124
Emacs.org
View file

@ -1829,7 +1829,7 @@ Copy the current buffer to a perspective and switch to it.
(switch-to-buffer buffer))) (switch-to-buffer buffer)))
#+end_src #+end_src
Switch to perspective buffer in other window. Switch to a perspective buffer in other window.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/persp-ivy-switch-buffer-other-window (arg) (defun my/persp-ivy-switch-buffer-other-window (arg)
(interactive "P") (interactive "P")
@ -2704,7 +2704,7 @@ Section snippets. The code turned out to be more complicated than just writing t
'latex-mode 'latex-mode
my/latex-section-snippets) my/latex-section-snippets)
#+end_src #+end_src
** Other markup languages ** Other markup & natural languages
*** Markdown *** Markdown
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package markdown-mode (use-package markdown-mode
@ -2786,7 +2786,8 @@ References:
"l" 'langtool-correct-buffer) "l" 'langtool-correct-buffer)
#+end_src #+end_src
** Lisp ** Lisp
These are your father's parentheses. Elegant weapons for a more... civilized age. [[./dot-imgs/lisp_cycles.png]]
*** Meta Lisp *** Meta Lisp
Some packages for editing various Lisps. Some packages for editing various Lisps.
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -3092,6 +3093,66 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]].
(car (find-file-read-args "Directory: " t))) (car (find-file-read-args "Directory: " t)))
(display-buffer my/tensorboard-buffer)) (display-buffer my/tensorboard-buffer))
#+end_src #+end_src
** Data serialization
*** JSON
#+begin_src emacs-lisp
(use-package json-mode
:straight t
:mode "\\.json\\'"
:config
(add-hook 'json-mode #'smartparens-mode)
(add-hook 'json-mode #'hs-minor-mode)
(my/set-smartparens-indent 'json-mode))
#+end_src
*** CSV
#+begin_src emacs-lisp
(use-package csv-mode
:straight t
:mode "\\.csv\\'")
#+end_src
*** YAML
#+begin_src emacs-lisp
(use-package yaml-mode
:straight t
:mode "\\.yml\\'"
:config
(add-hook 'yaml-mode-hook 'smartparens-mode)
(add-hook 'yaml-mode-hook 'highlight-indent-guides-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
#+end_src
** Configuration
*** .env
#+begin_src emacs-lisp
(use-package dotenv-mode
:straight t
:mode "\\.env\\..*\\'")
#+end_src
*** Docker
#+begin_src emacs-lisp
(use-package dockerfile-mode
:mode "Dockerfile\\'"
:straight t
:config
(add-hook 'dockerfile-mode 'smartparens-mode))
#+end_src
*** crontab
#+begin_src emacs-lisp
(use-package crontab-mode
:straight t)
#+end_src
** Shell
*** sh
#+begin_src emacs-lisp
(add-hook 'sh-mode-hook #'smartparens-mode)
#+end_src
*** fish
#+begin_src emacs-lisp
(use-package fish-mode
:straight t
:mode "\\.fish\\'"
:config
(add-hook 'fish-mode-hook #'smartparens-mode))
#+end_src
** Java ** Java
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package lsp-java (use-package lsp-java
@ -3140,18 +3201,6 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]].
:config :config
(add-hook 'csproj-mode #'smartparens-mode)) (add-hook 'csproj-mode #'smartparens-mode))
#+end_src #+end_src
** fish
#+begin_src emacs-lisp
(use-package fish-mode
:straight t
:mode "\\.fish\\'"
:config
(add-hook 'fish-mode-hook #'smartparens-mode))
#+end_src
** sh
#+begin_src emacs-lisp
(add-hook 'sh-mode-hook #'smartparens-mode)
#+end_src
** Haskell ** Haskell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package haskell-mode (use-package haskell-mode
@ -3171,16 +3220,6 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]].
(my/set-smartparens-indent 'lua-mode) (my/set-smartparens-indent 'lua-mode)
#+end_src #+end_src
** JSON
#+begin_src emacs-lisp
(use-package json-mode
:straight t
:mode "\\.json\\'"
:config
(add-hook 'json-mode #'smartparens-mode)
(add-hook 'json-mode #'hs-minor-mode)
(my/set-smartparens-indent 'json-mode))
#+end_src
** SQL ** SQL
[[https://github.com/zeroturnaround/sql-formatter][sql-formatter]] is a nice JavaScript package for pretty-printing SQL queries. It is not packaged for Emacs, so the easiest way to use it seems to be to define a custom formatter via [[https://github.com/purcell/emacs-reformatter][reformatter]]. [[https://github.com/zeroturnaround/sql-formatter][sql-formatter]] is a nice JavaScript package for pretty-printing SQL queries. It is not packaged for Emacs, so the easiest way to use it seems to be to define a custom formatter via [[https://github.com/purcell/emacs-reformatter][reformatter]].
@ -3213,41 +3252,6 @@ So far I didn't find a nice SQL client for Emacs, but I occasionally run SQL que
(use-package sparql-mode (use-package sparql-mode
:straight t) :straight t)
#+end_src #+end_src
** YAML
#+begin_src emacs-lisp
(use-package yaml-mode
:straight t
:mode "\\.yml\\'"
:config
(add-hook 'yaml-mode-hook 'smartparens-mode)
(add-hook 'yaml-mode-hook 'highlight-indent-guides-mode)
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode)))
#+end_src
** .env
#+begin_src emacs-lisp
(use-package dotenv-mode
:straight t
:mode "\\.env\\..*\\'")
#+end_src
** CSV
#+begin_src emacs-lisp
(use-package csv-mode
:straight t
:mode "\\.csv\\'")
#+end_src
** Docker
#+begin_src emacs-lisp
(use-package dockerfile-mode
:mode "Dockerfile\\'"
:straight t
:config
(add-hook 'dockerfile-mode 'smartparens-mode))
#+end_src
** crontab
#+begin_src emacs-lisp
(use-package crontab-mode
:straight t)
#+end_src
* Org Mode * Org Mode
The best feature of Emacs. Just after every other best feature of Emacs, probably. The best feature of Emacs. Just after every other best feature of Emacs, probably.

View file

@ -11,57 +11,25 @@ The files themselves are managed and deployed via [[https://yadm.io/][yadm]], bu
My current GNU/Linux distribution is [[https://guix.gnu.org/][GNU Guix]]. In the context of this repo, Guix allows me to list all the used programs in manifests, which means I have the same set of programs across multiple machines. Look for tables with "Guix dependency" in the header. My current GNU/Linux distribution is [[https://guix.gnu.org/][GNU Guix]]. In the context of this repo, Guix allows me to list all the used programs in manifests, which means I have the same set of programs across multiple machines. Look for tables with "Guix dependency" in the header.
Literate configuration files: Table of contents and software:
- [[file:Emacs.org][Emacs.org]] - [[file:Emacs.org][Emacs.org]]
- [[file:Emacs.org][GNU Emacs]]
- [[file:Desktop.org][Desktop.org]] - [[file:Desktop.org][Desktop.org]]
- /Active/: [[file:Desktop.org::*EXWM][EXWM]], [[file:Desktop.org::*Polybar][Polybar]], [[file:Desktop.org::*Rofi][Rofi]], [[file:Desktop.org::*Flameshot][Flameshot]], [[file:Desktop.org::*dunst][dunst]], [[file:Desktop.org::*Picom][Picom]], [[file:Desktop.org::*Zathura][Zathura]]
- /In Limbo/: [[file:Desktop.org::*i3wm][i3wm]], [[file:Desktop.org::*keynav][keynav]]
- [[file:Console.org][Console.org]] - [[file:Console.org][Console.org]]
- /Active/: [[file:Console.org::*=.profile=][.profile]], [[file:Console.org::*Bash][Bash]], [[file:Console.org::*Fish][Fish]], [[file:Console.org::*Starship prompt][Starship]], [[file:Console.org::*Tmux][Tmux]], [[file:Console.org::*Alacritty][Alacritty]]
- /In Limbo/: [[file:Console.org::*Nushell][Nushell]]
- [[file:Guix.org][Guix.org]] - [[file:Guix.org][Guix.org]]
- [[file:Mail.org][Mail.org]] - [[file:Mail.org][Mail.org]]
- /Active/: [[file:Mail.org::*Lieer][Lieer]], [[file:Mail.org::*DavMail][DavMail]], [[file:Mail.org::*OfflineIMAP][OfflineIMAP]], [[file:Mail.org::*Notmuch][Notmuch]]
* Programs used
Some of the notable programs are listed in the table below.
| Group | Program | Purpose | Status | Documented? | Notes |
|-----------+-------------+-----------------------------+-------------------+----------------+-----------------------------------------------------------|
| console | bash | shell | launches fish :) | [[file:Console.org::*Bash][Console.org]] | |
| console | [[https://fishshell.com/][fish]] | shell | *active* | [[file:Console.org::*Fish][Console.org]] | |
| console | [[https://github.com/starship/starship][starship]] | prompt | *active* | [[file:Console.org::*Starship][Console.org]] | |
| console | [[https://github.com/tmux/tmux][tmux]] | terminal multiplexer | *active* | [[file:Console.org::*Tmux][Console.org]] | |
| console | [[https://github.com/alacritty/alacritty][alacritty]] | terminal emulator | *active* | [[file:Console.org::*Alacritty][Console.org]] | |
| mail | [[https://notmuchmail.org/][notmuch]] | mail indexer | *active* | [[file:Mail.org][Mail.org,]] [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][post]] | |
| mail | [[https://github.com/gauteh/lieer][lieer]] | gmail API client | *active* | [[file:Mail.org][Mail.org]], [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][post]] | credentials are encrypted |
| mail | [[https://marlam.de/msmtp/][msmtp]] | SMTP client | *active* | [[file:Mail.org][Mail.org]] | |
| editor | [[https://www.gnu.org/software/emacs/][emacs]] | everything | *active* | [[file:Emacs.org][Emacs.org]] | GitHub renders .org files without labels and =tangle: no= |
| editor | [[https://www.vim.org/][vim]] | text edtior | *active* | - | A minimal config to have a lightweight terminal $EDITOR |
| editor | [[https://neovim.io/][neovim]] | text edtior | archive | - | |
| documents | [[https://mg.readthedocs.io/latexmk.html][latexmk]] | LaTeX build tool | *active* | - | |
| documents | [[https://pwmt.org/projects/zathura/][zathura]] | pdf viewer | *active* | [[file:Desktop.org::*dunst][Desktop.org]] | |
| desktop | [[https://github.com/dunst-project/dunst][dunst]] | notification manager | *active* | [[file:Desktop.org::*dunst][Desktop.org]] | |
| desktop | [[https://i3wm.org/][i3wm]] | tiling WM | *active* | [[file:Desktop.org::*i3wm][Desktop.org]] | |
| desktop | [[https://github.com/jordansissel/keynav][keynav]] | control mouse with keyboard | *active* | [[file:Desktop.org::*keynav][Desktop.org]] | |
| desktop | [[https://github.com/polybar/polybar][polybar]] | status bar | *active* | [[file:Desktop.org::*Polybar][Desktop.org]] | |
| desktop | [[https://github.com/davatorium/rofi][rofi]] | generic menu | *active* | [[file:Desktop.org::*Rofi][Desktop.org]] | |
| desktop | [[https://github.com/flameshot-org/flameshot][flameshot]] | screenshot | *active* | [[file:Desktop.org::Flameshot][Desktop.org]] | |
| desktop | [[https://github.com/yshui/picom][picom]] | X11 compositor | *active* | [[file:Desktop.org::*Picom][Desktop.org]] | |
| desktop | [[https://github.com/vivien/i3blocks][i3blocks]] | status bar | archive | - | |
| internet | [[https://github.com/tridactyl/tridactyl][tridactyl]] | vim bindings for Firefox | *active* | - | templated with yadm |
| internet | [[https://newsboat.org/][newsboat]] | terminal RSS reader | archive | - | urls are encrypted |
| internet | [[https://qutebrowser.org/][qutebrowser]] | browser with vim bindings | archive | - | |
| internet | [[https://github.com/jarun/buku][buku]] | bookmarks manager | archive | - | |
| audio | [[https://www.musicpd.org/][mpd]] | music player daemon | *active* | - | |
| audio | [[https://github.com/ncmpcpp/ncmpcpp][ncmpcpp]] | MPD frontend | *active* | - | |
| misc | [[https://yadm.io][yadm]] | dotfiles manager | *active* | - | |
| misc | [[https://github.com/risacher/sunwait][sunwait]] | sunrise calculator | *active* | - | |
| misc | [[https://github.com/vergoh/vnstat][vnstat]] | traffic stats | *active* | - | |
* Posts about my configuration * Posts about my configuration
- [[https://sqrtminusone.xyz/posts/2021-10-04-emacs-i3/][Getting a consistent set of keybindings between i3 and Emacs]]
- [[https://sqrtminusone.xyz/posts/2021-09-07-emms/][My EMMS and elfeed setup]]
- [[https://sqrtminusone.xyz/posts/2021-05-01-org-python/][Replacing Jupyter Notebook with Org Mode]] - [[https://sqrtminusone.xyz/posts/2021-05-01-org-python/][Replacing Jupyter Notebook with Org Mode]]
- [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][Multiple Gmail accounts & labels with Emacs]] - [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][Multiple Gmail accounts & labels with Emacs]]
* Some statistics * Some statistics
If you are viewing the file in Emacs, eval the following to show the pictures with reasonable width:
** History
[[https://sqrtminusone.xyz/stats/all.png]] [[https://sqrtminusone.xyz/stats/all.png]]
[[https://sqrtminusone.xyz/stats/emacs-vim.png]] [[https://sqrtminusone.xyz/stats/emacs-vim.png]]

BIN
dot-imgs/lisp_cycles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB