1

I use org-mode with org-pomodoro.

Status bar at the bottom get's pretty long. Like:

-:**- leo.org   Top L50 (org Ind Helm drag Abbrev) [6:08 (bug 459487 - [Gtk] Replace deprecated ......)] [Pomodoro-19:42] 

and it's only fully visable if there is only a single window(/frame).

Is it possible to display the status bar in the title bar of emacs instead? (I am using the GUI version of emacs.)

Or alt. Can I shorten it somehow myself via hacks? E.g only show the first xyz chars, and only show the last xyz chars and trim out the middle if it doesn't all fit?

3

It's certainly possible to get the mode line into the frame's title.

(set-frame-parameter
        nil 'title (format-mode-line mode-line-format))

You'll have to figure out when and how to update it.

  • Thank you. I"ll try to come up with a timer of some sort to do this. – Leo Ufimtsev Feb 12 '15 at 20:59
4

You can set frame-title-format to control the template used for frame titles.

If you really want the frame title to match the mode-line, try this:

(setq frame-title-format mode-line-format)

This approach differs from using set-frame-parameter in a couple ways:

  • The title format is used to set the title on all frames, rather than on a single frame.
  • The title format gets re-evaluated automatically. If you set the title parameter directly you will need some way to update it manually when something changes.

Since your specific example is about org-pomodoro, you could consider adding the current pomodoro timer to the frame title rather than copying the whole mode line up there. For example:

(setq frame-title-format '("" invocation-name "@" system-name " " org-pomodoro-mode-line))

With this approach you should not need any timers or anything else.

  • I would need to hack into org-pomodoro to do that. What if the file get's updated, wouldn't I have to add the code back in again? I did ask the author to add a hook for this function thou. – Leo Ufimtsev Feb 12 '15 at 21:40
  • I was suggesting you use advice. If you aren't familiar with this approach, try M-x describe-function advice-add. This would not require changes when org-pomodoro is updated, unless the authoer removed that org-pomodoro-update-mode-line function altogether. – glucas Feb 12 '15 at 21:45
  • The frame title is automatically updated regularly from the frame-title-format. If you use this approach I don't think you need to worry about advice or explicitly updating the title at all. Just set the format to include the info you want. See gnu.org/software/emacs/manual/html_node/elisp/… for more. – glucas Feb 12 '15 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.