23 lines
460 B
Python
Executable file
23 lines
460 B
Python
Executable file
#!/usr/bin/env python
|
|
|
|
from i3sway.monitor import Monitor
|
|
from config import read_config
|
|
from state import StateWriter
|
|
|
|
"""
|
|
{
|
|
"items": {
|
|
"discord": {
|
|
"match_class": [ "discord" "WebCord" ],
|
|
"exec": "webcord",
|
|
},
|
|
},
|
|
}
|
|
"""
|
|
|
|
config = read_config()
|
|
|
|
state = StateWriter(config)
|
|
class_map = {name: defn['match_classes'] for name, defn in config['items'].items()}
|
|
with Monitor(state, class_map) as wm:
|
|
wm.listen()
|