config: debian-compatibility

This commit is contained in:
xeruf 2021-12-14 14:31:05 +01:00
parent e3affa7c10
commit 80631fa2f9
2 changed files with 7 additions and 5 deletions

View File

@ -29,7 +29,7 @@ test -d "/etc/yadm" || sy clone
SECTION "Software"
link() {
test -e "$2" -o -h "$2" || $(checkaccess -w "$2" || echo sudo) ln -sv "$@"
test -e "$2" -o -h "$2" || $($HOME/.local/bin/scripts/checkaccess -w "$2" || echo sudo) ln -sv "$@"
}
mkdir -p .config/audacity
@ -40,8 +40,6 @@ find $HOME -maxdepth 1 -type l -exec file {} + |
link python /usr/bin/python3
link fdfind /usr/bin/fd
link batcat /usr/bin/bat
link "$HOME/.ssh/config" "$XDG_CONFIG_HOME/ssh"
link .bash_aliases "$HOME/.bashrc"
highlight "SSH Permissions"
chmod og= "$HOME/.ssh" -R
@ -91,6 +89,9 @@ test "$DISPLAY" || exit 0
highlight "Desktop Applications"
subhighlight "Application symlinks"
link .bash_aliases "$HOME/.bashrc"
link "$HOME/.ssh/config" "${XDG_CONFIG_HOME:-$HOME/.config}/ssh"
link "$XDG_STATE_HOME/gradle/gradle.properties" "$XDG_CONFIG_HOME/gradle.properties"
link "$XDG_DATA_HOME/applications/signal-tray.desktop" "$XDG_CONFIG_HOME/autostart/"
link "/usr/share/applications/stretchly.desktop" "$XDG_CONFIG_HOME/autostart/"

View File

@ -121,10 +121,11 @@ if test "$timg"; then
fi
if test "$bat" -o "$batl"; then
test "$(bat --version | cut -d. -f2)" -gt 16 && rule=,rule
if test $# -gt ${#bat[@]} -a $# -gt ${#batl[@]} && test -z "$args"
then $elevate head "${batl[@]}" "${bat[@]}" | cut -c-$(echo "$(tput cols)*1.9" | bc | cut -d. -f1)
else test "$bat" && $elevate bat --style header,rule --pager 'less -RF' $args "${bat[@]}"
test "$batl" && $elevate bat --style rule --pager 'less -RF' $args "${batl[@]}"
else test "$bat" && $elevate bat --style header$rule --pager 'less -RF' $args "${bat[@]}"
test "$batl" && $elevate bat --style ${rule#,} --pager 'less -RF' $args "${batl[@]}"
fi
fileinfo "${bat[@]}"
fi