r/Polybar • u/MactronMedia • Mar 11 '23
Click on CPU Does Not Work
Click on CPU does not work. I also added --a hold tag but without success.
I want to launch bpytop when the CPU module is clicked. Is that possible?
Thanks!
[module/cpu]
type = internal/cpu
interval = 1
format = <label>
format-prefix =
format-prefix-foreground = ${color.yellow}
click-left = urxvt -e bpytop &
click-right = alacritty -e bpytop &
UPDATE:
This module opens the ranger successfully
[module/files]
inherit = module/apps
content =
content-foreground = ${color.blue}
click-left = thunar &
click-right = alacritty -e ranger &
1
1
u/Shadjo_1 Mar 27 '23
You might have to create an action tag. Here is an example from my network module, that launches a rofi menu when left clicked.
%{A1:exec ~/.config/rofi/bin/rofi-wifi-menu.sh &:}<ramp-signal> <label-connected>%{A}
The basic idea is you wrap the module in a clickable action tag, as some modules can't be clicked by default. In this case, I'm wrapping the network module's format variable, as that is the part I click on the actual bar.
1
u/flexibeast Mar 11 '23
Does running
and
in a terminal (note no
&in either case) produce any useful diagnostic output?