regolith-linux / regolith-desktop

Meta package for the Regolith Desktop Environment
1.48k stars 31 forks source link

Unable to rebind navigations in local user configuration #864

Open Aeyk opened 1 year ago

Aeyk commented 1 year ago

;; This buffer is for text that is not saved, and for Lisp evaluation. ;; To create a file, visit it with C-x C-f and enter text in its buffer.

Describe the bug Adding lines that deal with navigation to ~/.config/regolith/i3/config.d/00_custom cause a i3 error about duplicate bindings. for context, I like warping my mouse to the focused window and changing the navigation keys bindings is how i normally do it.

To Reproduce ~/.config/regolith/i3/config.d/00_custom

bindsym $mod+$i3-wm.binding.left focus left; exec --no-startup-id mouse_warp
bindsym $mod+$i3-wm.binding.down focus down; exec --no-startup-id mouse_warp
bindsym $mod+$i3-wm.binding.up focus up; exec --no-startup-id mouse_warp
bindsym $mod+$i3-wm.binding.right focus right; exec --no-startup-id mouse_warp

and reload config -- get red error line about duplicate bindings

ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym h, command "focus left; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym j, command "focus down; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym k, command "focus up; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym l, command "focus right; exec --no-startup-id mouse_warp"
ERROR: FYI: You are using i3 version 4.21 (2022-09-21)
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym h, command "focus left; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym j, command "focus down; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym k, command "focus up; exec --no-startup-id mouse_warp"
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym l, command "focus right; exec --no-startup-id mouse_warp"
ERROR: FYI: You are using i3 version 4.21 (2022-09-21)
ERROR: Received ConfigureNotify for unknown window 0x03600000
ERROR: Received ExposeEvent for unknown window 0x03600000
ERROR: Received ConfigureNotify for unknown window 0x03600000
ERROR: Received ConfigureNotify for unknown window 0x03600008
ERROR: Received ExposeEvent for unknown window 0x03600008
ERROR: Received ConfigureNotify for unknown window 0x03600008
ERROR: Received ConfigureNotify for unknown window 0x0360000b
ERROR: Received ExposeEvent for unknown window 0x0360000b
ERROR: Received ConfigureNotify for unknown window 0x0360000b

Expected behavior I would like for user local config to supersede the global config. Is the way I'm supposed to rebind navigation keys is move /usr/share/regolith/i3/30_navigation to ~/.config/regolith/i3/config.d and edit it there? that seems like it wouldn't survive a apt upgrade of regolith-desktop.

Installation Details

ploum commented 10 months ago

I confirm this bug in both i3 and sway. This is very problematic as there’s no way to get rid of the login error with a custom config.

kgilmer commented 10 months ago

Sorry just noticed this issue. To override the navigation keybindings, copy the partial file /usr/share/regolith/common/config.d/30_navigation to the user config directory, then uninstall the package that provides the original: regolith-wm-navigation. Update the user version as needed, then log back in once you're ready to use it.

To find what package provides a given file, you can use dpkg -S <file path>.

ploum commented 10 months ago

Thanks for confirming that it is indeed a bug. Not sure how this could be fixed :-/

cfsmp3 commented 10 months ago

My take here is that we need to have sway provide the functionality "require_one" in which there's 30_navigation in several possible dirs (default, user) it only picks up (by directory priority) so we don't have to remove packages as a solution.

We did have a patch for this for sway but untested.

Problem with sway though is that their PR flow seems really really slow, so it doesn't really invite contributions.

ploum commented 10 months ago

On 23/09/06 09:55, Carlos Fernandez Sanz wrote:

My take here is that we need to have sway provide the functionality "require_one" in which there's 30_navigation in several possible dirs (default, user) it only picks up (by directory priority) so we don't have to remove packages as a solution.

We did have a patch for this for sway but untested.

Problem with sway though is that their PR flow seems really really slow, so it doesn't really invite contributions.

Regolith-sway is still alpha-software so fixing it for sway is probably not a priority.

But what about the same problem on i3?

kgilmer commented 10 months ago

Thanks for confirming that it is indeed a bug. Not sure how this could be fixed :-/

I am confused. I was describing how to remove the defaults (by uninstalling the package). What in particular is a bug?

Going back to the original post:

Is the way I'm supposed to rebind navigation keys is move /usr/share/regolith/i3/30_navigation to ~/.config/regolith/i3/config.d and edit it there?

The way to rebind navigation keys is to put whatever bindings you want in the user directory and uninstall the package from regolith that's providing the defaults. This will survive an apt upgrade just fine.

ploum commented 10 months ago

On 23/09/06 08:52, Ken Gilmer wrote:

Thanks for confirming that it is indeed a bug. Not sure how this could be fixed :-/

I am confused. I was describing how to remove the defaults (by uninstalling the package). What in particular is a bug?

I was considering that removing a package installed by default to solve a configuration issue might be a bug. Is it the intended way of working? Should it be documented "as it is" that, when customizing their shortcuts, people should remove a package?

Aeyk commented 10 months ago

If it's documented sufficiently, I am fine with it, but is it, I tried a little and failed to search through the seemingly two sets of incompatible and configuration notes.

I would prefer it if it was more similar to the rest of the config files, where you don't need to copy or uninstall packages to override settings.

On Thu, Sep 7, 2023, 4:52 AM Ploum @.***> wrote:

On 23/09/06 08:52, Ken Gilmer wrote:

Thanks for confirming that it is indeed a bug. Not sure how this could be fixed :-/

I am confused. I was describing how to remove the defaults (by uninstalling the package). What in particular is a bug?

I was considering that removing a package installed by default to solve a configuration issue might be a bug. Is it the intended way of working? Should it be documented "as it is" that, when customizing their shortcuts, people should remove a package?

— Reply to this email directly, view it on GitHub https://github.com/regolith-linux/regolith-desktop/issues/864#issuecomment-1709749562, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA47HFLSBCGXGMIHKS2FGSTXZGDLBANCNFSM6AAAAAAZL2IAAI . You are receiving this because you authored the thread.Message ID: @.***>

ploum commented 9 months ago

Removing regolith-wm-navigation doesn’t solve the issue for me. Still an error.