Add files via upload
This commit is contained in:
12
config/polybar/scripts/checkupdates.sh
Executable file
12
config/polybar/scripts/checkupdates.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
updates=$(sysupdate)
|
||||
|
||||
if [ -z "$updates" ]; then
|
||||
count=0
|
||||
else
|
||||
printf '%s\n' "$updates" >/tmp/bspwm-polybar-updates
|
||||
count=$(wc -l "/tmp/bspwm-polybar-updates" | awk '{print $1}')
|
||||
fi
|
||||
|
||||
echo "%{T1}%{T-} %{T2}$count %{T-}"
|
||||
Reference in New Issue
Block a user