i3 / i3

A tiling window manager for X11
https://i3wm.org/
BSD 3-Clause "New" or "Revised" License
9.5k stars 780 forks source link

Config doesn't load properly when certain commands aren't bound #3870

Closed BanchouBoo closed 4 years ago

BanchouBoo commented 4 years ago

I use sxhkd to bind my keys, so I removed all the bindsym's in my i3 config. Doing so prevented my config from loading properly. After this I narrowed it down by commenting out each keybind one by one and found that if I don't have at least one command bound from a specific set of commands (see below) it breaks my config. The keys themselves don't matter, but at least one of the commands must be bound.

bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

bindsym $mod+Shift+space floating toggle

bindsym $mod+1 workspace number $somenumber

I also get the following error from i3 -C when running the broken config

Smartmatch is experimental at /usr/bin/i3-migrate-config-to-v4 line 113.
Smartmatch is experimental at /usr/bin/i3-migrate-config-to-v4 line 195.
11/24/2019 11:54:27 PM - ERROR: 
11/24/2019 11:54:27 PM - ERROR: ****************************************************************
11/24/2019 11:54:27 PM - ERROR: NOTE: Automatically converted configuration file from v3 to v4.
11/24/2019 11:54:27 PM - ERROR: 
11/24/2019 11:54:27 PM - ERROR: Please convert your config file to v4. You can use this command:
11/24/2019 11:54:27 PM - ERROR:     mv /home/boo/.config/i3/config /home/boo/.config/i3/config.O
11/24/2019 11:54:27 PM - ERROR:     i3-migrate-config-to-v4 /home/boo/.config/i3/config.O > /home/boo/.config/i3/config
11/24/2019 11:54:27 PM - ERROR: ****************************************************************
11/24/2019 11:54:27 PM - ERROR:  

And this is the config I'm using to test. Just load it, comment out the bindsym's for changing focus, reload the config and run i3 -C. If you restart, it will also show the default i3 bar.

set $mod Mod4

bindsym $mod+Return exec kitty

bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.17.1 (2019-08-30) © 2009 Michael Stapelberg and contributors

Running version: < 4.2-200
- Linux Distribution & Version: Manjaro 18.1.3 Juhraya
- Are you using a compositor (e.g., xcompmgr or compton): No
i3bot commented 4 years ago

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

Airblader commented 4 years ago

It looks like you removed the comment for the config version. Can you add this back and see if it works then?

# i3 config file (v4)
BanchouBoo commented 4 years ago

That fixed it, thought it was just information and not an important line. Thanks.