Last active
August 1, 2021 00:42
-
-
Save wpjunior/96bc48dcb0a6d45a25852a98bfb503ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from gi.repository import GLib, Gtk, Gdk | |
import Xlib.display | |
size = 167 | |
def main(): | |
window = Gtk.Window() # Gtk.WINDOW_TOPLEVEL) | |
window.set_default_size(size*0.68, Gdk.Screen.height()) | |
window.move(0, 0) | |
window.set_type_hint(6) # Type DOCK | |
window.show_all() | |
xid = window.get_window().get_xid() | |
display = Xlib.display.Display() | |
window = display.create_resource_object("window", window.get_window().get_xid()) | |
window.change_property( | |
display.intern_atom("_NET_WM_STRUT"), | |
display.intern_atom("CARDINAL"), | |
32, [size, 0, 0, 0]) | |
display.sync() | |
Gtk.main() | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment