aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenj <benj@rse8.com>2026-02-09 18:19:37 +0800
committerbenj <benj@rse8.com>2026-02-09 18:20:16 +0800
commit360477ee4af21c91e8475e2a9ab3f0e962d98106 (patch)
tree0a21fa790b9f63e47ca2ea235abcb78bd0024d90
parent3c53f6ce3ea1df5fcba29ddbbc56e1c8de8e640a (diff)
downloadmycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar.gz
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar.bz2
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar.lz
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar.xz
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.tar.zst
mycfg-360477ee4af21c91e8475e2a9ab3f0e962d98106.zip
add xray status
Diffstat (limited to '')
-rw-r--r--des/i3/config2
-rw-r--r--des/i3/i3blocks/config10
-rwxr-xr-xdes/i3/i3blocks/scripts/calendar4
-rwxr-xr-xdes/i3/i3blocks/scripts/xray10
4 files changed, 20 insertions, 6 deletions
diff --git a/des/i3/config b/des/i3/config
index 382c36f..961e1e2 100644
--- a/des/i3/config
+++ b/des/i3/config
@@ -236,7 +236,7 @@ bar {
status_command i3blocks
i3bar_command i3bar -t
- font pango:Font Awesome,Source Code Pro 9
+ font pango:Font Awesome, Source Code Pro 9
position bottom
mode dock
diff --git a/des/i3/i3blocks/config b/des/i3/i3blocks/config
index 7ca8810..bf8d0bb 100644
--- a/des/i3/i3blocks/config
+++ b/des/i3/i3blocks/config
@@ -18,9 +18,9 @@ interval=once
signal=10
color=#4ca2df
-[genfan]
-interval=1
-color=#a8afb0
+# [genfan]
+# interval=1
+# color=#a8afb0
[memory]
label=
@@ -39,3 +39,7 @@ color=#49E20E
[calendar]
interval=60
color=#ffffff
+
+[xray]
+interval=once
+signal=11 \ No newline at end of file
diff --git a/des/i3/i3blocks/scripts/calendar b/des/i3/i3blocks/scripts/calendar
index 27653a5..a530869 100755
--- a/des/i3/i3blocks/scripts/calendar
+++ b/des/i3/i3blocks/scripts/calendar
@@ -36,5 +36,5 @@ case "$BLOCK_BUTTON" in
--posx=$posX --posy=$posY \
> /dev/null"
esac
-echo "$LABEL$(date "$DATEFMT") "
-echo "$LABEL$(date "$SHORTFMT") "
+echo "$LABEL$(date "$DATEFMT")"
+echo "$LABEL$(date "$SHORTFMT")"
diff --git a/des/i3/i3blocks/scripts/xray b/des/i3/i3blocks/scripts/xray
new file mode 100755
index 0000000..04070b1
--- /dev/null
+++ b/des/i3/i3blocks/scripts/xray
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+ICON_VPN_ON=󰦝
+ICON_VPN_OFF=󰦞
+
+if systemctl is-active --quiet xray; then
+ echo "<span color='#49e20e'>$ICON_VPN_ON </span>"
+else
+ echo "<span color='#cb4b16'>$ICON_VPN_OFF </span>"
+fi \ No newline at end of file