| Commit message (Expand) | Author | Age | Files | Lines |
* | ismax toggling on mouse based action | arg@mmvi | 2006-09-22 | 1 | -0/+2 |
* | patched resizemouse according to sanders remark | arg@mmvi | 2006-09-22 | 1 | -2/+2 |
* | sander check this | arg@mmvi | 2006-09-22 | 1 | -19/+37 |
* | implemented the maximization as I described on the mailinglist, this feels be... | arg@mmvi | 2006-09-22 | 1 | -2/+2 |
* | added visibility check to enternotify as well 1.6 | arg@mmvi | 2006-09-15 | 1 | -1/+1 |
* | removed a bunch of lines through making function signatures more consistent w... | Anselm R. Garbe | 2006-09-12 | 1 | -37/+22 |
* | small change to comments, renamed two set* functions in client.c into update* | Anselm R. Garbe | 2006-09-11 | 1 | -2/+2 |
* | applied Sanders max_and_focus.patch | Anselm R. Garbe | 2006-09-04 | 1 | -4/+4 |
* | simplified buttonpress | Anselm R. Garbe | 2006-09-01 | 1 | -23/+12 |
* | applied sanders patch | Anselm R. Garbe | 2006-09-01 | 1 | -5/+8 |
* | implemented Button2 press on tags for toggletag on the focused client | Anselm R. Garbe | 2006-08-31 | 1 | -2/+9 |
* | simplified configurerequest | Anselm R. Garbe | 2006-08-29 | 1 | -25/+22 |
* | now dwm enforces max screen size also in tiled mode on non-floating clients w... | Anselm R. Garbe | 2006-08-29 | 1 | -13/+14 |
* | fixed | Anselm R. Garbe | 2006-08-29 | 1 | -1/+3 |
* | configurenotify remembers max geom now, and restores this if necessary, howev... | Anselm R. Garbe | 2006-08-29 | 1 | -1/+11 |
* | applied sanders focus_ patches | Anselm R. Garbe | 2006-08-28 | 1 | -1/+1 |
* | applied sanders somepatches.patch | Anselm R. Garbe | 2006-08-28 | 1 | -2/+4 |
* | trying a different configuration | Anselm R. Garbe | 2006-08-25 | 1 | -13/+11 |
* | changed symbols for float/tiled mode, added mouse-driven mode toggle to butto... | Anselm R. Garbe | 2006-08-25 | 1 | -10/+12 |
* | new color stuff/new rendering stuff | Anselm R. Garbe | 2006-08-25 | 1 | -1/+3 |
* | applied Sanders focus_* patches, removed the unnecessary clean-prefix from th... | Anselm R.Garbe | 2006-08-21 | 1 | -0/+2 |
* | changed main event loop | Anselm R.Garbe | 2006-08-15 | 1 | -0/+13 |
* | removed NUMLOCKMASK, added dynamically calculated numlockmask instead | Anselm R.Garbe | 2006-08-14 | 1 | -3/+3 |
* | applied sanders man page patch, rss="s">"month"
)
type Archive struct{}
func init() {
register(Archive{})
}
func (_ Archive) Aliases() []string {
return []string{"archive"}
}
func (_ Archive) Complete(aerc *widgets.Aerc, args []string) []string {
return nil
}
func (_ Archive) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New("Usage: archive <flat|year|month>")
}
widget := aerc.SelectedTab().(widgets.ProvidesMessage)
acct := widget.SelectedAccount()
if acct == nil {
return errors.New("No account selected")
}
msg := widget.SelectedMessage()
store := widget.Store()
archiveDir := acct.AccountConfig().Archive
store.Next()
acct.Messages().Scroll()
switch args[1] {
case ARCHIVE_MONTH:
archiveDir = path.Join(archiveDir,
fmt.Sprintf("%d", msg.Envelope.Date.Year()),
fmt.Sprintf("%02d", msg.Envelope.Date.Month()))
case ARCHIVE_YEAR:
archiveDir = path.Join(archiveDir, fmt.Sprintf("%v",
msg.Envelope.Date.Year()))
case ARCHIVE_FLAT:
// deliberately left blank
}
store.Move([]uint32{msg.Uid}, archiveDir, true, func(
msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done:
aerc.PushStatus("Messages archived.", 10*time.Second)
case *types.Error:
aerc.PushStatus(" "+msg.Error.Error(), 10*time.Second).
Color(tcell.ColorDefault, tcell.ColorRed)
}
})
return nil
}
|