You are not logged in.

#1 2023-03-09 20:54:26

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

[SOLVED] Binds in i3-wm doesn't work

Hello everyone! I'm a novice here at the forum and to using linux. So be as loyal as possible. Thanks.

Not so long ago I installed xorg, xorg-xinit, etc. Together with them I am eager to configure and understand i3. I am writing this topic from another computer, so I cannot attach the entire configuration file. And it doesn't make sense.

In the configuration file at the path .config/i3/config (aka /home/username/.config/i3/config) there are the following commands:

set $mod Mod4
bindsym $mod+Return exec alacritty
bindsym $mod+Shift+q kill
.... and other

And so. Hotkeys work to switch the workspace (except for 4), to open the alacrity terminal. However, binds do not work to kill the window, to close the entire i3. When i have a open terminal in i3 and I press combination super (Mod4) + shift + q, it just prints the letter Q. It works the same way, for example, with super+shift+e, it just print E in the terminal. But if i press again super+return, i3 open new terminal in this workspace.

I tried rebooting the device, reinstalling i3, changing the configuration file. Everything is useless. What could be the problem, and how can I fix it? Tell me, please.

I may attach another information if u need it necessary. Just write it.

Last edited by darksoulfear (2023-03-17 19:02:13)

Offline

#2 2023-03-09 21:00:51

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

By the way, changes in the configuration file are saved and applied at startup. Banal, as far as I could, I checked it on the position of the status bar (top, bottom).

Offline

#3 2023-03-10 07:51:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,273

Re: [SOLVED] Binds in i3-wm doesn't work

I am writing this topic from another computer, so I cannot attach the entire configuration file. And it doesn't make sense.

Yes you can and yes it does.
Also post your xinitrc and the output of

setxkbmap -print -query

Does

bindsym $mod+Shift+Return exec alacritty

work as expected?
Does

bindsym $mod+e exec alacritty

?

Offline

#4 2023-03-10 19:41:39

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

seth wrote:

Also post your xinitrc and the output of

setxkbmap -print -query

.xinitrc contains only one line

exec i3

Yes. I get it:

[username@ArchLinux573G~]$ setxkbmap -print -query
xkb_keymap {
    xkb_keycodes  { include “evdev+aliases(qwerty)"  };
    xkb_types     { include “complete” };
    xkb_compat    { include "complete" };
   xkb_symbols    { include “pc+us:2+inet(evdev)+group(alt_shift_toggle)"
   xkb_geometry   { include “pc(pc105)" };
};
rules: evdev
model: pc105
layout: us
options: grp:alt_shift_toggle
seth wrote:

Does

bindsym $mod+Shift+Return exec alacritty

work as expected?
Does

bindsym $mod+e exec alacritty

?

Bind

bindsym $mod+Shift+Return exec alacritty

works. But another bind

bindsym $mod+e exec alacritty

doesn't work.

Last edited by darksoulfear (2023-03-10 19:43:16)

Offline

#5 2023-03-10 19:49:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,273

Re: [SOLVED] Binds in i3-wm doesn't work

Your xinitrc is broken (last link below, see the not on what to include at least) but that's unrelated.

options: grp:alt_shift_toggle

Why do you have a group toggle, but only one layout?
(My theory was that i3 selects the shortcuts on a different layout and that fact kinda plays into the theory)

Offline

#6 2023-03-11 11:37:45

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

I tried to install the xinitrc config, as indicated in the link below. The terminal was different, everything still worked incorrectly and broke more. I deleted it and made the config a standard that i had before: "exec i3".
However, after restarting the laptop, the result of the setxkbmap command changed:

[username@ArchLinux573G~]$ setxkbmap -print -query
xkb_keymap {
    xkb_keycodes  { include “evdev+aliases(qwerty)"  };
    xkb_types     { include “complete” };
    xkb_compat    { include "complete" };
   xkb_symbols    { include “pc+ru+us:2+inet(evdev)+group(alt_shift_toggle)"
   xkb_geometry   { include “pc(pc105)" };
};
rules: evdev
model: pc105
layout: ru,us
options: grp:alt_shift_toggle

Completely reinstall xorg, xorg-server, xorg-xinit and i3 is useless sad . I tried.

Offline

#7 2023-03-11 11:45:59

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

Honestly, I do not know why there is such a problem. Reading hundreds of similar topics, everyone writes about the key codes and numpad.

I still don't understand how numpad interferes with them if the window closing bind is not connected with it in any way. And the bind through the key codes to use, understand and change is inconvenient and long.

When i3 was first installed, everything worked fine. And then there is a sharp change.

Offline

#8 2023-03-11 13:01:04

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,273

Re: [SOLVED] Binds in i3-wm doesn't work

The terminal was different, everything still worked incorrectly and broke more. I deleted it and made the config a standard that i had before: "exec i3".

Yeah, no.
The suggestion is not to ruin twm adn xterms but

the wiki wrote:

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your ~/.xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

Fix that.

the result of the setxkbmap command changed:

So you do have multiple keyboard layouts.
1. what configures the keyboard?

localectl

Try the behvior w/ just a us keyboard layout configured.

What likely happens is indeed that you're binding the shortcuts for one layout and then try to use them w/ a different one.
Or use bindcode, https://wiki.archlinux.org/title/I3#Con … rd_layouts

Offline

#9 2023-03-11 19:08:47

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

seth wrote:

The suggestion is not to ruin twm adn xterms but

the wiki wrote:

Note: At the very least, ensure that the last if block in /etc/X11/xinit/xinitrc is present in your ~/.xinitrc file to ensure that the scripts in /etc/X11/xinit/xinitrc.d are sourced.

Fix that.

Yes, I added this to my file. Xorg is running, there are no errors.


seth wrote:

What likely happens is indeed that you're binding the shortcuts for one layout and then try to use them w/ a different one.
Or use bindcode, https://wiki.archlinux.org/title/I3#Con … rd_layouts

Apparently, unfortunately it will have to. I checked it now, everything is working properly with the codes. It's a pity that it turns out this way.

Offline

#10 2023-03-17 19:01:22

darksoulfear
Member
Registered: 2023-03-09
Posts: 7

Re: [SOLVED] Binds in i3-wm doesn't work

I have found a solution to my problem!

Using the following command below, I completely turned off the second layout.

$ localectl --no-convert set-x11-keymap us "" "" grp:ctrl_shift_toggle

Next, my i3 began to work with all the options of the binds in the configuration file. That is, he began to work with both 'bindcode' and 'bindsym'. It would seem that it is already possible to rejoice. But I went further. Now we can safely use i3, edit its config and not reboot the system.

I added the following line to the i3 config in the .config/i3/config directory

exec "setxkbmap -layout us,ru -option 'grp:alt_shift_toggle'"

And now in pure archlinux I don't have a second layout. However, when i3 starts, it connects, and all the binds inside i3 are already working.

Thus, the problem is solved. Thank you all.

Last edited by darksoulfear (2023-03-17 19:05:20)

Offline

Board footer

Powered by FluxBB