So, i just started using I3 through Arcolinux, it’s working pretty nicely all things considered but i’m having one little problem, a game i play uses keys that are very close to a keybind combination that is set here and that makes me accidentally trigger it sometimes, and i wanted to know how, if possible i can make so this keybind is disabled while I’m playing this game, searching for a solution i found this thread on reddit (yeah, lack of better places, but hey I’m asking here now so it’s an opportunity to get some info on here!) That seems to be talking about pretty much what i need, buut i have no idea how to create these scripts and all that and i didn’t had much success on searching on how to do this kind of thing before so… a little help please? Is there any more efficient method, or something like that?

  • DirigibleProtein
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    Use a mode. Not at my computer right now, but off the top of my head, something like this example from the manual:

    # Press $mod+o followed by either f, t, Escape or Return to launch firefox,
    # thunderbird or return to the default mode, respectively.
    set $mode_launcher Launch: [f]irefox [t]hunderbird
    bindsym $mod+o mode "$mode_launcher"
    
    mode "$mode_launcher" {
        bindsym f exec firefox
        bindsym t exec thunderbird
    
        bindsym Escape mode "default"
        bindsym Return mode "default"
    }
    

    Change ’$mod+o’ to your own combination. Inside the Mode Definition, before the exec, change your key bindings, and change them back afterwards, before you exit with mode default.