* Add xresources-xdefaults patch
This patch adds the ability to configure st via Xdefaults, in addition
to Xresources, like the rxvt-unicode terminal. At startup, st will read
and apply the system and user's local Xdefault files, the XServer's
Xresources, and the screen and per-host Xdefaults. This patch depends
on XRESOURCES_PATCH and is compatible with XRESOURCES_RELOAD_PATCH.
I used the following script to stress test this patch. You can also use
the script to demo what the patch does. To be simple, it only tests
the user's .Xdefaults and .Xresources files, without throwing in the
system and per-host files. The script cycles st's background through
red, green and blue indefinitely.
BACKUP YOUR ~/.Xdefaults and ~/.Xresources FILES BEFORE TESTING.
```sh
unset pid
if [ -n "$1" ]; then
pid=$1
elif pid=$(pgrep -f ^valgrind) && [ -n "$pid" ]; then
:
else
pid=$(pgrep -n ^st$)
fi
if [ -z "$pid" -o "x$pid" = "x-h" -o "x$pid" = "x--help" ]; then
echo "usage: $0 [pid]
If pid is omitted valgrind's is used falling back to st's.
---------------------------------------------------------------
BACKUP YOUR ~/.Xdefaults and ~/.Xresources FILES BEFORE TESTING
---------------------------------------------------------------"
exit 0
fi
printf "Attaching pid=%d\n\t%s\n" "$pid" "$(ps -h -ocmd "$pid")" >&2
seconds=0.25 red='#800000' green='#008000' blue='#000080'
echo "St.background: $red" >> $HOME/.Xdefaults
while true; do
sed -i "\$s/$red/$green/" $HOME/.Xdefaults
kill -USR1 $pid
sleep $seconds
sed -i "\$s/$green/$red/" $HOME/.Xdefaults
kill -USR1 $pid
sleep $seconds
echo "St.background: $blue" >> $HOME/.Xresources
xrdb -load $HOME/.Xresources
kill -USR1 $pid
sleep $seconds
sed -i '$d' $HOME/.Xresources
xrdb -load $HOME/.Xresources
kill -USR1 $pid
sleep $seconds
done
```
* Minor refactoring and freeing / destroying the Xrm database with XrmDestroyDatabase
---------
Co-authored-by: Bakkeby <bakkeby@gmail.com>
* osc7: initial patch implementation
Closes#153
* osc7: avoid redundant use of realpath()
* osc7: fix styling
* Changing position of the OSC7_PATCH toggle in patches.def.h
---------
Co-authored-by: Bakkeby <bakkeby@gmail.com>
The general reasoning is that the vim browse patch is very invasive,
has a high level of complexity, and is incompatible with a significant
number of other patches and it complicates further maintenance.
Additionally the patch has its own scrollback mechanism which seemingly
did not work properly - and nobody seems to have complained about this
since the patch was added back in May 2021.
If you want to try out the vim browse patch then I would recommend having
a play around with the patch author's own build that has this patch
integrated:
- https://github.com/juliusHuelsmann/st-history-vim
- https://github.com/juliusHuelsmann/st
Alternatively a tag has been added to this repository that refers to the
last commit that still has the vim browse patch:
- https://github.com/bakkeby/st-flexipatch/tree/VIM_BROWSE_PATCH