style: formatting

This commit is contained in:
Price Hiller 2022-08-08 17:07:49 -05:00
parent f748e2d0e2
commit 866e541a92
3 changed files with 167 additions and 158 deletions

View File

@ -1,162 +1,169 @@
{
"layer": "top",
"position": "top",
"modules-left": [
"idle_inhibitor",
"cpu",
"temperature",
"memory",
"battery",
"disk",
"pulseaudio",
"custom/media"
],
"modules-center": [
"sway/workspaces"
],
"modules-right": [
"custom/weather",
"network",
"clock",
"custom/offswitch"
],
"sway/window": {},
"custom/weather": {
"tooltip": false,
"min-length": 5,
"exec": "curl 'https://wttr.in/?format='%t''",
"interval": 3600
},
"battery": {
"min-length": 5,
"states": {
"full": 90,
"warning": 30,
"critical": 15
[
{
"layer": "top",
"position": "top",
"modules-left": [
"idle_inhibitor",
"cpu",
"temperature",
"memory",
"battery",
"disk",
"pulseaudio"
],
"modules-center": [
"custom/media"
],
"modules-right": [
"custom/weather",
"network",
"clock",
"custom/offswitch"
],
"custom/weather": {
"tooltip": false,
"min-length": 5,
"exec": "curl 'https://wttr.in/?format='%t''",
"interval": 3600
},
"tooltip": false,
"full-at": 95,
"format-plugged": "{icon} {capacity}%",
"format-charging": "{icon} {capacity}%",
"format": "{icon} {capacity}%",
"format-icons": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
]
},
"clock": {
"format": " {:%a %b %d %I:%M %p}",
"tooltip": false,
"min-length": 18
},
"custom/offswitch": {
"tooltip": false,
"format": "",
"interval": "once",
"on-click": "systemctl poweroff"
},
"network": {
"interval": 10,
"format-wifi": " {essid}",
"format-ethernet": " {ipaddr}",
"format-linked": " {ifname}",
"format-disconnected": " Disconnected",
"tooltip": false,
"max-length": 20,
"min-length": 14
},
"pulseaudio": {
"tooltip": false,
"min-length": 5,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE",
"format-icons": {
"headphone": "",
"headset": "",
"default": [
"",
"",
""
"battery": {
"min-length": 5,
"states": {
"full": 90,
"warning": 30,
"critical": 15
},
"tooltip": false,
"full-at": 95,
"format-plugged": "{icon} {capacity}%",
"format-charging": "{icon} {capacity}%",
"format": "{icon} {capacity}%",
"format-icons": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
]
}
},
"idle_inhibitor": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"cpu": {
"interval": 4,
"min-length": 6,
"format": " {usage}%",
"tooltip": false,
"states": {
"critical": 90
}
},
"temperature": {
"tooltip": false,
"min-length": 6,
"thermal-zone": 1,
"critical-threshold": 90,
"format": "{icon} {temperatureF}°F",
"format-critical": "{icon} {temperatureF}°F",
"format-icons": {
"default": [
"",
"",
"",
"",
""
]
}
},
"memory": {
"tooltip": false,
"format": " {percentage}%",
"states": {
"critical": 90
},
"min-length": 5
},
"disk": {
"tooltip": false,
"path": "/",
"interval": 60,
"min-length": 5,
"format": " {percentage_used}%",
"states": {
"critical": 90
"clock": {
"format": " {:%a %b %d %I:%M %p}",
"tooltip": false,
"min-length": 18
},
"custom/offswitch": {
"tooltip": false,
"format": "",
"interval": "once",
"on-click": "systemctl poweroff"
},
"network": {
"interval": 10,
"format-wifi": " {essid}",
"format-ethernet": " {ipaddr}",
"format-linked": " {ifname}",
"format-disconnected": " Disconnected",
"tooltip": false,
"max-length": 20,
"min-length": 14
},
"pulseaudio": {
"tooltip": false,
"min-length": 5,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon} {volume}%",
"format-muted": "MUTE",
"format-icons": {
"headphone": "",
"headset": "",
"default": [
"",
"",
""
]
}
},
"idle_inhibitor": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"cpu": {
"interval": 4,
"min-length": 6,
"format": " {usage}%",
"tooltip": false,
"states": {
"critical": 90
}
},
"temperature": {
"tooltip": false,
"min-length": 6,
"thermal-zone": 1,
"critical-threshold": 90,
"format": "{icon} {temperatureF}°F",
"format-critical": "{icon} {temperatureF}°F",
"format-icons": {
"default": [
"",
"",
"",
"",
""
]
}
},
"memory": {
"tooltip": false,
"format": " {percentage}%",
"states": {
"critical": 90
},
"min-length": 5
},
"disk": {
"tooltip": false,
"path": "/",
"interval": 60,
"min-length": 5,
"format": " {percentage_used}%",
"states": {
"critical": 90
}
},
"custom/media": {
"interval": 1,
"return-type": "json",
"exec": "~/.config/waybar/scripts/get-media.bash",
"escape": true
}
},
"sway/workspaces": {
"tooltip": false,
"disable-scroll": true,
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": []
{
"layer": "bottom",
"position": "bottom",
"modules-center": [
"sway/workspaces"
],
"sway/workspaces": {
"tooltip": false,
"disable-scroll": true,
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": []
}
}
},
"custom/media": {
"interval": 1,
"return-type": "json",
"exec": "~/.config/waybar/scripts/get-media.bash",
"escape": true
}
}
]

View File

@ -8,10 +8,10 @@ main() {
local player_ctl_info="$(playerctl metadata --format '{{ artist }} | {{ title }} | {{ album }}')"
if [[ "${class}" == "playing" ]]; then
text=" ${player_ctl_info}"
text=" ${player_ctl_info}"
elif [[ "${class}" == "paused" ]]; then
text="⏸︎ ${player_ctl_info}"
text=" ${player_ctl_info}"
fi
printf '{"class": "%s", "text": "%s"}\n' "${class}" "${text}"

View File

@ -38,9 +38,10 @@
* {
min-height: 0;
padding: 3px;
margin: 3px;
border-radius: 20px;
padding-left: 20px;
margin-left: 5px;
margin-right: 5px;
padding-right: 20px;
}
@ -55,6 +56,7 @@
background: @sumiInk0;
border-top: 2px solid @oniViolet;
border-left: 2px solid @oniViolet;
border-right: 2px solid @oniViolet;
}
#workspaces {