forked from ekeih/dynstatus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_config.py
81 lines (73 loc) · 2.8 KB
/
example_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/usr/bin/env python3
# This is an example configuration. Please copy/move
# it to $XDG_CONFIG_HOME/dynstatus/config.py and
# modify it to your need. On most systems
# $XDG_CONFIG_HOME will be ~/.config.
# This configuration file will be executed as
# normal python script. So you can use any
# valid python statement to configure dynstatus.
# status codes for pidgin
STATUS_OFFLINE = 1
STATUS_AVAILABLE = 2
STATUS_DO_NOT_DISTURB = 3
# 4 is unknown
STATUS_AWAY = 5
STATUS_EXTENDED_AWAY = 6
# 7 is unknown
dynstatus = {
# Define where dynstatus can find your plugins.
# If you want to write your own plugin you just
# have to put a python script that implements a
# function 'run(dict)' (where dict will be a
# dictionary that contains all settings of the
# matched configuration block) in this folder
# and enable it in the plugins section.
'plugins_path' : '~/.config/dynstatus/plugins',
# Which modules from plugins_path should be executed.
# Order is important! e.g. persistent_status should
# be executed as last module.
'plugins' : ['pidgin', 'notification', 'persistent_status'],
# If dynstatus runs as daemon all plugins
# will be executed in this interval (seconds).
'daemon_interval' : 300,
# You _must_ have a default configuration block.
# dynstatus will uses these values if no other
# configuration block matches your current location.
'default' : {
'name' : 'Default',
'status' : STATUS_AVAILABLE,
'statustext' : ''
},
# Put all your location configuration blocks in this dictionary.
# Every block must have an unique name and an interface.
# All other settings are optional.
#
# You can combine three different filters: ssid, mac and ip.
# All of them can be a simple string or a python list of strings.
# ssid : name of a wireless network
# mac : MAC address of wireless accesspoint
# ip : local ip address
#
# Any additional settings are not used by dynstatus directly.
# But the complete matching configuration block will be passed
# to your enabled plugins as dictionary. So you can use them
# in your plugins. But before you try to access a setting you
# should make sure that it is available in the passed
# configuration block.
'locations' : [
{
'name' : 'Home',
'interface' : 'enp0s25',
'ip' : '192.168.178.1',
'status' : STATUS_DO_NOT_DISTURB,
'statustext' : '@Home',
},
{
'name' : 'University',
'interface' : 'wlp3s0',
'ssid' : ['eduroam', 'tub-vpn'],
'status' : STATUS_DO_NOT_DISTURB,
'statustext' : '@University',
}
]
}