mirror of
https://git.adityakumar.xyz/dwmbar.git
synced 2024-11-09 22:19:45 +00:00
Merge branch 'master' of github.com:thytom/dwmbar
This commit is contained in:
commit
7b56a67e1c
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