Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back Super + Page Up/Down to switch workspaces #7

Open
arrufat opened this issue Apr 8, 2021 · 10 comments
Open

Add back Super + Page Up/Down to switch workspaces #7

arrufat opened this issue Apr 8, 2021 · 10 comments
Labels
backlog Low priority enhancement New feature or request

Comments

@arrufat
Copy link

arrufat commented Apr 8, 2021

First, thank you for working on this project, I really like vertical layout and was really sad to see it go with GNOME 40.

So, the feature request is about making the following extra key bindings that we had in the previous GNOME versions:

  • Super (+ Shift) + Page Up/Down = Ctrl + Alt (+ Shift) + Page Up/Down

Where Shift was used to carry the focused window when switching workspaces.

Again, thank you so much for this extension, it's a life-saver!

@romgrk
Copy link
Contributor

romgrk commented Apr 8, 2021

They may not appear in the shortcuts UI, but using dconf editor you cant set them directly in the /org/gnome/desktop/wm/keybindings/ schema.

@m2-farzan
Copy link

Following the hint by @romgrk I got to these commands for getting Page-Up & Page-Down to work:

dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-up "['<Super>Page_Up', '<Control><Alt>Up']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-down "['<Super>Page_Down', '<Control><Alt>Down']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-left "['<Super><Alt>Left', '<Control><Alt>Left']"
dconf write /org/gnome/desktop/wm/keybindings/switch-to-workspace-right "['<Super><Alt>Right', '<Control><Alt>Right']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-up "['<Super><Shift>Page_Up', '<Control><Shift><Alt>Up']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-down "['<Super><Shift>Page_Down', '<Control><Shift><Alt>Down']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-left "['<Super><Shift><Alt>Left', '<Control><Shift><Alt>Left']"
dconf write /org/gnome/desktop/wm/keybindings/move-to-workspace-right "['<Super><Shift><Alt>Right', '<Control><Shift><Alt>Right']"

To undo it:

dconf reset /org/gnome/desktop/wm/keybindings/switch-to-workspace-up
dconf reset /org/gnome/desktop/wm/keybindings/switch-to-workspace-down
dconf reset /org/gnome/desktop/wm/keybindings/switch-to-workspace-left
dconf reset /org/gnome/desktop/wm/keybindings/switch-to-workspace-right
dconf reset /org/gnome/desktop/wm/keybindings/move-to-workspace-up
dconf reset /org/gnome/desktop/wm/keybindings/move-to-workspace-down
dconf reset /org/gnome/desktop/wm/keybindings/move-to-workspace-left
dconf reset /org/gnome/desktop/wm/keybindings/move-to-workspace-right

As a feature, maybe it'd be nice set have this run automatically upon enabling/disabling the extension, but I don't have enough experience with extensions to have a good judgement or contribute to the code.

@romgrk
Copy link
Contributor

romgrk commented Apr 8, 2021

It would be a bit tricky, depending on if the user rebinds the shortcuts to something other than the defaults. We could try to intercept the workspace-left/right signal though.

@RensAlthuis
Copy link
Owner

We could probably allow the user to set these in the extension settings, since this is already working I don't think it has priority. I'll keep the issue open.

@RensAlthuis RensAlthuis added backlog Low priority enhancement New feature or request labels Apr 9, 2021
@thopri
Copy link

thopri commented May 1, 2021

Would also like this implemented but the comment from m2-farzan has helped me apply a fix manually so thanks! P.s. nice extension I much prefer the vertical layout.

@jakesco
Copy link

jakesco commented May 3, 2021

This was the first thing I looked for after installing. Might be nice to pin this issue, or put some of m2-farzan's comment into the readme for better visibility.

@RensAlthuis
Copy link
Owner

@jakesco Ah yeah, fair point. I'll make sure to add it later today.

@hute37
Copy link

hute37 commented May 6, 2021

dconf setting didn't work for me in Fedora 34,
with gsettings i had no problems:

My Settings:
I removed <Alt> and <Ctrl-Alt> keyboard shortcuts that conflicts with remote emulation (X2Go/nomachine)

vertical

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "['<Super>Page_Up']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super>Page_Down']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Super><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Super><Alt>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "['<Super><Shift>Page_Up']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "['<Super><Shift>Page_Down']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Super><Shift><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Super><Shift><Alt>Right']"

horizontal

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-left "['<Super>Page_Up', '<Super><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-right "['<Super>Page_Down', '<Super><Alt>Right']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-up "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-down "[]"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-left "['<Super><Shift>Page_Up', '<Super><Shift><Alt>Left']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-right "['<Super><Shift>Page_Down','<Super><Shift><Alt>Right' ]"

reset (dconf version)

dconf reset org.gnome.desktop.wm.keybindings switch-to-workspace-up
dconf reset org.gnome.desktop.wm.keybindings switch-to-workspace-down
dconf reset org.gnome.desktop.wm.keybindings switch-to-workspace-left
dconf reset org.gnome.desktop.wm.keybindings switch-to-workspace-right
dconf reset org.gnome.desktop.wm.keybindings move-to-workspace-up
dconf reset org.gnome.desktop.wm.keybindings move-to-workspace-down
dconf reset org.gnome.desktop.wm.keybindings move-to-workspace-left
dconf reset org.gnome.desktop.wm.keybindings move-to-workspace-right

@benscruton
Copy link

You can also bring them back into the Settings UI -- at least for my system (Fedora 34), you can find the relevant keybindings in /usr/share/gnome-control-center/keybindings/50-mutter-navigation.xml. In the XML, the options to navigate to a workspace up/ down (as well as the options to move a window to a workspace up/down) are listed, but have a "hidden=true" property on them. You can edit it with root privileges to remove that "hidden" property (or set it to false), and then you can edit the shortcuts with the graphical UI like before.

@ajfclark
Copy link

ajfclark commented Dec 7, 2021

Firstly, thank you so much for writing this extension. Horizontal workspaces on two wide monitors are absolutely awful.

The dconf bindings above are helpful to complete the fix and enable the hotkeys that make sense.

If it's hard to integrate them into the package, perhaps they could be listed in the configuration widget for the extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Low priority enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants