summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-24 08:14:24 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-24 08:14:24 -0500
commitb387934988d98ca7842bf44bd94d5067e3f9f843 (patch)
tree09ea4967e6b2b7dbf1a05f0900e0d739f85aa579
parentd7411594c0ca071f08da108f544902f03e2e413d (diff)
downloadscripts-b387934988d98ca7842bf44bd94d5067e3f9f843.tar.xz
scripts-b387934988d98ca7842bf44bd94d5067e3f9f843.zip
updated blocks and autolock
-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"