From d5ffb01d87852eb74f6b17ae06ac0c476010065b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 14 Oct 2024 21:34:04 +0200 Subject: Add new scripts Signed-off-by: Florian Pritz --- conky-update-interval | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 conky-update-interval (limited to 'conky-update-interval') diff --git a/conky-update-interval b/conky-update-interval new file mode 100755 index 0000000..94d794f --- /dev/null +++ b/conky-update-interval @@ -0,0 +1,13 @@ +#!/bin/bash + +set-conky-update-interval() { + sed -ri 's#^(update_interval) = .*,#\1 = '"$1"',#' ~/.i3/conkyrc-perl +} + +if [[ $# -gt 0 ]]; then + set-conky-update-interval "$1" +elif [[ "$(cat /sys/class/power_supply/ACAD/online)" = "0" ]]; then + set-conky-update-interval 3 +else + set-conky-update-interval 0.5 +fi -- cgit v1.2.3-24-g4f1b