Add dotfiles
This commit is contained in:
parent
49bfe1a4d3
commit
b6e01a720b
52 changed files with 4701 additions and 0 deletions
27
dwmbar/modules/archupdates
Executable file
27
dwmbar/modules/archupdates
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Prints out the number of pacman updates (Arch Linux)
|
||||
# Requires an internet connection
|
||||
# Depends on yay and checkupdates (pacman-contrib)
|
||||
# Optional: add --devel flag to the yay cmd to check for *-git package updates.
|
||||
|
||||
PREFIX=' Updates: '
|
||||
|
||||
get_updates()
|
||||
{
|
||||
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||
updates_arch=0
|
||||
fi
|
||||
|
||||
if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
|
||||
updates_aur=0
|
||||
fi
|
||||
|
||||
updates=$(("$updates_arch" + "$updates_aur"))
|
||||
|
||||
echo "$PREFIX$updates"
|
||||
}
|
||||
|
||||
if [ $(( 10#$(date '+%M') % 3 )) -eq 0 ] && [ $(( 10#$(date '+%S') )) -eq 5 ]; then
|
||||
get_updates
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue