;; 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: <Monday Jun 25, 2012 13:53:34 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
;;; Experimental stuff
-;; EMchat works great in a tty, but some setttings I use are best
+;; EMchat works great in a tty, but some settings I use are best
;; suited for X, so this just turns them off.
(defun tty-im-setup ()
"Set some things so I can use EMchat/Riece in tty."
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)
(when emchat-use-sound-flag
(setq emchat-audio-device
- ;(make-audio-device 'alsa :device "plughw:0,0"))
- ;(make-audio-device 'ao :driver "alsa"))
- ;; Pulseaudio is CRAP!!
+ ;(make-audio-device 'alsa))
(make-audio-device 'pulse
:client "SXEmacs::EMchat"
:stream "EMchat::Stream"
:role "phone"))
- ;; SXEmacs doesn't like current ffmpeg
- (setq emchat-media-driver 'sox)
+ ;; SXEmacs doesn't like current ffmpeg, and SoX is dodgy ATM too
+ (setq emchat-media-driver 'sndfile)
+ (setq default-media-stream-volume 50)
(setq emchat-sound-alist
'((auth-sound . "Auth.wav")
(buddy-sound . "Online.wav")
;:*=======================
;:* 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."
(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)