|
Revision 22, 0.5 KB
(checked in by lasarux, 3 years ago)
|
- config.py:
- config.yaml:
- misc/utils.py:
- plugins/info/info/init.py:
- plugins/zfs/zfs/init.py:
- plugins/zfs/zfs/zfs.glade:
More changes in config stuff.
ZFS plugin uses the current connection.
|
| Line | |
|---|
| 1 | # -*- coding: utf-8 -*- |
|---|
| 2 | from misc import yaml |
|---|
| 3 | |
|---|
| 4 | GLADEDIR = "glade" |
|---|
| 5 | CONFIG = yaml.load(file("config.yaml").read()) |
|---|
| 6 | HOSTS = CONFIG["hosts"] |
|---|
| 7 | USERS = CONFIG["users"] |
|---|
| 8 | PLUGINS = CONFIG["plugins"] |
|---|
| 9 | COMMANDS = CONFIG["commands"] |
|---|
| 10 | #USER = "lasarux" #TODO: add login window |
|---|
| 11 | REMOTE = "TERM=unix LC_ALL=C" |
|---|
| 12 | |
|---|
| 13 | def get_command(command, os): |
|---|
| 14 | columns = COMMANDS[command]["columns"] |
|---|
| 15 | try: |
|---|
| 16 | args = COMMANDS[command][os] |
|---|
| 17 | except: |
|---|
| 18 | args = COMMANDS[command]["default"] |
|---|
| 19 | return "%s %s" % (command, args), columns |
|---|