summaryrefslogtreecommitdiff
path: root/ar/.local
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.local')
-rwxr-xr-xar/.local/bin/gitupdate2
-rwxr-xr-xar/.local/bin/ovpn1
-rwxr-xr-xar/.local/bin/statusbar/sb-brightness2
-rwxr-xr-xar/.local/bin/statusbar/sb-forecast3
-rwxr-xr-xar/.local/bin/statusbar/sb-internet2
5 files changed, 4 insertions, 6 deletions
diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate
index 87c13c3..3dabf34 100755
--- a/ar/.local/bin/gitupdate
+++ b/ar/.local/bin/gitupdate
@@ -2,8 +2,6 @@
set -eu
-pidof transmission-daemon >/dev/null && echo "Turn off transmission-daemon first!" && exit 1
-
# Check if inside a Git repository
! git rev-parse --is-inside-work-tree >/dev/null 2>&1 && echo "Not a git repository." && exit 1
diff --git a/ar/.local/bin/ovpn b/ar/.local/bin/ovpn
index a89c357..10ecc01 100755
--- a/ar/.local/bin/ovpn
+++ b/ar/.local/bin/ovpn
@@ -7,7 +7,6 @@ turnonoffvpn() {
;;
*off*)
nmcli connection down "$THESIAH_VPN" 2>/dev/null && notify-send "✂️ THESIAH_VPN: OFF" || notify-send "✂️ Error to disconnect"
-
;;
esac
}
diff --git a/ar/.local/bin/statusbar/sb-brightness b/ar/.local/bin/statusbar/sb-brightness
index 625e69e..e18fa2c 100755
--- a/ar/.local/bin/statusbar/sb-brightness
+++ b/ar/.local/bin/statusbar/sb-brightness
@@ -5,7 +5,7 @@ monitor=$(xrandr --query | grep -i '\sconnected' | grep '[0-9]x[0-9]' | grep -i
case "$monitor" in
*DP* | *HDMI*)
current_brightness=$(xrandr --verbose | grep -i "^$monitor connected" -A5 | grep -i "Brightness:" | cut -d ' ' -f2)
- current_brightness=$(echo "$current_brightness * 100" | bc -l)
+ current_brightness=$(printf "%.0f\n" "$(echo "$current_brightness * 100" | bc -l)")
;;
esac
diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast
index 063c8e5..65bcd1a 100755
--- a/ar/.local/bin/statusbar/sb-forecast
+++ b/ar/.local/bin/statusbar/sb-forecast
@@ -11,7 +11,8 @@ weatherreportjson="${XDG_CACHE_HOME:-${HOME}/.cache}/weatherreport.json"
error() {
rm -f "$weatherreport" "$weatherreportjson"
- notify-send -u critical "⛔ Failed to update 'weather$1'"
+ notify-send "⛔ Failed to update 'weather$1'"
+ echo "❓"
exit 1
}
diff --git a/ar/.local/bin/statusbar/sb-internet b/ar/.local/bin/statusbar/sb-internet
index 163b7b3..4dfb605 100755
--- a/ar/.local/bin/statusbar/sb-internet
+++ b/ar/.local/bin/statusbar/sb-internet
@@ -71,7 +71,7 @@ fi
grep -q 'up' /sys/class/net/e*/operstate && ethericon="🌐" || ethericon="❎"
# TUN
-grep -q 'up' /sys/class/net/tun*/operstate 2>/dev/null && tunicon="🛰"
+[ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon="🛰"
icons=""
[ -n "$wifiicon" ] && icons="${icons}$wifiicon "