1

I have this in my i3 config to restart picom:
bindsym $mod+Shift+P exec killall picom; sleep 0.2; picom

It works fine in terminal but when I press the keybinding, it shows error, and it just says you have error in this line but don't tell which error.

1 Answer 1

1

See https://i3wm.org/docs/userguide.html#exec and, semicolons have special meaning in i3:

See [command_chaining] for details on the special meaning of ; (semicolon) and , (comma): they chain commands together in i3, so you need to use quoted strings (as shown in [exec_quoting]) if they appear in your command.

and

Commands can be chained by using ; (a semicolon)

so bindsym $mod+Shift+P exec killall picom; sleep 0.2; picom tries to bind $mod-shift-P to exec killall picom, followed by the i3 command sleep 0.2, followed by the i3 command picom. The latter two are not i3 commands.

I suggest moving killall picom; sleep 0.2; picom into a shell script and instead bind $mod-shift-P to that shell script with bindsym $mod+Shift+P exec /path/to/script.sh.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.