activities.el
activities.el copied to clipboard
Show the name of the current activity in an associated buffer's mode-line
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.
Easy to do yourself:
(push '(activities-mode
(:eval (when-let ((cur (activities-current)))
(activities-name-for cur))))
mode-line-misc-info)
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)
Sure, seems like a fine idea. Patches welcome, or I'll intend to get to it Eventually(TM).
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.
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).
See #103.
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.
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).