Dotfiles config update (2022-04-24)

This commit is contained in:
q3aql 2022-04-24 17:53:11 +02:00
parent 83a2b88415
commit 8eba2ef764
2 changed files with 24 additions and 3 deletions

22
.config/qtile/checkUpdates.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Check updates on Arch Linux
# Note: Create cron on /etc/cron.d/checkupdates with the following lines:
# 0 * * * * root /usr/bin/pacman -Sy
# 30 * * * * root /usr/bin/pacman -Sy
if [ -f /usr/bin/pacman ] ; then
num_packages=$(pacman -Qu | wc -l)
echo "${num_packages}"
# Check updates on Ubuntu/Debian/Devuan
# Note: Create cron on /etc/cron.d/checkupdates with the following lines:
# 0 * * * * root /usr/bin/aptitude update
# 30 * * * * root /usr/bin/aptitude update
elif [ -f /usr/bin/aptitude ] ; then
num_packages=$(aptitude search "~U" | wc -l)
echo "${num_packages}"
# Disable for other distros
else
echo "0"
fi

View File

@ -9,11 +9,9 @@ def base(fg='text', bg='dark'):
'background': colors[bg]
}
def separator():
return widget.Sep(**base(), linewidth=0, padding=5)
def icon(fg='text', bg='dark', fontsize=16, text="?"):
return widget.TextBox(
**base(fg, bg),
@ -78,7 +76,8 @@ primary_widgets = [
no_update_string='0',
display_format='{updates}',
update_interval=1800,
custom_command='checkupdates',
#custom_command='checkupdates',
custom_command='bash ~/.config/qtile/checkUpdates.sh',
),
powerline('color3', 'color5'),