[WIP] Task editing
This commit is contained in:
@ -21,9 +21,12 @@ type Keymap struct {
|
||||
SetProject key.Binding
|
||||
Select key.Binding
|
||||
Insert key.Binding
|
||||
Tag key.Binding
|
||||
Undo key.Binding
|
||||
StartStop key.Binding
|
||||
}
|
||||
|
||||
// TODO: use config values for key bindings
|
||||
// NewKeymap creates a new Keymap.
|
||||
func NewKeymap() *Keymap {
|
||||
return &Keymap{
|
||||
@ -102,9 +105,19 @@ func NewKeymap() *Keymap {
|
||||
key.WithHelp("insert", "Insert mode"),
|
||||
),
|
||||
|
||||
Tag: key.NewBinding(
|
||||
key.WithKeys("t"),
|
||||
key.WithHelp("tag", "Tag"),
|
||||
),
|
||||
|
||||
Undo: key.NewBinding(
|
||||
key.WithKeys("u"),
|
||||
key.WithHelp("undo", "Undo"),
|
||||
),
|
||||
|
||||
StartStop: key.NewBinding(
|
||||
key.WithKeys("s"),
|
||||
key.WithHelp("start/stop", "Start/Stop"),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,11 @@ type Styles struct {
|
||||
Form *huh.Theme
|
||||
TableStyle TableStyle
|
||||
|
||||
ColumnFocused lipgloss.Style
|
||||
ColumnBlurred lipgloss.Style
|
||||
ColumnInsert lipgloss.Style
|
||||
|
||||
// TODO: make color config completely dynamic to account for keyword., project., tag. and uda. colors
|
||||
Active lipgloss.Style
|
||||
Alternate lipgloss.Style
|
||||
Blocked lipgloss.Style
|
||||
@ -100,6 +105,10 @@ func NewStyles(config *taskwarrior.TWConfig) *Styles {
|
||||
|
||||
styles.Form = formTheme
|
||||
|
||||
styles.ColumnFocused = lipgloss.NewStyle().Width(30).Height(50).Border(lipgloss.DoubleBorder(), true)
|
||||
styles.ColumnBlurred = lipgloss.NewStyle().Width(30).Height(50).Border(lipgloss.HiddenBorder(), true)
|
||||
styles.ColumnInsert = lipgloss.NewStyle().Width(30).Height(50).Border(lipgloss.DoubleBorder(), true).BorderForeground(styles.Active.GetForeground())
|
||||
|
||||
return styles
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user