config.go (1004B)
1 package config // import "hhvn.uk/hbspbar/config" 2 3 import "image/color" 4 5 // Bar height 6 var H uint = 17 7 8 func int2rgb(argb uint32) (color.Color) { 9 return color.RGBA{ 10 B: uint8( argb & 0x000000ff), 11 G: uint8((argb & 0x0000ff00) >> 8), 12 R: uint8((argb & 0x00ff0000) >> 16), 13 A: uint8((argb & 0xff000000) >> 24) } 14 } 15 16 var ( 17 // Bar colours 18 Bg = int2rgb(0xff050a10) 19 UnselMon = int2rgb(0xff0c1726) 20 Status = int2rgb(0xff0a2126) 21 Fg = int2rgb(0xffeeeeee) 22 FgDark = int2rgb(0xff444444) 23 Sel = int2rgb(0xff1b364b) 24 Urg = int2rgb(0xff90222b) 25 26 // Status colours 27 Red = int2rgb(0xffaa2222) 28 Orange = int2rgb(0xffaa7700) 29 Green = int2rgb(0xff00aa00) 30 Black = int2rgb(0xff000000) 31 Grey = int2rgb(0xff888888) 32 Yellow = int2rgb(0xffaaaa00) 33 White = int2rgb(0xffcccccc) 34 ) 35 36 var Font string = "/usr/share/fonts/TTF/DejaVuSansMono.ttf" 37 var FontSize float64 = 11.0 38 var FontYPad int = 1 39 40 // Space between status elements 41 var StatusPad int = 15