Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-05-09 08:46:17

super8914
Member
Registered: 2015-05-09
Posts: 5

Disable mouse highlight on task swithing

Hello!

Is it possible to disable the mouse highlight on task switching (Alt+Tab)?

I found it *very* confusing, because I rely a lot on the keyboard, and when the mouse happens to be in the center of the screen, there are going to be three types of highlights: mouse, current task, and current task+mouse.

Thanks!

Offline

#2 2015-05-09 14:19:03

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

Re: Disable mouse highlight on task swithing

Hello and welcome.

Since the tabwin-button is a GTKButton, you can theme it (this is based on the work from this thread). Using the Greybird theme as a base for my example below, the following code in your ~/.gtkrc-2.0 file might accomplish what you are looking for:

##############################################################################
### tabwin transparency tweak
style "tab-win-tweak" 
{
      fg[NORMAL]        = "#444444"
      fg[PRELIGHT]      = "#444444"
      fg[SELECTED]      = "#ffffff"
      fg[INSENSITIVE]   = "#444444"
      fg[ACTIVE]        = "#ffffff"
      engine "pixmap"
        {
                image
                {
                        function                = BOX
                        recolorable             = TRUE
                        state                   = PRELIGHT
                        file                    = "panel-button-hover.png"
                        border                  = { 1, 1, 0, 0 }
                        stretch                 = TRUE
                }
                image
                {
                        function                = BOX
                        recolorable             = TRUE
                        state                   = ACTIVE
                        file                    = "panel-button-hover.png"
                        border                  = { 1, 1, 0, 0 }
                        stretch                 = TRUE
                }
                image
                {
                        function                = BOX
                        recolorable             = TRUE
                        state                   = NORMAL
                        file                    = "panel-button-hover.png"
                        border                  = { 1, 1, 0, 0 }
                        stretch                 = TRUE
                }
               image
                {
                        function                = BOX
                        recolorable             = TRUE
                        state                   = INSENSITIVE
                        file                    = "panel-button-hover.png"
                        border                  = { 1, 1, 0, 0 }
                        stretch                 = TRUE
                }
                image
                {
                        function                = BOX
                        recolorable             = TRUE
                        state                   = SELECTED
                        file                    = "panel-button-hover.png"
                        border                  = { 1, 1, 0, 0 }
                        stretch                 = TRUE
                }                    
        }
}
widget "xfwm4-tabwin*GtkButton*" style "tab-win-tweak"

You will need to download this image file and save it as panel-button-hover.png in your home directory.

This will in-effect remove all highlighting from the tabwin buttons.
The font highlighting, however, is a different beast. I used the "fg" parameters to do my best to match the font colour with the alt-tab background colour so it appears invisible (ie. doesn't change colour if mouse is over it). The font will only change colour (fg[SELECTED] or fg[ACTIVE]) if it is the currently active one through the cycle event.

If you're using another theme other than Greybird, you may need to adjust the color values for the fg parameters to match.

Last edited by ToZ (2015-05-14 18:22:45)


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 2015-05-14 17:35:22

super8914
Member
Registered: 2015-05-09
Posts: 5

Re: Disable mouse highlight on task swithing

Wow, many thanks!!!

One last thing - when the mouse is in the way, the name of the application shows, and it also overrides the white color of the currently selected-by-keyboard.

Is there any way to eliminate also this last trace?

Thanks!!

Offline

#4 2015-05-14 18:20:52

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

Re: Disable mouse highlight on task swithing

Oops, missed that one. Change:

fg[ACTIVE]        = "#444444"

...to be the same colour as fg[SELECTED]. In my example above, that would be:

fg[ACTIVE]        = "#ffffff"

I'll edit my code snippet above to reflect this.


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 2015-05-14 19:04:05

super8914
Member
Registered: 2015-05-09
Posts: 5

Re: Disable mouse highlight on task swithing

It worked - thanks!

Offline

#6 2016-06-26 10:59:13

xaccrocheur
Member
Registered: 2012-05-24
Posts: 6

Re: Disable mouse highlight on task swithing

This task switcher mouse interaction is a nightmare for me (and everyone I know that experienced it) The single biggest flaw of the whole WM ergonomics which is otherwise really nice and fine-tunable.

Are there people that use Alt+Tab+LMB to switch tasks anyway? And why should their workflow break (yes, break. The mouse rollover breaks the task switcher, as it is) ours?

Offline

#7 2016-06-26 14:06:20

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

Re: Disable mouse highlight on task swithing

xaccrocheur wrote:

And why should their workflow break (yes, break. The mouse rollover breaks the task switcher, as it is) ours?

How exactly does the mouse rollover break workflow and/or the task switcher?


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

#8 2016-08-31 14:19:29

andz433
Member
Registered: 2016-08-31
Posts: 1

Re: Disable mouse highlight on task swithing

after some trial based on some searching, I found that

        Xfwm4TabwinWidget::alpha = 1.0			# is for the opacity of widget. I make this opaque to make next less complicating
									# I left other Xfwm4TabwinWidget:: setting as is.

	bg[NORMAL] = shade (0.0, @bg_color_dark)		# widget background color
	bg[SELECTED] = shade (0.85, @selected_bg_color)	# color of selected item using keyboard
	bg[PRELIGHT] = shade (0.0, @bg_color_dark)		# color of item with mouse hovering on it, which we want to make it 'disappear'
	bg[ACTIVE] = @selected_bg_color				# when keyboard and mouse focus on the same item

	fg[NORMAL] = @base_color			# color of widget (bottom) text 
	fg[PRELIGHT] = @base_color			# text color of item under mouse hover
	fg[SELECTED] = '#ffffff'			# text color of selected item
	fg[ACTIVE] = @base_color			# text color of item where our mouse and keyboard meet

        font_name = "bold"				# if you also want make the widget text (bottom) also bold

	engine "murrine" {
		# We don't need anything. but maybe some
		roundness = 10		# to make item border rounded
}

when Xfwm4TabwinWidget::alpha set less than 1 the item with mouse over will be more visible. especially with shade more than 0.0
Maybe you can try to give rgba value to bg[PRELIGHT]

I also try it on greybird theme. I don't know with other theme. Hope this help.

Offline

#9 2017-04-13 07:26:00

dalf
Member
Registered: 2017-04-13
Posts: 2

Re: Disable mouse highlight on task swithing

I found the mouse also very disturbing on task switching (alt+tab).
The link to the ToZ image is not working. Is there another way to disable the mouse?
I'm using xfce 4.12.

Offline

#10 2017-04-13 09:51:06

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

Re: Disable mouse highlight on task swithing

The image is a simple transparent image. You can create one, say 24x24, with background set to transparent and use that. Or here is the image uploaded again:
panel-button-hover.png
Right-click and save image as.


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 2017-04-18 08:33:56

dalf
Member
Registered: 2017-04-13
Posts: 2

Re: Disable mouse highlight on task swithing

Thank you ToZ, it's working as expected.
I just commented out the "active" and "selected" section so there is still a background around the selected item.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.013 seconds, 8 queries executed - Memory usage: 588.95 KiB (Peak: 605.8 KiB) ]