regolith-linux / regolith-desktop

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

Previously working keybinding stopped working after update #790

Closed floratmin closed 1 year ago

floratmin commented 1 year ago

Hello,

I created a file in ~/.config/regolith2/i3/config.d/50_resize-mode to overwrite the resize mode. This worked fine until today, when all of a sudden it stopped working giving the error

ERROR: The binding mode with name "Resize Mode" is defined at least twice.
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym r, command "mode "Resize Mode""
ERROR: FYI: You are using i3 version 4.21 (2022-09-21)
ERROR: Duplicate keybinding in config file:
  state mask 0x40 with keysym r, command "mode "Resize Mode""
ERROR: FYI: You are using i3 version 4.21 (2022-09-21)

The configuration file at ~/.config/regolith2/i3/config.d/50_resize-mode:

## Resize // Enter Resize Mode // <> r ##
mode "Resize Mode" {
        # These bindings trigger as soon as you enter the resize mode

        ## Resize // Resize Window // ↑ ↓ ← → ##
        bindsym Left resize shrink width 6 px or 6 ppt
        bindsym Down resize grow height 6 px or 6 ppt
        bindsym Up resize shrink height 6 px or 6 ppt
        bindsym Right resize grow width 6 px or 6 ppt

        bindsym Shift+Left resize shrink width 12 px or 12 ppt
        bindsym Shift+Down resize grow height 12 px or 12 ppt
        bindsym Shift+Up resize shrink height 12 px or 12 ppt
        bindsym Shift+Right resize grow width 12 px or 12 ppt

        ## Resize // Resize Window // k j h l ##
        bindsym $i3-wm.binding.left resize shrink width 1 px
        bindsym $i3-wm.binding.up resize grow height 1 px
        bindsym $i3-wm.binding.down resize shrink height 1 px
        bindsym $i3-wm.binding.right resize grow width 1 px

        bindsym $i3-wm.binding.move_left resize shrink width 1 px
        bindsym $i3-wm.binding.move_up resize grow height 1 px
        bindsym $i3-wm.binding.move_down resize shrink height 1 px
        bindsym $i3-wm.binding.move_right resize grow width 1 px

        ## Resize // Exit Resize Mode // Escape or Enter ##
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}
set_from_resource $i3-wm.binding.resize_mode i3-wm.binding.resize_mode r
bindsym $mod+$i3-wm.binding.resize_mode mode "Resize Mode"

The update log:

Install: regolith-look-default-loader:amd64 (0.7.5-1regolith, automatic), regolith-i3-control-center-regolith:amd64 (3.8.1-2-1regolith, automatic), i3-swap-focus:amd64 (0.4.3-1regolith, automatic), regolith-i3-swap-focus:amd64 (3.8.1-2-1regolith, automatic) Upgrade: i3xrocks-net-traffic:amd64 (5.4.2-1regolith, 5.4.6-1regolith), python3-distupgrade:amd64 (1:22.04.14, 1:22.04.15), regolith-i3-rofication-ilia:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), google-chrome-stable:amd64 (108.0.5359.94-1, 108.0.5359.124-1), i3xrocks-memory:amd64 (5.4.2-1regolith, 5.4.6-1regolith), regolith-i3-config:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-user-programs:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3xrocks-config:amd64 (5.4.2-1regolith, 5.4.6-1regolith), ubuntu-release-upgrader-gtk:amd64 (1:22.04.14, 1:22.04.15), i3-next-workspace:amd64 (1.0.1-1-1regolith, 1.0.2-1regolith), regolith-i3-next-workspace:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), i3xrocks-cpu-usage:amd64 (5.4.2-1regolith, 5.4.6-1regolith), i3-gaps-wm:amd64 (4.20.1-1regolith, 4.21-2-1regolith), libwbclient0:amd64 (2:4.15.9+dfsg-0ubuntu0.2, 2:4.15.9+dfsg-0ubuntu0.3), regolith-i3-i3xrocks:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-look-default:amd64 (0.7.1-1regolith, 0.7.5-1regolith), regolith-i3-base-launchers:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), libsmbclient:amd64 (2:4.15.9+dfsg-0ubuntu0.2, 2:4.15.9+dfsg-0ubuntu0.3), i3xrocks-focused-window-name:amd64 (5.4.2-1regolith, 5.4.6-1regolith), regolith-i3-navigation:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-ftue:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-networkmanager:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), i3xrocks-rofication:amd64 (5.4.2-1regolith, 5.4.6-1regolith), regolith-session-flashback:amd64 (0.5.0-1regolith, 0.6.5-1regolith), regolith-i3-resize:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-unclutter:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-gaps-partial:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), samba-libs:amd64 (2:4.15.9+dfsg-0ubuntu0.2, 2:4.15.9+dfsg-0ubuntu0.3), xrescat:amd64 (1.2.1-1-1regolith, 1.2.1-2-1regolith), regolith-default-settings:amd64 (1.0.8-1hirsute, 2.0.4-1regolith), regolith-i3-compositor:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), code:amd64 (1.73.1-1667967334, 1.74.0-1670260027), ubuntu-release-upgrader-core:amd64 (1:22.04.14, 1:22.04.15), regolith-i3-workspace-config:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), ilia:amd64 (0.12.14-jammy-1regolith, 0.12.29-jammy-1regolith), regolith-desktop:amd64 (4.2.0-1regolith, 4.3.0-1regolith), regolith-i3-session:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), i3xrocks-time:amd64 (5.4.2-1regolith, 5.4.6-1regolith), regolith-ftue:amd64 (2.1.5-1regolith, 2.1.6-1regolith), regolith-i3-default-style:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith), regolith-i3-ilia:amd64 (3.7.5-1regolith, 3.8.1-2-1regolith) Remove: regolith-i3-gnome:amd64 (3.7.5-1regolith)

Installation Details

guillaumeriousat commented 1 year ago

I just had this issue. It seems like the configs installed in /usr/share/regolith/i3/config.d/ were reinstated on update on my machine even though I had copied them over to my home and deleted them. I commented the line include /usr/share/regolith/i3/config.d/* in /etc/regolith/i3/config to fix that.

I like the regolith project in that it provides working defaults for i3 but I really think the way the configuration works is an immense step down from bare i3 in terms of ease of use. The system is overengineered and clunky : the use of system level config files that creates duplicate binding when trying to override default values and of xressources makes tweaking the way regolith works a major headache and does not in my opinion provide any significant advantage.

kgilmer commented 1 year ago

Hi @guillaumeriousat , thanks for your feedback.

...even though I had copied them over to my home and deleted them.

How did you delete them?

guillaumeriousat commented 1 year ago

@kgilmer cd /usr/share/regolith/i3/config.d/ and sudo rm :P

kgilmer commented 1 year ago

Thanks for the clarification @guillaumeriousat . Regolith relies on the debian packaging system for much of it's configuration management. For example each i3 config partial is represented by a debian package. The upgrade broke your setup because of your approach to modifying the system. Rather than deleting system files owned byroot, it is highly recommended to uninstall the package associated with the file. dpkg can tell you which package is responsible for which file. Example:

~$ dpkg -S /usr/share/regolith/i3/config.d/40_next-workspace 
regolith-i3-next-workspace: /usr/share/regolith/i3/config.d/40_next-workspace

If you configure your system using packages, things will go smoother in the future. For example, the packaging system will install dependencies if needed, or block installation if it will interfere with an already installed package.

On the other hand, if you just want to deal with files and don't really want to mess with packages, you can take ownership of all the i3 stuff and keep it in one file, however you like by putting your i3 config in ~/.config/regolith2/i3/config. All these scenarios are covered in more detail here: https://regolith-desktop.com/docs/howtos/customize-i3-configuration/

In any case, thanks again for your feedback!

guillaumeriousat commented 1 year ago

I guess I need to read the manual before messing around with system files. Thanks for taking the time to explain it to me :)