Merge branch 'master' of github.com:thytom/dwmbar

This commit is contained in:
Archie Hilton (thytom) 2019-10-21 19:20:28 +01:00
commit 7b56a67e1c
3 changed files with 37 additions and 5 deletions

23
modules/archupdates Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
# Prints out the number of pacman updates (Arch Linux)
# Requires an internet connection
PREFIX=' Updates:'
updates()
{
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(yay -Qum --devel 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
echo "$PREFIX $updates"
}
updates

View file

@ -1,8 +1,12 @@
#!/bin/sh
#!/bin/bash
# Prints out the date
PREFIX_ICON=''
PREFIX=''
echo "$PREFIX_ICON $(date '+%d-%m-%y (%a)')"
date()
{
echo "$PREFIX $(date '+%d-%m-%y (%a)')"
}
date

View file

@ -2,6 +2,11 @@
# Prints out the time
PREFIX_ICON=' '
PREFIX=' '
echo "$PREFIX_ICON$(date '+%H:%M')"
time()
{
echo "$PREFIX$(date '+%H:%M')"
}
time