aboutsummaryrefslogtreecommitdiff
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/bin/logout-manager-cli (renamed from src/usr/bin/logout-manager-cli.py)4
-rwxr-xr-xsrc/usr/bin/logout-manager-gtk (renamed from src/usr/bin/logout-manager-gtk.py)2
-rwxr-xr-xsrc/usr/bin/logout-manager-ncurses (renamed from src/usr/bin/logout-manager-ncurses.py)6
-rwxr-xr-xsrc/usr/bin/logout-manager-tcl (renamed from src/usr/bin/logout-manager-tcl.py)4
-rwxr-xr-xsrc/usr/bin/logout-manager-trayicon2
-rw-r--r--src/usr/share/doc/logout-manager/README.md2
-rw-r--r--src/usr/share/logout-manager/lmlib.py4
-rw-r--r--src/usr/share/man/man1/logout-manager-cli.1.md25
-rw-r--r--src/usr/share/man/man1/logout-manager-gtk.1.md16
-rw-r--r--src/usr/share/man/man1/logout-manager-ncurses.1.md16
-rw-r--r--src/usr/share/man/man1/logout-manager-tcl.1.md16
-rw-r--r--src/usr/share/man/man1/logout-manager-trayicon.1.md18
-rw-r--r--src/usr/share/man/man5/logout-manager.conf.5.md57
-rw-r--r--src/usr/share/man/man7/logout-manager.7.md45
14 files changed, 205 insertions, 12 deletions
diff --git a/src/usr/bin/logout-manager-cli.py b/src/usr/bin/logout-manager-cli
index 8fd78b4..fde7d55 100755
--- a/src/usr/bin/logout-manager-cli.py
+++ b/src/usr/bin/logout-manager-cli
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# File: logout-manager-cli.py
+# File: logout-manager-cli
# License: CC-BY-SA 4.0
# Author: bgstack15
# Startdate: 2020-03-10 18:40
@@ -7,7 +7,7 @@
# Purpose: Feature completeness in this package
# History:
# Usage:
-# logout-manager-cli.py
+# logout-manager-cli
# Reference:
# https://stackoverflow.com/questions/39092149/argparse-how-to-make-mutually-exclusive-arguments-optional/39092229#39092229
# https://stackoverflow.com/questions/3061/calling-a-function-of-a-module-by-using-its-name-a-string/12025554#12025554
diff --git a/src/usr/bin/logout-manager-gtk.py b/src/usr/bin/logout-manager-gtk
index 553fc41..389ad70 100755
--- a/src/usr/bin/logout-manager-gtk.py
+++ b/src/usr/bin/logout-manager-gtk
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# File: logout-manager-gtk.py
+# File: logout-manager-gtk
# License: CC-BY-SA 4.0
# Author: bgstack15
# Startdate: 2019-06-01
diff --git a/src/usr/bin/logout-manager-ncurses.py b/src/usr/bin/logout-manager-ncurses
index 1500d85..7ff5e18 100755
--- a/src/usr/bin/logout-manager-ncurses.py
+++ b/src/usr/bin/logout-manager-ncurses
@@ -1,11 +1,11 @@
#!/usr/bin/env python3
-# File: logout-manager-ncurses.py
+# File: logout-manager-ncurses
# License: MIT
# Author: adamlamers, bgstack15
# Startdate: 2020-03-09 17:06
# Title: ncurses based logout manager
# Usage:
-# logout-manager-ncurses.py
+# logout-manager-ncurses
# Reference:
# https://docs.python.org/3/howto/curses.html
# ripped straight from http://adamlamers.com/post/FTPD9KNRA8CT
@@ -13,7 +13,7 @@
# https://robinislam.me/blog/reading-environment-variables-in-python/
# Improve:
# Dependencies:
-# Devuan: python3-dotenv
+# dep-devuan: python3-dotenv
# Documentation:
# Improvements for CursesMenu class over origin:
# accepts number key inputs
diff --git a/src/usr/bin/logout-manager-tcl.py b/src/usr/bin/logout-manager-tcl
index 127bd54..17e0eed 100755
--- a/src/usr/bin/logout-manager-tcl.py
+++ b/src/usr/bin/logout-manager-tcl
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# File: logout-manager-tcl.py
+# File: logout-manager-tcl
# License: CC-BY-SA 4.0
# Author: bgstack15
# Startdate: 2019-06-12 20:05
@@ -7,7 +7,7 @@
# Purpose: A tcl/tk graphical program for selecting shutdown, logout, etc.
# History:
# Usage:
-# logout-manager-tcl.py
+# logout-manager-tcl
# References:
# http://effbot.org/tkinterbook/button.htm
# http://effbot.org/tkinterbook/tkinter-application-windows.htm
diff --git a/src/usr/bin/logout-manager-trayicon b/src/usr/bin/logout-manager-trayicon
index 012e2bd..7a6fd25 100755
--- a/src/usr/bin/logout-manager-trayicon
+++ b/src/usr/bin/logout-manager-trayicon
@@ -12,7 +12,7 @@
# button right click must be from "button-press-event" and import Gdk https://python-gtk-3-tutorial.readthedocs.io/en/latest/menus.html
# useful reference https://lazka.github.io/pgi-docs/Gtk-3.0/classes/Button.html#Gtk.Button
# systray info https://github.com/PiSupply/PiJuice/blob/master/Software/Source/src/pijuice_tray.py
-# logout-manager-gtk.py
+# logout-manager-gtk
# how to determine double click https://stackoverflow.com/questions/60009648/is-there-a-better-way-to-handle-double-click-in-pygobject
# interactive python3 shell and help(Gdk.EventType)
# https://developer.gnome.org/gtk3/unstable/GtkWidget.html#GtkWidget-button-press-event
diff --git a/src/usr/share/doc/logout-manager/README.md b/src/usr/share/doc/logout-manager/README.md
index d34f02c..112d5f6 100644
--- a/src/usr/share/doc/logout-manager/README.md
+++ b/src/usr/share/doc/logout-manager/README.md
@@ -22,7 +22,7 @@ Be aware that this is insecure. See man `fluxbox-remote(1)`.
`apt-cache search logout` shows [lxsession-logout](http://manpages.ubuntu.com/manpages/precise/en/man1/lxsession-logout.1.html) which was compiled, as well as does not provide configurable options for changing executed commands or icons.
## License
-[logout-manager-ncurses.py](src/usr/bin/logout-manager-ncurses.py) is licensed under the [MIT license](http://choosealicense.com/licenses/mit) and is derived almost entirely from [adamlamers](http://adamlamers.com/post/FTPD9KNRA8CT).
+[logout-manager-ncurses](src/usr/bin/logout-manager-ncurses) is licensed under the [MIT license](http://choosealicense.com/licenses/mit) and is derived almost entirely from [adamlamers](http://adamlamers.com/post/FTPD9KNRA8CT).
Everything else is licensed under [CC-BY-SA 4.0](https://choosealicense.com/licenses/cc-by-sa-4.0/).
## Description
diff --git a/src/usr/share/logout-manager/lmlib.py b/src/usr/share/logout-manager/lmlib.py
index 0bf0a0c..ba4980b 100644
--- a/src/usr/share/logout-manager/lmlib.py
+++ b/src/usr/share/logout-manager/lmlib.py
@@ -7,7 +7,7 @@
# Purpose: Store the common elements for operating a logout-manager
# History:
# Usage:
-# In a logout-manager-gtk.py program
+# In a logout-manager-gtk program
# Reference:
# platform info https://stackoverflow.com/questions/110362/how-can-i-find-the-current-os-in-python/10091465#10091465
# Improve:
@@ -18,7 +18,7 @@
import configparser, os, subprocess
from distro import linux_distribution
-logout_manager_version="2020-03-10a"
+logout_manager_version="2020-04-01a"
class Actions:
diff --git a/src/usr/share/man/man1/logout-manager-cli.1.md b/src/usr/share/man/man1/logout-manager-cli.1.md
new file mode 100644
index 0000000..a775770
--- /dev/null
+++ b/src/usr/share/man/man1/logout-manager-cli.1.md
@@ -0,0 +1,25 @@
+logout-manager-cli 1 "April 2020" logout-manager "General Commands Manual"
+==================================================
+# NAME
+logout-manager-cli - command line interface for invoking logout options
+# SYNOPSIS
+logout-manager-cli [OPTIONS] [ACTION]
+# DESCRIPTION
+Use this interface to `logout-manager`(7) from the command line or in scripts. Parameters can be passed to determine the action to take.
+# OPTIONS
+
+-h, --help show a help screen
+
+-d [0-10] set debug level
+
+-n Dryrun only! Do not take action. Useful with `hibernate` to determine if hibernate is allowed on this system.
+
+-V --verbose be verbose
+# ACTIONS
+One action may be specified on the command line. See "ACTIONS" section of `logout-manager`(7) man page for a list of available actions.
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7),`logout-manager.conf`(5)
diff --git a/src/usr/share/man/man1/logout-manager-gtk.1.md b/src/usr/share/man/man1/logout-manager-gtk.1.md
new file mode 100644
index 0000000..2130f6b
--- /dev/null
+++ b/src/usr/share/man/man1/logout-manager-gtk.1.md
@@ -0,0 +1,16 @@
+logout-manager-gtk 1 "April 2020" logout-manager "General Commands Manual"
+==================================================
+# NAME
+logout-manager-gtk - gtk3 interface for invoking logout options
+# SYNOPSIS
+logout-manager-gtk
+# DESCRIPTION
+Use this interface to `logout-manager`(7) in an X11 graphical environment. Using gtk3, this program displays buttons with text and icons to present a simple menu for invoking different logout-related commands.
+# ACTIONS
+When a button is selected, an action is invoked. See "ACTIONS" section of `logout-manager`(7) man page for a list of available actions.
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7),`logout-manager.conf`(5)
diff --git a/src/usr/share/man/man1/logout-manager-ncurses.1.md b/src/usr/share/man/man1/logout-manager-ncurses.1.md
new file mode 100644
index 0000000..4053ce3
--- /dev/null
+++ b/src/usr/share/man/man1/logout-manager-ncurses.1.md
@@ -0,0 +1,16 @@
+logout-manager-ncurses 1 "April 2020" logout-manager "General Commands Manual"
+==================================================
+# NAME
+logout-manager-ncurses - ncurses interface for invoking logout options
+# SYNOPSIS
+logout-manager-ncurses
+# DESCRIPTION
+Use this interface to `logout-manager`(7) in a console or terminal window. It displays numerized options, which can also be navigated with arrow keys or vim-style [jk] keys. The presented menu shows a list of actions for invoking different logout-related commands.
+# ACTIONS
+When an entry is selected, an action is invoked. See "ACTIONS" section of `logout-manager`(7) man page for a list of available actions.
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7),`logout-manager.conf`(5)
diff --git a/src/usr/share/man/man1/logout-manager-tcl.1.md b/src/usr/share/man/man1/logout-manager-tcl.1.md
new file mode 100644
index 0000000..e6ec55f
--- /dev/null
+++ b/src/usr/share/man/man1/logout-manager-tcl.1.md
@@ -0,0 +1,16 @@
+logout-manager-tcl 1 "April 2020" logout-manager "General Commands Manual"
+==================================================
+# NAME
+logout-manager-tcl - Tcl/tk interface for invoking logout options
+# SYNOPSIS
+logout-manager-tcl
+# DESCRIPTION
+Use this interface to `logout-manager`(7) in an X11 graphical environment. Using the python3 tkinter library, this program displays buttons with text and icons to present a simple menu for invoking different logout-related commands.
+# ACTIONS
+When a button is selected, an action is invoked. See "ACTIONS" section of `logout-manager`(7) man page for a list of available actions.
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7),`logout-manager.conf`(5)
diff --git a/src/usr/share/man/man1/logout-manager-trayicon.1.md b/src/usr/share/man/man1/logout-manager-trayicon.1.md
new file mode 100644
index 0000000..1f33e73
--- /dev/null
+++ b/src/usr/share/man/man1/logout-manager-trayicon.1.md
@@ -0,0 +1,18 @@
+logout-manager-trayicon 1 "April 2020" logout-manager "General Commands Manual"
+==================================================
+# NAME
+logout-manager-trayicon - system tray icon for invoking logout options
+# SYNOPSIS
+logout-manager-trayicon
+# DESCRIPTION
+This interface to `logout-manager`(7) displays a system tray (notification area) icon. `Right-clicking` the icon displays a popup menu with options for invoking different logout-related commands.
+A disabled menu entry also shows the currently-logged in user, as well as a notification if `DRYRUN` is set.
+`Double-clicking` the icon will invoke `logout-manager` which is usually aliases to one of the available interfaces for `logout-manager`(7)
+# ACTIONS
+When a button from the menu is selected, an action is invoked. See "ACTIONS" section of `logout-manager`(7) man page for a list of available actions.
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7),`logout-manager.conf`(5)
diff --git a/src/usr/share/man/man5/logout-manager.conf.5.md b/src/usr/share/man/man5/logout-manager.conf.5.md
new file mode 100644
index 0000000..6b5cce3
--- /dev/null
+++ b/src/usr/share/man/man5/logout-manager.conf.5.md
@@ -0,0 +1,57 @@
+logout-manager.conf 5 "April 2020" logout-manager "File Formats and Conventions"
+==================================================
+# NAME
+logout-manager.conf - the configuration file for logout-manager
+# FILE FORMAT
+The file has an ini-style syntax and consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. An example:
+
+ [section]
+ key = "value"
+ key2 = value2
+
+Put a value in double quotes if you need the white space preserved.
+logout-manager.conf must be a regular file, and readable by all users who are permitted to run logout-manager. This is usually the same users who are permitted to log in to a graphical session.
+# SECTIONS AND EXAMPLES
+### The [logout-manager] section
+Define the command for a given action.
+
+`Section parameters`
+
+lock_command, logout_command, hibernate_command, shutdown_command, reboot_command
+ The value will be invoked upon selection of the named action. Place a command with its parameters in double quotes.
+ Defaults:
+
+ lock_command="/usr/libexec/logout-manager/lm-helper lock"
+ logout_command="/usr/libexec/logout-manager/lm-helper logout"
+ hibernate_command="sudo /usr/libexec/logout-manager/lm-helper hibernate"
+ reboot_command="sudo /usr/libexec/logout-manager/lm-helper reboot"
+ shutdown_command="sudo /usr/libexec/logout-manager/lm-helper shutdown"
+### The [icons] section
+Configuration options for which icons to display, for the gtk3, tcl, and trayicon front-ends.
+
+`Section parameters`
+
+size (integer)
+ The height and width, in pixels, of the icons for the gtk3 and tcl frontends.
+ Default: 24
+
+theme
+ The gtk3 icon theme. Options include your currently installed themes in `/usr/share/icons`, or the string *default* which loads the current gtk3 theme as defined in `${HOME}/.config/gtk-3.0/settings.ini`, value `gtk-icon-theme-name`.
+ Default: default
+
+lock, logout, hibernate, shutdown, reboot
+ Each of these entries can be given an icon name, e.g., "system-reboot", or a full path to a specific file.
+ Defaults:
+
+ lock = system-lock-screen
+ logout = system-log-out
+ hibernate = system-hibernate
+ shutdown = system-shutdown
+ reboot = system-reboot
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager`(7)
+Icon theme specification `http://www.freedesktop.org/wiki/Specifications/icon-theme-spec/`
diff --git a/src/usr/share/man/man7/logout-manager.7.md b/src/usr/share/man/man7/logout-manager.7.md
new file mode 100644
index 0000000..de4d05e
--- /dev/null
+++ b/src/usr/share/man/man7/logout-manager.7.md
@@ -0,0 +1,45 @@
+logout-manager 7 "April 2020" logout-manager "Common configuration options"
+==================================================
+# NAME
+logout-manager - common configuration options
+# SYNOPSIS
+This program manages a list of options for common logout commands, and can be used by a number of front-ends, including:
+
+`logout-manager-cli`(1)
+`logout-manager-gtk`(1)
+`logout-manager-ncurses`(1)
+`logout-manager-tcl`(1)
+`logout-manager-trayicon`(1)
+
+Of the listed front-ends, the trayicon is not recommended for aliasing to the generic name `logout-manager`.
+
+The library for logout-manager uses a number of environment variables; see below.
+# ENVIRONMENT VARIABLES
+If the defaults file (nominally `/etc/sysconfig/logout-manager`) does not define the following variables, you can define them in your own situation.
+
+`LOGOUT_MANAGER_LIBPATH`=/usr/share/logout-manager
+
+`LOGOUT_MANAGER_CONF`=/etc/logout-manager.conf
+
+Additional environment variables are used.
+`DRYRUN`=1 If DRYRUN is set to any non-null value, the actions will instead only display what would be executed and will not execute the commands.
+
+# ACTIONS
+An action is one of the following.
+
+**lock** hide and password-protect current screen
+
+**logout** close this graphical session
+
+**hibernate** save session memory to disk and power off. Note that not all hardware supports this.
+
+**shutdown** power off
+
+**reboot** restarts the system
+
+# AUTHOR
+bgstack15 `https://bgstack15.wordpress.com/`
+# COPYRIGHT
+CC-BY-SA 4.0
+# SEE ALSO
+`logout-manager.conf`(5),`logout-manager-cli`(1),`logout-manager-gtk`(1),`logout-manager-ncurses`(1),`logout-manager-tcl`(1),`logout-manager-trayicon`(1),
bgstack15