From 78150f2c3e5caf45ff92a1dd26f6e813961c504a Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Tue, 31 Aug 2021 16:49:11 +0500 Subject: [PATCH] feat: update config, rss --- content/configs/Desktop.md | 5 ++- content/configs/Emacs.md | 21 ++++++--- content/configs/README.md | 4 +- public/configs/desktop/index.html | 8 +++- public/configs/emacs/index.html | 17 +++++--- public/configs/readme/index.html | 4 +- public/index.xml | 68 ----------------------------- themes/researcher/layouts/index.xml | 39 +++++++++++++++++ update-configs.sh | 1 - 9 files changed, 80 insertions(+), 87 deletions(-) create mode 100644 themes/researcher/layouts/index.xml diff --git a/content/configs/Desktop.md b/content/configs/Desktop.md index 131c6bd..b062752 100644 --- a/content/configs/Desktop.md +++ b/content/configs/Desktop.md @@ -897,7 +897,7 @@ The script below allows me to: ```bash hostname=$(hostname) # Settings varying on the hostname -export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|--)" | xargs) +export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|veth.*|--)" | xargs) if [ "$hostname" = "azure" ]; then TRAY_MONITOR="eDP-1" # export WLAN_INTERFACE="wlp3s0" @@ -936,7 +936,7 @@ declare -A BLOCKS=( ) # Geolocation for some modules -export LOC="SPB" +export LOC="TMN" export IPSTACK_API_KEY=$(pass show My_Online/APIs/ipstack | head -n 1) @@ -2346,6 +2346,7 @@ This section generates manifests for various desktop software that I'm using. | dev | node | | dev | openjdk | | dev | go | +| dev | gcc-toolchain | ### Manifests {#manifests} diff --git a/content/configs/Emacs.md b/content/configs/Emacs.md index 4e3af76..cb90cf5 100644 --- a/content/configs/Emacs.md +++ b/content/configs/Emacs.md @@ -1552,7 +1552,7 @@ Before I figure out how to package this for Guix: :straight (:host github :repo "SqrtMinusOne/wakatime-mode") :if (not my/is-termux) :config - <> + (setq wakatime-ignore-exit-codes '(0 1 102)) (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)) @@ -4028,7 +4028,7 @@ My bit of config here: :straight t :init (my-leader-def - :keymaps '(js-mode-map typescript-mode-map vue-mode-map svelte-mode-map) + :keymaps '(js-mode-map web-mode-map typescript-mode-map vue-mode-map svelte-mode-map) "rr" #'prettier-prettify)) ``` @@ -4101,7 +4101,8 @@ Trying this one out instead of vue-mode and svelte-mode, because this one seems :config (add-hook 'web-mode-hook 'smartparens-mode) (add-hook 'web-mode-hook 'hs-minor-mode) - (my/set-smartparens-indent 'web-mode)) + (my/set-smartparens-indent 'web-mode) + (add-hook 'web-mode-hook )) ``` Hooking this up with lsp. @@ -4120,6 +4121,16 @@ Hooking this up with lsp. (add-hook 'web-mode-hook #'my/web-mode-lsp) ``` +Vue settings + +```emacs-lisp +(defun my/web-mode-vue-setup () + (when (string-match-p (rx ".vue" eos) (buffer-name)) + (setq-local web-mode-script-padding 0))) + +(add-hook 'web-mode-hook 'my/web-mode-vue-setup) +``` + #### OFF (OFF) Vue.js {#off--vue-dot-js} @@ -4763,7 +4774,7 @@ For some reason it doesn't use pipenv python executable, so here is a small work (if asc (cdr asc) (let ((python-executable - (string-trim (shell-command-to-string "PIPENV_IGNORE_VIRTUALENVS=1 pipenv run which python")))) + (string-trim (shell-command-to-string "PIPENV_IGNORE_VIRTUALENVS=1 pipenv run which python 2>/dev/null")))) (if (string-match-p ".*not found.*" python-executable) (message "Pipfile found, but not pipenv executable!") (message (format "Found pipenv python: %s" python-executable)) @@ -5469,7 +5480,7 @@ After all this is done, run `M-x emms-cache-set-from-mpd-all` to set cache from [mpv](https://mpv.io/) is a decent media player, which has found a place in this configuration because it integrates with youtube-dl. ```emacs-lisp -(add-to-list 'emms-player-list 'emms-player-mpv t) +(add-to-list 'emms-player-list 'emms-player-mpv) ``` Also a custom regex. My demands for MPV include running `youtube-dl`, so there is a regex that matches youtube.com or some of the video formats. diff --git a/content/configs/README.md b/content/configs/README.md index 720e0f1..dd4f10e 100644 --- a/content/configs/README.md +++ b/content/configs/README.md @@ -13,7 +13,7 @@ The majority of the software is configured with [literate configuration](https:/ The files themselves are managed and deployed via [yadm](https://yadm.io/), but I mostly use Org Mode rich noweb whenever I can instead of what yadm offers. -My current GNU/Linux distribution is [GNU Guix](https://guix.gnu.org/). 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. Looks for Org tables with "Guix dependency" in the header. +My current GNU/Linux distribution is [GNU Guix](https://guix.gnu.org/). 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 the tables with "Guix dependency" in the header. Literate configuration files: @@ -70,7 +70,7 @@ Some of the notable programs are listed in the table below. ## Some statistics {#some-statistics} -Run the following to show the pictures with reasonable width: +If you are viewing the file in Emacs, eval the following to show the pictures with reasonable width: ```elisp (setq-local org-image-actual-width '(1024)) diff --git a/public/configs/desktop/index.html b/public/configs/desktop/index.html index 0aee58e..0431dac 100644 --- a/public/configs/desktop/index.html +++ b/public/configs/desktop/index.html @@ -894,7 +894,7 @@ setxkbmap -model pc105 -option 'grp:win_space_to
hostname=$(hostname)
 # Settings varying on the hostname
-export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|--)" | xargs)
+export WLAN_INTERFACE=$(nmcli -f DEVICE con show | grep -Ev "(.*docker.*|DEVICE|br.*|tun.*|veth.*|--)" | xargs)
 if [ "$hostname" = "azure" ]; then
     TRAY_MONITOR="eDP-1"
     # export WLAN_INTERFACE="wlp3s0"
@@ -933,7 +933,7 @@ declare -A BLOCKS=(
 )
 
 # Geolocation for some modules
-export LOC="SPB"
+export LOC="TMN"
 
 export IPSTACK_API_KEY=$(pass show My_Online/APIs/ipstack | head -n 1)
 
@@ -2300,6 +2300,10 @@ $BUKU -f 4 -p | awk -FManifests
diff --git a/public/configs/emacs/index.html b/public/configs/emacs/index.html
index 7d24e82..eefdf38 100644
--- a/public/configs/emacs/index.html
+++ b/public/configs/emacs/index.html
@@ -1364,7 +1364,7 @@
   :straight (:host github :repo "SqrtMinusOne/wakatime-mode")
   :if (not my/is-termux)
   :config
-  <<wakatime-fixes>>
+  (setq wakatime-ignore-exit-codes '(0 1 102))
   (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))
@@ -3217,7 +3217,7 @@ MimeType=x-scheme-handler/org-protocol
   :straight t
   :init
   (my-leader-def
-    :keymaps '(js-mode-map typescript-mode-map vue-mode-map svelte-mode-map)
+    :keymaps '(js-mode-map web-mode-map typescript-mode-map vue-mode-map svelte-mode-map)
     "rr" #'prettier-prettify))
 

TypeScript

(use-package typescript-mode
@@ -3265,7 +3265,8 @@ MimeType=x-scheme-handler/org-protocol
   :config
   (add-hook 'web-mode-hook 'smartparens-mode)
   (add-hook 'web-mode-hook 'hs-minor-mode)
-  (my/set-smartparens-indent 'web-mode))
+  (my/set-smartparens-indent 'web-mode)
+  (add-hook 'web-mode-hook ))
 

Hooking this up with lsp.

(setq my/web-mode-lsp-extensions
       `(,(rx ".svelte" eos)
@@ -3278,6 +3279,12 @@ MimeType=x-scheme-handler/org-protocol
     (lsp-deferred)))
 
 (add-hook 'web-mode-hook #'my/web-mode-lsp)
+

Vue settings

+
(defun my/web-mode-vue-setup ()
+  (when (string-match-p (rx ".vue" eos) (buffer-name))
+    (setq-local web-mode-script-padding 0)))
+
+(add-hook 'web-mode-hook 'my/web-mode-vue-setup)
 

OFF (OFF) Vue.js

(use-package vue-mode
   :straight t
@@ -3794,7 +3801,7 @@ MimeType=x-scheme-handler/org-protocol
 	  (if asc
 	      (cdr asc)
 	    (let ((python-executable
-		   (string-trim (shell-command-to-string "PIPENV_IGNORE_VIRTUALENVS=1 pipenv run which python"))))
+		   (string-trim (shell-command-to-string "PIPENV_IGNORE_VIRTUALENVS=1 pipenv run which python 2>/dev/null"))))
 	      (if (string-match-p ".*not found.*" python-executable)
 		  (message "Pipfile found, but not pipenv executable!")
 		(message (format "Found pipenv python: %s" python-executable))
@@ -4313,7 +4320,7 @@ MimeType=x-scheme-handler/org-protocol
 
 
 

mpv is a decent media player, which has found a place in this configuration because it integrates with youtube-dl.

-
(add-to-list 'emms-player-list 'emms-player-mpv t)
+
(add-to-list 'emms-player-list 'emms-player-mpv)
 

Also a custom regex. My demands for MPV include running youtube-dl, so there is a regex that matches youtube.com or some of the video formats.

(emms-player-set emms-player-mpv
 		 'regex
diff --git a/public/configs/readme/index.html b/public/configs/readme/index.html
index 11b42f4..67a96d9 100644
--- a/public/configs/readme/index.html
+++ b/public/configs/readme/index.html
@@ -65,7 +65,7 @@
 

A set of my GNU/Linux configuration files. View at GitHub.

The majority of the software is configured with literate configuration strategy via Emacs' Org Mode. This way has its advantages and disadvantages, but overall it’s pretty nice to keep the configs interweaved with comments in a handful of files.

The files themselves are managed and deployed via yadm, but I mostly use Org Mode rich noweb whenever I can instead of what yadm offers.

-

My current GNU/Linux distribution is 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. Looks for Org tables with “Guix dependency” in the header.

+

My current GNU/Linux distribution is 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 the tables with “Guix dependency” in the header.

Literate configuration files:

Some statistics

-

Run the following to show the pictures with reasonable width:

+

If you are viewing the file in Emacs, eval the following to show the pictures with reasonable width:

(setq-local org-image-actual-width '(1024))
 

History

diff --git a/public/index.xml b/public/index.xml index 3113726..3fd9a78 100644 --- a/public/index.xml +++ b/public/index.xml @@ -39,73 +39,5 @@ Regradless, I&rsquo;ll check if I can write some Python here print(&#34;Hello, world&#34;) Hello, world - - Console - https://sqrtminusone.xyz/configs/console/ - Mon, 01 Jan 0001 00:00:00 +0000 - - 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 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. - - - - Desktop - https://sqrtminusone.xyz/configs/desktop/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://sqrtminusone.xyz/configs/desktop/ - My general desktop environment configuration. -Parts prefixed with (OFF) are not used, but kept for historic purposes. For some reason GitHub&rsquo;s org renderer ignores TODO status, hence such a prefix. Round brackets instead of square ones to prevent GitHub&rsquo;s org renderer from screwing up. - Table of Contents Global customization Colors Xresources Colors in Xresources Fonts Themes Device-specific settings i3wm General settings Managing windows Workspaces Rules Scratchpad Launch script i3 config Gaps &amp; borders Keybindings Move &amp; resize windows OFF (OFF) Intergration with dmenu Integration with rofi Launching apps &amp; misc keybindings Apps Media controls &amp; brightness Screenshots Colors OFF (OFF) i3blocks Keyboard Layout Autostart Polybar Launching General settings Colors Bar config Modules ipstack-vpn weather aw-afk sun SEP TSEP i3 xkeyboard mpd pulseaudio cpu ram-memory swap-memory network date battery Rofi Theme Scripts Buku bookmarks Man pages Flameshot dunst keynav Config Using with picom Picom Shadows Fading Opacity General settings Zathura Various software Browsers Office LaTeX Dev Manifests Flatpak Nix Services Music GNU Mcron ActivityWatch PulseEffects xsettingsd Discord rich presence Polkit Authentication agent Xmodmap VPN Davmail Shepherd config Sync Guix settings Global customization Colors Most of the colors are from the Palenight theme. - - - - Emacs config - https://sqrtminusone.xyz/configs/emacs/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://sqrtminusone.xyz/configs/emacs/ - One day we won&rsquo;t hate one another, no young boy will march to war and I will clean up my Emacs config. But that day isn&rsquo;t today. - My Emacs configuration. -As with other files in the repo, parts prefixed with (OFF) are not used but kept for historic purposes. - Table of Contents Primary setup Measure startup speed straight.el use-package Performance Garbage collection Run garbage collection when Emacs is unfocused Misc Native compilation Anaconda &amp; environment Custom file location Private config No littering Global editing configuration General keybindings stuff general. - - - - Guix - https://sqrtminusone.xyz/configs/guix/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://sqrtminusone.xyz/configs/guix/ - GNU Guix is (1) a transactional package manager and (2) a GNU/Linux distribution. -My personal selling points are declarative package configuration and transactional upgrades. -References: - Official help System Crafters wiki Pjotr Prins' Guix notes Davil Wilson&rsquo;s YouTube series Table of Contents Contents Profiles Activate profiles Update profiles Channels Systems Base configuration indigo eminence azure System installation Preparation Installation After installation Misc software &amp; notes VPN vpn-start vpn-stop flatpak conda Slack virt-manager wakatime-cli Manifest Contents Contents Profiles Activate profiles Update profiles Channels Systems Base configuration indigo eminence azure System installation Preparation Installation After installation Misc software &amp; notes VPN vpn-start vpn-stop flatpak conda Slack virt-manager wakatime-cli Manifest Profiles A profile is a way to group Guix packages. - - - - Mail - https://sqrtminusone.xyz/configs/mail/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://sqrtminusone.xyz/configs/mail/ - 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. - - - - My dotfiles - https://sqrtminusone.xyz/configs/readme/ - Mon, 01 Jan 0001 00:00:00 +0000 - - https://sqrtminusone.xyz/configs/readme/ - A set of my GNU/Linux configuration files. View at GitHub. -The majority of the software is configured with literate configuration strategy via Emacs' Org Mode. This way has its advantages and disadvantages, but overall it&rsquo;s pretty nice to keep the configs interweaved with comments in a handful of files. -The files themselves are managed and deployed via yadm, but I mostly use Org Mode rich noweb whenever I can instead of what yadm offers. - - diff --git a/themes/researcher/layouts/index.xml b/themes/researcher/layouts/index.xml new file mode 100644 index 0000000..2b1503d --- /dev/null +++ b/themes/researcher/layouts/index.xml @@ -0,0 +1,39 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range where $pages "Section" "!=" "configs" }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end }} + + diff --git a/update-configs.sh b/update-configs.sh index 68a341b..c3efe05 100755 --- a/update-configs.sh +++ b/update-configs.sh @@ -1,4 +1,3 @@ #!/usr/bin/env bash (cd ./org/configs/ && emacs -Q --batch -l publish.el) hugo -D -git push