Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-12-29 22:17:00

dowx
Member
Registered: 2018-12-29
Posts: 31

.gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

Hi,
I've used two tweaks by editing local .gtkrc-2.0 file. But it doesn't work in new installation of Xubuntu 18.10. I need help in cofiguring these 2 things:
1. maximum length of a button in task list

style "xfce-tasklist-style"
{

XfceTasklist::max-button-length = 1500 

}
class "XfceTasklist" style "xfce-tasklist-style"

2. Scrollbar size

style "scroll"
{
    GtkScrollbar::slider-width        = 20
    GthScrollbar::stepper-size        = 20
}

class "*" style "scroll"

My guess is I need to edit some gtk3 files?

Offline

#2 2018-12-29 23:00:10

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

Hello and welcome.

Xubuntu 18.10 ships with mostly gtk3 versions of Xfce components, so yes, you need to edit the gtk3 files using proper CSS. The override file to use is generally ~/.config/gtk-3.0/gtk.css.

Try the following css to replace your gtk2 configs:

* {
        -XfceTasklist-max-button-length: 1500;
        -GtkScrollbar-has-backward-stepper: true;
        -GtkScrollbar-has-forward-stepper: true;
}
scrollbar slider {
     min-width: 20px;
}

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2018-12-29 23:34:07

dowx
Member
Registered: 2018-12-29
Posts: 31

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

Wow, thank you for quick solution. Works nice like before.

Let me ask another 2 questions (these are just minor issues):
3. Is it possible to turn off popups when mouse pointer is over task list buttons?
4. I added Activator to panel that runs my script. When I add icon to the button - it's not centered, just slight moved to left side. Bug?

Offline

#4 2018-12-30 00:45:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

dowx wrote:

3. Is it possible to turn off popups when mouse pointer is over task list buttons?

I don't think you can disable tooltips per widget. You can make all tooltips invisible with:

tooltip { opacity: 0 }

4. I added Activator to panel that runs my script. When I add icon to the button - it's not centered, just slight moved to left side. Bug?

What are you referring to when you say "Activator"? A launcher? Can you post a picture?

Also, which distro are you using? And which GTK Appearance theme?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2018-12-30 00:59:19

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

ToZ wrote:

which distro are you using?

dowx wrote:

new installation of Xubuntu 18.10.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#6 2018-12-30 01:02:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

lol. Sorry about that...


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2018-12-30 09:09:49

dowx
Member
Registered: 2018-12-29
Posts: 31

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

ToZ wrote:
dowx wrote:

3. Is it possible to turn off popups when mouse pointer is over task list buttons?

I don't think you can disable tooltips per widget. You can make all tooltips invisible with:

tooltip { opacity: 0 }

It disables tooltips in file manager too, so a little overkill smile It'd be nice to have individual option like launchers have.

ToZ wrote:

4. I added Activator to panel that runs my script. When I add icon to the button - it's not centered, just slight moved to left side. Bug?

What are you referring to when you say "Activator"? A launcher? Can you post a picture?

Yes, I meant launcher. I use Breeze-Dark but it's the same in every theme. Look at the red button - icon is slightly moved to top left. This is not window decoration, it's 3 launchers on panel.
moved-Icon.png

Last edited by dowx (2018-12-30 10:19:54)

Offline

#8 2018-12-30 11:32:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

dowx wrote:
ToZ wrote:
dowx wrote:

3. Is it possible to turn off popups when mouse pointer is over task list buttons?

I don't think you can disable tooltips per widget. You can make all tooltips invisible with:

tooltip { opacity: 0 }

It disables tooltips in file manager too, so a little overkill smile It'd be nice to have individual option like launchers have.

You can create an enhancement request over at the bug tracker.

ToZ wrote:

4. I added Activator to panel that runs my script. When I add icon to the button - it's not centered, just slight moved to left side. Bug?

What are you referring to when you say "Activator"? A launcher? Can you post a picture?

Yes, I meant launcher. I use Breeze-Dark but it's the same in every theme. Look at the red button - icon is slightly moved to top left. This is not window decoration, it's 3 launchers on panel.
https://i.ibb.co/hCRy0LB/moved-Icon.png

This one's a little tougher. There is not easy way to access all launchers at the same time (that I am aware of) so you need to identify each one by name in the CSS. To get the launcher name, right-click the panel, select Panel > Panel Preferences and go to the Items tab. Hover over the launcher item and you will see the name. Then create a CSS entry for each item like:

#launcher-10* { margin-left: 1px; margin-top: 1px }
#launcher-11* { margin-left: 1px; margin-top: 1px }
#launcher-12* { margin-left: 1px; margin-top: 1px }

...changing the launcher name where necessary and tweaking the 1px if necessary.

Edit: BTW, I don't see this offset with the Greybird theme on my system.

Last edited by ToZ (2018-12-30 11:33:52)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2018-12-30 12:26:13

dowx
Member
Registered: 2018-12-29
Posts: 31

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

It works. I wonder if you are one of developers or just like tweaking things around smile

ToZ wrote:

Edit: BTW, I don't see this offset with the Greybird theme on my system.

When I switch to Greybird it becomes less noticeable. In fact Breeze-Dark "highlights" it a bit. Also, the larger the icon the less visible the offset is.

I'm an old Fluxbox user with old habits. Maybe you can help me with configuring last one thing making xfce more like my old fluxbox setup smile I wonder if the buttons on task list can be activated automatically when mouse's cursor is hovering over. Without clicking.

Offline

#10 2018-12-30 15:07:09

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,482

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

dowx wrote:

It works. I wonder if you are one of developers or just like tweaking things around smile

A bit of both. I maintain the xfce4-genmon-plugin and I like tweaking.

I'm an old Fluxbox user with old habits. Maybe you can help me with configuring last one thing making xfce more like my old fluxbox setup smile I wonder if the buttons on task list can be activated automatically when mouse's cursor is hovering over. Without clicking.

Unfortunately, this functionality doesn't exist. However, the following script will replicate this functionality:

#!/bin/bash
# a tool that left clicks the mouse when it has hovered over a certain area for a specific amount of time

# are that there might be a windows button
areaX1=30
areaX2=1200
areaY1=0
areaY2=24

# mouse hover time before click action is sent
DWELLTIME=1.5

# make sure that only one instance of this script is running per user
lockfile=/tmp/.autoclick.$USER.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
   trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
   echo "autoclickDEBUG: Locking succeeded" >&2

while true
do
 #get mouse position
 mdata=$(xdotool getmouselocation)

 #extract x/y coordinates
 mx=$(echo "$mdata"|cut -f1 -d' '|cut -d: -f2)
 my=$(echo "$mdata"|cut -f2 -d' '|cut -d: -f2)

 #check for position within pre-defined area
 if [[ $mx -gt $areaX1 ]] && [[ $mx -lt $areaX2 ]]; then
  if [[ $my -gt $areaY1 ]] && [[ $my -lt areaY2 ]]; then
   sleep $DWELLTIME
   mdata2=$(xdotool getmouselocation)
   mx2=$(echo "$mdata2"|cut -f1 -d' '|cut -d: -f2)
    my2=$(echo "$mdata2"|cut -f2 -d' '|cut -d: -f2)
   if [[ $mx -eq $mx2 ]] && [[ $my -eq $my2 ]]; then
    xdotool click 1
   fi
  fi
 fi
done

# can't create lockfile - notify user and quit
else

   echo "autoclickDEBUG: Lock failed, check for existing process and/or lock file and delete - exiting." >&2
   exit 1
fi  

exit 0

...make sure to change the areaX1/X2/Y1/Y2 and DWELLTIME variables to suit. The area variables should define the geometry points or area that the window buttons plugin can cover. DWELLTIME is the time that the mouse should hover before the click event is sent.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2018-12-30 17:13:33

dowx
Member
Registered: 2018-12-29
Posts: 31

Re: .gtkrc-2.0 doesn't work anymore - how can I cofigure 2 things?

It's not exactly replicating this functionality. It keeps clicking every DWELLTIME seconds, so it's hiding and showing window every DWELLTIME seconds. You would need to firstly check if the window is currently focused and then click if it's not, otherwise it keeps blinking the window. I think it'd be too forceful for CPU, because even at current shape the task manager shows me plus 12% of CPU usage (conky shows up to 1% though?). Anyway, I've lived without this functionality for few years so I'll pass. Thank you for sharing your knowledge and your time.
BTW: I hope you didn't waste your time writing this code for me, just got it out of your drawer smile

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 11 queries executed - Memory usage: 599.38 KiB (Peak: 616.22 KiB) ]