home: wm: i3bar: update to v0.30.X

This should be equivalent to the previous version's configuration, since
v0.30.0 introduced a lot of breaking changes.
This commit is contained in:
Bruno BELANYI 2023-03-19 21:14:59 +00:00
parent 176ff5d6e3
commit 7cec58e215

View file

@ -13,8 +13,6 @@ in
programs.i3status-rust = { programs.i3status-rust = {
enable = true; enable = true;
package = pkgs.i3status-rust_0_22;
bars = { bars = {
top = { top = {
icons = "awesome5"; icons = "awesome5";
@ -22,28 +20,40 @@ in
blocks = builtins.filter (attr: attr != { }) [ blocks = builtins.filter (attr: attr != { }) [
{ {
block = "music"; block = "music";
buttons = [ "prev" "play" "next" ]; # This format seems to remove the block when not playing, somehow
max_width = 50; format = "{ $icon $combo.str(max_w:50,rot_interval:0.5) $prev $play $next |}";
dynamic_width = true; click = [
hide_when_empty = true; {
button = "play";
action = "music_play";
}
{
button = "prev";
action = "music_prev";
}
{
button = "next";
action = "music_next";
}
];
} }
(lib.optionalAttrs config.my.home.bluetooth.enable { (lib.optionalAttrs config.my.home.bluetooth.enable {
block = "bluetooth"; block = "bluetooth";
mac = "4C:87:5D:06:40:D9"; mac = "4C:87:5D:06:40:D9";
hide_disconnected = true; format = " $icon Boson{ $percentage|} ";
format = "Boson {percentage}"; disconnected_format = "";
}) })
(lib.optionalAttrs config.my.home.bluetooth.enable { (lib.optionalAttrs config.my.home.bluetooth.enable {
block = "bluetooth"; block = "bluetooth";
mac = "94:DB:56:00:EE:93"; mac = "94:DB:56:00:EE:93";
hide_disconnected = true; format = " $icon Protons{ $percentage|} ";
format = "Protons {percentage}"; disconnected_format = "";
}) })
(lib.optionalAttrs config.my.home.bluetooth.enable { (lib.optionalAttrs config.my.home.bluetooth.enable {
block = "bluetooth"; block = "bluetooth";
mac = "F7:78:BA:76:52:F7"; mac = "F7:78:BA:76:52:F7";
hide_disconnected = true; format = " $icon MX Ergo{ $percentage|} ";
format = "MX Ergo {percentage}"; disconnected_format = "";
}) })
{ {
block = "cpu"; block = "cpu";
@ -53,7 +63,7 @@ in
} }
{ {
block = "net"; block = "net";
format = "{ssid} {ip} {signal_strength}"; format = " $icon $ssid $ip $signal_strength ";
} }
{ {
block = "backlight"; block = "backlight";
@ -61,17 +71,17 @@ in
} }
{ {
block = "battery"; block = "battery";
format = "{percentage} ({time})"; format = " $percentage ($time) ";
full_format = "{percentage}"; full_format = " $icon $percentage ";
} }
{ {
block = "temperature"; block = "temperature";
collapsed = false; format_alt = " $icon ";
} }
{ {
block = "sound"; block = "sound";
device_kind = "source"; # Microphone status device_kind = "source"; # Microphone status
format = ""; # Only show icon format = " $icon ";
} }
{ {
block = "sound"; block = "sound";
@ -79,7 +89,8 @@ in
} }
{ {
block = "time"; block = "time";
format = "%F %T"; format = " $icon $timestamp.datetime(f:'%F %T') ";
interval = 5;
} }
]; ];
}; };