diff --git a/_sample_configs/small_config.yml b/_sample_configs/small_config.yml new file mode 100644 index 00000000..82e91e89 --- /dev/null +++ b/_sample_configs/small_config.yml @@ -0,0 +1,17 @@ +wtf: + grid: + columns: [20, 20] + rows: [3, 3] + refreshInterval: 1 + mods: + uptime: + type: cmdrunner + args: [""] + cmd: "uptime" + enabled: true + position: + top: 0 + left: 0 + height: 1 + width: 1 + refreshInterval: 30 \ No newline at end of file diff --git a/utils/sums.go b/utils/sums.go new file mode 100644 index 00000000..0f45fca5 --- /dev/null +++ b/utils/sums.go @@ -0,0 +1,12 @@ +package utils + +// SumInts takes a slice of ints and returns the sum of them +func SumInts(vals []int) int { + sum := 0 + + for _, a := range vals { + sum += a + } + + return sum +}