Giter Site home page Giter Site logo

jonathanlermitage / intellij-battery-status-plugin Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 3.0 619 KB

:jigsaw::battery: IntelliJ IDEA based IDEs plugin that displays battery status in the Status Bar. Useful if you run IDE in full screen.

Home Page: https://plugins.jetbrains.com/plugin/12321-battery-status

License: MIT License

Java 92.81% JavaScript 1.91% Makefile 5.28%
battery-status intellij-plugin jetbrains-ides gradle

intellij-battery-status-plugin's Introduction

logo
Battery Status


An open-source and free IntelliJ IDEA (and other JetBrains IDEs) plugin that displays battery status in the Status Bar.

Screenshot 1
Screenshot 2

Usage:

  • Windows: plugin should work as it.
  • Linux: you must be able to invoke acpi -b. Be sure ACPI is installed: on Debian or Ubuntu, type sudo apt install acpi.
  • MacOS: plugin should work as it. You must be able to invoke pmset -g batt.

Otherwise, go to plugin's settings and choose to use Oshi in order to get battery status. This is more configurable, it seems to work everywhere (macOS users may appreciate), but the battery information may differ a little bit from what you get from the operating system. Per example, on Windows, Oshi may indicate a remaining time (when charging or discharging) that differs from the Power Options indicator in the Windows status bar. Without Oshi, on Windows, plugin will query the native Kernel32.SYSTEM_POWER_STATUS, which is exactly what you get from the Power Options indicator. Oshi information are not wrong, but some of them simply offer estimates based on different calculation methods. You may observe the same thing on Linux (Oshi vs acpi -b) and macOS (Oshi vs pmset -g batt).

Battery status is updated every 90 seconds, configurable in File, Settings..., Appearance, Battery Status.

Build

Install a JDK17+ and Gradle, then run ./gradlew buildPlugin. See the ZIP file generated in build/distributions/.
You can also run plugin in a standalone IDE with ./gradlew runIde.

You can also take a look at the Makefile.

Author

Jonathan Lermitage ([email protected])
Linkedin profile: jonathan-lermitage

License

MIT License. In other words, you can do what you want: this project is entirely OpenSource, Free and Gratis.

intellij-battery-status-plugin's People

Contributors

chriscarini avatar jonathanlermitage avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

intellij-battery-status-plugin's Issues

migrate plugin to IJ 2020.1

Plugin uses deprecated API that are removed in IJ 2020.1. Migration may be complex due to the lack of documentation.

Automatically toggle "Power Save Mode"?

While looking through the IntelliJ Plugin Marketplace I found this plugin. I'm looking for a way to automatically toggle "Power Save Mode" whenever I'm on battery, maybe when the battery is below a certain percentage. This plugin seems somewhat related to such a feature, is this something that would fit this plugin?

Produces too long string on MacOS

I needed only Battery percentage, so I used this code:
pmset -g batt | grep -Eo "\d+%"|echo "Battery:$(cat -)"
I created a shell file and use this command in configuration: bash /path/to/script.sh
And now it works fine for me.

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.