vivien / i3blocks-contrib

Official repository for community contributed blocklets
https://github.com/vivien/i3blocks
Other
1.32k stars 485 forks source link

i3blocks click on block does not work on SWAY. #406

Open jasek5 opened 3 years ago

jasek5 commented 3 years ago

Hi, I am using sway 1.6. and i3blocks 1.5.

I have noticed that in sway i3blocks show correctly (they even refresh correctly) but clicking on a block does not work. I have noticed that it sometimes works if I log in to i3 and logout right away from i3 back to sway.

I do not know how to trace the problem. Could anyone help me, please? I am using the following blocks: batterybar dunst volume-pulseaudio

My custom blocks clicking does not work as well: config: [wifilaunch] full_text=  command=alacritty -e nmtui && pkill -RTMIN+3 i3blocks separator=false

Is there something which I should start on login to sway for the clicking to work? Also if you need some additional information and outputs please send me those commands and I will get the info for you.

Best regards

Issue rules:

Expected behavior

The expected behavior is that on click the commands should be executed. The battery bar should be expanded and it should show time left for battery charging or discharging. The Dunst should change its icon and disable/enable notification visibility - tested with notify-send. The volume-PulseAudio should change color and icon to muted and unmuted on click - also the audio output should be changed or muted (depending on the amount of active sound cards) The custom block should launch a terminal instance with nmtui active.

Actual behavior

On click it does nothing - however blocks themselves are working and they are showing correct information - they are even refreshing, but they cannot be clicked.

i3blocks config relevant to blocklet(s)

default from source: batterybar dunst volume-pulseaudio

My custom blocks clicking does not work as well: config: [wifilaunch] full_text=  command=alacritty -e nmtui && pkill -RTMIN+3 i3blocks separator=false

Other blocks were not changed and are default from the provided link - from this repository

Output of blocklet(s) when run from command line

dunst {"full_text": "<span font='Font Awesome 5 Free Solid'> 🔕 </span>", "DUNST_MUTE": "off"}

volume-pulseaudio  55%  55% #d0d0d0

batterybar <span foreground="#00AFE3">■■■■■</span>

Output of any relevant other commands that might help diagnostics

sway 1.6. and i3blocks 1.5.

If you need some additional information and outputs please send me those commands and I will get the info.

mhalano commented 3 years ago

I found out, in i3 not Sway, the volume-pulseaudio blocklet doesn't react to click if using SUBSCRIBE=1 (and interval=persist). I just can change using another methods, like pactl. That could be the case?

Zeioth commented 3 years ago

Using pactl would also fix #415.

jasek5 commented 3 years ago

I found out, in i3 not Sway, the volume-pulseaudio blocklet doesn't react to click if using SUBSCRIBE=1 (and interval=persist). I just can change using another methods, like pactl. That could be the case?

I am sorry could you please show example of config with pactl ? I am slightly confused about usage in the config.

mhalano commented 3 years ago

@jasek5 I can change using pactl directly, nothing related to put pactl in the config file. I have these keystrokes: bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status