Add i3status configuration overriding.

This commit is contained in:
dabruh 2022-05-29 00:31:14 +02:00
parent 82d1074178
commit 434168baaa
9 changed files with 45 additions and 41 deletions

View File

@ -9,21 +9,6 @@ general {
color_bad = "#e74c3c"
}
order += "read_file cmusctl.status"
order += "run_watch Docker"
order += "wireless _first_"
order += "ethernet _first_"
order += "load"
order += "memory"
order += "disk /"
order += "disk /home"
order += "disk /mnt/das/hdd2tb-1-main"
order += "disk /mnt/das/hdd4tb-1-main"
order += "read_file borg_backup"
order += "volume master"
order += "battery 0"
order += "tztime local"
read_file cmusctl.status {
format = "%content"
path = "/tmp/cmusctl.status"
@ -67,23 +52,6 @@ disk "/home" {
threshold_type = "percentage_used"
}
disk "/mnt/das/hdd2tb-1-main" {
format = "2TB: %percentage_used"
low_threshold = 70
threshold_type = "percentage_used"
}
disk "/mnt/das/hdd4tb-1-main" {
format = "4TB: %percentage_used"
low_threshold = 70
threshold_type = "percentage_used"
}
read_file borg_backup {
format = "B: %content"
path = "/var/tmp/last_borg_backup"
}
volume master {
format = "🔊 %volume"
format_muted = "🔇 %volume"

View File

@ -0,0 +1,6 @@
order += "wireless _first_"
order += "ethernet _first_"
order += "load"
order += "memory"
order += "disk /"
order += "disk /home"

View File

@ -0,0 +1,3 @@
order += "volume master"
order += "battery 0"
order += "tztime local"

View File

@ -0,0 +1 @@
order += "read_file cmusctl.status"

View File

@ -0,0 +1 @@
order += "run_watch Docker"

View File

@ -0,0 +1,20 @@
disk "/mnt/das/hdd2tb-1-main" {
format = "2TB: %percentage_used"
low_threshold = 70
threshold_type = "percentage_used"
}
disk "/mnt/das/hdd4tb-1-main" {
format = "4TB: %percentage_used"
low_threshold = 70
threshold_type = "percentage_used"
}
read_file borg_backup {
format = "B: %content"
path = "/var/tmp/last_borg_backup"
}
order += "disk /mnt/das/hdd2tb-1-main"
order += "disk /mnt/das/hdd4tb-1-main"
order += "read_file borg_backup"

View File

@ -4,3 +4,4 @@
^install\.sh$
^setup_system\.sh$
^\.config\/i3\/overrides
^\.config\/i3status\/overrides

0
.local/bin/battmon.sh Normal file → Executable file
View File

22
.local/bin/i3-config-builder Normal file → Executable file
View File

@ -1,16 +1,19 @@
#!/bin/bash
function i3setup() {
local file dir cfg path patterns=(
"config.vars"
"config.pre-main"
"config.main"
"config.post-main"
)
dir="$HOME/.config/i3"
local file dir cfg path \
component="$1" \
patterns=(
"config.vars"
"config.pre-main"
"config.main"
"config.post-main"
)
dir="$HOME/.config/$component"
cfg="$dir/config"
echo "Building i3 config... 🔨"
echo "Building $component config... 🔨"
rm "$cfg" 2>/dev/null
for pattern in "${patterns[@]}"; do
@ -36,4 +39,5 @@ function i3setup() {
echo
}
i3setup
i3setup i3
i3setup i3status