diff --git a/configs/i3.nix b/configs/i3.nix index 74fd040..4ed51b3 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -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 { + 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"; diff --git a/dot/i3status-rust.nix b/dot/i3status-rust.nix new file mode 100644 index 0000000..11e65ed --- /dev/null +++ b/dot/i3status-rust.nix @@ -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" +''