Update many things
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 20 Nov 2024 15:21:26 +0000 (10:21 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 20 Nov 2024 15:21:26 +0000 (10:21 -0500)
17 files changed:
home/.config/Code/User/settings.json
home/.config/mimeapps.list
home/.config/nvim/coc-settings.json
home/.config/nvim/init.vim
home/.gitconfig
home/.xbindkeysrc
home/.xlaunch.d/0-dunst [moved from home/.xlaunch.d/dunst with 83% similarity]
home/.xlaunch.d/000-dpi_scale [moved from home/.xlaunch.d/0-dpi_scale with 93% similarity]
home/.xlaunch.d/pista
home/.xlaunch.d/xbindkeys
home/.xlaunch.d/xscreensaver
home/bin/dunst_beep_critical
home/bin/dunst_beep_normal
home/bin/mpplay
home/lib/login_aliases.sh
home/lib/login_functions.sh
home/lib/login_variables.sh

index cfa54af..baa2463 100644 (file)
     ],
     "editor.inlineSuggest.enabled": true,
     "github.copilot.enable": {
-        "*": false,
-        "yaml": false,
+        "*": true,
         "plaintext": true,
-        "markdown": false
+        "markdown": false,
+        "scminput": false,
+        "yaml": false
     },
     "editor.fontSize": 13,
     "debug.console.fontSize": 13,
     "markdown.preview.fontSize": 13,
-    "terminal.integrated.fontSize": 13
+    "terminal.integrated.fontSize": 13,
+    "lldb.suppressUpdateNotifications": true
 }
\ No newline at end of file
index 7138d4d..6ba8e6c 100644 (file)
@@ -12,7 +12,7 @@ audio/vnd.audible.aax=vlc.desktop;
 audio/x-m4a=vlc.desktop;mpv.desktop;
 image/bmp=sxiv.desktop;
 image/gif=sxiv.desktop;
-image/jpeg=sxiv.desktop;
+image/jpeg=sxiv.desktop;feh.desktop;
 image/png=sxiv.desktop;
 image/tiff=sxiv.desktop;
 inode/symlink=caja.desktop;
@@ -28,17 +28,10 @@ x-scheme-handler/https=userapp-Firefox-FY7R00.desktop;
 x-scheme-handler/tg=userapp-Telegram Desktop-Q1EZH1.desktop;userapp-Telegram Desktop-NYSNT1.desktop;org.telegram.desktop.desktop;
 x-scheme-handler/trash=caja.desktop
 text/x-verilog=gvim.desktop;
-audio/flac=mpv.desktop;
-audio/x-flac=mpv.desktop;
-audio/mpeg=mpv.desktop;
-application/vnd.oasis.opendocument.text=libreoffice-writer.desktop;
-application/rtf=libreoffice-writer.desktop;
-application/msword=libreoffice-writer.desktop;
-application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
-application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop;
-application/vnd.ms-excel=libreoffice-calc.desktop;
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop;
 application/vnd.sqlite3=anki.desktop;
+image/heif=eom.desktop;feh.desktop;
+application/xml=gvim.desktop;
+x-scheme-handler/tonsite=org.telegram.desktop.desktop;
 
 [Default Applications]
 application/illustrator=gimp.desktop
@@ -59,10 +52,10 @@ audio/x-vorbis+ogg=mpv.desktop
 audio/x-wav=mpv.desktop
 image/bmp=eom.desktop
 image/gif=eom.desktop
-image/jpeg=eom.desktop
+image/jpeg=feh.desktop
 image/png=eom.desktop
 image/tiff=eom.desktop
-inode/directory=caja.desktop
+inode/directory=pcmanfm.desktop
 inode/symlink=caja.desktop
 message/rfc822=thunderbird.desktop
 text/csv=gvim.desktop
@@ -105,3 +98,6 @@ application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoff
 application/vnd.oasis.opendocument.spreadsheet=libreoffice-calc.desktop
 application/vnd.ms-excel=libreoffice-calc.desktop
 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet=libreoffice-calc.desktop
+image/heif=feh.desktop
+application/xml=gvim.desktop
+x-scheme-handler/tonsite=org.telegram.desktop.desktop
index 8265119..c31bc4f 100644 (file)
@@ -21,6 +21,7 @@
             "filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"]
         }
     },
+
     "markdownlint.config": {
         // Allow mixed usage of both styles of heading indicators.
         // (i.e. leading hashes (###) for level 3+ after
         // - https://github.com/fannheyward/coc-markdownlint
         // - https://github.com/DavidAnson/markdownlint/blob/main/doc/md003.md
         // - https://github.com/DavidAnson/markdownlint/blob/3561fc3f38b05b3c55f44e371c2cd9bda194598a/doc/md003.md
-        "MD003": { "style": "setext_with_atx" }
-    }
+        "MD003": { "style": "setext_with_atx" },
+
+        // Allow different list item markers (-, +, *) in unordered lists, as
+        // long as each level uses the same one.
+        // Ref: https://github.com/DavidAnson/markdownlint/blob/main/doc/md004.md
+        "MD004": { "style": "sublist" },
+
+        // Allow duplicate headings with different parents.
+        // Ref: https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md
+        "MD024": { "siblings_only": true }
+    },
+
+    // FIXME These rust-analyzer settings do not seem to work. Why?
+    // Ref: https://github.com/fannheyward/coc-rust-analyzer
+    // "rust-analyzer.inlayHints.typeHints.enable": false,
+    // "rust-analyzer.inlayHints.maxLength": 0,
+    // "rust-analyzer.inlayHints.parameterHints.enable": false
+    "rust-analyzer.cargo.features": "all"
 }
index 6a4e197..73871ec 100644 (file)
@@ -9,6 +9,8 @@
 " Run :PlugInstall after adding a new plugin
 call plug#begin()
 
+Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
+Plug 'junegunn/fzf.vim'
 Plug 'z0mbix/vim-shfmt', { 'for': 'sh' }
 Plug 'dense-analysis/ale' " Syntastic's spiritual succesor
 Plug 'preservim/nerdtree'
@@ -33,6 +35,15 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
 
 Plug 'simrat39/symbols-outline.nvim'
 
+" Typst stuff:
+Plug 'kaarmu/typst.vim'
+" https://typst.app/
+" https://github.com/typst/typst
+" https://github.com/typst/typst/issues/175
+" https://github.com/kaarmu/typst.vim
+" https://github.com/chomosuke/typst-preview.nvim
+" https://github.com/SeniorMars/typst.nvim
+
 call plug#end()
 " END Vim-Plug
 
@@ -49,10 +60,13 @@ let NERDTreeShowLineNumbers=1
 
 " rust.vim
 let g:rustfmt_autosave = 1
+"let g:rustfmt_options = '--edition 2021' " XXX Without specifying edition,
+                                         " presence of async in file prevents
+                                         " it from being formatted on save.
 
 " shfmt
 let g:shfmt_extra_args = '--indent 4 --language-dialect bash'
-" let g:shfmt_fmt_on_save = 1 " on-save probably to invasive to mod existing scripts.
+" let g:shfmt_fmt_on_save = 1 " on-save probably too invasive to mod existing scripts.
 
 "==============================================================================
 " Defaults
@@ -81,7 +95,18 @@ set spelllang=en,ru
 " lightline
 set laststatus=2
 set noshowmode
-let g:lightline = {'colorscheme': 'seoul256'}
+let g:lightline = {
+    \ 'colorscheme': 'seoul256',
+    \ 'component_function': {
+    \   'filename': 'LightlineFilename'
+    \ }
+\}
+
+function! LightlineFilename()
+  let l:filename = expand('%:t')
+  let l:parentdir = expand('%:h:t')
+  return l:parentdir . '/' . l:filename
+endfunction
 
 "------------------------------------------------------------------------------
 " Color
index 3e84c52..2cfd719 100644 (file)
@@ -8,8 +8,12 @@
         ui = true
 [cola]
        spellcheck = false
+
 [init]
-       defaultBranch = electus
+    # As in "electus ramus" - "the chosen branch".
+    # The One, which was arbitrarily chosen to serve as default.
+    defaultBranch = electus
+
 #[filter "lfs"]
 #      required = true
 #      clean = git-lfs clean -- %f
index 19639d1..a7b3db5 100644 (file)
 "cd ~/doc/drafts && gvim $(draft ~/doc/drafts/adhoc)"
     Mod4 + d
 
+"cd ~/doc/notes/job-search-2024 && gvim README.md"
+    Mod4 + j
 "cd ~/doc/notes && notes_prepend && gvim -c NERDTreeFind notes.md"
     Mod4 + n + Shift
 "cd ~/doc/notes && gvim $(draft ~/doc/notes/adhoc)"
 "notify_status"
     Mod4 + s
 
-"notify_time-in-zones"
+"notify-send -u low 'time in zones' "$(tiz UTC US/Pacific US/Mountain US/Eastern Europe/Warsaw Europe/Kyiv Europe/Moscow Europe/Samara Asia/Manila NZ)""
     Mod4 + z
 
 # MPD
similarity index 83%
rename from home/.xlaunch.d/dunst
rename to home/.xlaunch.d/0-dunst
index fb39ad2..7713dd9 100755 (executable)
@@ -21,5 +21,9 @@ ps -eo pid,cmd | awk '$2 ~ /\/usr\/bin\/dunst\>/ {print $1}' | xargs -I% kill %
 # Hope this is enough for hidpi stuff to finish setting.
 sleep 1
 
+# XXX mate-settings-daemon, on which we rely on for hidpi settings, starts
+#     mate-notification-daemon and interferes with our start.
+pkill mate-notificati || true
+
 # Now dunst should start scaled:
 dunst --startup_notification
similarity index 93%
rename from home/.xlaunch.d/0-dpi_scale
rename to home/.xlaunch.d/000-dpi_scale
index bd5cd39..51a89ff 100755 (executable)
@@ -32,5 +32,6 @@ set -e
 #
 #main
 
+# sleep 1 # XXX Slow down to let dunst and xscreensaver win the start-up race.
 # /usr/libexec/mate-settings-daemon --replace --debug
 /usr/libexec/mate-settings-daemon --replace
index 7633f65..f047813 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
-set -e
+set -e
 
 # pistactl --config ~/.pistactl."$(hostname)" restart
 # pistactl --config ~/.pistactl.toml restart
-pistactl restart
+pistactl restart
index 2bba2da..35e895f 100755 (executable)
@@ -6,4 +6,4 @@ set -e
 #     1. not using killall;
 #     2. using "command" (or "cmd") instead of "comm".
 ps -eo pid,command | awk '$2 ~ "^xbindkeys" {print $1}' | xargs -I% kill %
-xbindkeys -n -v
+xbindkeys -n #-v
index 7e202a2..9762d77 100755 (executable)
@@ -2,4 +2,8 @@
 
 set -e
 
+# XXX mate-settings-daemon, on which we rely on for hidpi settings, starts
+#     mate-screensaver and interferes with our start.
+pkill mate-screensave || true
+
 xscreensaver
index d169409..3a2e41b 100755 (executable)
@@ -3,5 +3,5 @@
 #play -q -n synth 0.5 sin 750
 for i in $(seq 3)
 do
-    play -q -n synth 0.1 sin 115
+    play -q -n synth 0.1 sin 300
 done
index 3b6ac8c..1f8aa2f 100755 (executable)
@@ -1,3 +1,3 @@
 #! /bin/sh
 
-play -q -n synth 0.1 sin 115
+play -q -n synth 0.1 sin 300
index 1782f0e..4eaa4a6 100755 (executable)
@@ -4,5 +4,5 @@ set -e
 set -o pipefail
 
 mpc listall | khomenu | mpc insert
-mpc play
-st -e ncmpc
+mpc play
+st -e ncmpc
index a2716a9..74bfa2c 100644 (file)
@@ -28,3 +28,10 @@ alias quotes='cd ~/doc/quotations && vim quotations.md'
 alias bitcoin='nc ticker.bitcointicker.co 10080'  # https://github.com/chubin/awesome-console-services#Money
 alias weather='cat ~/.pista-out/weather-summary'
 alias sccache-restart='sccache --stop-server; sccache --start-server'
+alias nightshift=sct
+alias links='vim ~/arc/doc/links/"$(date +%F)"'
+alias gh-clone-repo=gh_clone_repo
+alias gh-clone-user=gh_clone_user
+alias gh-clone-org=gh_clone_org
+alias j=jobs
+alias t='tiz UTC US/Pacific US/Mountain US/Eastern Europe/Warsaw Europe/Kyiv Europe/Moscow Europe/Samara Asia/Manila NZ'
index f28666d..e518135 100644 (file)
@@ -15,6 +15,22 @@ emoji() {
     khomenu < ~/emoji.txt | awk '{print $1}' | xsel --input --clipboard
 }
 
+links_aggregate_md() {
+    printf 'Daily Links\n'
+    printf '%s\n' "$(bar 78 '=')"
+    find ~/arc/doc/links -maxdepth 1 -mindepth 1 -type f \
+    | sort -r \
+    | while read -r file_path; do
+        printf '\n'
+        basename $file_path
+        printf '%s\n' "$(bar 78 '-')"
+        printf '\n'
+        while read -r url; do
+            printf '- <%s>\n' "$url"
+        done < "$file_path"
+    done
+}
+
 ## notify_done : unit -> unit
 notify_done() {
     local -r _status_code="$?"
@@ -322,7 +338,8 @@ _yt() {
     local -r uri="$2"
     local -r opts="$3"
 
-    local -r yt=youtube-dl
+    # local -r yt=youtube-dl
+    local -r yt=yt-dlp
     local -r id=$("$yt" --get-id "$uri")
     local -r title=$("$yt" --get-title "$uri" | sed 's/[^А-Яа-яA-Za-z0-9._-]/_/g')
     local -r dir="${base_dir}/${title}--${id}"
@@ -935,3 +952,7 @@ loggers() {
     | bar_gauge -v num=1 -v ch_right=' ' -v ch_left=' ' -v ch_blank=' ' \
     | column -t
 }
+
+load() {
+    awk -v n="$(nproc)" 'NR == 1 {printf "%.2f %.2f %.2f\n", $1 / n, $2 / n, $3 / n}' /proc/loadavg
+}
index 7904ae7..00826c9 100644 (file)
@@ -35,6 +35,7 @@ ERL_AFLAGS="+pc unicode"
 ERL_AFLAGS="$ERL_AFLAGS -kernel shell_history enabled"
 ERL_AFLAGS="$ERL_AFLAGS -kernel shell_history_path '\"$HOME/.erl_history\"'"
 export ERL_AFLAGS
+. /home/xand/.kerl/installations/25.3.2.13/activate
 
 # Rust / cargo
 export PATH=$PATH:$HOME/.cargo/bin
This page took 0.043399 seconds and 4 git commands to generate.