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

Feature: key bindings through a .conf file #350

Open
Heus-Sueh opened this issue Feb 10, 2024 · 5 comments
Open

Feature: key bindings through a .conf file #350

Heus-Sueh opened this issue Feb 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Heus-Sueh
Copy link

(1) Description

I think being able to configure keyboard shortcuts through a .conf file would help a lot in sharing the configuration with other people, It would be cool to be able to import and export these settings

(2) Alternatives I've considered

None

(3) Design / Screenshots / Mockups

hyprland example

# Main modifier
$mainMod = SUPER # windows key

# Window/Session actions
bind = $mainMod, W, togglefloating, # toggle the window on focus to float
bind = $mainMod, G, togglegroup, # toggle the window on focus to group (tab mode)
bind = ALT, return, fullscreen, # toggle the window on focus to fullscreen

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = ALT, Tab, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4

# Switch workspaces relative to the active workspace with mainMod + CTRL + [←→]
bind = $mainMod CTRL, right, workspace, r+1 
bind = $mainMod CTRL, left, workspace, r-1

# move to the first empty workspace instantly with mainMod + CTRL + [↓]
bind = $mainMod CTRL, down, workspace, empty 

# Resize windows
binde = $mainMod SHIFT, right, resizeactive, 30 0
binde = $mainMod SHIFT, left, resizeactive, -30 0
binde = $mainMod SHIFT, up, resizeactive, 0 -30
binde = $mainMod SHIFT, down, resizeactive, 0 30

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
@Heus-Sueh Heus-Sueh added the enhancement New feature or request label Feb 10, 2024
@jmmaranan
Copy link
Collaborator

I had thought about this when creating Forge - but it is not going to work I think on the extensions gnome review. The standard storage is gschema for all settings including the keybinds. The existing maintainers need to confirm with the folks over matrix chat, though.
Maybe also, the .conf can be an override to the gschema values if it is present.

@juarezr
Copy link
Contributor

juarezr commented Feb 15, 2024

What about running some shell commands:

$ dconf dump '/org/gnome/shell/extensions/forge/keybindings/' > dconf-forge-keybindings.ini

$ dconf load '/org/gnome/shell/extensions/forge/keybindings/' < dconf-forge-keybindings.ini

@Heus-Sueh Heus-Sueh changed the title Feature: keyboard shortcut through a .conf file Feature: key bindings through a .conf file Feb 15, 2024
@p135246
Copy link

p135246 commented Apr 4, 2024

What about running some shell commands:

$ dconf dump '/org/gnome/shell/extensions/forge/keybindings/' > dconf-forge-keybindings.ini

$ dconf load '/org/gnome/shell/extensions/forge/keybindings/' < dconf-forge-keybindings.ini

This produces an empty file for me

@juarezr
Copy link
Contributor

juarezr commented Apr 4, 2024

What about running some shell commands:

$ dconf dump '/org/gnome/shell/extensions/forge/keybindings/' > dconf-forge-keybindings.ini

$ dconf load '/org/gnome/shell/extensions/forge/keybindings/' < dconf-forge-keybindings.ini

This produces an empty file for me

It's working here.

Maybe you haven't changed any forge settings.

@fabian4cast
Copy link

I wanted to achieve the same. As @juarezr mentioned, the file is empty if you haven't changed any of the default keybindings. As soon as you do, those keybindings that vary from the default appear in that config file, and it shouldn't be empty anymore. Works like a charm for me, and tbh if it weren't for that solution I wouldn't have tried out Forge since not being able to save settings and keybindings would've been a showstopper for me.

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

No branches or pull requests

5 participants