-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh bar #9
Comments
The Regarding the refresh rate, you can pass I don't think it's possible to make conky refresh automatically when the volume changes. The best solution is probably to implement a volume control directly as a barpyrus widget. |
Awesome thanks, I'll try this out! |
Works great, first neither |
Here's how I added volume indicator: gray = '%{F\\#989898}'
green = '%{F\\#9fbc00}'
vol_off_symb = gray + '\ue202'
speaker_symb = green + '\ue203'
headphone_symb = green + '\ue0fd'
vol_on_symb = '${if_match \"$pa_sink_active_port_name\" == \"analog-output-speaker\"}' + speaker_symb + '${else}' + headphone_symb + '${endif}'
conky_text = ''
conky_text += '${if_pa_sink_muted}' + vol_off_symb + '${else}' + vol_on_symb + '${endif}'
conky_text += gray + '${pa_sink_volume}% ' showing if volume is on/off and if headphone are plugged in. |
Great! Thanks for sharing! |
I updated it a bit to also show a bluetooth symbol if bluetooth speakers are used, works for me but port name might be different for others # Colors
gray = '%{F\\#989898}'
green = '%{F\\#9fbc00}'
blue = '%{F\\#0000ff}'
pink = '%{F\\#f268ae}'
light_blue = '%{F\\#28b4c9}'
purple = '%{F\\#b057fd}'
bright_green = '%{F\\#d3f1e3}'
# Volume status
vol_off_symb = gray + '\ue202'
speaker_symb = purple + '\ue203'
headphone_symb = purple + '\ue0fd'
bluetooth_symb = blue + '\ue1b5'
vol_on_symb = '${if_match \"$pa_sink_active_port_name\" == \"analog-output-headphones\"}'
vol_on_symb += headphone_symb
vol_on_symb += '${else}'
vol_on_symb += '${if_match \"$pa_sink_active_port_name\" == \"headset-output\"}'
vol_on_symb += headphone_symb + bluetooth_symb
vol_on_symb += '${else}'
vol_on_symb += speaker_symb
vol_on_symb += '${endif}'
vol_on_symb += '${endif}'
volume = '${if_pa_sink_muted}' + vol_off_symb + '${else}' + vol_on_symb + '${endif}'
volume += gray + '${pa_sink_volume}%' also added an indicator of wifi quality (similar to how battery was done) ########
# wifi #
########
wifi_icons = ['\ue218', '\ue219', '\ue21a']
wifi_delta = 100 / len(wifi_icons)
wifi_qual = '${wireless_link_qual_perc wlp0s20f3}'
wifi = ''
for i, icon in enumerate(wifi_icons[:-1]):
wifi += '${if_match ' + wifi_qual + ' < %d}' % ((i + 1) * wifi_delta)
wifi += light_blue + icon
wifi += '${else}'
wifi += light_blue + wifi_icons[-1] # 100 %
for _ in range(len(wifi_icons) - 1):
wifi += '${endif}'
wifi += gray + ' ' + wifi_qual + '%' which gets added to my list of things as conky_elements = [
test,
mail,
wifi,
volume,
disk_usage,
cpu,
ram,
# net_down_speed,
# net_up_speed,
battery,
uptime,
]
conky_text = ' '.join(conky_elements) + ' ' |
I just tried this bar with herbstluftwm and works really nice :) I've did some small tweaks and added something to display the volume status. However, it only updates quite rarely. How can I control the refresh-rate, or ideally can it be configured to refresh when for example a certain key is pressed or headphones are plugged in?
Thanks in advance!
PS, here's my battery status, I added the following to the start of
conky_text
:where
getvolume
is a script I have to retrieve the volume fromamixer
. Can I use the output ofgetvolume
in a variable to not have to call it twice? For example, where does the$battery
variable come from?The text was updated successfully, but these errors were encountered: