Lisp HUG Maillist Archive

Color theme for LispWorks IDE

Hi,

Does anyone know of an API that I could use to completely theme the Lispworks IDE's editor and the listener? I use the solarized color theme : http://ethanschoonover.com/solarized everywhere else (vim, pycharm etc etc) and would love to have it for LW. 

I found this link: http://permalink.gmane.org/gmane.lisp.lispworks.general/8799, which helps me set the background color programmatically.

What about the other options in  Preferences->Environment->Styles->Colors & Attributes?Can these also be set programmatically? Btw, I also see a colors.db file in Library but I cannot open it. Is this colors.db related to color & attributes or something else?

Regards,
Deepak

--
http://deepaksurti.com
To see a miracle, be the miracle.

Re: Color theme for LispWorks IDE

I have this in my .lispworks file (rather a file that .lispworks loads) that sets some not-too-disgusting colors:

(defun set-pane-background-colors (x)
  (typecase x
    (capi:echo-area-pane
     (setf (capi:simple-pane-background x) (color:make-rgb 1.0 .67 0.67)))
    (capi:collector-pane
     (setf (capi:simple-pane-background x) (color:make-rgb .8 1.0 .8)))
    (capi:listener-pane
     (setf (capi:simple-pane-background x) (color:make-rgb .8 .8 1.0)))
    (capi:editor-pane
     (setf (capi::simple-pane-background x) (color:make-rgb .9 .9 .8)
;           (capi::simple-pane-foreground x) :black
           ))
    (capi:tab-layout
     (mapcar 'set-pane-background-colors (capi:tab-layout-panes x)))
;    (capi:output-pane
;     (setf (capi:simple-pane-background x) :black
;           (capi::simple-pane-foreground x) :white))
    ))

(let ((*HANDLE-WARN-ON-REDEFINITION* :warn)
      (*redefinition-action* :warn))
  (defmethod capi:interface-display :before ((self lw-tools:listener))
    (capi:map-pane-descendant-children
     self 'set-pane-background-colors))
  (defmethod capi:interface-display :before ((self lw-tools:editor))
    (capi:map-pane-descendant-children
     self 'set-pane-background-colors))
  )
Raymond Laning
Principal Systems Engr
Missile Systems
Raytheon Company



520.545.9330
rclaning@raytheon.com

1151 E Hermans Rd
Tucson, AZ 85756    
www.raytheon.com

Raytheon Sustainability

This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive mail for the addressee), you should not use, copy or disclose to anyone this message or any information contained in this message. If you have received this message in error, please so advise the sender by reply e-mail and delete this message. Thank you for your cooperation.






From:        Deepak Surti <dmsurti@gmail.com>
To:        "lisp-hug@lispworks.com" <lisp-hug@lispworks.com>
Date:        10/22/2013 07:40 AM
Subject:        Color theme for LispWorks IDE
Sent by:        owner-lisp-hug@lispworks.com




Hi,

Does anyone know of an API that I could use to completely theme the Lispworks IDE's editor and the listener? I use the solarized color theme : http://ethanschoonover.com/solarized everywhere else (vim, pycharm etc etc) and would love to have it for LW. 

I found this link: http://permalink.gmane.org/gmane.lisp.lispworks.general/8799, which helps me set the background color programmatically.

What about the other options in  Preferences->Environment->Styles->Colors & Attributes?Can these also be set programmatically? Btw, I also see a colors.db file in Library but I cannot open it. Is this colors.db related to color & attributes or something else?

Regards,
Deepak

--
http://deepaksurti.com
To see a miracle, be the miracle.

Re: Color theme for LispWorks IDE

Deepak Surti wrote:
> What about the other options in Preferences->Environment->Styles->Colors &
> Attributes? Can these also be set programmatically?

The items in the "style name" color preferences dropdown correspond to 
certain editor font faces (as in emacs), which can be changed 
programmatically.  For example ("Lisp Comment" item):

(setf editor::*font-lock-comment-face*
       (editor:make-face 'editor::font-lock-comment-face
                          :if-exists :overwrite
                          :foreground (color:make-rgb
                                          (/ #x58 255)
                                          (/ #x6e 255)
                                          (/ #x75 255))
                          :italic-p t))

The MAKE-FACE call is what changes the specified font face (not the setf 
to a variable; not all font faces have corresponding variables).  There 
are a number of font face names, many of which are found in the editor 
source (and which correspond to same-named emacs font face names, IIRC).


Mike

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Color theme for LispWorks IDE

I think you also should specify the platform you use LW on. In the attachment
I include .gtkrc-2.0 I use to change colors when using LW on Linux.  I got that file
from the documentation and examples for LW and changed that file to my needs,
so the content of the file is not perfectly polished by me. Also my color theme is
very simple, only two colors -- I don't use syntax coloring at all, I always turn it off.

Best,
 Art

Re: Color theme for LispWorks IDE

2013/10/22 Deepak Surti:
> Does anyone know of an API that I could use to completely theme the
> Lispworks IDE's editor and the listener? I use the solarized color theme :
> http://ethanschoonover.com/solarized everywhere else (vim, pycharm etc etc)
> and would love to have it for LW.
>
> I found this link:
> http://permalink.gmane.org/gmane.lisp.lispworks.general/8799, which helps me
> set the background color programmatically.
>
> What about the other options in  Preferences->Environment->Styles->Colors &
> Attributes?Can these also be set programmatically? Btw, I also see a
> colors.db file in Library but I cannot open it. Is this colors.db related to
> color & attributes or something else?

I've had something that does this, lingering in my laptop. I've
created a git repository just for the sake of sharing it, and this
question is the perfect excuse:

https://github.com/acelent/lw-editor-color-theme

Just (compile and) load the .lisp file.

Since I don't have a commercial license, I've made it work in the
personal edition, where the podium is already loaded and running.

I haven't yet decided what license to use for the code, but it'll be
something along the lines of LLGPL, or maybe the Boost license. This
is too simple to care much about copyleft, although I'd prefer that
people contibute patches or fork it.

I hope it's useful.

Best regards,

Paulo Madeira

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Color theme for LispWorks IDE

Thanks everyone for the very useful answers. 

I will fork Paulo's repo over the weekend to implement the Solarized theme and submit a pull request.

Regards,
Deepak


On Wed, Oct 23, 2013 at 4:38 AM, Paulo Madeira <acelent@gmail.com> wrote:

2013/10/22 Deepak Surti:
> Does anyone know of an API that I could use to completely theme the
> Lispworks IDE's editor and the listener? I use the solarized color theme :
> http://ethanschoonover.com/solarized everywhere else (vim, pycharm etc etc)
> and would love to have it for LW.
>
> I found this link:
> http://permalink.gmane.org/gmane.lisp.lispworks.general/8799, which helps me
> set the background color programmatically.
>
> What about the other options in  Preferences->Environment->Styles->Colors &
> Attributes?Can these also be set programmatically? Btw, I also see a
> colors.db file in Library but I cannot open it. Is this colors.db related to
> color & attributes or something else?

I've had something that does this, lingering in my laptop. I've
created a git repository just for the sake of sharing it, and this
question is the perfect excuse:

https://github.com/acelent/lw-editor-color-theme

Just (compile and) load the .lisp file.

Since I don't have a commercial license, I've made it work in the
personal edition, where the podium is already loaded and running.

I haven't yet decided what license to use for the code, but it'll be
something along the lines of LLGPL, or maybe the Boost license. This
is too simple to care much about copyleft, although I'd prefer that
people contibute patches or fork it.

I hope it's useful.

Best regards,

Paulo Madeira

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html




--
http://deepaksurti.com
To see a miracle, be the miracle.

Re: Color theme for LispWorks IDE

Once we are on the topic of coloring, I wonder if someone would have a  
quick answer to a question that has been bothering me for some time now.

Have a look at the screen shot.

If we are defining a function using defun (or do a variable assignment  
using a defparameter, or defvar etc) right on the very top level the defun  
gets nicely colored according to the specified setting. However, should it  
be defined within a closure, it loses the color highlights. It is not a  
problem as such, but I find it takes me noticeably longer to orient myself  
in long files when I do not see the defuns highlighted, the whole closure  
starts to look like just a simple top level form without any definitions.

Has anybody handled it? Assistance would be much appreciated.

Yuri
Updated at: 2020-12-10 08:34 UTC