From e0332b6f0799834238676307c145fe72d477dd72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ingo=20B=C3=BCrk?= Date: Wed, 25 Mar 2015 17:50:06 +0100 Subject: [PATCH] Allow nop command without argument fixes #1318 --- docs/userguide | 21 +++++++++++++++++++++ parser-specs/commands.spec | 2 ++ 2 files changed, 23 insertions(+) diff --git a/docs/userguide b/docs/userguide index 45b05a06..8528d684 100644 --- a/docs/userguide +++ b/docs/userguide @@ -2011,6 +2011,27 @@ bindsym $mod+minus scratchpad show bindsym mod4+s [title="^Sup ::"] scratchpad show ------------------------------------------------ +=== Nop + +There is a no operation command +nop+ which allows you to override default +behavior. This can be useful for, e.g., disabling a focus change on clicks with +the middle mouse button. + +The optional +comment+ argument is ignored, but will be printed to the log file +for debugging purposes. + +*Syntax*: +--------------- +nop [] +--------------- + +*Example*: +---------------------------------------------- +# Disable focus change for clicks on titlebars +# with the middle mouse button +bindsym button2 nop +---------------------------------------------- + === i3bar control There are two options in the configuration of each i3bar instance that can be diff --git a/parser-specs/commands.spec b/parser-specs/commands.spec index 82348df7..315a9218 100644 --- a/parser-specs/commands.spec +++ b/parser-specs/commands.spec @@ -353,6 +353,8 @@ state MODE: state NOP: comment = string -> call cmd_nop($comment) + end + -> call cmd_nop(NULL) state SCRATCHPAD: 'show' -- 2.39.5