Harmonize Switcher & Panel -- How? Ideas?

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon
Post Reply
markfilipak
Level 5
Level 5
Posts: 591
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Harmonize Switcher & Panel -- How? Ideas?

Post by markfilipak » Mon Mar 12, 2018 12:24 am

The Panel: In addition to a Tray and the Menu button, the Panel displays a tabbed list of the open windows. Unfortunately, there doesn't seem to be a way to cycle through the windows (change tab focus) via the keyboard.

The Switcher: The default for 'System Settings' > 'Hardware' > 'Keyboard' > 'General' > 'Cycle through open windows' is Alt+Tab. Alt+Tab opens a Switcher -- I don't know the actual name for it. When the Switcher is open, Alt+Tab cycles through the open window list & Shift+Alt+Tab cycles backwards through the open window list.

The Switcher's fine, but there are 2 problems:
1, The Switcher's window-order is different from the Panel's window order, and
2, The Switcher's window-order gets rearranged depending on which window last had the focus.
I find this behavior unbearable. Except for switching between only 2 windows, the behavior inhibits predictable use of the Switcher when 3 or more windows are open.

Actually, if you think about it, the Switcher and the Panel are redundant. The Switcher is accessable via keyboard, the Panel is accessable via mouse, but otherwise, they do the same thing.

I recon there's 2 possible fixes and I wonder whether anyone can help implement either fix.
Fix #1 is to remap Alt+Tab to open the Panel and (somehow) cycle through the Panel's window tab list.
Fix #2 is to force the Switcher to display a window list that's frozen to (in the same order as) the Panel's window list.

Any ideas?

Warm Regards,
Mark.
Please don't refer me to github. Their words: "This repository isn't a support forum"
Acer Predator G9-792 > Win10-1511 > VBox > Mint18.2 + Cinnamon -or-
Dell Inspiron 15-3567 > Win10-1709 > VBox > Mint18.2 + Cinnamon

Cosmo.
Level 23
Level 23
Posts: 17823
Joined: Sat Dec 06, 2014 7:34 am

Re: Harmonize Switcher & Panel -- How? Ideas?

Post by Cosmo. » Mon Mar 12, 2018 6:39 am

Your second "fix" would break the possibility to switch quickly between the last to focused windows by short pressing alt-tab.

Besides that: The alt-tab switcher and the window list applet inside(!) of the panel (the panel itself does nothing) are 2 quite different things. You can rearrange the icons in the window list applet by dragging them with the mouse. But they will never jump around, just because the history order has been changed.

markfilipak
Level 5
Level 5
Posts: 591
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Harmonize Switcher & Panel -- How? Ideas?

Post by markfilipak » Mon Mar 12, 2018 12:07 pm

Cosmo. wrote:
Mon Mar 12, 2018 6:39 am
Your second "fix" would break the possibility to switch quickly between the last to focused windows by short pressing alt-tab.
Hi Cosmo. I assume "last to focused windows" should be "last two focused windows", and I assume by "short pressing" you mean pressing just once. Switching between 2 windows (only) -- back and forth -- is the only way the alt-tab is useful. If there are a half-dozen windows open and I try to switch between several of them, alt-tab becomes too difficult to use because the window order keeps changing. I realize that the developers thought that rearranging the windows in a history order would be neet, but it's actually too difficult to use. A fixed order (in which I vary the number of alt-tab taps I use between windows -- sort of like drumming) would actually be easier to use; it is easier to mentally visualize a fixed order than a changing order. I also realize that Windows Switcher has the same behavior and that the Cinnamon Switcher is following what Microsoft did, but I find it also useless in Windows.
Besides that: The alt-tab switcher and the window list applet inside(!) of the panel (the panel itself does nothing) are 2 quite different things. You can rearrange the icons in the window list applet by dragging them with the mouse. But they will never jump around, just because the history order has been changed.
Confirmed: They are 2 quite different things. Confirmed: The Panel window list does not "jump around". That's a good thing. I wish the Switcher window list behaved in exactly the same way.

I'm working around this by setting Panel to always display and using only the Panel to switch between windows, but I'd rather the Panel retract of course so that it doesn't take up window space when it's not needed.

This is not a show-stopper. I was just hoping someone knew of a way, 1, to make the Switcher a fixed list (no history rearranging), or 2, to bind alt-tab to the Panel instead of the Switcher. I'm sort of a Linux newbie and don't know what other, more experienced Linux-users do.
Please don't refer me to github. Their words: "This repository isn't a support forum"
Acer Predator G9-792 > Win10-1511 > VBox > Mint18.2 + Cinnamon -or-
Dell Inspiron 15-3567 > Win10-1709 > VBox > Mint18.2 + Cinnamon

User avatar
smurphos
Level 8
Level 8
Posts: 2258
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Harmonize Switcher & Panel -- How? Ideas?

Post by smurphos » Mon Mar 12, 2018 12:35 pm

https://superuser.com/questions/579053/ ... n-cinnamon

See the above for a script to switch the autohide behaviour of a particular panel and instructions to link the script to a keyboard shortcut. I've not tested it but it looks like it should do the job.

You could assign alt-tab to a similar script and simply leave the switcher menu unassigned.

Re going through the windows list with keyboard shortlists - not sure if that is possible. You can set mousewheel scroll to cycle through the windows list so if you can work out a way to emulate mousewheel scroll in the keyboard you are away.

markfilipak
Level 5
Level 5
Posts: 591
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Harmonize Switcher & Panel -- How? Ideas?

Post by markfilipak » Mon Mar 12, 2018 5:45 pm

Thanks for this. Yes, it seems that it would work ... but ...

There is that note below it that says it no longer works.

The core of the script seems to be this: 'gsettings get org.cinnamon panels-autohide'. But 'panels-autohide' seems to be an antique.
1- I ran 'gsettings' in Terminal:

Code: Select all

$ gsettings help get
Usage:
  gsettings [--schemadir SCHEMADIR] get SCHEMA[:PATH] KEY

Get the value of KEY

Arguments:
  SCHEMADIR A directory to search for additional schemas
  SCHEMA    The name of the schema
  PATH      The path, for relocatable schemas
  KEY       The key within the schema
I see that SCHEMA == 'org.cinnamon', and KEY == 'panels-autohide'.
2- Running 'gsettings get org.cinnamon panels-autohide', in terminal...

Code: Select all

$ gsettings get org.cinnamon panels-autohide
['1:false']
I don't know what to make of that.
3- On a hunch, I searched for files named 'org.cinnamon' && 'key' and got this list:

Code: Select all

/usr/share/glib-2.0/schemas/org.cinnamon.desktop.a11y.keyboard.gschema.xml
/usr/share/glib-2.0/schemas/org.cinnamon.desktop.keybindings.gschema.xml
/usr/share/glib-2.0/schemas/org.cinnamon.desktop.keybindings.media-keys.gschema.xml
/usr/share/glib-2.0/schemas/org.cinnamon.desktop.keybindings.wm.gschema.xml     <-- contains 'tab'
/usr/share/glib-2.0/schemas/org.cinnamon.settings-daemon.plugins.keyboard.gschema.xml
/usr/share/glib-2.0/schemas/org.cinnamon.settings-daemon.plugins.media-keys.gschema.xml
4- Extract from '/usr/share/glib-2.0/schemas/org.cinnamon.desktop.keybindings.wm.gschema.xml' is:

Code: Select all

    <key type="as" name="switch-windows">
      <default><![CDATA[['<Alt>Tab']]]></default>
      <summary>Switch applications</summary>
    </key>
    <key type="as" name="switch-windows-backward">
      <default>[]</default>
      <summary>Reverse switch applications</summary>
    </key>
I'm scratching my head at this point.

I need help. I'm fearful to make any changes without advice from someone who knows this stuff. -- Mark.

PS: Oh, wait! 'panels-autohide' does seem to exist even though I can't find it. Perhaps I will try the script and change the default keybinding.
Stay tuned, but don't post any help until I try the script.

Thanks.
Please don't refer me to github. Their words: "This repository isn't a support forum"
Acer Predator G9-792 > Win10-1511 > VBox > Mint18.2 + Cinnamon -or-
Dell Inspiron 15-3567 > Win10-1709 > VBox > Mint18.2 + Cinnamon

markfilipak
Level 5
Level 5
Posts: 591
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Harmonize Switcher & Panel -- How? Ideas?

Post by markfilipak » Mon Mar 12, 2018 6:28 pm

It does work BUT...

'panels-autohide' seems to be the wrong method. Let me explain...

The normal mode for Panel is to float over the open windows. Toggling 'panels-autohide' causes the Panel to extend/retract, but while it's extended it displaces the open windows which in turn causes a complete screen redraw. When it's retracted, another complete screen redraw. I assume that 'panels-autohide' is the wrong method.There is probably another method that is invoked when mousing over the edge of the screen. That's the method I need to invoke in the script.

I'm now off to search (hack) for that method. If anyone can tell me how I need to change 'gsettings set org.cinnamon panels-autohide' to 'gsettings set org.cinnamon <...what...>', kindly let me know. Thanks!
Please don't refer me to github. Their words: "This repository isn't a support forum"
Acer Predator G9-792 > Win10-1511 > VBox > Mint18.2 + Cinnamon -or-
Dell Inspiron 15-3567 > Win10-1709 > VBox > Mint18.2 + Cinnamon

Post Reply

Return to “Cinnamon”