Do not set state to 'warning' if tasks are complete
* Also, show complete/total
This commit is contained in:
parent
2ba309fe36
commit
c9813b1aaf
10
task_ops.go
10
task_ops.go
@ -28,12 +28,16 @@ func (a *AppState) opI3Status(args []string) int {
|
|||||||
if state != "Warning" {
|
if state != "Warning" {
|
||||||
warning := a.config.Get("i3status_warning")
|
warning := a.config.Get("i3status_warning")
|
||||||
if warning != "" {
|
if warning != "" {
|
||||||
if len(*a.getFilteredList(warning)) > 0 {
|
t := a.getFilteredList(warning)
|
||||||
state = "Warning"
|
for _, v := range *t {
|
||||||
|
if !v.HasCompletedDate() {
|
||||||
|
state = "Warning"
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Printf("{\"icon\":\"tasks\",\"state\":\"%s\", \"text\": \"%s: %d/%d\"}", state, filterString, incomplete, total)
|
fmt.Printf("{\"icon\":\"tasks\",\"state\":\"%s\", \"text\": \"%s: %d/%d\"}", state, filterString, (total - incomplete), total)
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user