Update various cities
Migrate alacritty.toml to new version Remove various waybar modules
This commit is contained in:
parent
876f11177d
commit
06f35a4eb9
7 changed files with 11 additions and 26 deletions
|
@ -16,8 +16,6 @@
|
|||
"cpu",
|
||||
"memory",
|
||||
"custom/pacman",
|
||||
"custom/status",
|
||||
"custom/weather",
|
||||
"clock",
|
||||
"tray"
|
||||
],
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
result=$(curl https://status.serguzim.net/api/status-page/heartbeat/serguzim-net \
|
||||
| jq '.heartbeatList | to_entries | map(.value | last .status)
|
||||
| [group_by(.)[] | {value: .[0], count: length}] | map({(.value|tostring): .count}) | add')
|
||||
|
||||
up_count=$(echo "$result" | jq '."1" // 0')
|
||||
down_count=$(echo "$result" | jq '."0" // 0')
|
||||
count=$((up_count + down_count))
|
||||
percent=$((up_count * 100 / count))
|
||||
|
||||
tooltip="status.serguzim.net\nUp: $up_count\nDown: $down_count\nTotal: $count\nPercent: $percent%"
|
||||
|
||||
echo "{\"text\": \"$percent%\", \"tooltip\": \"$tooltip\"}"
|
|
@ -73,13 +73,5 @@
|
|||
"format": "{}",
|
||||
"tooltip": true,
|
||||
"interval": 1200
|
||||
},
|
||||
"custom/status": {
|
||||
"format": " {}",
|
||||
"exec": "~/.config/waybar/custom/status-serguzim-net",
|
||||
"on-click": "xdg-open 'https://status.serguzim.me'",
|
||||
"return-type": "json",
|
||||
"tooltip": true,
|
||||
"interval": 500
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue