1
0
Fork 0

compatibility changes for debian

compatibility changes for debian
This commit is contained in:
Luca Bilke 2023-02-09 14:49:10 +01:00
parent c129a1b8c8
commit 01c05fa96e
6 changed files with 40 additions and 36 deletions

View File

@ -9,7 +9,8 @@ export XSECURELOCK_PASSWORD_PROMPT="time_hex"
export XSECURELOCK_AUTH_TIMEOUT=10
export XSECURELOCK_SHOW_DATETIME=1
export XSECURELOCK_COMPOSITE_OBSCURER=0
export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid"
[ -r "/usr/libexec/xscreensaver/cubicgrid" ] && export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid"
[ -r "/usr/lib/xscreensaver/cubicgrid" ] && export XSECURELOCK_SAVER="/usr/lib/xscreensaver/cubicgrid"
export XSECURELOCK_SHOW_DATETIME=1
export XSECURELOCK_SHOW_HOSTNAME=1

View File

@ -4,13 +4,15 @@
notify-send " Repository Sync" "Checking for package updates..."
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
Check your internet connection, if pacman is already running, or run update manually to see errors."
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates." "Check your internet connection, if pacman is already running, or run update manually to see errors."
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
if pacman -Qu | grep -v "\[ignored\]"; then
notify-send " Repository Sync" "Updates available. Click statusbar icon () for update."
answer=$(
notify-send --action=Yes=Yes --action=No=No \
" Repository Sync" "Updates available. Update now?"
)
[ $answer -eq 1 ] && $TERMINAL -e upgrades
else
notify-send " Repository Sync" "Sync complete. No new packages for update."
fi

View File

@ -1,15 +0,0 @@
#!/bin/sh
vals=$(aptitude full-upgrade --simulate --assume-yes |
grep -m1 '^[0-9]\+ packages upgraded,' |
tr -cd '0-9 ' |
tr ' ' '\n' |
grep '[0-9]\+' |
xargs echo)
print=" "
for i in $vals; do
[ $i != 0 ] && icon="\033[11m\033[10m"
print="$print$i/"
done
[ -n "$icon" ] && printf "$icon " && echo $print | sed 's/\/$//'

View File

@ -0,0 +1,19 @@
#!/bin/sh
command -v pacman 1>/dev/null 2>&1 && echo -n "$(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g")"
if command -v aptitude 1>/dev/null 2>&1; then
vals=$(aptitude full-upgrade --simulate --assume-yes |
grep -m1 '^[0-9]\+ packages upgraded,' |
tr -cd '0-9 ' |
tr ' ' '\n' |
grep '[0-9]\+' |
xargs echo)
print=" "
for i in $vals; do
[ $i != 0 ] && icon="\033[11m\033[10m"
print="$print$i/"
done
[ -n "$icon" ] && printf "$icon " && echo "$print" | sed 's/\/$//'
fi

View File

@ -1,15 +0,0 @@
#!/bin/sh
# For this to work, have a `pacman -Sy` command run in the background as a
# cronjob every so often as root. This script will then read those packages.
# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook:
#
# [Trigger]
# Operation = Upgrade
# Type = Package
# Target = *
#
# [Action]
# Description = Updating statusbar...
# When = PostTransaction
# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3.
echo -n $(pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g")

View File

@ -1,4 +1,16 @@
#!/bin/sh
printf "Beginning upgrade.\\n"
paru -Syu
if command -v paru 1>/dev/null 2>&1; then
paru -Syu
elif command -v yay 1>/dev/null 2>&1; then
yay -Syu
elif command -v pacman 1>/dev/null 2>&1; then
pacman -Syu
fi
command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n"
read -r _