py3status icon indicating copy to clipboard operation
py3status copied to clipboard

Add option to format bluetooth module output if there's no adapter detected

Open jose1711 opened this issue 4 years ago • 11 comments

I currently see no way of configuring the icon/text when using bluetooth module. If there is something wrong with the adapter, the text just says: "bluetooth". It would be nice if a user can define that for instance a greyed out bluetooth icon is shown instead.

jose1711 avatar Nov 11 '19 23:11 jose1711

Try https://github.com/ultrabug/py3status/tree/newmodule-bluetooth.

lasers avatar Nov 12 '19 06:11 lasers

thank you, though this fails on my test arch linux system inside virtualbox. seems like with missing bluetooth adapter bluetooth.service is unable to start and the module cannot cope with such a situation

jose1711 avatar Nov 12 '19 07:11 jose1711

Is there an error message from the module? Just in case you didn't see... What you want is not in default format. (See third example). Otherwise, I need more info.

lasers avatar Nov 12 '19 07:11 lasers

obrázok obrázok it looks as it is failing earlier than the formatting starts.

jose1711 avatar Nov 12 '19 08:11 jose1711

I can reproduce this by uninstalling bluez stuff. Do you have them installed on virtualbox?

That error message is pretty nasty tho... The problem might be unrelated to the adapter too because I didn't have issues running/testing bluetooth module without the adapter.

lasers avatar Nov 12 '19 08:11 lasers

I do have bluez package installed inside VirtualBox. I should have an option to test this on a real computer lacking bluetooth adapter later this week.

jose1711 avatar Nov 12 '19 10:11 jose1711

No problem. I recently added a new exciting commit. My old bluetooth mouse is really flakey. :(

lasers avatar Nov 12 '19 10:11 lasers

Thank you, the new commit works nicely. How long before this is pulled into main branch?

jose1711 avatar Nov 12 '19 13:11 jose1711

I'd like to add a few additional information. On Arch the bluetooth service file contains the following check:

ConditionPathIsDirectory=/sys/class/bluetooth

Without this the service is not started and py3status reports an issue. The directory is not created by default inside my VirtualBox machine but when I start the service manually no error is reported by systemd, the directory gets created and py3status stops failing.

jose1711 avatar Nov 12 '19 22:11 jose1711

If there is something wrong with the adapter, the text just says: "bluetooth". It would be nice if a user can define that for instance a greyed out bluetooth icon is shown instead.

I now realize this is likely an error message you saw. You can click on that if you want. Click-1 to show the error. Click-2 to refresh/retry. Click-3 to hide/dismiss the module.

EDIT: Based on the screenshot, you know this now/already.

Without this the service is not started and py3status reports an issue.

It came from dbus and py3status displays any errors we had with the module . Same error if we try to connect to org.bluez on d-feet.

lasers avatar Nov 12 '19 22:11 lasers

@ultrabug Bluetooth issue technically unrelated to py3status. WDYWTD?

  1. Close this?
  2. Merge newmodule-bluetooth? i) 20+ placeholders. ii) Includes adapters. iii) No more hardcoded color. iv) Code looks more clean.

lasers avatar Dec 12 '19 08:12 lasers