From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: just-the-text Emacs frame (was: Emacs as a desktop environment)
Date: Sat, 28 May 2011 12:49:59 -0500 [thread overview]
Message-ID: <874o4ebtq0.fsf_-_@lifelogs.com> (raw)
In-Reply-To: m37h9bdz3m.fsf@verona.se
I just want to display some text, nothing else. How about this (based
on your code) to show some arbitrary text in a popup (no menus,
modeline, etc., just the buffer is visible)? I think it will DTRT
whether the frame is shown already or not. I can use this to show the
indicators, icons, and status messages.
#+begin_src lisp
(require 'battery)
(require 'timeclock)
(defvar popup-info-frame)
(defun popup-info-string ()
(format "%s\n%s\n%s\n%s"
(format-time-string "%H:%M %Y-%m-%d" (current-time))
(battery-format battery-echo-area-format (funcall
battery-status-function))
(timeclock-status-string)
(shell-command-to-string "nmcli -p dev")))
(defun popup-info ()
(interactive)
(popup-info--1 " *popup status*"))
(defun popup-info--1 (bufname)
(with-current-buffer (get-buffer-create bufname)
(make-local-variable 'popup-info-frame)
(if (and (boundp 'popup-info-frame)
popup-info-frame
(member popup-info-frame (frame-list)))
(select-frame popup-info-frame)
(let ((default-frame-alist '((minibuffer . nil)
(width . 20)
(border-width . 0)
(menu-bar-lines . 0)
(tool-bar-lines . 0)
(unsplittable . t)
(left-fringe . 0))))
(switch-to-buffer-other-frame bufname)
(setq popup-info-frame (selected-frame))))
(erase-buffer)
(setq mode-line-format nil)
(redraw-modeline)
(insert (popup-info-string))))
#+end_src
Let me know what you think. It supports any number of status buffers by
name and behaves correctly even if the frame is closed.
Thanks!
Ted
next prev parent reply other threads:[~2011-05-28 17:49 UTC|newest]
Thread overview: 130+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 1:05 Emacs as a desktop environment Ted Zlatanov
2011-05-25 7:31 ` joakim
[not found] ` <87ei3n1dph.fsf@mid.gehheimdienst.de>
2011-05-25 10:28 ` Ted Zlatanov
2011-05-25 16:45 ` PJ Weisberg
2011-05-25 16:33 ` Ken Raeburn
2011-05-25 17:44 ` Tom Tromey
2011-05-25 19:26 ` Evans Winner
2011-05-25 21:58 ` Lennart Borgman
2011-05-25 22:15 ` David Kastrup
2011-05-25 22:27 ` Lennart Borgman
2011-05-25 23:04 ` Christophe Poncy
2011-05-26 0:18 ` Ken Raeburn
2011-05-26 0:37 ` Stefan Monnier
2011-05-26 5:45 ` Ulrich Mueller
2011-05-27 1:50 ` Stephen J. Turnbull
2011-05-28 0:09 ` Nix
2011-05-28 10:25 ` Thien-Thi Nguyen
2011-05-28 10:44 ` Nix
2011-05-28 16:14 ` David De La Harpe Golden
2011-05-30 8:34 ` Julien Danjou
2011-05-25 22:08 ` Nix
2011-05-25 23:57 ` Ken Raeburn
2011-05-26 7:27 ` joakim
2011-05-26 8:33 ` Thierry Volpiatto
2011-05-26 14:16 ` BBDB in the GNU ELPA (was: Emacs as a desktop environment) Ted Zlatanov
2011-05-26 23:12 ` BBDB in the GNU ELPA Glenn Morris
2011-05-27 3:48 ` Stephen J. Turnbull
2011-05-27 12:53 ` Ted Zlatanov
2011-05-28 14:57 ` Bernt Hansen
2011-05-30 12:57 ` Ted Zlatanov
2011-05-30 18:08 ` Glenn Morris
2011-05-30 19:27 ` Štěpán Němec
2011-05-30 19:42 ` Glenn Morris
2011-05-31 9:56 ` Ted Zlatanov
2011-05-25 23:35 ` Emacs as a desktop environment Ted Zlatanov
2011-05-26 1:33 ` Tom Tromey
2011-05-26 15:36 ` PJ Weisberg
2011-05-26 16:29 ` Ted Zlatanov
2011-05-26 0:58 ` Eric M. Ludlam
2011-05-26 15:21 ` Ted Zlatanov
2011-05-26 16:38 ` joakim
2011-05-27 12:50 ` Ted Zlatanov
2011-05-28 8:10 ` joakim
2011-05-28 17:49 ` Ted Zlatanov [this message]
2011-05-28 20:01 ` Emacs24 Mobile (was: Re: just-the-text Emacs frame (was: Emacs as a desktop environment)) Mohsen BANAN
2011-05-29 1:44 ` Emacs24 Mobile Ted Zlatanov
2011-05-29 2:00 ` T.V. Raman
2011-05-30 17:11 ` Lars Magne Ingebrigtsen
2011-05-28 20:18 ` just-the-text Emacs frame Thierry Volpiatto
2011-05-28 22:06 ` Ted Zlatanov
2011-05-29 10:12 ` joakim
2011-06-01 18:01 ` Ted Zlatanov
2011-06-02 2:43 ` Leo
2011-06-02 4:05 ` Eli Zaretskii
2011-06-02 13:15 ` Ted Zlatanov
2011-06-02 15:43 ` Mohsen BANAN
2011-06-02 17:41 ` Ted Zlatanov
2011-06-02 20:19 ` Mohsen BANAN
2011-06-02 21:06 ` Ted Zlatanov
2011-06-03 15:09 ` Mohsen BANAN
2011-06-03 20:56 ` Ted Zlatanov
2011-06-03 22:31 ` Mohsen BANAN
2011-06-02 18:00 ` Eli Zaretskii
2011-06-02 18:53 ` GTK "decorated" and "deletable" properties (was: just-the-text Emacs frame) Ted Zlatanov
2011-06-02 20:49 ` Eli Zaretskii
2011-06-02 20:59 ` GTK "decorated" and "deletable" properties Ted Zlatanov
2011-06-03 15:21 ` Jan Djärv
2011-06-03 16:29 ` Ted Zlatanov
2011-06-03 16:39 ` Eli Zaretskii
2011-06-03 17:39 ` Ted Zlatanov
2011-06-03 17:39 ` Jan Djärv
2011-06-03 18:09 ` Ted Zlatanov
2011-06-10 20:58 ` sending X client messages from Emacs (was: GTK "decorated" and "deletable" properties) Ted Zlatanov
2011-06-10 21:27 ` sending X client messages from Emacs Chong Yidong
2011-06-10 21:49 ` Ted Zlatanov
2011-06-03 2:40 ` just-the-text Emacs frame Leo
2011-06-03 11:36 ` Ted Zlatanov
2011-06-03 11:55 ` Leo
2011-06-03 15:15 ` Ted Zlatanov
2011-06-04 3:51 ` Leo
2011-06-04 7:02 ` Eli Zaretskii
2011-06-03 9:24 ` Julien Danjou
2011-06-03 11:40 ` Ted Zlatanov
2011-06-03 13:16 ` Julien Danjou
2011-06-03 15:11 ` Ted Zlatanov
2011-06-03 15:27 ` Julien Danjou
2011-06-03 16:30 ` Jan Djärv
2011-06-03 17:37 ` Ted Zlatanov
2011-06-03 18:06 ` Jan Djärv
2011-06-03 19:08 ` Ted Zlatanov
2011-06-06 8:38 ` Julien Danjou
2011-06-06 9:23 ` Jan Djärv
2011-06-06 9:34 ` Jan Djärv
2011-06-06 10:00 ` Julien Danjou
2011-06-06 20:52 ` Ted Zlatanov
2011-06-07 8:25 ` Julien Danjou
2011-06-10 16:28 ` Ted Zlatanov
2011-06-10 17:35 ` T.V. Raman
2011-06-10 18:57 ` chad
2011-06-10 20:53 ` Ted Zlatanov
2011-06-11 8:04 ` Philipp Haselwarter
2011-06-11 10:45 ` Ted Zlatanov
2011-06-07 15:54 ` org-src.el begin_src/end_src fontification may have been broken recently (was: just-the-text Emacs frame) Ted Zlatanov
2011-06-07 18:02 ` org-src.el begin_src/end_src fontification may have been broken recently Stefan Monnier
2011-06-07 18:17 ` Ted Zlatanov
2011-06-07 18:05 ` Jambunathan K
2011-06-07 19:02 ` Ted Zlatanov
2011-06-10 0:20 ` Ted Zlatanov
2011-06-10 16:23 ` Ted Zlatanov
2011-06-10 19:51 ` Thierry Volpiatto
2011-06-10 23:00 ` Bastien
2011-06-11 10:41 ` Ted Zlatanov
2011-06-11 10:53 ` Ted Zlatanov
2011-06-11 18:16 ` Julien Danjou
2011-06-12 22:24 ` Ted Zlatanov
2011-06-13 8:05 ` Štěpán Němec
2011-06-13 14:38 ` Eric Schulte
2011-06-13 15:36 ` Ted Zlatanov
2011-06-14 9:41 ` Julien Danjou
2011-06-14 16:08 ` Ted Zlatanov
2011-06-15 8:12 ` Julien Danjou
2011-06-15 14:55 ` Ted Zlatanov
2011-06-20 13:32 ` Bastien
2011-06-06 8:32 ` just-the-text Emacs frame Julien Danjou
2011-06-06 9:22 ` Jan Djärv
2011-05-26 17:50 ` Emacs as a desktop environment Tom Tromey
2011-06-13 17:36 ` taking over global key events (X, NS, W32) (was: Emacs as a desktop environment) Ted Zlatanov
2011-06-13 18:41 ` taking over global key events (X, NS, W32) joakim
2011-06-13 19:22 ` Mathias Dahl
2011-06-13 20:34 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874o4ebtq0.fsf_-_@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.