Skip to content

yutzhead/thinkvantage-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThinkVantage Dashboard: A system tool for ThinkPads.

ThinkVantage Dashboard works best with acpi_call, akmod-tp_smapi, akmod-acpi_call and tp_smapi installed.

Image of ThinkVantage Dashboard

If the ThinkVantage button is usele... err, unused, it will automatically use it as a hotkey.

ThinkVantage Dashboard can be extended via plugins which are pythonic classes.

from gi.repository import Gtk
from plguins.utils import TextRow, PercentageRow
import threading

class MyPlugin():
    def __init__(self):
        # Perform basic initialization
        self.autoupdate = -1 # Reloads data via getListboxRows every self.autoupdate seconds
        #self.lock = threading.Lock() # Optional lock for getRows()

    def getHeader(self):
        # Return a title as shown in the sidebar
        return 'My Plugin'

    def shouldDisplay(self):
        # Perform checks whether this plugin is available on this ThinkPad
        return True

    def getRows(self):
        # Yields GtkWidgets for the main area

        # Displays a title ('Nothing') on the left, and the content of the
        # file ('/dev/null') on the right
        yield TextRow('Nothing', '/dev/null')

        # Adds a title on the left, and a progressbar with subtitle
        # on the right
        yield PercentageRow('How full is the glass?',
                50.0,
                "volume of liquid"
        )

        # Custom row with a GtkBox
        box = Gtk.Box()
        box.add(Gtk.Label("Hello"))
        box.add(Gtk.Label("World"))
        yield box

# Add an instance of the plugin for auto-discovery with priority 99
PLUGINS.append((99, MyPlugin()))

If someone doesn't have anything better to do: It will be hours and hours of fun to write the fingerprint sensor plugin. In-depth description of fprint

About

A system tool for ThinkPads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages