mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 15:39:42 +00:00
chore: format code; fix lint issues
This commit is contained in:
@@ -149,6 +149,7 @@ type NetworkStatus struct {
|
||||
TxRateMBs float64
|
||||
IP string
|
||||
}
|
||||
|
||||
// NetworkHistory holds the global network usage history.
|
||||
type NetworkHistory struct {
|
||||
RxHistory []float64
|
||||
|
||||
@@ -201,8 +201,6 @@ func getScoreStyle(score int) lipgloss.Style {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func hasSensorData(sensors []SensorReading) bool {
|
||||
for _, s := range sensors {
|
||||
if s.Note == "" && s.Value > 0 {
|
||||
@@ -475,21 +473,6 @@ func renderNetworkCard(netStats []NetworkStatus, history NetworkHistory, proxy P
|
||||
return cardData{icon: iconNetwork, title: "Network", lines: lines}
|
||||
}
|
||||
|
||||
func netBar(rate float64) string {
|
||||
filled := min(int(rate/2.0), 5)
|
||||
if filled < 0 {
|
||||
filled = 0
|
||||
}
|
||||
bar := strings.Repeat("▮", filled) + strings.Repeat("▯", 5-filled)
|
||||
if rate > 8 {
|
||||
return dangerStyle.Render(bar)
|
||||
}
|
||||
if rate > 3 {
|
||||
return warnStyle.Render(bar)
|
||||
}
|
||||
return okStyle.Render(bar)
|
||||
}
|
||||
|
||||
// 8 levels: ▁▂▃▄▅▆▇█
|
||||
func sparkline(history []float64, current float64, width int) string {
|
||||
blocks := []rune{'▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'}
|
||||
|
||||
@@ -389,7 +389,6 @@ batch_uninstall_applications() {
|
||||
local has_system_files="false"
|
||||
[[ -n "$system_files" ]] && has_system_files="true"
|
||||
|
||||
|
||||
stop_launch_services "$bundle_id" "$has_system_files"
|
||||
|
||||
# Remove from Login Items
|
||||
|
||||
Reference in New Issue
Block a user