1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(i3): use i3-status-rust

This commit is contained in:
Kierán Meinhardt
2019-09-25 10:12:01 +02:00
parent 6e41f78863
commit 7343206622
2 changed files with 70 additions and 60 deletions

View File

@@ -61,67 +61,11 @@ in with config.niveum; {
text = colours.foreground;
};
};
statusCommand = "${pkgs.i3status}/bin/i3status -c ${pkgs.writeText "i3status.conf" ''
general {
colors = true
color_good = "${colours.green.dark}"
color_bad = "${colours.red.dark}"
color_degraded = "${colours.white.dark}"
interval = 5
separator = " "
statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs ${pkgs.writeText "i3status-rust.toml" (
import <dot/i3status-rust.nix> {
wifi-interface = networkInterfaces.wireless;
}
# order += "run_watch retiolum"
order += "path_exists openvpn"
order += "wireless ${networkInterfaces.wireless}"
order += "battery all"
order += "volume master"
order += "load"
order += "tztime local"
wireless ${networkInterfaces.wireless} {
format_up = "%essid"
format_down = "offline"
}
# run_watch retiolum {
# pidfile = "/var/run/tinc.retiolum.pid"
# format = "%title"
# }
path_exists openvpn {
path = "/proc/sys/net/ipv4/conf/tun0"
format = "%title"
}
battery all {
format = "%status%percentage"
format_down = "No battery"
status_chr = ""
status_bat = ""
status_unk = ""
status_full = ""
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 15
threshold_type = "percentage"
integer_battery_capacity = true
}
volume master {
format = "%volume"
format_muted = "%volume"
device = "default"
mixer = "Master"
mixer_idx = 0
}
tztime local {
format = "%Y-%m-%d %H:%M"
}
load {
format = "%1min"
}''}";
)}";
}];
keybindings = {
"${modifier}+Down" = "focus down";

66
dot/i3status-rust.nix Normal file
View File

@@ -0,0 +1,66 @@
{ wifi-interface }: ''
[theme]
name = "plain"
[theme.overrides]
separator = " "
[icons]
name = "none"
[icons.overrides]
music = " "
music_play = ""
music_next = ""
music_prev = ""
volume_full = " "
volume_half = " "
volume_empty = " "
bat = " "
bat_full = " "
bat_charging = " "
bat_discharging = " "
memory_mem = ""
separator = ""
net_wireless = ""
cogs = ""
time = ""
[[block]]
block = "music"
player = "spotify"
buttons = ["prev", "play", "next"]
marquee = false
max_width = 35
# on_collapsed_click = "spotify"
[[block]]
block = "net"
device = "${wifi-interface}"
ssid = true
interval = 1
speed_up = false
speed_down = false
[[block]]
block = "battery"
show = "both"
[[block]]
block = "sound"
# show_volume_when_muted = true
[[block]]
block = "memory"
display_type = "memory"
format_mem = "{MUg}G"
clickable = false
[[block]]
block = "load"
interval = 1
format = "{1m}"
[[block]]
block = "time"
interval = 5
format = "%Y-%m-%d %H:%M"
''