Code Monkey home page Code Monkey logo

budgie-bluetooth-battery-applet's Introduction

BudgieBluetoothBattery

This is a small Panel applet for the Budgie Desktop to display the battery charge of a connected Bluetooth device.
It uses the library Bluetooth_Headset_Battery_Level by @TheWeirdDev.

Panel example


Installation

With Archlinux or Manjaro, you can install this applet using AUR:

yay -S budgie-bluetooth-battery-applet

It is possible that you need to re-login to make the Applet visible in Budgie Settings.


With less cool Linux Distributions (๐Ÿ˜‰) one way to get it working is to copy the following files to the paths in which they are expected by Budgie:

# Local installation
mkdir -p ~/.local/share/budgie-desktop/plugins/budgie-bluetooth-battery-applet
cp BudgieBluetoothBatteryApplet.plugin budgie_bluetooth_battery_applet.py ~/.local/share/budgie-desktop/plugins/budgie-bluetooth-battery-applet/
mkdir -p ~/.local/share/glib-2.0/schemas
cp schema/de.galaxy102.budgie.bluetooth-battery.gschema.xml ~/.local/share/glib-2.0/schemas/
glib-compile-schemas ~/.local/share/glib-2.0/schemas

# System-wide installation
sudo mkdir -p /usr/lib/budgie-desktop/plugins/budgie-bluetooth-battery-applet
sudo cp BudgieBluetoothBatteryApplet.plugin budgie_bluetooth_battery_applet.py /usr/lib/budgie-desktop/plugins/budgie-bluetooth-battery-applet/
sudo cp schema/de.galaxy102.budgie.bluetooth-battery.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas

You need to Re-Login for the changes to take effect.


Configuration

When adding the applet, you need to enter the MAC address of the device you want to see the battery charge of. To find that address, go to the Bluetooth Settings and click the device.

MAC address

Enter this address in the same format in Budgie Settings when adding the Applet to your Panel.


Known issues

  • By now, multiple Applet instances are not supported (and I have no idea how to implement that...)
  • The Behaviour when the device is not connected is to show "NC" as battery state. This could be made configurable.
  • The Poll interval is fixed to 30 seconds and could be made configurable.
  • This is my first work with Gtk. I have no idea whether the code style is adequate.

Please feel free to open PRs or write Github Issues.


Thanks

budgie-bluetooth-battery-applet's People

Contributors

galaxy102 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.