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

command chaining in i3-input?

asked 2013-09-25 17:36:27 +0000

yoav gravatar image

I want to bind a key to query for input and perform a "complex" action based on that. Specifically, I want to both mark a window with a user-specified name AND send it to the scratchpad.

I tried both of the following options, and both did not work as intended:

bindsym $mod+Shift+minus exec --no-startup-id i3-input -P 'Mark window as:' -F "mark %s"; move to scratchpad

The problem with the above is that it sends the focused window the the scratchpad, and then marks the remaining, newly-focused window with the provided name. For some reason it does not wait for i3-input to return prior to performing the next action in the chain

I also tried:

bindsym $mod+Shift+minus exec --no-startup-id i3-input  -P 'Mark window as:' -F "mark %s; move to scratchpad"

Here i3 does not parse the line well, as it is confused by the ; inside the quotes.

Any tips on how to resolve this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-09-25 17:42:31 +0000

Michael gravatar image

You need to quote the exec argument so that the parser skips the semicolon:

bindsym $mod+Shift+minus exec --no-startup-id "i3-input -P 'Mark window as:' -F 'mark %s; move to scratchpad'"
edit flag offensive delete link more

Comments

Great, thanks, working perfectly now! (and also thanks for this really cool wm!)

yoav gravatar imageyoav ( 2013-09-25 17:47:01 +0000 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-25 17:36:27 +0000

Seen: 243 times

Last updated: Sep 25 '13