mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-12-23 05:22:53 +00:00
Added archupdates module
This commit is contained in:
parent
a3733553da
commit
e0efb08f31
3 changed files with 37 additions and 5 deletions
23
modules/archupdates
Normal file
23
modules/archupdates
Normal 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
|
10
modules/date
10
modules/date
|
@ -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
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
# Prints out the time
|
||||
|
||||
PREFIX_ICON=' '
|
||||
PREFIX=' '
|
||||
|
||||
echo "$PREFIX_ICON$(date '+%H:%M')"
|
||||
time()
|
||||
{
|
||||
echo "$PREFIX$(date '+%H:%M')"
|
||||
}
|
||||
|
||||
time
|
||||
|
|
Loading…
Reference in a new issue