i3status: more useful info, less garbage
This commit is contained in:
+32
-11
@@ -6,11 +6,9 @@ general {
|
||||
interval = 5
|
||||
}
|
||||
|
||||
order += "ipv6"
|
||||
order += "disk /"
|
||||
order += "disk /home"
|
||||
order += "run_watch DHCP"
|
||||
order += "run_watch VPN"
|
||||
CONFIG
|
||||
|
||||
wireless_interface_config=''
|
||||
@@ -18,8 +16,8 @@ for wireless_interface in $(ip link | grep -Eo 'wl[a-z0-9]+'); do
|
||||
echo "order += \"wireless $wireless_interface\""
|
||||
wireless_interface_config="$wireless_interface_config
|
||||
wireless $wireless_interface {
|
||||
format_up = \"W: (%quality at %essid) %ip\"
|
||||
format_down = \"W: down\"
|
||||
format_up = \"%essid:%ip %quality\"
|
||||
format_down = \"$wireless_interface\"
|
||||
}
|
||||
"
|
||||
done
|
||||
@@ -29,13 +27,25 @@ for ethernet_interface in $(ip link | grep -Eo 'en[a-z0-9]+'); do
|
||||
echo "order += \"ethernet $ethernet_interface\""
|
||||
ethernet_interface_config="$ethernet_interface_config
|
||||
ethernet $ethernet_interface {
|
||||
format_up = \"E: %ip (%speed)\"
|
||||
format_down = \"E: down\"
|
||||
format_up = \"%ip (%speed)\"
|
||||
format_down = \"$ethernet_interface\"
|
||||
}
|
||||
"
|
||||
done
|
||||
|
||||
echo 'order += "battery 0"'
|
||||
battery_config=''
|
||||
battery_index=0
|
||||
for battery_path in /sys/class/power_supply/BAT*; do
|
||||
echo "order += \"battery $battery_index\""
|
||||
battery_config="$battery_config
|
||||
battery $battery_index {
|
||||
format = \"%status %percentage %remaining\"
|
||||
path = \"$battery_path/uevent\"
|
||||
low_threshold = 10
|
||||
}
|
||||
"
|
||||
let battery_index+=1
|
||||
done
|
||||
|
||||
cpu_temperature_config=''
|
||||
cpu_temperature_index=0
|
||||
@@ -48,21 +58,22 @@ cpu_temperature $cpu_temperature_index {
|
||||
}
|
||||
"
|
||||
let cpu_temperature_index+=1
|
||||
break
|
||||
done
|
||||
|
||||
cat <<CONFIG
|
||||
order += "load"
|
||||
order += "tztime annapolis"
|
||||
order += "tztime santaclara"
|
||||
order += "tztime local"
|
||||
$cpu_temperature_config
|
||||
$wireless_interface_config
|
||||
$ethernet_interface_config
|
||||
$battery_config
|
||||
|
||||
run_watch DHCP {
|
||||
pidfile = "/var/run/dhc*.pid"
|
||||
}
|
||||
|
||||
run_watch VPN {
|
||||
pidfile = "/var/run/vpnc/pid"
|
||||
format = "%title"
|
||||
}
|
||||
|
||||
tztime local {
|
||||
@@ -80,4 +91,14 @@ disk "/" {
|
||||
disk "/home" {
|
||||
format = "/home %free"
|
||||
}
|
||||
|
||||
tztime annapolis {
|
||||
format = "Ann %H:%M"
|
||||
timezone = "US/Eastern"
|
||||
}
|
||||
|
||||
tztime santaclara {
|
||||
format = "S-C %H:%M"
|
||||
timezone = "US/Pacific"
|
||||
}
|
||||
CONFIG
|
||||
|
||||
Reference in New Issue
Block a user