feat: migrate to i3blocks and autotiling-rs
This commit is contained in:
parent
ce241fd98d
commit
487870a473
14 changed files with 512 additions and 7 deletions
22
home/oli/bin/i3blocks/archupdates
Executable file
22
home/oli/bin/i3blocks/archupdates
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
. ~/bin/i3blocks/_utils
|
||||
|
||||
# Check if updated Arch packages can be installed
|
||||
pkgupdate() {
|
||||
local pkgcount=$(checkupdates | wc -l)
|
||||
if [[ $pkgcount -ge 1 && $pkgcount -lt 20 ]]; then
|
||||
local bg=$mute_bg
|
||||
local fg=$mute_fg
|
||||
elif [[ $pkgcount -ge 20 ]]; then
|
||||
local bg=$warn1_bg
|
||||
local fg=$warn1_fg
|
||||
fi
|
||||
local stat="$pkgcount pkg updates"
|
||||
|
||||
if [[ -n "$bg" ]]; then
|
||||
echo -e "<span background=\"$bg\" color=\"$fg\">$stat</span>\n"
|
||||
fi
|
||||
}
|
||||
|
||||
pkgupdate
|
||||
Loading…
Add table
Add a link
Reference in a new issue