Skip to main content

A GTK tray applet for power management for i3/sway/KDE

Project description

pwr-tray

A GTK Tray Applet for Power/Energy Saving and System/DE Controls

Install

Details TBD

  • Basically: pipx install pwr-tray
  • Plus, various executables.
  • Manually run as pwr-tray to create config (in ~/.config/pwr-tray/config.ini)

System Python Modules are needed

  • On Debian:

    • gir1.2-appindicator3-0.1 python3-gi
    • python3-gi-cairo gir1.2-gtk-3.0 libappindicator3-1
  • On Debian 12 and others?, if the above is not working, try:

    • gir1.2-ayatanaappindicator3-0.1 gir1.2-notify-0.7
    • python3-gi python3-gi-cairo gir1.2-gtk-3.0 ayatanalibappindicator3-1
  • On Arch:

    • libappindicator-gtk3 python-gobject python-cairo

Manual Launch

  • For foreground in terminal, run pwr-tray
  • In background, run setsid pwr-tray >/dev/null 2>&1 &

Output for Debugging

  • unless stdout is a tty, say for debugging, ~/.config/pwr-tray/debug.log is used instead of stdout
  • if we create a log file, its size is limited to 512K and then it is truncated
  • TBD: more info (tail -F, ssh, whatever)

Menu Options

Choose from three major power modes (to limit the effect of timeouts):

  • ☀ PRESENTATION Mode - Keeps the monitors on and system up.
  • ☀ NO-SLEEP Mode - Keeps the system up, but not the monitors on.
  • ☀ NORMAL Mode - Allows the monitors off and system to go down (the default).

Or choose to start the screen saver / lock:

  • ▷ Start Screensaver - start the screensaver (configure your screensaver separately, as you wish, but it should not be "None").
  • ▷ Blank Monitors - Blanks the screen immediately and locks the screen (using your screen saver).

Or choose a new system state:

  • ▼ Suspend System - suspends the system immediately.
  • ▼ Reboot System - reboots the system immediately.
  • ▼ Poweroff System - power down the system immediately.

Or choose new controls values:

  • ♺ Chg Screen Idle: 10m->30m - change the time to start the screen saver; each time clicked, it changes to the next one; you can fix the timeout or choose a list of them from the command line options; the default list is [10m, 30m].
  • ♺ Chg System Idle: 30m->60m - change the time to take the system down; clicking selects the next value; change on the command line; the default is [30m, 60m].
  • ♺ Chg Down State: Suspend - toggle how the system goes down when System Idle expires, Suspend or PowerOff; you can select the default from the command line.

Notes:

  • only the menu options that can have effect are shown (e.g., you cannot see "Presentation Mode" if in "Presentation Mode", you cannot see "Chg Screen Idle" if there is only one possibility, etc).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwr_tray-0.2.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pwr_tray-0.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file pwr_tray-0.2.tar.gz.

File metadata

  • Download URL: pwr_tray-0.2.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pwr_tray-0.2.tar.gz
Algorithm Hash digest
SHA256 26e47ebba5c4db5253e7324a4a9557c43b3344c0f76250767f91b598f5995fd5
MD5 d8d3c011bd1378d90320c4acc8e6be10
BLAKE2b-256 58490b62dee7e6a9d771f6bbf85ac40eb17c6ee5e16d8a52b148ebbea8c16b56

See more details on using hashes here.

File details

Details for the file pwr_tray-0.2-py3-none-any.whl.

File metadata

  • Download URL: pwr_tray-0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pwr_tray-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0f930c4cc133605296389fe67f9c54db34aaf7745c6f2f6b6e9c7371b0bf410
MD5 52d6fc971baf5a7108a44cbe0c82e9f0
BLAKE2b-256 e68a7503a2571527cdac9984daadf0bd828a5e2ed2c12fa221cb0e30d0c1d722

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page