Problem using Dunst on I3

Hi, so… i have a problem. I use this config for my volume on i3wm (using i3-volume)


# append "-c $alsacard" without quotes to override default card
bindsym XF86AudioRaiseVolume exec --no-startup-id $volumepath/volume -an -t $statuscmd -u $statussig up $volumestep
bindsym XF86AudioLowerVolume exec --no-startup-id $volumepath/volume -an -t $statuscmd -u $statussig down $volumestep
bindsym XF86AudioMute        exec --no-startup-id $volumepath/volume -an -t $statuscmd -u $statussig mute

And i cant seem to be able to configure it to send notifications using dunst to make a KDE-style on screen notification for the volume. Does anybody know how i can do it? i have tried , for example:

bindsym XF86AudioRaiseVolume exec --no-startup-id $volumepath/volume -an -t $statuscmd -u $statussig up $volumestep && notify-send "volume: $(pamixer --get-volume)%"

Yet, it doesn’t work.
Thanks for your help :slight_smile:

Your use of && to execute both $volumepath/volume and notify-send is suspect. I don’t think that syntax is supported by the exec keyword. (You’re probably used to using that in Bash, right?) To chain commands in exec lines, I think that you want the ; character instead. (See the i3 User’s Guide for doing command chaining.)

If that doesn’t work, the next thing I’d try is to move all the functionality to a script, and then have the bindSym command invoke that script.