From 7218790fe84bd8f74e09a7d8d21fc0819bb85a30 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 10 Mar 2024 10:51:43 +0300 Subject: [PATCH 01/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 02/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 03/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 04/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 05/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 06/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 07/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 08/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 09/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 10/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 11/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 From f0705e168f54f76e24ef899344af0f9afc5f282b Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 6 May 2024 17:19:17 +0300 Subject: [PATCH 12/16] No annoying advice --- git/.gitconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/git/.gitconfig b/git/.gitconfig index bd6ae59..7d19ce5 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -3,6 +3,7 @@ [advice] pushUpdateRejected = false detachedHead = false + addIgnoredFile = false [alias] wt = worktree unchanged = update-index --assume-unchanged -- 2.44.0 From 30e6af7b65ab3b05cdd824c05a4c38cabc6555f6 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 6 May 2024 17:18:55 +0300 Subject: [PATCH 13/16] I also have got non-HiDPI display --- wish/.wishrc | 8 +++++--- x/.xinitrc | 7 +++++-- x/bin/mylock | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/wish/.wishrc b/wish/.wishrc index 2fa31fa..2bb5a40 100644 --- a/wish/.wishrc +++ b/wish/.wishrc @@ -1,4 +1,6 @@ -font create myDefaultFont -family Go -size 14 -option add *font myDefaultFont -tk scaling [expr {163 / 72.0}] +if {[file exists /tmp/hidpi]} { + font create myDefaultFont -family Go -size 12 + option add *font myDefaultFont + tk scaling [expr {163 / 72.0}] +} tk_setPalette grey diff --git a/x/.xinitrc b/x/.xinitrc index db58c85..20dee4a 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,8 +1,11 @@ #!/bin/zsh xsetroot -solid \#222222 -xset s off b off -dpms -xset m 4 1 +[[ -e /tmp/hidpi ]] && { + xset s off b off -dpms + xset m 4 1 + xsetroot -xcf /usr/local/share/icons/whiteglass/cursors/left_ptr 28 +} setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap diff --git a/x/bin/mylock b/x/bin/mylock index e123f5b..0a3554c 100755 --- a/x/bin/mylock +++ b/x/bin/mylock @@ -1,6 +1,6 @@ #!/bin/sh -xset dpms force off +[ -e /tmp/hidpi ] && || xset dpms force off gpgconf --reload gpg-agent SSH_AUTH_SOCK=$HOME/.ssh/agent ssh-add -D slock -- 2.44.0 From d5566c908a83e598ed8933e568aad90c7aa6ac7c Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 8 May 2024 11:11:49 +0300 Subject: [PATCH 14/16] non-HiDPI links -g --- links/bin/xom | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/links/bin/xom b/links/bin/xom index 469dd36..ddd72d0 100755 --- a/links/bin/xom +++ b/links/bin/xom @@ -15,4 +15,7 @@ if [ $# -gt 1 ] ; then wr) url="https://ru.wikipedia.org/wiki/$@" ;; esac fi -exec links -g "$url" +[ -e /tmp/hidpi ] || { + fonts="-menu-font-size 16 -html-user-font-size 20" +} +exec links -g $fonts "$url" -- 2.44.0 From f5e41b85a7771237f6e207cf093cbefe50f3802a Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 8 May 2024 18:40:06 +0300 Subject: [PATCH 15/16] start-x-hidpi --- x/.xinitrc | 4 +++- x/bin/start-x-hidpi | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 x/bin/start-x-hidpi diff --git a/x/.xinitrc b/x/.xinitrc index 20dee4a..5a1594d 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -4,11 +4,13 @@ xsetroot -solid \#222222 [[ -e /tmp/hidpi ]] && { xset s off b off -dpms xset m 4 1 - xsetroot -xcf /usr/local/share/icons/whiteglass/cursors/left_ptr 28 } setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap ~/work/godwmstat/godwmstat -xsetroot & rm -f ~/.ssh/agent ; ssh-agent -a $SSH_AUTH_SOCK +if [[ -e /tmp/hidpi ]] ; then + ( sleep 30 ; xsetroot -xcf /usr/local/share/icons/Adwaita/cursors/left_ptr 30 ) & +fi exec ~/src/suckless/dwm/dwm diff --git a/x/bin/start-x-hidpi b/x/bin/start-x-hidpi new file mode 100755 index 0000000..583216e --- /dev/null +++ b/x/bin/start-x-hidpi @@ -0,0 +1,4 @@ +#!/bin/sh + +touch /tmp/hidpi +exec start-x -- -dpi 163 -- 2.44.0 From 43d6af60eb7cca98edf6defe775521fa6f315447 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 13 May 2024 12:00:02 +0300 Subject: [PATCH 16/16] HI flag --- links/bin/xom | 2 +- wish/.wishrc | 2 +- x/.xinitrc | 6 +++--- x/bin/mylock | 2 +- x/bin/start-x-hidpi | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/links/bin/xom b/links/bin/xom index ddd72d0..3c8168c 100755 --- a/links/bin/xom +++ b/links/bin/xom @@ -15,7 +15,7 @@ if [ $# -gt 1 ] ; then wr) url="https://ru.wikipedia.org/wiki/$@" ;; esac fi -[ -e /tmp/hidpi ] || { +[ -e /tmp/stargrave-flags/HI ] || { fonts="-menu-font-size 16 -html-user-font-size 20" } exec links -g $fonts "$url" diff --git a/wish/.wishrc b/wish/.wishrc index 2bb5a40..6b3dc14 100644 --- a/wish/.wishrc +++ b/wish/.wishrc @@ -1,4 +1,4 @@ -if {[file exists /tmp/hidpi]} { +if {[file exists /tmp/stargrave-flags/HI]} { font create myDefaultFont -family Go -size 12 option add *font myDefaultFont tk scaling [expr {163 / 72.0}] diff --git a/x/.xinitrc b/x/.xinitrc index 5a1594d..f04be49 100755 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,16 +1,16 @@ #!/bin/zsh xsetroot -solid \#222222 -[[ -e /tmp/hidpi ]] && { +if [[ -e /tmp/stargrave-flags/HI ]] ; then xset s off b off -dpms xset m 4 1 -} +fi setxkbmap -rules xorg -layout us,ru -option grp:caps_toggle,grp_led:caps xrdb ~/.Xresources xmodmap ~/.Xmodmap ~/work/godwmstat/godwmstat -xsetroot & rm -f ~/.ssh/agent ; ssh-agent -a $SSH_AUTH_SOCK -if [[ -e /tmp/hidpi ]] ; then +if [[ -e /tmp/stargrave-flags/HI ]] ; then ( sleep 30 ; xsetroot -xcf /usr/local/share/icons/Adwaita/cursors/left_ptr 30 ) & fi exec ~/src/suckless/dwm/dwm diff --git a/x/bin/mylock b/x/bin/mylock index 0a3554c..57b1e1e 100755 --- a/x/bin/mylock +++ b/x/bin/mylock @@ -1,6 +1,6 @@ #!/bin/sh -[ -e /tmp/hidpi ] && || xset dpms force off +[ -e /tmp/stargrave-flags/HI ] || xset dpms force off gpgconf --reload gpg-agent SSH_AUTH_SOCK=$HOME/.ssh/agent ssh-add -D slock diff --git a/x/bin/start-x-hidpi b/x/bin/start-x-hidpi index 583216e..461753e 100755 --- a/x/bin/start-x-hidpi +++ b/x/bin/start-x-hidpi @@ -1,4 +1,5 @@ #!/bin/sh -touch /tmp/hidpi +mkdir -p /tmp/stargrave-flags +touch /tmp/stargrave-flags/HI exec start-x -- -dpi 163 -- 2.44.0