aboutsummaryrefslogtreecommitdiffstats
path: root/machammer/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'machammer/process.py')
-rwxr-xr-xmachammer/process.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/machammer/process.py b/machammer/process.py
index 59160c6..252cb2a 100755
--- a/machammer/process.py
+++ b/machammer/process.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from . import defaults
from .functions import call, tell_app
@@ -35,3 +36,37 @@ def kill(name, signal='TERM'):
def open(name):
call('/usr/bin/open', '-a', name)
+
+
+class Prefs(object):
+ def __init__(self, domain):
+ self._prefs = defaults.as_dict(domain)
+
+ def __getattr__(self, k):
+ try:
+ return self._prefs[k]
+ except AttributeError:
+ return super(Prefs, self).getattr(k)
+
+ def __setattr__(self, k, v):
+ print('Setting attribute: %s' % k)
+ self._prefs[k] = v
+
+
+class App(object):
+ def __init__(self, domain):
+ self.domain = domain
+ self.prefs = Prefs(domain)
+
+ def launch(self):
+ pass
+
+ def quit(self):
+ pass
+
+ def is_installed(self):
+ return False
+
+ def version(self):
+ return False
+