Speed up mouse scrolling in foot
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
1f8819318d
commit
9ca5f63f86
@@ -0,0 +1,20 @@
|
||||
echo "Speed up mouse scrolling in foot"
|
||||
|
||||
foot_config="$HOME/.config/foot/foot.ini"
|
||||
|
||||
if [[ -f $foot_config ]] && ! grep -q '^multiplier=' "$foot_config"; then
|
||||
if grep -qxF '[scrollback]' "$foot_config"; then
|
||||
tmp=$(mktemp)
|
||||
awk '
|
||||
{ print }
|
||||
!inserted && $0 == "[scrollback]" {
|
||||
print "multiplier=7.0"
|
||||
inserted = 1
|
||||
}
|
||||
' "$foot_config" >"$tmp"
|
||||
cat "$tmp" >"$foot_config"
|
||||
rm -f "$tmp"
|
||||
else
|
||||
printf '\n[scrollback]\nmultiplier=7.0\n' >>"$foot_config"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user