You are not logged in.

#1 2012-05-07 17:27:23

kuba144
Member
Registered: 2012-05-02
Posts: 18

Exception in .gtkrc

Hi,

is there any option to run app with another visual style? Eclipse looks really bad in my VS

Offline

#2 2012-05-07 17:56:24

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Exception in .gtkrc

So you just want to change the looks of your gtk programs if I understand correctly? There are various tools/options to do that; have a look at the GTK wiki page.


Burninate!

Offline

#3 2012-05-07 17:58:29

kuba144
Member
Registered: 2012-05-02
Posts: 18

Re: Exception in .gtkrc

I just want to change visual style (gtk style) for only one application (Eclipse)

Offline

#4 2012-05-08 10:31:59

Nanthiel
Member
From: Slovenia
Registered: 2009-09-20
Posts: 148

Re: Exception in .gtkrc

I think it works if you change the file, run Eclipse, then change it back. This could be automated in a script, something like ...

#!/bin/sh
cd ~
# Assume .gtkrc-2.0-default and .gtkrc-2.0-eclipse exist.
cp .gtkrc-2.0-eclipse .gtkrc-2.0
eclipse &
sleep 10s # Wait for Eclipse to start, not sure if this is necessary.
cp .gtkrc-2.0-default .gtkrc-2.0

Code is untested.

Offline

#5 2012-05-08 10:53:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: Exception in .gtkrc

You can edit your gtk theme file to include per app settings as described here


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2012-05-09 19:08:16

kuba144
Member
Registered: 2012-05-02
Posts: 18

Re: Exception in .gtkrc

Nanthiel wrote:

I think it works if you change the file, run Eclipse, then change it back. This could be automated in a script, something like ...

#!/bin/sh
cd ~
# Assume .gtkrc-2.0-default and .gtkrc-2.0-eclipse exist.
cp .gtkrc-2.0-eclipse .gtkrc-2.0
eclipse &
sleep 10s # Wait for Eclipse to start, not sure if this is necessary.
cp .gtkrc-2.0-default .gtkrc-2.0

Code is untested.

Idea is very nice but it sadly dosen't work. It might be connected with that I use XFCE

You can edit your gtk theme file to include per app settings as described here

I couldn't find specific fragment on that page. Can you point me in which paragraph i can find that?

Offline

#7 2012-05-10 04:20:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: Exception in .gtkrc

To be successful you'll probably want to read the whole page ... it's not that long.  The line directly relevant to having settings specific to a given application is under "widget matches".


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2012-05-10 06:37:34

triplc
Member
From: Hanoi, Vietnam
Registered: 2009-08-23
Posts: 42

Re: Exception in .gtkrc

GTK2_RC_FILES=~/.gtkrc-2.0-alternative /path/to/some/appl

Offline

#9 2012-05-10 06:59:16

kuba144
Member
Registered: 2012-05-02
Posts: 18

Re: Exception in .gtkrc

Nope, tried that already.

If i add this to .gtkrc-2.0:
style "eclipse" {
        font_name = "Sans Condensed 8"
}
class "GtkWidget" style "eclipse"

It change font, but how can i change visual style using "style"?

Offline

#10 2012-05-10 12:25:57

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: Exception in .gtkrc

READ the link.  It's clearly described.  There are complete examples on that page.

Last edited by Trilby (2012-05-10 12:26:25)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#11 2012-05-10 14:35:17

kuba144
Member
Registered: 2012-05-02
Posts: 18

Re: Exception in .gtkrc

I read that part! I tried to make something like
style "eclipse"
{
    widget "*eclipse*" style "Vorta"
}
class "GtkWidget" style "eclipse"
but it does not work (Vorta is the name of visual style)
Also widget "*eclipse*" style "Vorta" give me nothing

Offline

#12 2012-05-10 15:06:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,557
Website

Re: Exception in .gtkrc

I don't know why you nested the style like that.  That is not in any of the examples.

If you already have the style Vorta created and working, then all you need is

widget "<ecclipse window name>.*" style "Vorta"

You will need to get ecclipse's actual window name though.  xprop should do the trick for that.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#13 2012-05-11 10:13:15

kuba144
Member
Registered: 2012-05-02
Posts: 18

Re: Exception in .gtkrc

Hm, sadly it dosen't work sad
I tried with eclipse and other apps too

Offline

Board footer

Powered by FluxBB