diff --git a/app_state.go b/app_state.go index cc96c97..8f0d929 100644 --- a/app_state.go +++ b/app_state.go @@ -5,9 +5,9 @@ import ( "os" "strings" - todotxt "github.com/br0xen/go-todotxt" - "github.com/br0xen/termbox-screen" - "github.com/br0xen/user-config" + todotxt "git.bullercodeworks.com/brian/go-todotxt" + termboxScreen "git.bullercodeworks.com/brian/termbox-screen" + userConfig "git.bullercodeworks.com/brian/user-config" termbox "github.com/nsf/termbox-go" ) diff --git a/go.mod b/go.mod index 89c68eb..54bee19 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,13 @@ module git.bullercodeworks.com/brian/gask +go 1.16 + require ( + git.bullercodeworks.com/brian/go-todotxt v1.0.0 + git.bullercodeworks.com/brian/termbox-screen v0.0.0-20190712162752-c91f70ac38c6 + git.bullercodeworks.com/brian/termbox-util v0.0.0-20200220160819-dc6d6950ba00 + git.bullercodeworks.com/brian/user-config v0.0.0-20170914134719-16e743ec93a2 github.com/BurntSushi/toml v0.3.1 // indirect - github.com/br0xen/go-todotxt v0.0.0-20190220135311-c2c2ad14ad22 - github.com/br0xen/termbox-util v0.0.0-20170904143325-de1d4c83380e - github.com/br0xen/user-config v0.0.0-20170914134719-16e743ec93a2 github.com/casimir/xdg-go v0.0.0-20160329195404-372ccc2180da // indirect - github.com/mattn/go-runewidth v0.0.4 // indirect - github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d + github.com/nsf/termbox-go v1.1.0 ) diff --git a/go.sum b/go.sum index 59238fb..107ec4c 100644 --- a/go.sum +++ b/go.sum @@ -1,18 +1,18 @@ -git.bullercodeworks.com/brian/go-todotxt v0.0.0-20190204043859-239b7c535cc7 h1:euAlecu5ui9tjcJKcPk+tmt7wMn+Lkon9p2OPClMlJA= -git.bullercodeworks.com/brian/go-todotxt v0.0.0-20190204043859-239b7c535cc7/go.mod h1:MS8w9yuyAlDxjdxe/3mgfOovifM8aMbH7Z2Ac14J7N8= +git.bullercodeworks.com/brian/go-todotxt v0.0.0-20210317161427-e7c5dfe04c31 h1:E7WOx5fUe5fvDJ1Zr0tu+8bNT/0utxKCIskggm7cGzI= +git.bullercodeworks.com/brian/go-todotxt v0.0.0-20210317161427-e7c5dfe04c31/go.mod h1:MS8w9yuyAlDxjdxe/3mgfOovifM8aMbH7Z2Ac14J7N8= +git.bullercodeworks.com/brian/go-todotxt v1.0.0 h1:FnezIGRtDBYHXx/CenjOKhtv35gR8Y7VGyNT+zpcX/k= +git.bullercodeworks.com/brian/go-todotxt v1.0.0/go.mod h1:MS8w9yuyAlDxjdxe/3mgfOovifM8aMbH7Z2Ac14J7N8= +git.bullercodeworks.com/brian/termbox-screen v0.0.0-20190712162752-c91f70ac38c6 h1:H9ZIWuAcWRHZ4NqXWiIv9RFS35U4wL90fiPm5kbbDJ8= +git.bullercodeworks.com/brian/termbox-screen v0.0.0-20190712162752-c91f70ac38c6/go.mod h1:ELIb2SMnFJN+1SY1cThGR55UQyke8AcFBHr9y071j90= +git.bullercodeworks.com/brian/termbox-util v0.0.0-20200220160819-dc6d6950ba00 h1:h2IQSbnljgd41m6uriwE3SewC5MsHez8cOrpgQ/OnF0= +git.bullercodeworks.com/brian/termbox-util v0.0.0-20200220160819-dc6d6950ba00/go.mod h1:AXQlE7+T+dNiQJwkGS3a5JVQJd8J32cTM8uv8iKQeiQ= +git.bullercodeworks.com/brian/user-config v0.0.0-20170914134719-16e743ec93a2 h1:Q8Ty2s2CN5i2E10UCCkpIHTVB22avGcP9HChuvqjEBU= +git.bullercodeworks.com/brian/user-config v0.0.0-20170914134719-16e743ec93a2/go.mod h1:7THeubmaACTBR+d+KeaRJCL0sOOLA3tz2w0mPwLtjU8= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/br0xen/go-todotxt v0.0.0-20190204043859-239b7c535cc7 h1:ocxG6X67fmRxY74Or1594ZjC02I9DH26G0xX6fHMA8U= -github.com/br0xen/go-todotxt v0.0.0-20190204043859-239b7c535cc7/go.mod h1:AmJKSVbee7+0JxWEd/79ButCY9e9NTfSUK+6DY+77Cg= -github.com/br0xen/go-todotxt v0.0.0-20190220135311-c2c2ad14ad22 h1:3cLwiVRGgCKmjSkxwLwapR+VLv3ixeBbbHJgNsF2QRA= -github.com/br0xen/go-todotxt v0.0.0-20190220135311-c2c2ad14ad22/go.mod h1:AmJKSVbee7+0JxWEd/79ButCY9e9NTfSUK+6DY+77Cg= -github.com/br0xen/termbox-util v0.0.0-20170904143325-de1d4c83380e h1:PF4gYXcZfTbAoAk5DPZcvjmq8gyg4gpcmWdT8W+0X1c= -github.com/br0xen/termbox-util v0.0.0-20170904143325-de1d4c83380e/go.mod h1:x9wJlgOj74OFTOBwXOuO8pBguW37EgYNx51Dbjkfzo4= -github.com/br0xen/user-config v0.0.0-20170914134719-16e743ec93a2 h1:H/prDPxUZBsK4DQC7ScP3ftSijMtWyetb6ab69DSKrs= -github.com/br0xen/user-config v0.0.0-20170914134719-16e743ec93a2/go.mod h1:lMy7txIyYXt+I/1JgTGBZTdyTNJyNVDCX4Z+lHzNcSM= github.com/casimir/xdg-go v0.0.0-20160329195404-372ccc2180da h1:hjpZV7G49m1bly++F+Gho1Sbf2+eBW/eTLJWuRkH9Uc= github.com/casimir/xdg-go v0.0.0-20160329195404-372ccc2180da/go.mod h1:dywSSi3sMtJn2IjiYfJciP9tjVVeIVRa7AE7N5WLUBo= -github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= -github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/nsf/termbox-go v1.1.0 h1:R+GIXVMaDxDQ2VHem5vO5h0mI8ZxLECTUNw1ZzXODzI= +github.com/nsf/termbox-go v1.1.0/go.mod h1:T0cTdVuOwf7pHQNtfhnEbzHbcNyCEcVU4YPpouCbVxo= diff --git a/message.go b/message.go index c07d499..5d74e52 100644 --- a/message.go +++ b/message.go @@ -3,7 +3,7 @@ package main import ( "time" - "github.com/br0xen/termbox-util" + termboxUtil "git.bullercodeworks.com/brian/termbox-util" termbox "github.com/nsf/termbox-go" ) diff --git a/model.go b/model.go index fabf2d8..f5cbb8d 100644 --- a/model.go +++ b/model.go @@ -5,7 +5,7 @@ import ( "strings" "time" - todotxt "github.com/br0xen/go-todotxt" + todotxt "git.bullercodeworks.com/brian/go-todotxt" ) // diskListChanged returns true if the task list in todo.txt diff --git a/screen_about.go b/screen_about.go index 679c461..17708f5 100644 --- a/screen_about.go +++ b/screen_about.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/br0xen/termbox-screen" - "github.com/br0xen/termbox-util" + termboxScreen "git.bullercodeworks.com/brian/termbox-screen" + termboxUtil "git.bullercodeworks.com/brian/termbox-util" termbox "github.com/nsf/termbox-go" ) diff --git a/screen_main.go b/screen_main.go index 4c90c71..48bbdf4 100644 --- a/screen_main.go +++ b/screen_main.go @@ -6,9 +6,9 @@ import ( "strings" "time" - todotxt "github.com/br0xen/go-todotxt" - "github.com/br0xen/termbox-screen" - "github.com/br0xen/termbox-util" + todotxt "git.bullercodeworks.com/brian/go-todotxt" + termboxScreen "git.bullercodeworks.com/brian/termbox-screen" + termboxUtil "git.bullercodeworks.com/brian/termbox-util" termbox "github.com/nsf/termbox-go" ) diff --git a/screen_task.go b/screen_task.go index 77acfcb..f6e5b24 100644 --- a/screen_task.go +++ b/screen_task.go @@ -6,9 +6,9 @@ import ( "strings" "time" - todotxt "github.com/br0xen/go-todotxt" - "github.com/br0xen/termbox-screen" - "github.com/br0xen/termbox-util" + todotxt "git.bullercodeworks.com/brian/go-todotxt" + termboxScreen "git.bullercodeworks.com/brian/termbox-screen" + termboxUtil "git.bullercodeworks.com/brian/termbox-util" termbox "github.com/nsf/termbox-go" ) @@ -89,9 +89,9 @@ func (screen *TaskScreen) HandleKeyEvent(event termbox.Event) int { } if event.Key == termbox.KeyEnter { screen.editing = true - screen.inputField.SetTitle(screen.fieldLabels[screen.cursor] + ": ") + //screen.inputField.SetTitle(screen.fieldLabels[screen.cursor] + ": ") screen.inputField.SetValue(screen.GetFieldValue(screen.cursor)) - screen.inputField.SetActive(true) + //screen.inputField.SetActive(true) return screen.Id() } else if event.Key == termbox.KeyBackspace || event.Key == termbox.KeyBackspace2 || event.Ch == 'h' || event.Key == termbox.KeyArrowLeft { @@ -217,7 +217,7 @@ func (screen *TaskScreen) handleEditingKeyEvent(event termbox.Event) int { } } screen.editing = false - screen.inputField.SetActive(false) + //screen.inputField.SetActive(false) } else { if screen.inputField.HandleEvent(event) { diff --git a/task_ops.go b/task_ops.go index 0f29162..c6fdf1c 100644 --- a/task_ops.go +++ b/task_ops.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - todotxt "github.com/br0xen/go-todotxt" + todotxt "git.bullercodeworks.com/brian/go-todotxt" ) func (a *AppState) opListTasks(args []string) int { @@ -19,6 +19,9 @@ func (a *AppState) opListTasks(args []string) int { filterString = strings.Join(args, " ") a.TaskList = a.getFilteredList(filterString) } + + a.TaskList.Sort(todotxt.SORT_USEFULNESS_ASC) + for _, v := range *a.TaskList { fmt.Println(a.getTaskString(v)) lastIdx++