summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautolocker.sh3
-rwxr-xr-xi3blocks-net.sh2
-rwxr-xr-xi3blocks-up.sh5
-rwxr-xr-xi3blocks-updates.sh3
4 files changed, 9 insertions, 4 deletions
diff --git a/autolocker.sh b/autolocker.sh
index f7b0b2a..692fbfb 100755
--- a/autolocker.sh
+++ b/autolocker.sh
@@ -8,9 +8,8 @@ if [ "$1" = "-d" ]; then
-notifier "notify-send -t=10000 '10 seconds to lock...'"
else
xautolock \
- -detectsleep \
-killtime 10 \
- -killer "doas acpiconf -s3" \
+ -killer "sleep 0.5; doas acpiconf -s3" \
-notify 10 \
-time 10 \
-locker "i3lock -n -f -c 000000 -i ~/.local/share/wallpapers/lock.png; sleep 0.2" \
diff --git a/i3blocks-net.sh b/i3blocks-net.sh
index 26aad7b..340a70a 100755
--- a/i3blocks-net.sh
+++ b/i3blocks-net.sh
@@ -11,7 +11,7 @@ elif [ "$(ifconfig wlan0 | grep status | cut -d\: -f2)" = " associated" ]; then
ssid=$(ifconfig wlan0 | sed -n 's/^.*ssid \(.*\) channel.*$/\1/p')
[ -n "$ssid" ] && printf "%s%s %s" $icon_wireless "$ssid" $inet
else
- printf "%sNo connection" $icon_down
+ printf "%sOffline" $icon_down
fi
printf "\n"
diff --git a/i3blocks-up.sh b/i3blocks-up.sh
new file mode 100755
index 0000000..52791a1
--- /dev/null
+++ b/i3blocks-up.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+icon=󰣠
+
+doas freebsd-update updatesready > /dev/null
+[ $? -eq 2 ] && printf "$icon%s\n" "$(uptime | grep -o 'up[^,]*')" || printf "%sUpdates are available" $icon
diff --git a/i3blocks-updates.sh b/i3blocks-updates.sh
index 3b73f3c..02d3a60 100755
--- a/i3blocks-updates.sh
+++ b/i3blocks-updates.sh
@@ -1,4 +1,5 @@
#!/bin/sh
icon=󰣠
-freebsd-update updatesready && printf "%s" $icon && notify-send "FreeBSD updates are ready to install"
+freebsd-update updatesready > /dev/null
+[ $? -eq 2 ] || printf "%sUpdates are available" $icon && notify-send "Updates are ready to install"