Re: Some stuff to discuss about



Christopher Roy Bratusek <zanghar freenet de> writes:

> Am Samstag, den 26.09.2009, 17:10 +0200 schrieb Christopher Roy Bratusek:
>
>  Am Samstag, den 26.09.2009, 17:08 +0200 schrieb Christopher Roy
>  Bratusek:
>  > Am Sonntag, den 20.09.2009, 20:21 -0600 schrieb Matthew Love:
>  > > Matthew Love <matth love gmail com> writes:
>  > >
>  > > I guess this one is a bit better at restoring original colors...
>  > >
>  >
>  > This one's great. It'll go in.
>  > ... Changing Buttons/Frame Colors independently of the theme (like the
>
>  should have been "Button Order/Frame Colors"
>
>  > above one changes the Font Color indepedently of the theme) would be
>  > another thing for 3.0 (unless someone willing to write for 1.6).
>  >
>  > Thanks for your work,
>  > Chris
>
>
> Hi Matthew,
>
> first here's a patch to integrate the feature:
>
> *************
> diff --git a/lisp/sawfish/wm/frames.jl b/lisp/sawfish/wm/frames.jl
> index 1dc6cd4..0c0a196 100644
> --- a/lisp/sawfish/wm/frames.jl
> +++ b/lisp/sawfish/wm/frames.jl
> @@ -53,7 +53,7 @@
>   set-frame-part-value
>   def-frame-class
>   define-frame-class))
> -    
> +
>   (open rep
>   rep.system
>   rep.regexp
> @@ -161,6 +161,35 @@ that overrides settings set elsewhere.")
>  (splash . unframed))
>   "Frame type fallbacks.")
>
> +  ;; Re-Coloring Options for Themes
> +  (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)))
> +
> +  (define (update-font-color)
> +    (if use-custom-font-color
> +      (set-frame-part-value 'title 'foreground (list
> frame-font-inactive-color frame-font-focus-color) 't)
> +      (progn
> +        (rplacd (assoc 'foreground (assoc 'title
> override-frame-part-classes) nil))
> +        (rplaca (assoc 'foreground (assoc 'title
> override-frame-part-classes) nil))))
> +    (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 +594,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
> ****************
>
> I'm currently working on fully renaming sawfish-ui to sawfish-config
> (Docs, Code, blah), so I would like to ask you to do the following two
> things:
>
> Next it produces the following compiler-warning (just make it shut-up,
> please)
>
> sawfish/wm/frames.jl:189: In function `update-font-color':
> sawfish/wm/frames.jl:189: warning: more than two parameters to `assoc';
> rest ignored
> sawfish/wm/frames.jl:190: warning: more than two parameters to `assoc';
> rest ignored
>
> Also it produces an error message on sawfish-startup:
>
> Bad argument: #<closure update-font-color>, (), 1
> Bad argument: #<closure update-font-color>, (), 1
>
> Thanks in advance,
> Chris

Yes, I'll see what I can do, thanks!

Cheers

-- 
Matthew Love



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