-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display perspective in frame title #192
Comments
Ah, since it doesn’t propertize text in the title, you probably also want to always treat |
Ok, my quick experiment is not so successful – it sets the title for all frames to whatever perspective the selected frame is in. But I’m sure there’s a way around that … |
FWIW this seems to work for me:
(but of course relying on non-public things is not ideal) |
Thanks, @cmm, that looks like it works for me. I extracted it into a function: (defun persp-frame-title ()
(when-let ((persp (frame-parameter nil 'persp--curr)))
(let ((open (nth 0 persp-modestring-dividers))
(close (nth 1 persp-modestring-dividers)))
(concat open persp close))))
(setq frame-title-format '((:eval (persp-frame-title)) " %b")) It matches the existing rendering (e.g., using |
@sellout: Have you tried using I would merge in a PR that added |
I hadn’t. It looks like (defun persp-frame-title ()
(let ((open (nth 0 persp-modestring-dividers))
(close (nth 1 persp-modestring-dividers)))
(concat open (persp-current-name) close))) works just as well.
I think for a PR, adding |
@sellout happy to have helped (I guess, not really sure?), feel free to go ahead :) |
Since there is one (or merged) active perspective in a frame, displaying it in the title makes more sense than in the mode-line or header. So, suggesting another possible value for
persp-show-modestring
:'frame-title
.There’s no
global-frame-title
to append it to, but searchingframe-title-format
for "%b" and adding an entry just before it, (like((:edit (persp-mode-line)) "%b")
in the simplest case) might do it.As an added bonus, when I go to share a window with Google Meet, it can be hard to find the right window to select (they are all just random buffer names), so having the perspective for that frame in the title would be very helpful.
The text was updated successfully, but these errors were encountered: