activities.el icon indicating copy to clipboard operation
activities.el copied to clipboard

Show the name of the current activity in an associated buffer's mode-line

Open shipmints opened this issue 1 year ago • 8 comments

Would be nice especially if one uses frames without decorations (no titles) and/or hides the tab-bar. Also useful in the absence of the frame title also changing when the activity changes.

shipmints avatar Jun 18 '24 20:06 shipmints

Easy to do yourself:

(push '(activities-mode
        (:eval (when-let ((cur (activities-current)))
                 (activities-name-for cur))))
      mode-line-misc-info)

jdtsmith avatar Jun 18 '24 21:06 jdtsmith

Good interim solution, @jdtsmith. Perhaps a mode-line lighter in the future. Maybe even clickable to select an activity, restore (in a new frame) if not activated, switch to selected set of frames and tabs/activity group if activated?

I refactored to add-to-list since it checks for duplicates (and can also add at the end vs push which seems to always be at the list head).

(setq my:activity-mode-line-active-name
      '((:eval (when-let ((cur (activities-current)))
                 (concat (activities-name-for cur) " ")))) ; separator for visual concordance
(add-to-list 'mode-line-misc-info my:activity-mode-line-active-name)

shipmints avatar Jun 18 '24 23:06 shipmints

Sure, seems like a fine idea. Patches welcome, or I'll intend to get to it Eventually(TM).

alphapapa avatar Jun 19 '24 06:06 alphapapa

I set something like this up for when maximized, but then found it annoying to have on all the windows in an activity. So "selected window modeline" tricks would likely be needed.

jdtsmith avatar Jun 19 '24 15:06 jdtsmith

Taking a stab at a PR that introduces mode-line to the code base and adding a menu bar menu that might help newbies for discussion (seems innocuous to have it).

shipmints avatar Jun 20 '24 15:06 shipmints

See #103.

shipmints avatar Jun 20 '24 18:06 shipmints

Please note that I've chosen the terminology "live" for an open activity in the menu help items. Not sure there's an agreed terminology here. Feel free to change it if you don't like it, or I can change it.

shipmints avatar Jun 20 '24 18:06 shipmints

Now that there might be official mode-line support, I wonder if it would be worth adding a flag to indicate activities-actitivies status to aid people's expectations. There could be a dirty flag that would be shown in the mode line that could be cleared when saving is successful. It could be a single character such as "*" or could be two faces, one indicating dirty, the other indicating clean. Perhaps in conjunction with window hooks ala window-configuration-change-hook or window-state-change-hook or window-state-change-functions? This might also help optimize saving, avoiding saves when nothing has changed merely because the timer fired (perhaps this is already implemented, I'm still learning the code).

shipmints avatar Jun 20 '24 21:06 shipmints