[sawfish] Added a way to change the font-color via SawfishConfig independently of what theme is beeing used
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sawfish] Added a way to change the font-color via SawfishConfig independently of what theme is beeing used
- Date: Sat, 26 Sep 2009 19:43:05 +0000 (UTC)
commit 7c1a3631b5570c98cfd80d17cbfed54c5ef02ba2
Author: chrisb <zanghar freenet de>
Date: Sat Sep 26 21:42:01 2009 +0200
Added a way to change the font-color via SawfishConfig independently of what theme is beeing used
ChangeLog | 4 ++++
lisp/sawfish/wm/frames.jl | 18 +++++++++++++++---
lisp/sawfish/wm/user.jl | 8 +++++++-
man/news.texi | 2 ++
4 files changed, 28 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9930a82..68ab448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,10 @@
* po/make-pot: removed --update (intltool + rep = puke)
+ * lisp/sawfish/wm/ext/frames.jl: added customization options for changing font-color
+ *independently* of what frame-style is beeing used
+ -- [Matthew Love, Christopher Bratusek]
+
2009-09-23 Christopher Bratusek <zanghar freenet de>
* man/news.texi: news items for 1.6.0 are partially rewritten [Teika Kazura]
diff --git a/lisp/sawfish/wm/frames.jl b/lisp/sawfish/wm/frames.jl
index 1dc6cd4..6e21d7b 100644
--- a/lisp/sawfish/wm/frames.jl
+++ b/lisp/sawfish/wm/frames.jl
@@ -52,8 +52,9 @@
frame-class-removed-p
set-frame-part-value
def-frame-class
- define-frame-class))
-
+ define-frame-class
+ update-frame-font-color))
+
(open rep
rep.system
rep.regexp
@@ -161,6 +162,17 @@ that overrides settings set elsewhere.")
(splash . unframed))
"Frame type fallbacks.")
+ ;; Re-Coloring Options for Themes
+
+ (define (update-frame-font-color)
+ (if use-custom-font-color
+ (mapc (lambda (fc)
+ (set-frame-part-value fc 'foreground (list frame-font-inactive-color frame-font-focus-color) 't)) (list 'title 'tab))
+ (mapc (lambda (fc)
+ (rplacd (assoc 'foreground (assoc fc override-frame-part-classes)) nil)
+ (rplaca (assoc 'foreground (assoc fc override-frame-part-classes)) nil)) (list 'title 'tab)))
+ (mapc (lambda (x) (rebuild-frame x)) (managed-windows)))
+
(defvar theme-update-interval 60
"Number of seconds between checking if theme files have been modified.")
@@ -565,7 +577,7 @@ deciding which frame type to ask a theme to generate.")
;; (def-frame-class shade-button '((cursor . foo) ...)
;; (bind-keys shade-button-keymap
;; "Button1-Off" 'toggle-window-shaded))
- ;;
+ ;;
;; the idea being that it will only create the frame part if it doesn't
;; exist, it will add all properties from the second argument unless
;; they're already set, then create and initialise the keymap from the
diff --git a/lisp/sawfish/wm/user.jl b/lisp/sawfish/wm/user.jl
index c164d4d..7250e34 100644
--- a/lisp/sawfish/wm/user.jl
+++ b/lisp/sawfish/wm/user.jl
@@ -47,7 +47,8 @@
sawfish.wm.util.display-window
sawfish.wm.util.compat
sawfish.wm.ext.error-handler
- sawfish.wm.ext.fdo-menu)
+ sawfish.wm.ext.fdo-menu
+ sawfish.wm.frames)
(set-binds))
(setq *user-structure* 'user)
@@ -118,6 +119,11 @@
(unless (or batch-mode apps-menu)
(update-saw-menu))
+ ;; apply customized font-colors
+ (require 'sawfish.wm.extras)
+ (if use-custom-font-color
+ (update-frame-font-color))
+
;; use a default theme if none given
(unless (or batch-mode default-frame-style)
(setq default-frame-style fallback-frame-style))
diff --git a/man/news.texi b/man/news.texi
index 1e4cd84..077c4bb 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -79,6 +79,8 @@ Shrink-yank functions and @code{send-to-workspace}.
@item Added FDO (freedesktop.org) application-menu-implementation [Matthew Love]
+ item Added a way to change the font-color via SawfishConfig independently of what theme is beeing used [Matthew Love, Christopher Bratusek]
+
@item Sawfish does now support theme-tarballs compressed with XZ (aka LZMA2) or LZMA [Christopher Bratusek]
@item 3 new sawfish-mmc based commands (@code{maximize-unframe}, @code{maximize-reframe} and @code{rename-window}) [Christopher Bratusek]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]