From 67f3177c8f37d5f1c17d509f69fd015edf19e824 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sun, 29 Aug 2021 16:01:58 +0500 Subject: [PATCH] feat: update config --- .gitmodules | 0 content/configs/Console.md | 1 + content/configs/Console.md~ | 1 + content/configs/Desktop.md | 2 +- content/configs/Desktop.md~ | 2 +- content/configs/Emacs.md | 92 +-- content/configs/Emacs.md~ | 92 +-- content/configs/Mail.md | 12 +- content/configs/Mail.md~ | 12 +- content/configs/README.md~ | 2 +- public/404.html | 20 +- public/categories/index.html | 20 +- public/configs/console/index.html | 21 +- public/configs/desktop/index.html | 22 +- public/configs/emacs/index.html | 106 +-- public/configs/guix/index.html | 20 +- public/configs/index.html | 20 +- public/configs/index.xml | 4 +- public/configs/mail/index.html | 32 +- public/configs/readme/index.html | 20 +- public/index.html | 20 +- public/index.xml | 68 ++ public/posts/2021-02-27-gmail/index.html | 20 +- public/posts/2021-05-01-org-python/index.html | 20 +- public/posts/hello-world/index.html | 20 +- public/posts/index.html | 20 +- public/sass/researcher.min.css | 1 + public/tags/emacs/index.html | 20 +- public/tags/index.html | 20 +- public/tags/mail/index.html | 20 +- public/tags/org/index.html | 20 +- ...s_81ad576498767608ce504b3564784665.content | 1 + ...scss_81ad576498767608ce504b3564784665.json | 1 + themes/researcher/LICENSE | 674 ++++++++++++++++++ themes/researcher/README.md | 50 ++ themes/researcher/archetypes/default.md | 2 + themes/researcher/assets/sass/researcher.scss | 162 +++++ themes/researcher/exampleSite/config.toml | 53 ++ .../researcher/exampleSite/content/_index.md | 1 + .../researcher/exampleSite/content/about.md | 61 ++ .../researcher/exampleSite/content/contact.md | 24 + ...s_b95b077eb505d5c0aff8055eaced30ad.content | 1 + ...scss_b95b077eb505d5c0aff8055eaced30ad.json | 1 + .../researcher/exampleSite/static/avatar.jpg | Bin 0 -> 12302 bytes .../researcher/exampleSite/static/favicon.ico | Bin 0 -> 7406 bytes .../researcher/exampleSite/static/resume.pdf | Bin 0 -> 96781 bytes themes/researcher/images/screenshot.png | Bin 0 -> 80672 bytes themes/researcher/images/tn.png | Bin 0 -> 53110 bytes themes/researcher/layouts/404.html | 6 + .../researcher/layouts/_default/baseof.html | 14 + themes/researcher/layouts/_default/list.html | 10 + .../researcher/layouts/_default/single.html | 5 + themes/researcher/layouts/index.html | 5 + .../researcher/layouts/partials/footer.html | 13 + themes/researcher/layouts/partials/head.html | 27 + .../researcher/layouts/partials/header.html | 24 + themes/researcher/layouts/partials/math.html | 17 + .../researcher/layouts/shortcodes/math.html | 8 + themes/researcher/theme.toml | 17 + update-configs.sh | 4 + 60 files changed, 1559 insertions(+), 372 deletions(-) create mode 100644 .gitmodules create mode 100644 public/sass/researcher.min.css create mode 100644 resources/_gen/assets/scss/sass/researcher.scss_81ad576498767608ce504b3564784665.content create mode 100644 resources/_gen/assets/scss/sass/researcher.scss_81ad576498767608ce504b3564784665.json create mode 100644 themes/researcher/LICENSE create mode 100644 themes/researcher/README.md create mode 100644 themes/researcher/archetypes/default.md create mode 100644 themes/researcher/assets/sass/researcher.scss create mode 100644 themes/researcher/exampleSite/config.toml create mode 120000 themes/researcher/exampleSite/content/_index.md create mode 100644 themes/researcher/exampleSite/content/about.md create mode 100644 themes/researcher/exampleSite/content/contact.md create mode 100644 themes/researcher/exampleSite/resources/_gen/assets/scss/sass/researcher.scss_b95b077eb505d5c0aff8055eaced30ad.content create mode 100644 themes/researcher/exampleSite/resources/_gen/assets/scss/sass/researcher.scss_b95b077eb505d5c0aff8055eaced30ad.json create mode 100644 themes/researcher/exampleSite/static/avatar.jpg create mode 100755 themes/researcher/exampleSite/static/favicon.ico create mode 100644 themes/researcher/exampleSite/static/resume.pdf create mode 100644 themes/researcher/images/screenshot.png create mode 100644 themes/researcher/images/tn.png create mode 100644 themes/researcher/layouts/404.html create mode 100644 themes/researcher/layouts/_default/baseof.html create mode 100644 themes/researcher/layouts/_default/list.html create mode 100644 themes/researcher/layouts/_default/single.html create mode 100644 themes/researcher/layouts/index.html create mode 100644 themes/researcher/layouts/partials/footer.html create mode 100644 themes/researcher/layouts/partials/head.html create mode 100644 themes/researcher/layouts/partials/header.html create mode 100644 themes/researcher/layouts/partials/math.html create mode 100644 themes/researcher/layouts/shortcodes/math.html create mode 100644 themes/researcher/theme.toml create mode 100755 update-configs.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 diff --git a/content/configs/Console.md b/content/configs/Console.md index 2915e56..d0dc47e 100644 --- a/content/configs/Console.md +++ b/content/configs/Console.md @@ -17,6 +17,7 @@ draft = false # export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0 +export TZ="Asia/Yekaterinburg" # export GTK2_RC_FILES="$HOME/.gtkrc-2.0" ``` diff --git a/content/configs/Console.md~ b/content/configs/Console.md~ index 2915e56..d0dc47e 100644 --- a/content/configs/Console.md~ +++ b/content/configs/Console.md~ @@ -17,6 +17,7 @@ draft = false # export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0 +export TZ="Asia/Yekaterinburg" # export GTK2_RC_FILES="$HOME/.gtkrc-2.0" ``` diff --git a/content/configs/Desktop.md b/content/configs/Desktop.md index d40c128..131c6bd 100644 --- a/content/configs/Desktop.md +++ b/content/configs/Desktop.md @@ -440,7 +440,7 @@ Rules to automatically assign applications to workspaces and do other stuff, lik Most apps can be distinguished by a WM class (you can get one with [xprop](https://www.x.org/releases/X11R7.5/doc/man/man1/xprop.1.html)), but in some cases it doesn't work, e.g. for terminal applications. In that case rules can be based on a window title, for instance. -However, watch out for the following: rule such as `for_window [title="ncmpcpp.*"] move to workspace $w9` will move **any** windows with a title, starting with `ncmpcpp` to workspace `$w9`, which, for instance, may move your browser there if you google "ncmpcpp". +However, watch out for the following: rule such as `for_window [title="ncmpcpp.*"] move to workspace $w9` will move **any** window with a title starting with `ncmpcpp` to workspace `$w9`. For instance, it moves your browser when you google "ncmpcpp". ```vim assign [class="Emacs"] $w1 diff --git a/content/configs/Desktop.md~ b/content/configs/Desktop.md~ index d40c128..131c6bd 100644 --- a/content/configs/Desktop.md~ +++ b/content/configs/Desktop.md~ @@ -440,7 +440,7 @@ Rules to automatically assign applications to workspaces and do other stuff, lik Most apps can be distinguished by a WM class (you can get one with [xprop](https://www.x.org/releases/X11R7.5/doc/man/man1/xprop.1.html)), but in some cases it doesn't work, e.g. for terminal applications. In that case rules can be based on a window title, for instance. -However, watch out for the following: rule such as `for_window [title="ncmpcpp.*"] move to workspace $w9` will move **any** windows with a title, starting with `ncmpcpp` to workspace `$w9`, which, for instance, may move your browser there if you google "ncmpcpp". +However, watch out for the following: rule such as `for_window [title="ncmpcpp.*"] move to workspace $w9` will move **any** window with a title starting with `ncmpcpp` to workspace `$w9`. For instance, it moves your browser when you google "ncmpcpp". ```vim assign [class="Emacs"] $w1 diff --git a/content/configs/Emacs.md b/content/configs/Emacs.md index 137ac6b..4e3af76 100644 --- a/content/configs/Emacs.md +++ b/content/configs/Emacs.md @@ -76,7 +76,6 @@ As with other files in the repo, parts prefixed with (OFF) are not used but kept - [Snippets](#snippets) - [Time trackers](#time-trackers) - [WakaTime](#wakatime) - - [Fixes](#fixes) - [ActivityWatch](#activitywatch) - [UI](#ui) - [General UI & GUI Settings](#general-ui-and-gui-settings) @@ -690,6 +689,7 @@ I don't enable the entire package, just the modes I need. helpful compile comint + git-timemachine magit prodigy))) ``` @@ -1441,7 +1441,9 @@ A company frontend with nice icons. [Magic](https://magit.vc/) is a git interface for Emacs. The closest non-Emacs alternative (sans actual clones) I know is [lazygit](https://github.com/jesseduffield/lazygit), which I used before Emacs. -Also, [git-gutter](https://github.com/emacsorphanage/git-gutter) is plugin which shows git changes for each line (added/changed/deleted lines). +[git-gutter](https://github.com/emacsorphanage/git-gutter) is a package which shows git changes for each line (added/changed/deleted lines). + +[git-timemachine](https://github.com/emacsmirror/git-timemachine) allows to visit previous versions of a file. ```emacs-lisp (use-package magit @@ -1468,6 +1470,10 @@ Also, [git-gutter](https://github.com/emacsorphanage/git-gutter) is plugin which :config (global-git-gutter-mode +1)) +(use-package git-timemachine + :straight t + :commands (git-timemachine)) + (my-leader-def "m" 'magit "M" 'magit-file-dispatch) @@ -1543,7 +1549,7 @@ Before I figure out how to package this for Guix: ```emacs-lisp (use-package wakatime-mode - :straight t + :straight (:host github :repo "SqrtMinusOne/wakatime-mode") :if (not my/is-termux) :config <> @@ -1553,60 +1559,6 @@ Before I figure out how to package this for Guix: ``` -##### Fixes {#fixes} - -wakatime-mode.el seems to be incompatible with the latest Go cli. The fix is to replace `--file` with `--entity`. - -```emacs-lisp -(defun wakatime-client-command (savep) - "Return client command executable and arguments. - Set SAVEP to non-nil for write action." - (format "%s%s--entity \"%s\" --plugin \"%s/%s\" --time %.2f%s%s" - (if (s-blank wakatime-python-bin) "" (format "\"%s\" " wakatime-python-bin)) - (if (s-blank wakatime-cli-path) "wakatime " (format "\"%s\" " wakatime-cli-path)) - (buffer-file-name (current-buffer)) - wakatime-user-agent - wakatime-version - (float-time) - (if savep " --write" "") - (if (s-blank wakatime-api-key) "" (format " --key %s" wakatime-api-key)))) -``` - -Also, until [this issue](https://github.com/wakatime/wakatime-cli/issues/509) is resolved, I set `wakatime-call` to ignore exit-code 1. - -```emacs-lisp -(defun wakatime-call (savep) - "Call WakaTime command." - (let* - ((command (wakatime-client-command savep)) - (process-environment (if wakatime-python-path (cons (format "PYTHONPATH=%s" wakatime-python-path) process-environment) process-environment)) - (process - (start-process - "Shell" - (generate-new-buffer " *WakaTime messages*") - shell-file-name - shell-command-switch - command))) - - (set-process-sentinel process - `(lambda (process signal) - (when (memq (process-status process) '(exit signal)) - (kill-buffer (process-buffer process)) - (let ((exit-status (process-exit-status process))) - (when (and (not (= 0 exit-status)) (not (= 102 exit-status)) (not (= 1 exit-status))) - (when wakatime-disable-on-error - (wakatime-mode -1) - (global-wakatime-mode -1)) - (cond - ((= exit-status 103) (error "WakaTime Error (%s) Config file parse error. Check your ~/.wakatime.cfg file." exit-status)) - ((= exit-status 104) (error "WakaTime Error (%s) Invalid API Key. Set your api key with: (custom-set-variables '(wakatime-api-key \"XXXX\"))" exit-status)) - ((= exit-status 105) (error "WakaTime Error (%s) Unknown wakatime-cli error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status)) - ((= exit-status 106) (error "WakaTime Error (%s) Malformed heartbeat error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status)) - (t (message "WakaTime Error (%s) Make sure this command runs in a Terminal: %s" exit-status (wakatime-client-command nil))))))))) - (set-process-query-on-exit-flag process nil))) -``` - - #### ActivityWatch {#activitywatch} ```emacs-lisp @@ -2648,7 +2600,7 @@ References: Refresh kernelspecs. -Kernelspecs by default are hashed, so even switching Anaconda environments doesn't change kernel (i.e. kernel from the first environment is run after the switch to the second one). +Kernelspecs by default are hashed, so even switching Anaconda environments doesn't change the kernel (i.e. kernel from the first environment is run after the switch to the second one). ```emacs-lisp (defun my/jupyter-refresh-kernelspecs () @@ -5377,9 +5329,9 @@ Open a URL with eww. ##### YouTube {#youtube} -Previously this block was opening MPV with `start-process`, but now I've managed to hook up MPV with EMMS. So there is the integration of elfeed with EMMS. +Previously this block was opening MPV with `start-process`, but now I've managed to hook up MPV with EMMS. So there is the EMMS+elfeed "integration". -The following function converts URLs from Invidious to YouTube. +The following function converts URLs from Invidious and the like to YouTube. ```emacs-lisp (defun my/get-youtube-url (link) @@ -5418,7 +5370,7 @@ Now, a function to add YouTube link with metadata from elfeed to EMMS. #### EMMS {#emms} -EMMS is the Emacs Multi-Media System. I control MPD from Emacs with its help. +EMMS is the Emacs Multi-Media System. I use it to control MPD & MPV. References: @@ -5483,19 +5435,19 @@ References: (setq emms-player-mpd-music-directory "~/Music") ``` -Connect on setup. For some reason, it stops mpd playback whenever it connects, but it is not a big issue. +Connect on setup. For some reason, it stops the mpd playback whenever it connects, but it is not a big issue. ```emacs-lisp (emms-player-mpd-connect) ``` -Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD playlists, I don't use them anyhow. +Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD library playlist, I don't use them anyhow. ```emacs-lisp (add-hook 'emms-playlist-cleared-hook 'emms-player-mpd-clear) ``` -Set a custom regex for MPD. EMMS sets up the default regex from mpd diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex. +Set a custom regex for MPD. EMMS sets up the default one from MPD's diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex. ```emacs-lisp (emms-player-set emms-player-mpd @@ -5504,7 +5456,7 @@ Set a custom regex for MPD. EMMS sets up the default regex from mpd diagnostic o "m3u" "ogg" "flac" "mp3" "wav" "mod" "au" "aiff")) ``` -Now, after all this is done, run `M-x emms-cache-set-from-mpd-all` to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database. +After all this is done, run `M-x emms-cache-set-from-mpd-all` to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database. ##### MPV {#mpv} @@ -5532,7 +5484,7 @@ Also a custom regex. My demands for MPV include running `youtube-dl`, so there i "mp4" "mov" "wmv" "webm" "flv" "avi" "mkv"))))))) ``` -By default MPV, plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose youtube quality. +By default MPV plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose the quality. ```emacs-lisp (setq my/youtube-dl-quality-list @@ -5558,7 +5510,7 @@ Now `emms-add-url` should work on YouTube URLs just fine. Just keep in mind that ##### Cache cleanup {#cache-cleanup} -Now, all these URLs reside in EMMS cache after being played. I don't want them to stay there for a long time, so here is a handy function to clean it. +All added URLs reside in the EMMS cache after being played. I don't want them to stay there for a long time, so here is a handy function to clean it. ```emacs-lisp (defun my/emms-cleanup-urls () @@ -5582,7 +5534,7 @@ My package for fetching EMMS lyrics and album covers. ```emacs-lisp (use-package lyrics-fetcher - :straight (:host github :repo "SqrtMinusOne/lyrics-fetcher.el") + :straight t :after (emms) :init (my-leader-def @@ -5619,7 +5571,7 @@ My package for fetching EMMS lyrics and album covers. ##### EMMS & mpd Fixes {#emms-and-mpd-fixes} -Some fixes until I submit a patch. +~~Some fixes until I submit a patch.~~ I've submitted a patch for with these fixes, so I'll remove this section eventually. For some reason EMMS doesn't fetch `albumartist` from MPD. Overriding this function fixes that. @@ -5820,7 +5772,7 @@ References: #### tldr {#tldr} -[tldr](https://tldr.sh/) is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in in the Emacs package download is broken, so I use my own function. +[tldr](https://tldr.sh/) is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in download in the package is broken, so I use my own function. ```emacs-lisp (use-package tldr diff --git a/content/configs/Emacs.md~ b/content/configs/Emacs.md~ index 137ac6b..4e3af76 100644 --- a/content/configs/Emacs.md~ +++ b/content/configs/Emacs.md~ @@ -76,7 +76,6 @@ As with other files in the repo, parts prefixed with (OFF) are not used but kept - [Snippets](#snippets) - [Time trackers](#time-trackers) - [WakaTime](#wakatime) - - [Fixes](#fixes) - [ActivityWatch](#activitywatch) - [UI](#ui) - [General UI & GUI Settings](#general-ui-and-gui-settings) @@ -690,6 +689,7 @@ I don't enable the entire package, just the modes I need. helpful compile comint + git-timemachine magit prodigy))) ``` @@ -1441,7 +1441,9 @@ A company frontend with nice icons. [Magic](https://magit.vc/) is a git interface for Emacs. The closest non-Emacs alternative (sans actual clones) I know is [lazygit](https://github.com/jesseduffield/lazygit), which I used before Emacs. -Also, [git-gutter](https://github.com/emacsorphanage/git-gutter) is plugin which shows git changes for each line (added/changed/deleted lines). +[git-gutter](https://github.com/emacsorphanage/git-gutter) is a package which shows git changes for each line (added/changed/deleted lines). + +[git-timemachine](https://github.com/emacsmirror/git-timemachine) allows to visit previous versions of a file. ```emacs-lisp (use-package magit @@ -1468,6 +1470,10 @@ Also, [git-gutter](https://github.com/emacsorphanage/git-gutter) is plugin which :config (global-git-gutter-mode +1)) +(use-package git-timemachine + :straight t + :commands (git-timemachine)) + (my-leader-def "m" 'magit "M" 'magit-file-dispatch) @@ -1543,7 +1549,7 @@ Before I figure out how to package this for Guix: ```emacs-lisp (use-package wakatime-mode - :straight t + :straight (:host github :repo "SqrtMinusOne/wakatime-mode") :if (not my/is-termux) :config <> @@ -1553,60 +1559,6 @@ Before I figure out how to package this for Guix: ``` -##### Fixes {#fixes} - -wakatime-mode.el seems to be incompatible with the latest Go cli. The fix is to replace `--file` with `--entity`. - -```emacs-lisp -(defun wakatime-client-command (savep) - "Return client command executable and arguments. - Set SAVEP to non-nil for write action." - (format "%s%s--entity \"%s\" --plugin \"%s/%s\" --time %.2f%s%s" - (if (s-blank wakatime-python-bin) "" (format "\"%s\" " wakatime-python-bin)) - (if (s-blank wakatime-cli-path) "wakatime " (format "\"%s\" " wakatime-cli-path)) - (buffer-file-name (current-buffer)) - wakatime-user-agent - wakatime-version - (float-time) - (if savep " --write" "") - (if (s-blank wakatime-api-key) "" (format " --key %s" wakatime-api-key)))) -``` - -Also, until [this issue](https://github.com/wakatime/wakatime-cli/issues/509) is resolved, I set `wakatime-call` to ignore exit-code 1. - -```emacs-lisp -(defun wakatime-call (savep) - "Call WakaTime command." - (let* - ((command (wakatime-client-command savep)) - (process-environment (if wakatime-python-path (cons (format "PYTHONPATH=%s" wakatime-python-path) process-environment) process-environment)) - (process - (start-process - "Shell" - (generate-new-buffer " *WakaTime messages*") - shell-file-name - shell-command-switch - command))) - - (set-process-sentinel process - `(lambda (process signal) - (when (memq (process-status process) '(exit signal)) - (kill-buffer (process-buffer process)) - (let ((exit-status (process-exit-status process))) - (when (and (not (= 0 exit-status)) (not (= 102 exit-status)) (not (= 1 exit-status))) - (when wakatime-disable-on-error - (wakatime-mode -1) - (global-wakatime-mode -1)) - (cond - ((= exit-status 103) (error "WakaTime Error (%s) Config file parse error. Check your ~/.wakatime.cfg file." exit-status)) - ((= exit-status 104) (error "WakaTime Error (%s) Invalid API Key. Set your api key with: (custom-set-variables '(wakatime-api-key \"XXXX\"))" exit-status)) - ((= exit-status 105) (error "WakaTime Error (%s) Unknown wakatime-cli error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status)) - ((= exit-status 106) (error "WakaTime Error (%s) Malformed heartbeat error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status)) - (t (message "WakaTime Error (%s) Make sure this command runs in a Terminal: %s" exit-status (wakatime-client-command nil))))))))) - (set-process-query-on-exit-flag process nil))) -``` - - #### ActivityWatch {#activitywatch} ```emacs-lisp @@ -2648,7 +2600,7 @@ References: Refresh kernelspecs. -Kernelspecs by default are hashed, so even switching Anaconda environments doesn't change kernel (i.e. kernel from the first environment is run after the switch to the second one). +Kernelspecs by default are hashed, so even switching Anaconda environments doesn't change the kernel (i.e. kernel from the first environment is run after the switch to the second one). ```emacs-lisp (defun my/jupyter-refresh-kernelspecs () @@ -5377,9 +5329,9 @@ Open a URL with eww. ##### YouTube {#youtube} -Previously this block was opening MPV with `start-process`, but now I've managed to hook up MPV with EMMS. So there is the integration of elfeed with EMMS. +Previously this block was opening MPV with `start-process`, but now I've managed to hook up MPV with EMMS. So there is the EMMS+elfeed "integration". -The following function converts URLs from Invidious to YouTube. +The following function converts URLs from Invidious and the like to YouTube. ```emacs-lisp (defun my/get-youtube-url (link) @@ -5418,7 +5370,7 @@ Now, a function to add YouTube link with metadata from elfeed to EMMS. #### EMMS {#emms} -EMMS is the Emacs Multi-Media System. I control MPD from Emacs with its help. +EMMS is the Emacs Multi-Media System. I use it to control MPD & MPV. References: @@ -5483,19 +5435,19 @@ References: (setq emms-player-mpd-music-directory "~/Music") ``` -Connect on setup. For some reason, it stops mpd playback whenever it connects, but it is not a big issue. +Connect on setup. For some reason, it stops the mpd playback whenever it connects, but it is not a big issue. ```emacs-lisp (emms-player-mpd-connect) ``` -Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD playlists, I don't use them anyhow. +Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD library playlist, I don't use them anyhow. ```emacs-lisp (add-hook 'emms-playlist-cleared-hook 'emms-player-mpd-clear) ``` -Set a custom regex for MPD. EMMS sets up the default regex from mpd diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex. +Set a custom regex for MPD. EMMS sets up the default one from MPD's diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex. ```emacs-lisp (emms-player-set emms-player-mpd @@ -5504,7 +5456,7 @@ Set a custom regex for MPD. EMMS sets up the default regex from mpd diagnostic o "m3u" "ogg" "flac" "mp3" "wav" "mod" "au" "aiff")) ``` -Now, after all this is done, run `M-x emms-cache-set-from-mpd-all` to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database. +After all this is done, run `M-x emms-cache-set-from-mpd-all` to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database. ##### MPV {#mpv} @@ -5532,7 +5484,7 @@ Also a custom regex. My demands for MPV include running `youtube-dl`, so there i "mp4" "mov" "wmv" "webm" "flv" "avi" "mkv"))))))) ``` -By default MPV, plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose youtube quality. +By default MPV plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose the quality. ```emacs-lisp (setq my/youtube-dl-quality-list @@ -5558,7 +5510,7 @@ Now `emms-add-url` should work on YouTube URLs just fine. Just keep in mind that ##### Cache cleanup {#cache-cleanup} -Now, all these URLs reside in EMMS cache after being played. I don't want them to stay there for a long time, so here is a handy function to clean it. +All added URLs reside in the EMMS cache after being played. I don't want them to stay there for a long time, so here is a handy function to clean it. ```emacs-lisp (defun my/emms-cleanup-urls () @@ -5582,7 +5534,7 @@ My package for fetching EMMS lyrics and album covers. ```emacs-lisp (use-package lyrics-fetcher - :straight (:host github :repo "SqrtMinusOne/lyrics-fetcher.el") + :straight t :after (emms) :init (my-leader-def @@ -5619,7 +5571,7 @@ My package for fetching EMMS lyrics and album covers. ##### EMMS & mpd Fixes {#emms-and-mpd-fixes} -Some fixes until I submit a patch. +~~Some fixes until I submit a patch.~~ I've submitted a patch for with these fixes, so I'll remove this section eventually. For some reason EMMS doesn't fetch `albumartist` from MPD. Overriding this function fixes that. @@ -5820,7 +5772,7 @@ References: #### tldr {#tldr} -[tldr](https://tldr.sh/) is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in in the Emacs package download is broken, so I use my own function. +[tldr](https://tldr.sh/) is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in download in the package is broken, so I use my own function. ```emacs-lisp (use-package tldr diff --git a/content/configs/Mail.md b/content/configs/Mail.md index 2481fb0..aca7abe 100644 --- a/content/configs/Mail.md +++ b/content/configs/Mail.md @@ -4,7 +4,7 @@ author = ["Pavel"] draft = false +++ -My email configration. Currently uses [lieer](https://github.com/gauteh/lieer) to fetch emails from Gmail, [davmail](http://davmail.sourceforge.net/) & [offlineimap](http://www.offlineimap.org/) to fetch emails from MS Exchange, [notmuch](https://notmuchmail.org/) to index, [msmtp](https://marlam.de/msmtp/) to send emails. Also using notmuch frontend from Emacs. +My email configration. Currently I use [lieer](https://github.com/gauteh/lieer) to fetch emails from Gmail, [davmail](http://davmail.sourceforge.net/) & [offlineimap](http://www.offlineimap.org/) to fetch emails from MS Exchange, [notmuch](https://notmuchmail.org/) to index, [msmtp](https://marlam.de/msmtp/) to send emails. Also using notmuch frontend from Emacs. My problem with any particular mail setup was that I use Gmail labels quite extensively, and handling these over IMAP is rather awkward. Notmuch seems to be the only software that provides the same first-class support for labels. @@ -86,7 +86,7 @@ davmail.imapAutoExpunge=false davmail.enableKeepalive=false ``` -Also it's a bit of problem to get it launched as it looks for some jars in pwd, so here is a script. +Also it's a bit of problem to get it launched as it looks for its jars in the pwd, so here is a script. ```bash cd $HOME/bin/davmail-6.0.0-3375 @@ -102,9 +102,9 @@ Shepherd service is defined in [Desktop.org]({{< relref "Desktop" >}}). |-----------------| | offlineimap | -[OfflineIMAP](https://github.com/OfflineIMAP/offlineimap) is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also [isync](https://isync.sourceforge.io/), but I had some weird issues with duplicate UIDs, which don't occur for OfflineIMAP. +[OfflineIMAP](https://github.com/OfflineIMAP/offlineimap) is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also [isync](https://isync.sourceforge.io/), but there I had some weird issues with duplicate UIDs, which don't occur for OfflineIMAP. -I have a few options for setting a username and password. First, I can run `pass` in `remotepasswordeval`, and this is fine, but it will keep by keyring unlocked because I want to run `offlineimap` every couple of minutes. +I have a few options for setting a username and password. First, I can run `pass` in `remotepasswordeval`, and while this will work, it will keep my keyring unlocked because I want to run `offlineimap` every couple of minutes. Another option is to use noweb and not push the file below to the version control. Then I have a plaintext password of email on my computer, but I think it's a lesser evil than the entire keyring. @@ -150,7 +150,7 @@ ssl = no | notmuch | | parallel | -Notmuch is an email indexer program, which handles labels in a way somewhat like Gmail. It also provides a frontend for Emacs, but it's not the only one available. +Notmuch is an email indexer program, which handles labels in a way somewhat similar to Gmail. It also provides a frontend for Emacs, but it's not the only one available. ### Config {#config} @@ -198,7 +198,7 @@ synchronize_flags=true ### Hooks {#hooks} -Now we have to link up lieer & Maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command. +Now we have to link up lieer & davmail's maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command. With lieer and Gmail, it is enough to simply run the program, because Gmail has first-class support for tags. Maildir does not, so I decide to synchronize notmuch tags and IMAP folders. In essence, the idea is to: diff --git a/content/configs/Mail.md~ b/content/configs/Mail.md~ index 2481fb0..aca7abe 100644 --- a/content/configs/Mail.md~ +++ b/content/configs/Mail.md~ @@ -4,7 +4,7 @@ author = ["Pavel"] draft = false +++ -My email configration. Currently uses [lieer](https://github.com/gauteh/lieer) to fetch emails from Gmail, [davmail](http://davmail.sourceforge.net/) & [offlineimap](http://www.offlineimap.org/) to fetch emails from MS Exchange, [notmuch](https://notmuchmail.org/) to index, [msmtp](https://marlam.de/msmtp/) to send emails. Also using notmuch frontend from Emacs. +My email configration. Currently I use [lieer](https://github.com/gauteh/lieer) to fetch emails from Gmail, [davmail](http://davmail.sourceforge.net/) & [offlineimap](http://www.offlineimap.org/) to fetch emails from MS Exchange, [notmuch](https://notmuchmail.org/) to index, [msmtp](https://marlam.de/msmtp/) to send emails. Also using notmuch frontend from Emacs. My problem with any particular mail setup was that I use Gmail labels quite extensively, and handling these over IMAP is rather awkward. Notmuch seems to be the only software that provides the same first-class support for labels. @@ -86,7 +86,7 @@ davmail.imapAutoExpunge=false davmail.enableKeepalive=false ``` -Also it's a bit of problem to get it launched as it looks for some jars in pwd, so here is a script. +Also it's a bit of problem to get it launched as it looks for its jars in the pwd, so here is a script. ```bash cd $HOME/bin/davmail-6.0.0-3375 @@ -102,9 +102,9 @@ Shepherd service is defined in [Desktop.org]({{< relref "Desktop" >}}). |-----------------| | offlineimap | -[OfflineIMAP](https://github.com/OfflineIMAP/offlineimap) is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also [isync](https://isync.sourceforge.io/), but I had some weird issues with duplicate UIDs, which don't occur for OfflineIMAP. +[OfflineIMAP](https://github.com/OfflineIMAP/offlineimap) is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also [isync](https://isync.sourceforge.io/), but there I had some weird issues with duplicate UIDs, which don't occur for OfflineIMAP. -I have a few options for setting a username and password. First, I can run `pass` in `remotepasswordeval`, and this is fine, but it will keep by keyring unlocked because I want to run `offlineimap` every couple of minutes. +I have a few options for setting a username and password. First, I can run `pass` in `remotepasswordeval`, and while this will work, it will keep my keyring unlocked because I want to run `offlineimap` every couple of minutes. Another option is to use noweb and not push the file below to the version control. Then I have a plaintext password of email on my computer, but I think it's a lesser evil than the entire keyring. @@ -150,7 +150,7 @@ ssl = no | notmuch | | parallel | -Notmuch is an email indexer program, which handles labels in a way somewhat like Gmail. It also provides a frontend for Emacs, but it's not the only one available. +Notmuch is an email indexer program, which handles labels in a way somewhat similar to Gmail. It also provides a frontend for Emacs, but it's not the only one available. ### Config {#config} @@ -198,7 +198,7 @@ synchronize_flags=true ### Hooks {#hooks} -Now we have to link up lieer & Maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command. +Now we have to link up lieer & davmail's maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command. With lieer and Gmail, it is enough to simply run the program, because Gmail has first-class support for tags. Maildir does not, so I decide to synchronize notmuch tags and IMAP folders. In essence, the idea is to: diff --git a/content/configs/README.md~ b/content/configs/README.md~ index fb98c86..720e0f1 100644 --- a/content/configs/README.md~ +++ b/content/configs/README.md~ @@ -1,7 +1,7 @@ +++ title = "My dotfiles" author = ["Pavel"] -aliases = ["/configs/config"] +aliases = ["/config"] draft = false +++ diff --git a/public/404.html b/public/404.html index 052a287..81b710d 100644 --- a/public/404.html +++ b/public/404.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@
diff --git a/public/categories/index.html b/public/categories/index.html index 3304eae..e5ab3f9 100644 --- a/public/categories/index.html +++ b/public/categories/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -25,7 +26,7 @@
diff --git a/public/configs/console/index.html b/public/configs/console/index.html index aa8a046..bc6f76e 100644 --- a/public/configs/console/index.html +++ b/public/configs/console/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@

My paths

My script folders

@@ -950,10 +952,13 @@ sudo cp colorscript.sh $PREFIX/bin/colorscript diff --git a/public/configs/desktop/index.html b/public/configs/desktop/index.html index 2f3adf8..0aee58e 100644 --- a/public/configs/desktop/index.html +++ b/public/configs/desktop/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@

Rules

Rules to automatically assign applications to workspaces and do other stuff, like enable floating.

Most apps can be distinguished by a WM class (you can get one with xprop), but in some cases it doesn’t work, e.g. for terminal applications. In that case rules can be based on a window title, for instance.

-

However, watch out for the following: rule such as for_window [title="ncmpcpp.*"] move to workspace $w9 will move any windows with a title, starting with ncmpcpp to workspace $w9, which, for instance, may move your browser there if you google “ncmpcpp”.

+

However, watch out for the following: rule such as for_window [title="ncmpcpp.*"] move to workspace $w9 will move any window with a title starting with ncmpcpp to workspace $w9. For instance, it moves your browser when you google “ncmpcpp”.

assign [class="Emacs"] $w1
 assign [class="qutebrowser"] $w2
 assign [class="firefox"] $w2
@@ -2689,10 +2690,13 @@ aw-watcher-afk
 
diff --git a/public/configs/emacs/index.html b/public/configs/emacs/index.html index 86ac616..7d24e82 100644 --- a/public/configs/emacs/index.html +++ b/public/configs/emacs/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@

More keybindings

@@ -1282,7 +1280,8 @@ :hook (company-mode . company-box-mode))

Git & Magit

Magic is a git interface for Emacs. The closest non-Emacs alternative (sans actual clones) I know is lazygit, which I used before Emacs.

-

Also, git-gutter is plugin which shows git changes for each line (added/changed/deleted lines).

+

git-gutter is a package which shows git changes for each line (added/changed/deleted lines).

+

git-timemachine allows to visit previous versions of a file.

(use-package magit
   :straight t
   :commands (magit-status magit-file-dispatch)
@@ -1307,6 +1306,10 @@
   :config
   (global-git-gutter-mode +1))
 
+(use-package git-timemachine
+  :straight t
+  :commands (git-timemachine))
+
 (my-leader-def
   "m" 'magit
   "M" 'magit-file-dispatch)
@@ -1358,57 +1361,13 @@
 
 
 
(use-package wakatime-mode
-  :straight t
+  :straight (:host github :repo "SqrtMinusOne/wakatime-mode")
   :if (not my/is-termux)
   :config
   <<wakatime-fixes>>
   (advice-add 'wakatime-init :after (lambda () (setq wakatime-cli-path "/home/pavel/bin/wakatime-cli")))
   ;; (setq wakatime-cli-path (executable-find "wakatime"))
   (global-wakatime-mode))
-
Fixes
-

wakatime-mode.el seems to be incompatible with the latest Go cli. The fix is to replace --file with --entity.

-
(defun wakatime-client-command (savep)
-  "Return client command executable and arguments.
-   Set SAVEP to non-nil for write action."
-  (format "%s%s--entity \"%s\" --plugin \"%s/%s\" --time %.2f%s%s"
-    (if (s-blank wakatime-python-bin) "" (format "\"%s\" " wakatime-python-bin))
-    (if (s-blank wakatime-cli-path) "wakatime " (format "\"%s\" " wakatime-cli-path))
-    (buffer-file-name (current-buffer))
-    wakatime-user-agent
-    wakatime-version
-    (float-time)
-    (if savep " --write" "")
-    (if (s-blank wakatime-api-key) "" (format " --key %s" wakatime-api-key))))
-

Also, until this issue is resolved, I set wakatime-call to ignore exit-code 1.

-
(defun wakatime-call (savep)
-  "Call WakaTime command."
-  (let*
-      ((command (wakatime-client-command savep))
-       (process-environment (if wakatime-python-path (cons (format "PYTHONPATH=%s" wakatime-python-path) process-environment) process-environment))
-       (process
-	(start-process
-	 "Shell"
-	 (generate-new-buffer " *WakaTime messages*")
-	 shell-file-name
-	 shell-command-switch
-	 command)))
-
-    (set-process-sentinel process
-			  `(lambda (process signal)
-			     (when (memq (process-status process) '(exit signal))
-			       (kill-buffer (process-buffer process))
-			       (let ((exit-status (process-exit-status process)))
-				 (when (and (not (= 0 exit-status)) (not (= 102 exit-status)) (not (= 1 exit-status)))
-				   (when wakatime-disable-on-error
-				     (wakatime-mode -1)
-				     (global-wakatime-mode -1))
-				   (cond
-				    ((= exit-status 103) (error "WakaTime Error (%s) Config file parse error. Check your ~/.wakatime.cfg file." exit-status))
-				    ((= exit-status 104) (error "WakaTime Error (%s) Invalid API Key. Set your api key with: (custom-set-variables '(wakatime-api-key \"XXXX\"))" exit-status))
-				    ((= exit-status 105) (error "WakaTime Error (%s) Unknown wakatime-cli error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status))
-				    ((= exit-status 106) (error "WakaTime Error (%s) Malformed heartbeat error. Please check your ~/.wakatime.log file and open a new issue at https://github.com/wakatime/wakatime-mode" exit-status))
-				    (t (message "WakaTime Error (%s) Make sure this command runs in a Terminal: %s" exit-status (wakatime-client-command nil)))))))))
-    (set-process-query-on-exit-flag process nil)))
 

ActivityWatch

(use-package request
   :straight t)
@@ -2192,7 +2151,7 @@
   :init
   (my-leader-def "ar" 'jupyter-run-repl))
 

Refresh kernelspecs.

-

Kernelspecs by default are hashed, so even switching Anaconda environments doesn’t change kernel (i.e. kernel from the first environment is run after the switch to the second one).

+

Kernelspecs by default are hashed, so even switching Anaconda environments doesn’t change the kernel (i.e. kernel from the first environment is run after the switch to the second one).

(defun my/jupyter-refresh-kernelspecs ()
   "Refresh Jupyter kernelspecs"
   (interactive)
@@ -4243,8 +4202,8 @@ MimeType=x-scheme-handler/org-protocol
     (when link
       (eww link))))
 
YouTube
-

Previously this block was opening MPV with start-process, but now I’ve managed to hook up MPV with EMMS. So there is the integration of elfeed with EMMS.

-

The following function converts URLs from Invidious to YouTube.

+

Previously this block was opening MPV with start-process, but now I’ve managed to hook up MPV with EMMS. So there is the EMMS+elfeed “integration”.

+

The following function converts URLs from Invidious and the like to YouTube.

(defun my/get-youtube-url (link)
   (let ((watch-id (cadr
 		   (assoc "watch?v"
@@ -4273,7 +4232,7 @@ MimeType=x-scheme-handler/org-protocol
    :keymaps 'elfeed-show-mode-map
    "gm" #'my/elfeed-add-emms-youtube))
 

EMMS

-

EMMS is the Emacs Multi-Media System. I control MPD from Emacs with its help.

+

EMMS is the Emacs Multi-Media System. I use it to control MPD & MPV.

References:

  • EMMS Manual
  • @@ -4327,16 +4286,16 @@ MimeType=x-scheme-handler/org-protocol (setq emms-player-mpd-server-name "localhost") (setq emms-player-mpd-server-port "6600") (setq emms-player-mpd-music-directory "~/Music") -

Connect on setup. For some reason, it stops mpd playback whenever it connects, but it is not a big issue.

+

Connect on setup. For some reason, it stops the mpd playback whenever it connects, but it is not a big issue.

(emms-player-mpd-connect)
-

Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD playlists, I don’t use them anyhow.

+

Clear MPD playlist on clearing EMMS playlist. IDK if this is fine for MPD library playlist, I don’t use them anyhow.

(add-hook 'emms-playlist-cleared-hook 'emms-player-mpd-clear)
-

Set a custom regex for MPD. EMMS sets up the default regex from mpd diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex.

+

Set a custom regex for MPD. EMMS sets up the default one from MPD’s diagnostic output so that regex opens basically everything, including videos, https links, etc. That is fine if MPD is the only player in EMMS, but as I want to use MPV as well, I override the regex.

(emms-player-set emms-player-mpd
 		 'regex
 		 (emms-player-simple-regexp
 		  "m3u" "ogg" "flac" "mp3" "wav" "mod" "au" "aiff"))
-

Now, after all this is done, run M-x emms-cache-set-from-mpd-all to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database.

+

After all this is done, run M-x emms-cache-set-from-mpd-all to set cache from MPD. If everything is correct, EMMS browser will be populated with MPD database.

MPV
@@ -4363,7 +4322,7 @@ MimeType=x-scheme-handler/org-protocol (* nonl) (regexp (eval (emms-player-simple-regexp "mp4""mov""wmv""webm""flv""avi""mkv"))))))) -

By default MPV, plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose youtube quality.

+

By default MPV plays the video in the best possible quality, which may be pretty high, even too high with limited bandwidth. So here is the logic to choose the quality.

(setq my/youtube-dl-quality-list
       '("bestvideo[height<=720]+bestaudio/best[height<=720]"
 	"bestvideo[height<=480]+bestaudio/best[height<=480]"
@@ -4382,7 +4341,7 @@ MimeType=x-scheme-handler/org-protocol
 (my/set-emms-mpd-youtube-quality (car my/youtube-dl-quality-list))
 

Now emms-add-url should work on YouTube URLs just fine. Just keep in mind that it will only add the URL to the playlist, not play it right away.

Cache cleanup
-

Now, all these URLs reside in EMMS cache after being played. I don’t want them to stay there for a long time, so here is a handy function to clean it.

+

All added URLs reside in the EMMS cache after being played. I don’t want them to stay there for a long time, so here is a handy function to clean it.

(defun my/emms-cleanup-urls ()
   (interactive)
   (let ((keys-to-delete '()))
@@ -4398,7 +4357,7 @@ MimeType=x-scheme-handler/org-protocol
 
Fetching lyrics

My package for fetching EMMS lyrics and album covers.

(use-package lyrics-fetcher
-  :straight (:host github :repo "SqrtMinusOne/lyrics-fetcher.el")
+  :straight t
   :after (emms)
   :init
   (my-leader-def
@@ -4426,7 +4385,7 @@ MimeType=x-scheme-handler/org-protocol
    :keymaps 'emms-playlist-mode-map
    "q" 'quit-window))
 
EMMS & mpd Fixes
-

Some fixes until I submit a patch.

+

Some fixes until I submit a patch. I’ve submitted a patch for with these fixes, so I’ll remove this section eventually.

For some reason EMMS doesn’t fetch albumartist from MPD. Overriding this function fixes that.

(defun emms-info-mpd-process (track info)
   (dolist (data info)
@@ -4572,7 +4531,7 @@ tag2: value2'
   "t" 'google-translate-smooth-translate)
 

Reading documentation

tldr

-

tldr is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in in the Emacs package download is broken, so I use my own function.

+

tldr is a collaborative project providing cheatsheets for various console commands. For some reason, the built-in download in the package is broken, so I use my own function.

(use-package tldr
   :straight t
   :commands (tldr)
@@ -4840,10 +4799,13 @@ tag2: value2'
 
diff --git a/public/configs/guix/index.html b/public/configs/guix/index.html index 6565f6e..7193423 100644 --- a/public/configs/guix/index.html +++ b/public/configs/guix/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@
diff --git a/public/configs/index.html b/public/configs/index.html index f1ad9f1..2fc3d07 100644 --- a/public/configs/index.html +++ b/public/configs/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -25,7 +26,7 @@
diff --git a/public/configs/index.xml b/public/configs/index.xml index c3fa670..daba7c6 100644 --- a/public/configs/index.xml +++ b/public/configs/index.xml @@ -13,7 +13,7 @@ https://sqrtminusone.xyz/configs/console/ #+TOC headlines 6 -.profile Environment # export EDITOR=/usr/bin/vim # export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME=&#34;qt5ct&#34; export QT_AUTO_SCREEN_SCALE_FACTOR=0 # export GTK2_RC_FILES=&#34;$HOME/.gtkrc-2.0&#34; My paths My script folders +.profile Environment # export EDITOR=/usr/bin/vim # export BROWSER=/usr/bin/firefox export QT_QPA_PLATFORMTHEME=&#34;qt5ct&#34; export QT_AUTO_SCREEN_SCALE_FACTOR=0 export TZ=&#34;Asia/Yekaterinburg&#34; # export GTK2_RC_FILES=&#34;$HOME/.gtkrc-2.0&#34; My paths My script folders if [ -d &#34;$HOME/bin&#34; ] ; then export PATH=&#34;$HOME/bin:$PATH&#34; export PATH=&#34;$HOME/bin/scripts:$PATH&#34; fi Guix settings Enable extra profiles if [ -z &#34;$IS_ANDROID&#34; ]; then GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles for i in $GUIX_EXTRA_PROFILES/*; do profile=$i/$(basename &#34;$i&#34;) if [ -f &#34;$profile&#34;/etc/profile ]; then GUIX_PROFILE=&#34;$profile&#34; . &#34;$GUIX_PROFILE&#34;/etc/profile fi export XDG_DATA_DIRS=&#34;$XDG_DATA_DIRS:$profile/share&#34; unset profile done fi Set Jupyter config PATH. @@ -59,7 +59,7 @@ References: Mon, 01 Jan 0001 00:00:00 +0000 https://sqrtminusone.xyz/configs/mail/ - My email configration. Currently uses lieer to fetch emails from Gmail, davmail &amp; offlineimap to fetch emails from MS Exchange, notmuch to index, msmtp to send emails. Also using notmuch frontend from Emacs. + My email configration. Currently I use lieer to fetch emails from Gmail, davmail &amp; offlineimap to fetch emails from MS Exchange, notmuch to index, msmtp to send emails. Also using notmuch frontend from Emacs. My problem with any particular mail setup was that I use Gmail labels quite extensively, and handling these over IMAP is rather awkward. Notmuch seems to be the only software that provides the same first-class support for labels. diff --git a/public/configs/mail/index.html b/public/configs/mail/index.html index 77c45d0..5efff4c 100644 --- a/public/configs/mail/index.html +++ b/public/configs/mail/index.html @@ -1,5 +1,5 @@ - + @@ -9,9 +9,10 @@ + - + @@ -24,7 +25,7 @@
-

OfflineIMAP is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also isync, but I had some weird issues with duplicate UIDs, which don’t occur for OfflineIMAP.

-

I have a few options for setting a username and password. First, I can run pass in remotepasswordeval, and this is fine, but it will keep by keyring unlocked because I want to run offlineimap every couple of minutes.

+

OfflineIMAP is a program that can synchronize IMAP mailbox and Maildir. Lieer does everything by itself, but my pirate Exchange IMAP needs this program. There is also isync, but there I had some weird issues with duplicate UIDs, which don’t occur for OfflineIMAP.

+

I have a few options for setting a username and password. First, I can run pass in remotepasswordeval, and while this will work, it will keep my keyring unlocked because I want to run offlineimap every couple of minutes.

Another option is to use noweb and not push the file below to the version control. Then I have a plaintext password of email on my computer, but I think it’s a lesser evil than the entire keyring.

I would use password-store-get from password-store.el, but I want this to be able to run without any 3rd party packages, so it’s just bash.

@@ -192,7 +193,7 @@ gmi set --ignore-tags-local new -

Notmuch is an email indexer program, which handles labels in a way somewhat like Gmail. It also provides a frontend for Emacs, but it’s not the only one available.

+

Notmuch is an email indexer program, which handles labels in a way somewhat similar to Gmail. It also provides a frontend for Emacs, but it’s not the only one available.

Config

Not much is going on here.

First, the database path.

@@ -214,7 +215,7 @@ gmi set --ignore-tags-local new
[maildir]
 synchronize_flags=true
 

Hooks

-

Now we have to link up lieer & Maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command.

+

Now we have to link up lieer & davmail’s maildir and with notmuch. This is done via the notmuch hook system, which allows running custom scripts before and after any command.

With lieer and Gmail, it is enough to simply run the program, because Gmail has first-class support for tags. Maildir does not, so I decide to synchronize notmuch tags and IMAP folders. In essence, the idea is to: