From 3d290cefc9463352b1823bbce40c35464cb5ae65 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 18 Feb 2024 22:33:25 +0300 Subject: [PATCH 01/16] Cleanup empty ~/go --- bin/bin/my-cleanup | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/bin/my-cleanup b/bin/bin/my-cleanup index 7e1da08..925e9c4 100755 --- a/bin/bin/my-cleanup +++ b/bin/bin/my-cleanup @@ -8,4 +8,5 @@ rm -fr \ ~/.pylint.d \ ~/.viminfo \ ~/.Trash \ + ~/go \ ~/zathura.core -- 2.44.0 From b90a8671dd5879e07e8854546ec0fa53dc42efb7 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 18 Feb 2024 22:33:35 +0300 Subject: [PATCH 02/16] Trivial style fixes --- bin/bin/music-indexer | 6 +++--- bin/bin/my-ps2pdf | 2 +- bin/bin/zsnap | 3 +-- img/bin/my-jxll | 2 +- mkv/bin/my-mkvmerge | 2 +- nnn/bin/_nnn-cd | 2 +- nnn/bin/_nnn-cp | 2 +- tmux/.tmux/bin/fzf.zsh | 2 +- vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh | 2 +- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bin/bin/music-indexer b/bin/bin/music-indexer index 02e3823..a1e837e 100755 --- a/bin/bin/music-indexer +++ b/bin/bin/music-indexer @@ -29,12 +29,12 @@ for name (*~cols) { album=(${ts[2,-1]}) } lossless="" - [[ -d $name ]] && { + if [[ -d $name ]] ; then wvs=($name/**/*.wv(N)) [[ ${#wvs} -gt 0 ]] && lossless=1 - } || { + else [[ $name:e = wv ]] && lossless=1 - } + fi cols=() for col ($COLS) [[ -e cols/$col/$name ]] && cols=($cols $col) diff --git a/bin/bin/my-ps2pdf b/bin/bin/my-ps2pdf index ba5af64..5510c18 100755 --- a/bin/bin/my-ps2pdf +++ b/bin/bin/my-ps2pdf @@ -5,7 +5,7 @@ # removes all empty metainformation fields, removed fields # with uuid:s, removes Format (that is application/pdf). -set -e +setopt ERR_EXIT opts=( -dQUIET -dBATCH diff --git a/bin/bin/zsnap b/bin/bin/zsnap index 90d08f6..7bab829 100755 --- a/bin/bin/zsnap +++ b/bin/bin/zsnap @@ -1,7 +1,6 @@ #!/usr/bin/env zsh -set -e -setopt EXTENDED_GLOB +setopt ERR_EXIT EXTENDED_GLOB usage() { cat < Date: Sat, 24 Feb 2024 12:50:40 +0300 Subject: [PATCH 03/16] EXTENDED_HISTORY --- zsh/.zsh/rc/005history-cfg.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/.zsh/rc/005history-cfg.zsh b/zsh/.zsh/rc/005history-cfg.zsh index ed50aaa..aa16543 100644 --- a/zsh/.zsh/rc/005history-cfg.zsh +++ b/zsh/.zsh/rc/005history-cfg.zsh @@ -1,5 +1,5 @@ -setopt APPEND_HISTORY SHARE_HISTORY INC_APPEND_HISTORY HIST_IGNORE_ALL_DUPS -setopt HIST_IGNORE_SPACE +setopt APPEND_HISTORY SHARE_HISTORY INC_APPEND_HISTORY EXTENDED_HISTORY +setopt HIST_IGNORE_SPACE HIST_IGNORE_ALL_DUPS local history_ignore=( "dl-magnet *" "link-for-*" -- 2.44.0 From 9624dcb97970a1cf51f53e839e950d01a1d301f7 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Tue, 5 Mar 2024 11:18:39 +0300 Subject: [PATCH 04/16] Less annoying parallel perl -i -ne 'print unless /^\s+citation_notice..;$/' src/parallel --- parallel/.parallel/will-cite | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 parallel/.parallel/will-cite diff --git a/parallel/.parallel/will-cite b/parallel/.parallel/will-cite deleted file mode 100644 index e69de29..0000000 -- 2.44.0 From 204ae064d0bf7b7bb7e06e2d064d8dd33556f23b Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 10 Mar 2024 10:49:45 +0300 Subject: [PATCH 05/16] Keep original mtime --- img/bin/my-transcode-jpg | 1 + 1 file changed, 1 insertion(+) diff --git a/img/bin/my-transcode-jpg b/img/bin/my-transcode-jpg index ec0d7a1..616323b 100755 --- a/img/bin/my-transcode-jpg +++ b/img/bin/my-transcode-jpg @@ -5,3 +5,4 @@ trap "rm -f $tmp.jpg" HUP PIPE INT QUIT TERM EXIT jpegtran -optimize -progressive -perfect -copy all "$1" > $tmp.jpg cjxl $tmp.jpg "${1%.*}.jxl" --distance=0 --effort=9 --brotli_effort=11 --lossless_jpeg=1 [ -s "${1%.*}.jxl" ] +touch -r "$1" "${1%.*}.jxl" -- 2.44.0 From 7218790fe84bd8f74e09a7d8d21fc0819bb85a30 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 10 Mar 2024 10:51:43 +0300 Subject: [PATCH 06/16] Cleanup empty file --- img/bin/my-transcode-jpg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/img/bin/my-transcode-jpg b/img/bin/my-transcode-jpg index 616323b..bf4863d 100755 --- a/img/bin/my-transcode-jpg +++ b/img/bin/my-transcode-jpg @@ -1,7 +1,7 @@ #!/bin/sh -e tmp=`mktemp` -trap "rm -f $tmp.jpg" HUP PIPE INT QUIT TERM EXIT +trap "rm -f $tmp $tmp.jpg" HUP PIPE INT QUIT TERM EXIT jpegtran -optimize -progressive -perfect -copy all "$1" > $tmp.jpg cjxl $tmp.jpg "${1%.*}.jxl" --distance=0 --effort=9 --brotli_effort=11 --lossless_jpeg=1 [ -s "${1%.*}.jxl" ] -- 2.44.0 From 9d0713a36dc003697856079aae6ae31c7ae98bf8 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 22 Mar 2024 09:39:05 +0300 Subject: [PATCH 07/16] my-bunzip2 --- bin/bin/my-bunzip2 | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/bin/my-bunzip2 diff --git a/bin/bin/my-bunzip2 b/bin/bin/my-bunzip2 new file mode 100755 index 0000000..6c70c4d --- /dev/null +++ b/bin/bin/my-bunzip2 @@ -0,0 +1,3 @@ +#!/bin/sh -e + +exec 7z x -tbzip2 -si -so -- 2.44.0 From f3e53b28c9f4fdc699d45b4c8b3e1fc725bb85f6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 6 Apr 2024 10:43:13 +0300 Subject: [PATCH 08/16] No on-data caches --- mpv/.mpv/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpv/.mpv/config b/mpv/.mpv/config index b50b600..0b8c924 100644 --- a/mpv/.mpv/config +++ b/mpv/.mpv/config @@ -4,6 +4,8 @@ cache-secs=60 display-tags=* gapless-audio=yes autosync=30 +cache-on-disk=no +gpu-shader-cache=no audio-channels=2 hwdec=vaapi hwdec-codecs=h264,hevc,vp8,vp9,mpeg2video,vc1 -- 2.44.0 From 228cd5e9ec4395df3b26422c3fc87feb6ca323bd Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 15 Apr 2024 14:20:19 +0300 Subject: [PATCH 09/16] Move variable --- x/bin/start-im | 2 +- zsh/.zsh/env/005irc.zsh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/x/bin/start-im b/x/bin/start-im index 69727ae..fc2f81c 100755 --- a/x/bin/start-im +++ b/x/bin/start-im @@ -1,3 +1,3 @@ #!/bin/sh -st -t Terminal8 -e sh -c "cd /home/stargrave/secure/mmc ; /home/stargrave/work/mmc/cmd/start" 2>/dev/null & +st -t Terminal8 -e sh -c "cd /home/stargrave/secure/mmc ; envdir env /home/stargrave/work/mmc/cmd/start" 2>/dev/null & diff --git a/zsh/.zsh/env/005irc.zsh b/zsh/.zsh/env/005irc.zsh index e107fae..743e10c 100644 --- a/zsh/.zsh/env/005irc.zsh +++ b/zsh/.zsh/env/005irc.zsh @@ -1,3 +1,2 @@ export IRCNAME="Sergey Matveev" export IRCNICK="stargrave" -export MMC_ENTRYPOINT=mm.rnd.stcnet.ru -- 2.44.0 From d978dc744515a24d68e139349b244354e2623696 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 26 Apr 2024 09:29:39 +0300 Subject: [PATCH 10/16] Have not used zshfe for years --- .../stargrave/start/zshfe/autoload/zshfe.vim | 7 ------- .../stargrave/start/zshfe/plugin/zshfe.vim | 18 ------------------ .../stargrave/start/zshfe/plugin/zshfe.zsh | 8 -------- 3 files changed, 33 deletions(-) delete mode 100644 vim/.vim/pack/stargrave/start/zshfe/autoload/zshfe.vim delete mode 100644 vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.vim delete mode 100755 vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh diff --git a/vim/.vim/pack/stargrave/start/zshfe/autoload/zshfe.vim b/vim/.vim/pack/stargrave/start/zshfe/autoload/zshfe.vim deleted file mode 100644 index bb94dd6..0000000 --- a/vim/.vim/pack/stargrave/start/zshfe/autoload/zshfe.vim +++ /dev/null @@ -1,7 +0,0 @@ -vim9script - -export def Do(query: string, opencmd: string) - silent var result = systemlist(g:zshfe_path .. " " .. query) - if len(result) == 0 | return | endif - execute opencmd .. " " .. result[0][: -2] -enddef diff --git a/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.vim b/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.vim deleted file mode 100644 index cb05d99..0000000 --- a/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.vim +++ /dev/null @@ -1,18 +0,0 @@ -vim9script - -# zsh file completion caller -# Maintainer: Sergey Matveev -# License: GNU General Public License version 3 of the License or later - -if exists("*zshfe#Do") | finish | endif -if !exists("g:zshfe_path") - g:zshfe_path = expand(":p:h") .. "/zshfe.zsh" -endif - -command! -nargs=1 Fe call zshfe#Do(, "edit") -command! -nargs=1 Fsp call zshfe#Do(, "split") -command! -nargs=1 Fvs call zshfe#Do(, "vsplit") - -nmap e :Fe -nmap :Fsp -nmap v :Fvs diff --git a/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh b/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh deleted file mode 100755 index 9222054..0000000 --- a/vim/.vim/pack/stargrave/start/zshfe/plugin/zshfe.zsh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env zsh - -setopt ERR_EXIT -zmodload zsh/zpty -zpty zshfe zsh -zpty -w zshfe "print ZSHFE $*"$'\t EFHSZ\nexit\n' -zpty -r zshfe zshfe "*exit" -print -- $zshfe | sed -n "s/^ZSHFE \(.*\) EFHSZ/\1/p" -- 2.44.0 From 35272b25e4db4bf15efd2b36b558abe2499a6cb6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 3 May 2024 11:45:40 +0300 Subject: [PATCH 11/16] PDFACompatibilityPolicy must be set through -d --- bin/bin/my-ps2pdf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/bin/my-ps2pdf b/bin/bin/my-ps2pdf index 5510c18..4b18dc3 100755 --- a/bin/bin/my-ps2pdf +++ b/bin/bin/my-ps2pdf @@ -15,7 +15,7 @@ opts=( -dPDFSETTINGS=/default -dPDFA=1 -dCompatibilityLevel=1.4 - -dPDFACompatibilityPolicy=3 # that will skip some errors about XMP + -sPDFACompatibilityPolicy=3 # that will skip some errors about XMP -dAutoRotatePages=/None -dOptimize=true -sColorConversionStrategy=RGB # advised for PDF/A -- 2.44.0 From 6b67724b21464f8bb8eec2a671c0a224a696b947 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 3 May 2024 11:46:07 +0300 Subject: [PATCH 12/16] Keep Producer --- bin/bin/my-ps2pdf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/bin/my-ps2pdf b/bin/bin/my-ps2pdf index 4b18dc3..01e37bd 100755 --- a/bin/bin/my-ps2pdf +++ b/bin/bin/my-ps2pdf @@ -38,8 +38,9 @@ exiftool $1.pdf | while read l ; do done for i ({1..${#toremove}}) toremove[$i]=-${toremove[$i]}= exiftool -zip -overwrite_original -quiet \ - -tagsFromFile $1 -Producer\>Creator \ - ${=toremove} $1.pdf + -tagsFromFile $1 -Creator\Creator ${=toremove} $1.pdf [[ -z $LINEARIZE ]] || LINEARIZE=--linearize qpdf $LINEARIZE --compress-streams=y $1.pdf $1.pdf.pdf mv $1.pdf.pdf $1.pdf -- 2.44.0 From abdba3d4a3a766610776ab47489428695dbdf26e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 3 May 2024 11:46:21 +0300 Subject: [PATCH 13/16] Let's try to use Brave's search DuckDuckGo is too censored and gives full of political shit instead of my request results. --- links/bin/xom | 2 +- lynx/.lynx_jumps.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/links/bin/xom b/links/bin/xom index 57d4f5c..469dd36 100755 --- a/links/bin/xom +++ b/links/bin/xom @@ -10,7 +10,7 @@ if [ $# -gt 1 ] ; then pep) url="https://www.python.org/dev/peps/pep-0$@/" ;; py) url="https://pypi.org/project/$@/" ;; rfc) url="https://datatracker.ietf.org/doc/html/rfc$@" ;; - s) url="https://html.duckduckgo.com/html?q=$@" ;; + s) url="https://search.brave.com/search?q=$@" ;; we) url="https://en.wikipedia.org/wiki/$@" ;; wr) url="https://ru.wikipedia.org/wiki/$@" ;; esac diff --git a/lynx/.lynx_jumps.html b/lynx/.lynx_jumps.html index 95d897f..432b861 100644 --- a/lynx/.lynx_jumps.html +++ b/lynx/.lynx_jumps.html @@ -9,7 +9,7 @@
pep
PEP
py
PyPI
rfc
RFC
-
s
DuckDuckGo
+
s
Brave
we
WikiEN
wr
WikiRU
-- 2.44.0 From a382a4c9f7edc9295247389cd7ea4cd143942a7a Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 4 May 2024 19:45:11 +0300 Subject: [PATCH 14/16] Some HiDPI-related stuff --- wish/.wishrc | 4 ++++ x/.Xresources | 1 - x/.xinitrc | 1 + x/bin/start-x | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 wish/.wishrc diff --git a/wish/.wishrc b/wish/.wishrc new file mode 100644 index 0000000..2fa31fa --- /dev/null +++ b/wish/.wishrc @@ -0,0 +1,4 @@ +font create myDefaultFont -family Go -size 14 +option add *font myDefaultFont +tk scaling [expr {163 / 72.0}] +tk_setPalette grey diff --git a/x/.Xresources b/x/.Xresources index 00f07a8..aec20aa 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -1,4 +1,3 @@ -Xft.dpi: 96 Xft.hinting: true Xft.antialias: true Xft.autohint: false diff --git a/x/.xinitrc b/x/.xinitrc index 4717bbb..0fa02e1 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -5,6 +5,7 @@ xset b off setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap +xset m 4 ~/work/godwmstat/godwmstat -xsetroot & rm -f ~/.ssh/agent ; ssh-agent -a $SSH_AUTH_SOCK exec ~/src/suckless/dwm/dwm diff --git a/x/bin/start-x b/x/bin/start-x index ca17aa2..cf889aa 100755 --- a/x/bin/start-x +++ b/x/bin/start-x @@ -1,4 +1,4 @@ #!/bin/sh rm .serverauth.* .Xauthority* -exec startx +exec startx $@ -- 2.44.0 From 3da199a6498c79b65430428933d6c0f8831eecc3 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 5 May 2024 10:15:11 +0300 Subject: [PATCH 15/16] Currently mode switching brings problems --- x/.xinitrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/.xinitrc b/x/.xinitrc index 0fa02e1..db58c85 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,11 +1,11 @@ #!/bin/zsh xsetroot -solid \#222222 -xset b off +xset s off b off -dpms +xset m 4 1 setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap -xset m 4 ~/work/godwmstat/godwmstat -xsetroot & rm -f ~/.ssh/agent ; ssh-agent -a $SSH_AUTH_SOCK exec ~/src/suckless/dwm/dwm -- 2.44.0 From 38bdc955e081775d3c46d48ffee78147948f8881 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 5 May 2024 10:15:38 +0300 Subject: [PATCH 16/16] Make zathura configuration file aware --- zathura/.zathurarc | 1 + zathura/.zsh/rc/010zathurarc.zsh | 4 ++++ zathura/bin/zat | 1 + 3 files changed, 6 insertions(+) create mode 100644 zathura/.zsh/rc/010zathurarc.zsh diff --git a/zathura/.zathurarc b/zathura/.zathurarc index 39be0c1..6523573 100644 --- a/zathura/.zathurarc +++ b/zathura/.zathurarc @@ -1,2 +1,3 @@ set sandbox strict set dbus-service false +set font "monospace normal 20" diff --git a/zathura/.zsh/rc/010zathurarc.zsh b/zathura/.zsh/rc/010zathurarc.zsh new file mode 100644 index 0000000..a5bc5f8 --- /dev/null +++ b/zathura/.zsh/rc/010zathurarc.zsh @@ -0,0 +1,4 @@ +[[ -d $XDG_CONFIG_HOME/zathura ]] || { + mkdir -p $XDG_CONFIG_HOME/zathura + ln -fs ~/.zathurarc $XDG_CONFIG_HOME/zathura/zathurarc +} diff --git a/zathura/bin/zat b/zathura/bin/zat index f12a718..9debef1 100755 --- a/zathura/bin/zat +++ b/zathura/bin/zat @@ -2,6 +2,7 @@ export PATH=$HOME/local/bin:$PATH export XDG_DATA_DIRS=$HOME/local +export XDG_CONFIG_HOME=/tmp/stargrave-xdg export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH winid=`start-tabbed.sh zathura -c` zathura -e $winid "$1" -- 2.44.0