From cbca4939ddbf7bbf8324c4d40b697af053ce6e0a Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Fri, 18 Dec 2020 15:27:40 +0100 Subject: [PATCH] sway-bar: use i3status-rs --- config | 17 +++++++++-------- i3status.toml | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 i3status.toml diff --git a/config b/config index 84c8a62..719ae91 100644 --- a/config +++ b/config @@ -194,15 +194,16 @@ bindsym $mod+r mode "resize" # Read `man 5 sway-bar` for more information about this section. bar { position top - - # When the status_command prints a new line to stdout, swaybar updates. - # The default just shows the current date and time. - status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done - + status_command i3status-rs $HOME/.config/sway/i3status.toml + font "Cascadia Code PL Regular 11" colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c + separator #666666 + background #222222 + statusline #dddddd + focused_workspace #0088CC #0088CC #ffffff + active_workspace #333333 #333333 #ffffff + inactive_workspace #333333 #333333 #888888 + urgent_workspace #2f343a #900000 #ffffff } } diff --git a/i3status.toml b/i3status.toml new file mode 100644 index 0000000..9c635f0 --- /dev/null +++ b/i3status.toml @@ -0,0 +1,40 @@ +theme = "slick" +icons = "awesome5" + +[[block]] +block = "cpu" +interval = 1 +format = "{barchart} {utilization}%" + +[[block]] +block = "memory" +format_mem = "{Mug}/{MTg}GB ({Mup}%)" +format_swap = "{SUm}MB/{STm}MB({SUp}%)" +display_type = "memory" +icons = true +clickable = true +interval = 5 +warning_mem = 80 +warning_swap = 80 +critical_mem = 95 +critical_swap = 95 + +# [[block]] +# block = "memory" +# format_mem = "{Mug}/{MTg}GB ({Mup}%)" +# format_swap = "{SUg}/{STg}GB ({SUp}%)" +# display_type = "swap" +# icons = true +# clickable = true +# interval = 5 +# warning_mem = 80 +# warning_swap = 80 +# critical_mem = 95 +# critical_swap = 95 + +[[block]] +block = "time" +format = "%Y/%m/%d %R" +timezone = "Europe/Berlin" +interval = 60 +locale = "de_DE"