fork/home-manager
git clone https://git.julia.blue/fork/home-manager
f5c15668
master
1{ config , lib , pkgs , ...} : 2 3{ 4config = { 5programs . i3status-rust = { 6enable = true ; 7bars = { 8extra-settings = { 9blocks = [ 10{ 11block = "disk_space" ; 12path = "/" ; 13info_type = "available" ; 14interval = 60 ; 15warning = 20.0 ; 16alert = 10.0 ; 17} 18{ 19block = "memory" ; 20display_type = "memory" ; 21format_mem = "{Mug}GB ({Mup}%)" ; 22format_swap = "{SUp}%" ; 23} 24{ 25block = "cpu" ; 26interval = 1 ; 27format = " $icon $barchart " ; 28} 29{ 30block = "load" ; 31interval = 1 ; 32format = " $icon $1m $5m " ; 33} 34{ 35block = "temperature" ; 36interval = 10 ; 37format = "$icon $min min, $max max, $average avg" ; 38chip = "*-isa-*" ; 39} 40{ 41block = "net" ; 42device = "enp9s0u2u1u2c2" ; 43interval = 5 ; 44} 45{ 46block = "speedtest" ; 47format = " ^icon_ping $ping " ; 48} 49{ 50block = "xrandr" ; 51interval = 526000 ; # Because running the commands causes screen lag, see https://github.com/greshake/i3status-rust/issues/668 53} 54{ 55block = "sound" ; 56format = "{output_name} {volume}%" ; 57click = [{ 58button = "left" ; 59cmd = "pavucontrol --tab=3" ; 60}]; 61mappings = { 62"alsa_output.pci-0000_00_1f.3.analog-stereo" = "" ; 63"bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = "" ; 64}; 65} 66{ 67block = "music" ; 68player = "spotify" ; 69buttons = [ "play" "prev" "next" ]; 70click = [ 71{ 72button = "play" ; 73action = "music_play" ; 74} 75{ 76button = "prev" ; 77action = "music_prev" ; 78} 79{ 80button = "next" ; 81action = "music_next" ; 82} 83]; 84} 85{ 86block = "time" ; 87interval = 60 ; 88format = " $timestamp.datetime(f:'%a %d/%m %R') " ; 89} 90{ block = "battery" ; } 91]; 92 93icons = "awesome5" ; 94 95settings = { 96theme = { 97theme = "solarized-dark" ; 98overrides = { 99idle_bg = "#123456" ; 100idle_fg = "#abcdef" ; 101}; 102}; 103}; 104 105theme = "gruvbox-dark" ; 106}; 107}; 108}; 109 110test . stubs . i3status-rust = { version = "0.30.0" ; }; 111 112nmt . script = '' 113assertFileExists home-files/.config/i3status-rust/config-extra-settings.toml 114assertFileContent home-files/.config/i3status-rust/config-extra-settings.toml \ 115${ 116pkgs . writeText "i3status-rust-expected-config" '' 117[[block]] 118alert = 10.0 119block = "disk_space" 120info_type = "available" 121interval = 60 122path = "/" 123warning = 20.0 124 125[[block]] 126block = "memory" 127display_type = "memory" 128format_mem = "{Mug}GB ({Mup}%)" 129format_swap = "{SUp}%" 130 131[[block]] 132block = "cpu" 133format = " $icon $barchart " 134interval = 1 135 136[[block]] 137block = "load" 138format = " $icon $1m $5m " 139interval = 1 140 141[[block]] 142block = "temperature" 143chip = "*-isa-*" 144format = "$icon $min min, $max max, $average avg" 145interval = 10 146 147[[block]] 148block = "net" 149device = "enp9s0u2u1u2c2" 150interval = 5 151 152[[block]] 153block = "speedtest" 154format = " ^icon_ping $ping " 155 156[[block]] 157block = "xrandr" 158interval = 6000 159 160[[block]] 161block = "sound" 162format = "{output_name} {volume}%" 163 164[[block.click]] 165button = "left" 166cmd = "pavucontrol --tab=3" 167 168[block.mappings] 169"alsa_output.pci-0000_00_1f.3.analog-stereo" = "" 170"bluez_sink.70_26_05_DA_27_A4.a2dp_sink" = "" 171 172[[block]] 173block = "music" 174buttons = ["play", "prev", "next"] 175player = "spotify" 176 177[[block.click]] 178action = "music_play" 179button = "play" 180 181[[block.click]] 182action = "music_prev" 183button = "prev" 184 185[[block.click]] 186action = "music_next" 187button = "next" 188 189[[block]] 190block = "time" 191format = " $timestamp.datetime(f:'%a %d/%m %R') " 192interval = 60 193 194[[block]] 195block = "battery" 196 197[icons] 198icons = "awesome5" 199 200[theme] 201theme = "solarized-dark" 202[theme.overrides] 203idle_bg = "#123456" 204idle_fg = "#abcdef" 205'' 206} 207'' ; 208}; 209}