A few minor updates
[syinit] / 17-emchat-sy.el
index 0071f74..abf2ba4 100644 (file)
@@ -1,11 +1,11 @@
 ;; 17-emchat-sy.el --- EMchat Settings   -*- Emacs-Lisp -*-
 
-;; Copyright (C) 2007 - 2012 Steve Youngs
+;; Copyright (C) 2007 - 2013 Steve Youngs
 
 ;;     Author: Steve Youngs <steve@sxemacs.org>
 ;; Maintainer: Steve Youngs <steve@sxemacs.org>
 ;;    Created: <2007-12-02>
-;; Time-stamp: <Wednesday Jan 30, 2013 17:20:27 steve>
+;; Time-stamp: <Friday May 29, 2015 20:53:39 steve>
 ;;   Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
 ;;   HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/17-emchat-sy.html>
 ;;   Git Repo: git clone http://git.sxemacs.org/syinit
@@ -82,6 +82,8 @@
  emchat-emphasis-enabled-flag t
  emchat-history-enabled-flag t
  emchat-log-fill-column 72
+ emchat-port 5190
+ emchat-server "login.icq.com"
  emchat-smiley t
  emchat-track-enable t
  emchat-track-indicator-type 'char
  emchat-save-log-on-exit-p nil
  emchat-log-debug-flag t
  emchat-user-meta-invisible nil
- emchat-buddy-show-xface t)
+ emchat-buddy-show-avatar t
+ emchat-buddy-xface-foreground "black"
+ emchat-buddy-xface-background "red")
 
 ;; PulseAudio only seems to work if X is running
 (when (getenv "DISPLAY")
   (setq  emchat-use-sound-flag t))
 
-(customize-set-variable 'emchat-auto-away-timeout 1200)
+;; Lets not auto-away.
+(customize-set-variable 'emchat-auto-away-timeout 0)
 
 (emchat-world-update)
 
 ;:*=======================
 ;:* Addons/extensions
 
-(defvar **mpd-var-Title* nil)
-(defvar **mpd-var-Artist* nil)
 (defun sy-emchat-now-playing ()
   "Return title/artist of current song."
   (interactive)
-  (let ((song (if **mpd-var-Title*
-                 (format "%s --- [%s]"
-                         **mpd-var-Title*
-                         **mpd-var-Artist*)
-               "The Sounds of Silence --- [Marcel Marceau]")))
-    (format "NP: %s" song)))
+  (format "NP: %s" (mpd-now-playing)))
 
 (defun sy-emchat-send-now-playing ()
   "Send title/artist of current song."
@@ -297,12 +295,19 @@ time, beer, song, help."))
   (require 'emchat-wharf)
   (setq emchat-wharf-frame-use-p t)
   (setq emchat-wharf-notice-riece-flag t)
-  (push (cons 'left 1578) emchat-wharf-frame-props)
-  (push (cons 'top 289) emchat-wharf-frame-props)
+  (push (cons 'left 1690) emchat-wharf-frame-props)
+  (push (cons 'top 5) emchat-wharf-frame-props)
   (push (cons 'internal-border-width 4) emchat-wharf-frame-props)
   ;; `override-redirect' means no WM decorations, and you also get
-  ;; sticky and always on top
-  ;(push (cons 'override-redirect t) emchat-wharf-frame-props)
+  ;; sticky and always on top and skip pagers and task lists etc.
+  ;; The downside is that often new windows will appear underneath
+  ;; because the WM/DE has no knowledge of its existence.  I don't
+  ;; use this in KDE because you can easily get the same effect
+  ;; without the downside with KDE's "Window Rules".  I also don't
+  ;; use this in Sawfish for similar reasons.
+  (unless (or (string= (getenv "KDE_FULL_SESSION") "true")
+             (string= (getenv "SAWFISH_IS_RUNNING") "true"))
+    (push (cons 'override-redirect t) emchat-wharf-frame-props))
   (push (cons 'border-width 1) emchat-wharf-frame-props)
   (push (cons 'border-color "red") emchat-wharf-frame-props)
   (add-hook 'emchat-new-message-hook #'emchat-wharf-inc-messages)