Gnus development mailing list
 help / color / mirror / Atom feed
From: Ivan Kanis <gnus@kanis.fr>
To: ding@gnus.org
Subject: Gnus' gnu is running backward
Date: Mon, 24 Dec 2007 18:19:45 +0100	[thread overview]
Message-ID: <87zlw0m2mm.fsf@kanis.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 3565 bytes --]

Hello Gnus Tower,

Everytime I start gnus I feel that the splash screen is facing the
wrong way round. Since I read from left to right, a proper running gnu
should be facing right. It gives a reader the feeling that it's moving
forward.

Since I have plenty of spare time I wrote a feature to flip the splash
screen vertically. I have also attached a screenshot. All you need to
do is set gnus-flip-splash-logo to t.

The patch depends on ImageMagick wich will do the flipping.

The patch is against emacs 22.1, if there is any interest in including
it I'll make a CVS patch.

Merry Xmas!

--- gnus.el	(révision 2098)
+++ gnus.el	(copie de travail)
@@ -44,6 +44,7 @@
 (defvar gnus-spam-newsgroup-contents)
 (defvar gnus-spam-process-destinations)
 (defvar gnus-spam-process-newsgroups)
+(defvar gnus-flip-splash-text)
 
 
 (defgroup gnus nil
@@ -307,6 +308,14 @@
   :group 'gnus-start
   :type 'boolean)
 
+(defcustom gnus-flip-splash-logo nil
+  "If non-nil the startup logo will be flipped vertically.
+For people who read from left to right it will appear that the gnu
+running. Ironically it will slow down start up time. This feature
+depends on ImageMagick being installed."
+  :group 'gnus-start
+  :type 'boolean)
+
 (unless (fboundp 'gnus-group-remove-excess-properties)
   (defalias 'gnus-group-remove-excess-properties 'ignore))
 
@@ -1023,6 +1032,7 @@
 			     :background ,(face-foreground 'gnus-splash)
 			     :foreground ,(face-background 'default))))))
        (when image
+         (gnus-flip-splash-image image)
 	 (let ((size (image-size image)))
 	   (insert-char ?\n (max 0 (round (- (window-height)
 					     (or y (cdr size)) 1) 2)))
@@ -1033,7 +1043,7 @@
 	 t))))
    (t
     (insert
-     (format "              %s
+     (gnus-flip-splash-text (format "              %s
           _    ___ _             _
           _ ___ __ ___  __    _ ___
           __   _     ___    __  ___
@@ -1053,7 +1063,7 @@
           __
 
 "
-	     ""))
+	     "")))
     ;; And then hack it.
     (gnus-indent-rigidly (point-min) (point-max)
 			 (/ (max (- (window-width) (or x 46)) 0) 2))
@@ -1070,6 +1080,39 @@
   (setq mode-line-buffer-identification (concat " " gnus-version))
   (set-buffer-modified-p t))
 
+(defun gnus-flip-splash-image (image)
+  "Flip vertically an image, it depends on ImageMagick"
+  (when gnus-flip-splash-logo
+    (let ((temp-file (make-temp-file "gnus")))
+      (when (eq 0 (call-process "convert" nil nil nil "-flop"
+                                (plist-get (cdr image) :file)
+                                temp-file))
+        (message temp-file)
+        (plist-put (cdr image) :file temp-file)))))
+
+(defun gnus-flip-splash-text (text)
+  "Flip text vertically"
+  (if gnus-flip-splash-logo
+      (format "              %s
+           _             _ ___    _
+          ___ _    __  ___ __ ___ _
+          ___  __    ___     _   __
+          _     ___           _
+           _             __ _  _
+           _            __   ___
+            _           __
+             _   _      _
+             _    _      _
+              _    _  _
+                    ___  __
+               _     _ _   _
+                        _   _
+                         _    _
+                          _    _
+                                _
+                                 __ " "")
+    text))
+
 (eval-when (load)
   (let ((command (format "%s" this-command)))
     (when (string-match "gnus" command)


[-- Attachment #2: gnus.jpg --]
[-- Type: image/jpeg, Size: 35784 bytes --]

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]


-- 
Ivan
http://kanis.fr

  "There are two types of people in this world, good and bad. The good
sleep better, but the bad seem to enjoy the waking hours much more."
    -- Woody Allen

             reply	other threads:[~2007-12-24 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-24 17:19 Ivan Kanis [this message]
2010-08-30 22:06 ` Lars Magne Ingebrigtsen

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=87zlw0m2mm.fsf@kanis.fr \
    --to=gnus@kanis.fr \
    --cc=ding@gnus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).