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" SECTION "Software"
link() { 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 mkdir -p .config/audacity
@ -40,8 +40,6 @@ find $HOME -maxdepth 1 -type l -exec file {} + |
link python /usr/bin/python3 link python /usr/bin/python3
link fdfind /usr/bin/fd link fdfind /usr/bin/fd
link batcat /usr/bin/bat link batcat /usr/bin/bat
link "$HOME/.ssh/config" "$XDG_CONFIG_HOME/ssh"
link .bash_aliases "$HOME/.bashrc"
highlight "SSH Permissions" highlight "SSH Permissions"
chmod og= "$HOME/.ssh" -R chmod og= "$HOME/.ssh" -R
@ -91,6 +89,9 @@ test "$DISPLAY" || exit 0
highlight "Desktop Applications" highlight "Desktop Applications"
subhighlight "Application symlinks" 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_STATE_HOME/gradle/gradle.properties" "$XDG_CONFIG_HOME/gradle.properties"
link "$XDG_DATA_HOME/applications/signal-tray.desktop" "$XDG_CONFIG_HOME/autostart/" link "$XDG_DATA_HOME/applications/signal-tray.desktop" "$XDG_CONFIG_HOME/autostart/"
link "/usr/share/applications/stretchly.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 fi
if test "$bat" -o "$batl"; then 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" 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) 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[@]}" else test "$bat" && $elevate bat --style header$rule --pager 'less -RF' $args "${bat[@]}"
test "$batl" && $elevate bat --style rule --pager 'less -RF' $args "${batl[@]}" test "$batl" && $elevate bat --style ${rule#,} --pager 'less -RF' $args "${batl[@]}"
fi fi
fileinfo "${bat[@]}" fileinfo "${bat[@]}"
fi fi