2020-09-02 02:37:42 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.i3status-rust = {
|
|
|
|
enable = true;
|
|
|
|
bars = {
|
|
|
|
extra-settings = {
|
|
|
|
blocks = [
|
|
|
|
{
|
|
|
|
block = "disk_space";
|
|
|
|
path = "/";
|
|
|
|
info_type = "available";
|
|
|
|
interval = 60;
|
|
|
|
warning = 20.0;
|
|
|
|
alert = 10.0;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "memory";
|
|
|
|
display_type = "memory";
|
|
|
|
format_mem = "{Mug}GB ({Mup}%)";
|
|
|
|
format_swap = "{SUp}%";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "cpu";
|
|
|
|
interval = 1;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $barchart ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "load";
|
|
|
|
interval = 1;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $1m $5m ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "temperature";
|
|
|
|
interval = 10;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = "$icon $min min, $max max, $average avg";
|
2020-09-02 02:37:42 +00:00
|
|
|
chip = "*-isa-*";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "net";
|
|
|
|
device = "enp9s0u2u1u2c2";
|
|
|
|
interval = 5;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "speedtest";
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " ^icon_ping $ping ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "xrandr";
|
|
|
|
interval =
|
|
|
|
6000; # Because running the commands causes screen lag, see https://github.com/greshake/i3status-rust/issues/668
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "sound";
|
|
|
|
format = "{output_name} {volume}%";
|
2023-03-16 11:48:55 +00:00
|
|
|
click = [{
|
|
|
|
button = "left";
|
|
|
|
cmd = "pavucontrol --tab=3";
|
|
|
|
}];
|
2020-09-02 02:37:42 +00:00
|
|
|
mappings = {
|
|
|
|
"alsa_output.pci-0000_00_1f.3.analog-stereo" = "";
|
|
|
|
"bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = "";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "music";
|
|
|
|
player = "spotify";
|
|
|
|
buttons = [ "play" "prev" "next" ];
|
2023-03-16 11:48:55 +00:00
|
|
|
click = [
|
|
|
|
{
|
|
|
|
button = "play";
|
|
|
|
action = "music_play";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
button = "prev";
|
|
|
|
action = "music_prev";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
button = "next";
|
|
|
|
action = "music_next";
|
|
|
|
}
|
|
|
|
];
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
block = "time";
|
|
|
|
interval = 60;
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $timestamp.datetime(f:'%a %d/%m %R') ";
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
{ block = "battery"; }
|
|
|
|
];
|
|
|
|
|
|
|
|
icons = "awesome5";
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
theme = {
|
2023-03-16 11:48:55 +00:00
|
|
|
theme = "solarized-dark";
|
2020-09-02 02:37:42 +00:00
|
|
|
overrides = {
|
|
|
|
idle_bg = "#123456";
|
|
|
|
idle_fg = "#abcdef";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
theme = "gruvbox-dark";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-03-16 11:48:55 +00:00
|
|
|
test.stubs.i3status-rust = { version = "0.30.0"; };
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
nmt.script = ''
|
2022-06-15 13:49:39 +00:00
|
|
|
assertFileExists home-files/.config/i3status-rust/config-extra-settings.toml
|
2020-09-02 02:37:42 +00:00
|
|
|
assertFileContent home-files/.config/i3status-rust/config-extra-settings.toml \
|
|
|
|
${
|
|
|
|
pkgs.writeText "i3status-rust-expected-config" ''
|
|
|
|
[[block]]
|
2022-12-13 20:46:36 +00:00
|
|
|
alert = 10.0
|
2020-09-02 02:37:42 +00:00
|
|
|
block = "disk_space"
|
|
|
|
info_type = "available"
|
|
|
|
interval = 60
|
|
|
|
path = "/"
|
2022-12-13 20:46:36 +00:00
|
|
|
warning = 20.0
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "memory"
|
|
|
|
display_type = "memory"
|
|
|
|
format_mem = "{Mug}GB ({Mup}%)"
|
|
|
|
format_swap = "{SUp}%"
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "cpu"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $barchart "
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 1
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "load"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $icon $1m $5m "
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 1
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "temperature"
|
|
|
|
chip = "*-isa-*"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = "$icon $min min, $max max, $average avg"
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 10
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "net"
|
|
|
|
device = "enp9s0u2u1u2c2"
|
|
|
|
interval = 5
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "speedtest"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " ^icon_ping $ping "
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "xrandr"
|
|
|
|
interval = 6000
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "sound"
|
|
|
|
format = "{output_name} {volume}%"
|
2023-03-16 11:48:55 +00:00
|
|
|
|
|
|
|
[[block.click]]
|
|
|
|
button = "left"
|
|
|
|
cmd = "pavucontrol --tab=3"
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
[block.mappings]
|
|
|
|
"alsa_output.pci-0000_00_1f.3.analog-stereo" = ""
|
|
|
|
"bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = ""
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "music"
|
|
|
|
buttons = ["play", "prev", "next"]
|
|
|
|
player = "spotify"
|
|
|
|
|
2023-03-16 11:48:55 +00:00
|
|
|
[[block.click]]
|
|
|
|
action = "music_play"
|
|
|
|
button = "play"
|
|
|
|
|
|
|
|
[[block.click]]
|
|
|
|
action = "music_prev"
|
|
|
|
button = "prev"
|
|
|
|
|
|
|
|
[[block.click]]
|
|
|
|
action = "music_next"
|
|
|
|
button = "next"
|
|
|
|
|
2020-09-02 02:37:42 +00:00
|
|
|
[[block]]
|
|
|
|
block = "time"
|
2023-03-16 11:48:55 +00:00
|
|
|
format = " $timestamp.datetime(f:'%a %d/%m %R') "
|
2020-09-02 02:37:42 +00:00
|
|
|
interval = 60
|
|
|
|
|
|
|
|
[[block]]
|
|
|
|
block = "battery"
|
|
|
|
|
2023-03-16 11:48:55 +00:00
|
|
|
[icons]
|
|
|
|
icons = "awesome5"
|
|
|
|
|
2020-09-02 02:37:42 +00:00
|
|
|
[theme]
|
2023-03-16 11:48:55 +00:00
|
|
|
theme = "solarized-dark"
|
2020-09-02 02:37:42 +00:00
|
|
|
|
|
|
|
[theme.overrides]
|
|
|
|
idle_bg = "#123456"
|
|
|
|
idle_fg = "#abcdef"
|
2022-04-26 21:04:50 +00:00
|
|
|
''
|
2020-09-02 02:37:42 +00:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|