The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

focus nagbar with keyboard

asked Aug 9 '15

denzen gravatar image

Hi,

i3wm generally lets users park their mouse, because it works nicely with keybinds. Is there a way to access the nagbar also without a mouse? I would like to press a nagbar button with Return or close it with Esc and focus and unfocus it from keyboard. Is there a way?

1 answer

Sort by » oldest newest most voted
0

answered Aug 9 '15

oberon gravatar image

updated Aug 10 '15

Afaik this is not possible, but what you can definitely do is display a message of your liking in the statusbar by entering the 'system mode' and then trigger certain actions by predefined keys. Those you can assign with a simple script like THIS

In your ~.i3/config you can use somehting like:

# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"

# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}

Question Tools

1 follower

Stats

Asked: Aug 9 '15

Seen: 79 times

Last updated: Aug 10