From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sharon Kimble Subject: pop-up flashing box using org-timer? Date: Wed, 09 Dec 2015 13:32:54 +0000 Message-ID: <878u53px15.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6erk-000854-TO for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 08:33:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6erf-0005eL-Po for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 08:33:08 -0500 Received: from avasout02.plus.net ([212.159.14.17]:59970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6erf-0005dx-JU for emacs-orgmode@gnu.org; Wed, 09 Dec 2015 08:33:03 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: org-mode-email --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I'm using org-timer via "C-c C-x ;" and setting it for 30 minutes for a repetitive job that I'm doing. When it ends it has a small popup which shows its ended but that soon disappears. Is it possible for it to show a flashing popup that will show even if I'm not an org-mode buffer? Like in the code block showing at the end? I am using the following code for showing appointments that are, and have just, occurred. Is it possible for this code be adapted to show a similar popup that flashes like this does please? Thanks Sharon. =2D-8<---------------cut here---------------start------------->8--- #+BEGIN_SRC emacs-lisp (appt-activate t) ;; 5 minute warning (setq appt-message-warning-time '15) (setq appt-display-interval '5) #+END_SRC [2014-11-14 Fri 11:43] #+BEGIN_SRC emacs-lisp (defun djcb-popup (title msg &optional icon sound) ;; http://emacs-fu.blogspot.co.uk/2009/11/showing-pop-ups.html "Show a popup if we're on X, or echo it otherwise; TITLE is the title of the message, MSG is the context. Optionally, you can provide an ICON and a sound to be played" (interactive) (when sound (shell-command (concat "mplayer -really-quiet " sound " 2> /dev/null"))) (if (eq window-system 'x) (shell-command (concat "notify-send " (if icon (concat "-i " icon) "") " '" title "' '" msg "'")) ;; text only version (message (concat title ": " msg)))) (djcb-popup "Warning" "The end is near" "/usr/share/icons/test.png" "/usr/share/sounds/beep.ogg") ;; the appointment notification facility (setq appt-message-warning-time 15 ;; warn 15 min in advance appt-display-mode-line t ;; show in the modeline appt-display-format 'window) ;; use our func (appt-activate 1) ;; active appt (appointment notification) (display-time) ;; time display is required for this... ;; update appt each time agenda opened (add-hook 'org-finalize-agenda-hook 'org-agenda-to-appt) ;; our little fa=C3=A7ade-function for djcb-popup (defun djcb-appt-display (min-to-app new-time msg) (djcb-popup (format "Appointment in %s minute(s)" min-to-app) msg "/usr/share/icons/gnome/32x32/status/appointment-soon.png" )) ;; "/usr/share/sounds/ubuntu/stereo/phone-incoming-call.ogg" (setq appt-disp-window-function (function djcb-appt-display)) ;; you might also want to set: (setq org-agenda-skip-unavailable-files t) ;; so these warnings won't annoy the little remember-frame ;; also: I have noted infrequent problems when using ElScreen ;; (the wrong frame might be chosen for Remember in about 10% of the cases) #+END_SRC [2014-11-14 Fri 12:07] #+BEGIN_SRC emacs-lisp (defun my-appt-disp-window (min-to-app new-time msg) (save-window-excursion (async-shell-command (concat "/usr/bin/zenity --info --title=3D'Appointment' --text=3D'" = msg "'") nil nil))) #+END_SRC [2014-11-14 Fri 11:44] =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk Debian 8.0, fluxbox 1.3.7, emacs 24.5.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWaC2GAAoJEDaBgBkK+INbtasQALdmlo5FKkn3Xq/iXHJNuJvv gaQHtjBOm7uyBNcmECGZrBydR6m3cmU53uQxwpQJOvL4IMkQSX34yiUiSwMPmqjA /rrRsv/7SizkOErN5sQUI6MZeC/GTIZpthxbMq0O63Hfp0+GiFnai5iBAvA6fz+z 8A0GXInn+IWKVb/KG7NebdxJT/gliC9QkfgiaFEzzl8xyqyz3NWWbwrwwFSiICA6 QYp9YsGNv1s+cyGq4SJiwsKfrVQQ2I5+U1uBHcbbwn9srbqCMG1pFT5tmLjPgvlD aOFWU2W+MoysvADfs3DeX43nPo46kUuaLKChKMQPAAinKrtmbTGawWS9gcirtwRB WnqT4+TlXzg0+s3f+WrfaUSnc8q5gC/9486H2rnevd9k0zKpvGcrr0I/n/uZhM6v J8Xdzilsv7jt3kSOLPpOTkoMZjSb0fhgO5zDIDtotFnlwFb1DTX6tw0nyKGLBBd8 37hCdY3wLs2gADKUMnRBct40h3s2VTE87jVfo5I92TEfXjXJGSZaK4iKXuaXATAp G7yTFb1SULyhHPQKhZiAnkL4JL4LE9GdclyVEFARgRyr/ZFGy8CmE+E30cgMsihJ MuWIlkr1H/1z3KLDbDJKTQY9eNYLz4bbbJyQ1EMfnHHPMvCbiEe1nO6MfZQSUAiw Y/6uthpahPsr/rzWIjCx =7DRd -----END PGP SIGNATURE----- --=-=-=--