diff options
Diffstat (limited to 'internal/constants/constants.go')
| -rw-r--r-- | internal/constants/constants.go | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 44a0478..6787045 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -2,18 +2,18 @@ package constants // Paths and limits const ( - ConfFile = ".loadbarsrc" - CSSHConfFile = "/etc/clusters" - CSSHMaxRecursion = 10 - ColorDepth = 32 - Interval = 0.14 // CPU sampling interval (seconds) - IntervalNet = 3.0 // Network stats interval - IntervalMem = 1.0 // Memory stats interval - IntervalSDL = 0.14 // Display refresh interval - IntervalSDLWarn = 1.0 // Warn if loop is slower than this - SystemBlueThreshold = 30 // CPU system % for lighter blue - UserOrangeThreshold = 70 // CPU user % for orange - UserYellowThreshold = 50 // CPU user % for dark yellow + ConfFile = ".loadbarsrc" + CSSHConfFile = "/etc/clusters" + CSSHMaxRecursion = 10 + ColorDepth = 32 + Interval = 0.14 // CPU sampling interval (seconds) + IntervalNet = 3.0 // Network stats interval + IntervalMem = 1.0 // Memory stats interval + IntervalSDL = 0.14 // Display refresh interval + IntervalSDLWarn = 1.0 // Warn if loop is slower than this + SystemBlueThreshold = 30 // CPU system % for lighter blue + UserOrangeThreshold = 70 // CPU user % for orange + UserYellowThreshold = 50 // CPU user % for dark yellow ) // Exit codes @@ -26,27 +26,27 @@ const ( // Copyright string const Copyright = "2010-2026 (c) Paul Buetow <loadbars@dev.buetow.org>" -// RGB returns R, G, B in 0-255 for SDL. +// RGB holds R, G, B in 0-255 for SDL. type RGB struct{ R, G, B uint8 } // Colors used by the display (matching Perl Constants.pm) var ( - Black = RGB{0x00, 0x00, 0x00} - Blue0 = RGB{0x00, 0x00, 0xff} - LightBlue = RGB{0x00, 0x00, 0xdd} + Black = RGB{0x00, 0x00, 0x00} + Blue0 = RGB{0x00, 0x00, 0xff} + LightBlue = RGB{0x00, 0x00, 0xdd} LightBlue0 = RGB{0x00, 0x00, 0xcc} - Blue = RGB{0x00, 0x00, 0x88} - Green = RGB{0x00, 0x90, 0x00} + Blue = RGB{0x00, 0x00, 0x88} + Green = RGB{0x00, 0x90, 0x00} LightGreen = RGB{0x00, 0xf0, 0x00} - Orange = RGB{0xff, 0x70, 0x00} - Purple = RGB{0xa0, 0x20, 0xf0} - Red = RGB{0xff, 0x00, 0x00} - White = RGB{0xff, 0xff, 0xff} - Grey0 = RGB{0x11, 0x11, 0x11} - Grey = RGB{0xaa, 0xaa, 0xaa} - DarkGrey = RGB{0x15, 0x15, 0x15} - Yellow0 = RGB{0xff, 0xa0, 0x00} - Yellow = RGB{0xff, 0xc0, 0x00} + Orange = RGB{0xff, 0x70, 0x00} + Purple = RGB{0xa0, 0x20, 0xf0} + Red = RGB{0xff, 0x00, 0x00} + White = RGB{0xff, 0xff, 0xff} + Grey0 = RGB{0x11, 0x11, 0x11} + Grey = RGB{0xaa, 0xaa, 0xaa} + DarkGrey = RGB{0x15, 0x15, 0x15} + Yellow0 = RGB{0xff, 0xa0, 0x00} + Yellow = RGB{0xff, 0xc0, 0x00} ) // BytesPerSec for link speed reference (bytes per second at given mbit) |
