Re: Some stuff to discuss about

Christopher Roy Bratusek <zanghar freenet de> writes:

> Next:
> It's about a "generic interface to change the titlebar font color",
> currently that's not possible, only if the theme has an option like
> that, but I guess it would require (partial)rewrite of all themes.
> For this also making all themes "active theming"/"custom stuff in
> titlebar" compatible could be considered.
> "all themes" means all themes shipped with sawfish, here.

Not sure if this is exactly what you're talking about, but you can set
the font color on the frames using '(set-frame-part 'title 'foreground
"color1" "color2"), you could add that to the sawfish-ui with code
similar to the attached script

...put the decompressed script in a sawfish loadpath (~/.sawfish/lisp) and (require
'title-color) in .sawfish[/]rc, and the title font color options will be
available in sawfish-ui:appearance

this wont last past a sawfish restart, though you could add something
like: (if use-custom-font-color (update-font-color)) to .sawfish[/].rc
to keep it lasting...


(require 'sawfish.wm.frames)
(require 'sawfish.wm.custom)

;(define (clear-font-color)

(defun update-font-color ()
  (if use-custom-font-color
	(set-frame-part-value 'title 'foreground (list frame-font-inactive-color frame-font-focus-color) 't)
	(mapc (lambda (x) (rebuild-frame x)) (managed-windows)))
      (rplacd (assoc 'foreground (assoc 'title override-frame-part-classes) nil))
      (mapc (lambda (x) (rebuild-frame x)) (managed-windows)))))

(defcustom frame-font-focus-color "white"
  "Font color for active frames"
  :type color
  :group appearance
  :depends use-custom-font-color
  :after-set (lambda () (update-font-color)))

(defcustom frame-font-inactive-color "black"
  "Font color for inactive frames"
  :type color
  :group appearance
  :depends use-custom-font-color
  :after-set (lambda () (update-font-color)))

(defcustom use-custom-font-color '()
  "Use custom font colors for frames"
  :type boolean
  :group appearance
  :after-set (lambda () (update-font-color)))
Matthew Love

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]