diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-26 00:10:13 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-26 00:10:13 +0100 |
commit | 9f7991b16f754b51303e6f07380510e56bc54ed5 (patch) | |
tree | 0c59c3403ba517ba778bf41d4052a6a068a80723 /src | |
parent | open a simple window (diff) | |
download | xpybar-9f7991b16f754b51303e6f07380510e56bc54ed5.tar.gz xpybar-9f7991b16f754b51303e6f07380510e56bc54ed5.tar.bz2 xpybar-9f7991b16f754b51303e6f07380510e56bc54ed5.tar.xz |
partial strut dock
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/__main__.py | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/__main__.py b/src/__main__.py index e65472a..ad195f4 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -1,17 +1,34 @@ #!/usr/bin/env python3 import time - -import Xlib.display +import Xlib.display, Xlib.Xatom display = Xlib.display.Display() screen = display.screen() window = screen.root.create_window(0, 0, 100, 100, 0, screen.root_depth) +window.set_wm_name('xpybar') +window.set_wm_icon_name('xpybar') +window.set_wm_class('bar', 'xpybar') + +_CARD = display.intern_atom("CARDINAL") +_PSTRUT = display.intern_atom("_NET_WM_STRUT_PARTIAL") +window.change_property(_PSTRUT, _CARD, 32, [0, 60, 0, 0, 0, 0, 24, 767, 0, 0, 0, 0]) + +_ATOM = display.intern_atom("ATOM") +_TYPE = display.intern_atom("_NET_WM_WINDOW_TYPE") +_DOCK = display.intern_atom("_NET_WM_WINDOW_TYPE_DOCK") +window.change_property(_TYPE, _ATOM, 32, [_DOCK]) + + window.map() display.flush() + time.sleep(1) + +window.unmap() +display.flush() display.close() |