Metadata-Version: 2.1
Name: snxtray
Version: 0.0.7
Summary: Systray for snx
Home-page: https://gitlab.com/linalinn/snxtray
Author: LinaLinn
Author-email: lina.cloud@outlook.de
License: Mozilla Public License Version 2.0
Project-URL: Issue tracker, https://gitlab.com/linalinn/snxtray/-/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3
Description-Content-Type: text/markdown
Requires-Dist: psutil (==5.7.0)
Requires-Dist: wxPython
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'

# SNX Tray
Tray Icon for snx

## Install 
``pip install snxtray``

##### Ubuntu 18.04 LTS wx build dependencies:

``make gcc libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev libgstreamer-gl1.0-0 freeglut3 freeglut3-dev python-gst-1.0 python3-gst-1.0 libglib2.0-dev ubuntu-restricted-extras libgstreamer-plugins-base1.0-dev``

## Configuration 
#### Example config
`cat $HOME/.config/snxtray.json`
```json
{
  "server": "IP/URL",
  "cert": "path to cert",
  "keep_passwd": false,
  "elevate": "pkexec",
  "post-up": [["exsample", "-u"]],
  "post-down": [["exsample", "-d", "arg2"]]
}
```
**Note: if `elevate` is not set to `hooks` this string is added as an prefix to the snx command**
`post-up/down` are optional
#### Use root Hooks
To use root Hooks you need to configure your snxtray with `cert`, `server` and set `elevate` to `hooks`.<br>
Then you can run `sudo -E snxtray --init-hooks` this create the file structure in */etc/snxtray* and configures the up hook
with the values of your config **Note: all users that use hooks will use the same configuration**

You now can edit the post-down and post-up to call commands with root permissions

