Comments (7)
Ah, since it doesn’t propertize text in the title, you probably also want to always treat persp-modestring-short
as t
if persp-show-modestring
is 'frame-title
. I use the short form anyway, so I didn’t notice initially.
from perspective-el.
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 …
from perspective-el.
FWIW this seems to work for me:
(setq frame-title-format '("%b" (:eval (when-let ((persp (frame-parameter nil 'persp--curr))) (format " [%s]" (persp-name persp))))))
(but of course relying on non-public things is not ideal)
from perspective-el.
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 persp-modestring-dividers
), but always treats it as the short modestring, since there’s no propertization in the frame title.
from perspective-el.
@sellout: Have you tried using (persp-current-name)
in place of (frame-parameter nil 'persp--curr)
?
I would merge in a PR that added persp-frame-title
and included documentation about how to use it.
from perspective-el.
@sellout: Have you tried using
(persp-current-name)
in place of(frame-parameter nil 'persp--curr)
?
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 would merge in a PR that added
persp-frame-title
and included documentation about how to use it.
I think for a PR, adding (const :tag "Frame Title" frame-title)
to persp-show-modestring
would be the way to go. I’m happy to submit one (with @cmm tagged as co-author), unless @cmm would like to submit one themselves.
from perspective-el.
@sellout happy to have helped (I guess, not really sure?), feel free to go ahead :)
from perspective-el.
Related Issues (20)
- Marginalia annotation not working with `persp-switch-to-buffer*` HOT 4
- persp-mode does not get activated during startup HOT 3
- helm mini frame errors saying no such buffer HOT 5
- Recently released Emacs 28.1 uses `C-x x` for buffer actions, thus conflicting with the prefix for perspective-el HOT 10
- [feature request] - Option to not save modes for buffers HOT 1
- Creating pipe: Too many open files HOT 5
- Can't setup perspective layout at startup HOT 4
- Perspective breaks after enable-theme HOT 5
- Perspective hides buffers when running Emacs as server HOT 4
- Current perspective name not being propertized in the mode-line HOT 4
- `C-x 5 2 ` different behaviour when running perspective with daemon HOT 2
- Perspective.el wipes out perspectives when a emacsclient frame is closed. HOT 2
- `persp-delete-frame` alters windows of other frames when killing frame with dedicated window HOT 1
- Issue with using ediff and perspective [sorted] HOT 6
- Compare to tabspaces? HOT 2
- Support eshell state save and restore
- Would it support different themes per frame? HOT 2
- Loading perspectives upon opening emacs HOT 5
- ibuf-ext.el not loaded HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perspective-el.