diff options
Diffstat (limited to 'src/usr/bin')
-rwxr-xr-x | src/usr/bin/logout-manager-trayicon | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/usr/bin/logout-manager-trayicon b/src/usr/bin/logout-manager-trayicon index b6471f9..012e2bd 100755 --- a/src/usr/bin/logout-manager-trayicon +++ b/src/usr/bin/logout-manager-trayicon @@ -2,6 +2,11 @@ # File: logout-manager-trayicon # License: CC-BY-SA 4.0 # Author: bgstack15 +# Startdate: 2020-03-20 +# Title: Logout Manager tray icon +# Purpose: An easy menu from the system tray in a panel for a window manager or desktop environment +# History: +# 2020-04-01 update for python 3.8 # Reference: # icon work https://stackoverflow.com/questions/45162862/how-do-i-set-an-icon-for-the-whole-application-using-pygobject # button right click must be from "button-press-event" and import Gdk https://python-gtk-3-tutorial.readthedocs.io/en/latest/menus.html @@ -15,10 +20,11 @@ # send signals https://stackoverflow.com/questions/15080500/how-can-i-send-a-signal-from-a-python-program # https://docs.python.org/3.8/library/signal.html#module-signal # Dependencies: -# dep-pip: psutil -# dep-devuan: python3-psutil +# dep-pip: psutil distro +# dep-devuan: python3-psutil python3-distro -import gi, os, platform, re, sys, psutil, signal +import gi, os, re, sys, psutil, signal +from distro import linux_distribution gi.require_version("Gtk","3.0") from gi.repository import Gtk from gi.repository import Gdk @@ -27,7 +33,7 @@ from dotenv import load_dotenv # all this to load the libpath try: defaultdir="/etc/sysconfig" - thisplatform = platform.platform().lower() + thisplatform = linux_distribution()[0].lower() if 'debian' in thisplatform or 'devuan' in thisplatform: defaultdir="/etc/default" # load_dotenv keeps existing environment variables as higher precedent |