Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rweckert/pSupply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pSupply

A simple power supply monitoring tool for Linux.

Script Purpose as a Tool:

View all details of battery supply accessable from a menu or via tray menu. Easily view, monitor, export all details of the primary power supply of your system.

pSupply Screenshot

Setup:

  1. Please review "Common System Requirements" and "Critical System Requirements" sections below for basic and critical requirements to run this script successfully.
  2. Save the pSupply.sh file to a directory.
  3. Make the pSupply.sh script executable by running the following command in the same directory as the pSupply.sh file:
    chmod +x pSupply.sh

Features:

  • Access all battery specifications.
  • Print, Export or Save all battery specifications.
  • Power meter showing battery status and current charge.
  • Convenient tray menu to battery charge status and details.
  • Use the 'F1' key for documentation from any main window.

Typical Usage:

When opening the pSupply script the main menu will appear. This shows you the current status of the battery either in "Charging" or "Discharging" status. This is followed by the current percentage that the battery is holding in charge. The "Details" option will open a detailed view of battery specifications and status. The option for "Tray" allows you to use pSupply from the system tray showing current current charge capacity and acces to all options of the pSupply script.

Detailed Options and Usage:

When opening pSupply, you will have the following options from the main menu:
- Status: Displays battery status and will show either "Discharging" or "Charging".
- Percentage: Shows the current percentage of battery charge.
- Refresh: Updates the status and the percentage of battery charge.
- Details: Opens the "pSuppy Details" window showing all specifics of the primary battery source.
- Meter: Displays a meter showing status and battery usage percentage.
- Tray: Opens the pSupply Tray menu shown by a battery tray icon.
- Theme: Options will allow you to select a theme for pSupply.
- Help: Opens pSupply documentation.
- Exit: Closes all vAlias windows and menus.

Details View:

The "pSupply-Details" window will display several details about your primary battery source. Options include the following:
- Print: Prints a list of all battery details as seen from the "Details View" window.
- Refresh: Updates battery specifications and displays any changes.
- Edit Stats: Opens a text file showing all battery specifics using the default text editor.
- Save Stats: Save a text file displaying all battery specifics into a directory specified.
- Close: Closes the "pSupply-Detail" window.

Meter View:

The meter view displays a meter showing you the current status of the battery either in "Charging" or "Discharging" mode and percentage of the battery. Options include the following:
- Refresh: Updates the meter status window.
- Close: Closes the meter status window.

Tray Menu:

Selecting the "Tray" option from the main menu will close open the system tray mode of pSupply represented by a battery icon. The main menu will close when the Tray option has been selected. Options include the following: - Status: Displays battery status either in "Charging" or "Discharging" modes.
- Percentage: Shows battery charge percentage.
- Supply Details: Opens the battery details view.
- Main Menu: Opens the main menu.
- Refresh: Updates the battery percentage and details.
- Quit Menu: Closes the pSupply tray menu.

Theme Options:

The "Theme" main menu option allows the user to change settings for the theme being used, as well as access to "Help" and "About" options:
- Load Theme: Allows the user to browse their system for a theme to use.
- Apply Loaded Theme: Applies the loaded theme. Once selected the Options window will close and re-open showing the theme selected in use.
- Mode: Select basic system theme available in the system for "Light Theme" or "Dark Theme". This default uses the "Breeze" theme package located in the "/usr/share/themes/" folder.
- Apply System Theme: Applies the Mode selected for either "Light Theme" or "Dark Theme". Once selected the Options window will close and re-open showing the theme selected in use.
- Browse Themes Folder: Browse the default themes folder "/usr/share/themes/".
- Help: Opens mRunner help documentation.
- About: Opens the about window showing script credits.
- Close: Closes the "Options" window.

Notes:

  • pSupply can be ran from any directory.
  • pSupply uses the /tmp/ folder for temporary and .ini files.
  • Use the 'F1' key for documentation from any main window.

pSupply Shortcut File:

Save the following as a file named "pSupply.desktop" in creating a shortcut to this utility. Update the path for "Exec" to where the script is stored:
[Desktop Entry]
Name=pSupply
GenericName=pSupply
Comment=A simple power supply monitoring tool.
Exec=/PathToScript/pSupply.sh
Type=Application
Icon=battery
Terminal=false

Common System Requirements:

Common shell commands found in most Linux installations are used to provide system functionalilty for this and other scripts shared from this profile. For thoroughness, these common shell commands are listed in alphabetical order with version and man page link for review: https://github.com/rweckert/pSupply/blob/bb1772f8dce90ba74f3ba87defa1e3ec33ab59bf/README-Basic-Requirements.md

Critical System Requirements:

Packages listed below provide the core ingredients for graphic display and desired output that enables pSupply deliver output and are critical for successful execution of the the script:

Package Version Notes
yad 14.0+ (GTK+ 3.24.41) A tool for developing graphical user interfaces in Linux and is used by this script to generate menus and dialog windows, is written by Victor Ananjevsky. Download: https://github.com/v1cont/yad Setup: Step by step instructions are available for either Linux or Microsoft Windows Subsystem for Linux (WSL) using a Debian base: https://github.com/rweckert/yad-14.0-Setup-From-Scratch
upower 1.90.3 A simple command line client for the UPower daemon. Written by David Zeuthen [email protected]. More information regarding upower can be found at https://manpages.ubuntu.com/manpages/jammy/man1/upower.1.html and https://www.cyberciti.biz/faq/linux-upower-command-examples-and-syntax/

Closing:

Script interface written by: Robert W. Eckert - [email protected] Please feel free to email to submit bugs, changes or requests. This script comes with absolutely no warranty. See the link for the GNU General Public License, version 3 or later listed below for further details.


Project Contents:

Project Page:
https://github.com/rweckert/pSupply
Source File:
https://github.com/rweckert/pSupply/blob/488025edf09b585d66a2838440ebecb2124e341b/pSupply.sh
Documentation File:
https://github.com/rweckert/pSupply/blob/488025edf09b585d66a2838440ebecb2124e341b/README.md
Project Screenshot:
https://github.com/rweckert/pSupply/blob/488025edf09b585d66a2838440ebecb2124e341b/screenshot-pSupply.jpg
Project Licensing:
https://github.com/rweckert/pSupply/blob/36a0ec6f0e3e80f6ec3cd93ec809427dff97fff0/LICENSE
GitHub Profile Page:
https://github.com/rweckert

About

A simple power supply monitoring tool for Linux.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages