Parent directory

config-bottom.jsonc.tmpl

2729 bytes
  1// vim: set noet ft=chezmoitmpl.jsonc:
  2{{- $cpuThreads := (output "sh" "-c" "lscpu --online --parse | grep --invert-match '^#' | wc --lines") | trim | atoi | add -1 | int }}
  3{
  4	"layer": "top",
  5	"position": "bottom",
  6	"reload_style_on_change": true,
  7	"modules-right": [
  8		"custom/arrow_left_end_alt",
  9		"custom/tailscale",
 10		"custom/arrow_left_alt",
 11		"network",
 12		"custom/arrow_left",
 13		"temperature",
 14		"custom/arrow_left_alt",
 15		"cpu",
 16		"custom/arrow_left",
 17		"memory",
 18		"custom/arrow_left_alt",
 19		"tray"
 20	],
 21	"power-profiles-daemon": {
 22		"format": "{icon}",
 23		"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
 24		"tooltip": true,
 25		"format-icons": {
 26			"default": "",
 27			"performance": "",
 28			"balanced": "",
 29			"power-saver": ""
 30		}
 31	},
 32	"cpu": {
 33		"interval": 1,
 34		"tooltip": false,
 35		"format": "{{- range $i := splitList " " (seq 0 $cpuThreads) -}}{icon{{ $i }}}{{- end -}}",
 36		"format-alt": "  {usage}% ({load})",
 37		"format-icons": [
 38			"<span color='#98971a'>▁</span>", // green
 39			"<span color='#98971a'>▂</span>", // green
 40			"<span color='#d79921'>▃</span>", // yellow
 41			"<span color='#d79921'>▄</span>", // yellow
 42			"<span color='#d65d0e'>▅</span>", // orange
 43			"<span color='#d65d0e'>▆</span>", // orange
 44			"<span color='#cc241d'>▇</span>", // red
 45			"<span color='#cc241d'>█</span>" // red
 46		]
 47	},
 48	"memory": {
 49		"interval": 5,
 50		"format": " {used:0.1f}G/{total:0.1f}G",
 51		"states": {
 52			"warning": 70,
 53			"critical": 90
 54		},
 55		"tooltip": false
 56	},
 57	"temperature": {
 58		"critical-threshold": 90,
 59		"interval": 1,
 60		"hwmon-path-abs": "/sys/devices/{{ .waybar.bottom.cpu_temp_path }}/hwmon",
 61		"input-filename": "{{ .waybar.bottom.cpu_temp_filename }}",
 62		"format": "{icon} {temperatureC}°C",
 63		"format-icons": [
 64			"",
 65			"",
 66			"",
 67			"",
 68			""
 69		],
 70		"tooltip": false
 71	},
 72	"tray": {
 73		"icon-size": 18
 74		//"spacing": 10
 75	},
 76	"network": {
 77		"interval": 1,
 78		"format-wifi": " {essid} ({signalStrength}%) {bandwidthDownBytes} {bandwidthUpBytes}",
 79		"format-ethernet": " {bandwidthDownBytes} {bandwidthUpBytes}",
 80		"format": " {bandwidthDownBytes} {bandwidthUpBytes}",
 81		"format-disconnected": "󰲜",
 82		"format-alt": "󰩠 {ipaddr}/{cidr}",
 83		"tooltip": false
 84	},
 85	"custom/tailscale": {
 86		"exec": "tailscale status --json 2>/dev/null | jq -r 'if .BackendState == \"Running\" then \" 󰖂 \" else \" 󰲜 \" end'",
 87		"interval": 5,
 88		"tooltip": false
 89	},
 90	"custom/arrow_left": {
 91		"format": "",
 92		"tooltip": false
 93	},
 94	"custom/arrow_left_alt": {
 95		"format": "",
 96		"tooltip": false
 97	},
 98	"custom/arrow_left_end": {
 99		"format": "",
100		"tooltip": false
101	},
102	"custom/arrow_left_end_alt": {
103		"format": "",
104		"tooltip": false
105	}
106}