config initial
This commit is contained in:
parent
875a517e39
commit
76e943b876
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
.*pyc
|
||||
azot/*.pyc
|
||||
|
|
15
azot.py
15
azot.py
|
@ -1,13 +1,12 @@
|
|||
from Xlib import display
|
||||
import azot.action
|
||||
from azot.X import get_geometry, get_cursor_position
|
||||
import azot.config
|
||||
|
||||
azot.action.do("TRATATA")
|
||||
|
||||
width = display.Display().screen().width_in_pixels
|
||||
height = display.Display().screen().height_in_pixels
|
||||
geometry = get_geometry()
|
||||
position = get_cursor_position()
|
||||
|
||||
root = display.Display().screen().root.display
|
||||
azot.config.load()
|
||||
|
||||
# print data["root_x"], data["root_y"]
|
||||
#print width, height
|
||||
#print root.__dict__
|
||||
print geometry['x'], geometry['y']
|
||||
print position['x'], position['y']
|
||||
|
|
Binary file not shown.
BIN
azot/action.pyc
BIN
azot/action.pyc
Binary file not shown.
18
azot/config.py
Normal file
18
azot/config.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
# Globals
|
||||
config_path = os.environ['HOME'] + '.config/azot/config.json'
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('-c', '--config')
|
||||
args = parser.parse_args()
|
||||
if args.config:
|
||||
config_path = args.config
|
||||
|
||||
|
||||
# Load configuration from file
|
||||
def load():
|
||||
print config_path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user