summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdockd.sh3
-rwxr-xr-xi3blocks-packages.sh1
2 files changed, 4 insertions, 0 deletions
diff --git a/dockd.sh b/dockd.sh
index d74e6b3..6c5831e 100755
--- a/dockd.sh
+++ b/dockd.sh
@@ -40,6 +40,9 @@ undock() {
notify-send Undocked
}
+[ "$1" = "dock" ] && dock && return 0
+[ "$1" = "undock" ] && undock && return 0
+
while sleep 5
do
xrandr=$(xrandr)
diff --git a/i3blocks-packages.sh b/i3blocks-packages.sh
index 4fd211f..3f7b2ad 100755
--- a/i3blocks-packages.sh
+++ b/i3blocks-packages.sh
@@ -1,6 +1,7 @@
#!/bin/sh
icon=󰏖
+doas pkg update 2>/dev/null >/dev/null
count=$(pkg upgrade -n | sed -n 's/^Number of packages to be installed:\(.*\)/\1/p')
[ -n "$count" ] && [ "$count" -gt 0 ] && printf "%s%s" $icon $count && notify-send "$count package upgrade(s) available"
printf "\n"