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

Trying to fix a bind key

asked Mar 23 '15

BaNkS gravatar image

updated Mar 24 '15

Adaephon gravatar image

Hello everyone, I am having an issue with setting up a bind key for brightness control keys. While I can do it, I am getting some errors. This is what I have:

bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 && notify-send " $(xbacklight -get | awk '{printf "%.0f\n", $1}')%"

I am getting this error:

ERROR: Expected one of these tokens: <end>, '[', 'move', 'exec', 'exit', 'restart', 'reload', 'shmlog', 'debuglog', 'border', 'layout', 'append_layout', 'workspace', 'focus', 'kill', 'open', 'fullscreen', 'split', 'floating', 'mark', 'unmark', 'resize', 'rename', 'nop', 'scratchpad', 'mode', 'bar'
ERROR: Your command: exec --no-startup-id xbacklight -inc 10 && notify-send " $(xbacklight -get | awk '{printf "%.0f\n", $1}')%"
ERROR:

Comments

Thanks :). That was actually a good idea. I made a helper script with all my notify-send commands and just made them into functions. Then use the key bind to call each specific function per keybinding. A notify-send helper script if you want to call it that. :)

BaNkS gravatar imageBaNkS (Mar 23 '15)edit

1 answer

Sort by » oldest newest most voted
1

answered Mar 23 '15

i3convert gravatar image

updated Mar 23 '15

Probably either all the nested quotes are too much for the i3 config parser or more character escaping is needed. One workaround would be to create a bash script that has those commands and just run the script.

Question Tools

Stats

Asked: Mar 23 '15

Seen: 169 times

Last updated: Mar 24