space-bar icon indicating copy to clipboard operation
space-bar copied to clipboard

[FEATURES REQUEST] Allow customizing the keyboard shortcuts

Open BlackOpsDown opened this issue 1 year ago • 3 comments

I love this extension on Fedora Gnome. One issue is that I launch apps using the Super Key + numbers that are pinned to the dash. The extension uses the same keybinding to switch to workspace. Is there any way I can customize the keybindings with the extension?

BlackOpsDown avatar Aug 27 '24 09:08 BlackOpsDown

Hi @BlackOpsDown!

Currently the shortcuts cannot be customized with the extension's own preferences dialog, however, they are controlled by GSettings. The following script should update the shortcuts (in this example to Super+Alt+1...9)

#!/usr/bin/env bash

PREFIX="<Super><Alt>"

export GSETTINGS_SCHEMA_DIR=::$HOME/.local/share/gnome-shell/extensions/space-bar@luchrioh/schemas

for i in $(seq 1 9); do
    gsettings set \
        org.gnome.shell.extensions.space-bar.shortcuts activate-$i-key \
        "['$PREFIX$i']"
done

To view / edit shortcuts visually, you can use the command

GSETTINGS_SCHEMA_DIR=::$HOME/.local/share/gnome-shell/extensions/space-bar@luchrioh/schemas dconf-editor /org/gnome/shell/extensions/space-bar/shortcuts/

christopher-l avatar Aug 31 '24 15:08 christopher-l

Hi @christopher-l move to work space does not work. <Shift-Super-{1,9}> How to overide with <Alt + Super>? OS: Linux archlinux 6.10.7-arch1-1 DE: GNOME Thanks.

dunneeee avatar Sep 02 '24 12:09 dunneeee

This is actually a standard keybinding of GNOME which space-bar just sets. Here is a version of the script that lets you change both keybindings:

#!/usr/bin/env bash

PREFIX_SWITCH="<Super><Alt>"
PREFIX_MOVE="<Super><Alt><Shift>"

export GSETTINGS_SCHEMA_DIR=::$HOME/.local/share/gnome-shell/extensions/space-bar@luchrioh/schemas

for i in $(seq 1 9); do
    gsettings set \
        org.gnome.shell.extensions.space-bar.shortcuts activate-$i-key \
        "['$PREFIX_SWITCH$i']"
    gsettings set \
        org.gnome.desktop.wm.keybindings move-to-workspace-$i \
        "['$PREFIX_MOVE$i']"
done

christopher-l avatar Sep 07 '24 11:09 christopher-l