How do you make windows 100% width + height with python? #134
Answered
by
Consolatis
godalming123
asked this question in
Q&A
-
How do you make windows 100% width + height with python? Also is there any documentation? |
Beta Was this translation helpful? Give feedback.
Answered by
Consolatis
Sep 6, 2022
Replies: 2 comments 1 reply
-
Could be used to implement a desktop background with icons and context menu: #!/usr/bin/env python3
import gi
gi.require_version("Gtk", "3.0")
gi.require_version('GtkLayerShell', '0.1')
from gi.repository import Gtk, GtkLayerShell
if __name__ == '__main__':
win = Gtk.Window()
GtkLayerShell.init_for_window(win)
for anchor in ('LEFT', 'RIGHT', 'TOP', 'BOTTOM'):
GtkLayerShell.set_anchor(win, getattr(GtkLayerShell.Edge, anchor), True)
GtkLayerShell.set_layer(win, GtkLayerShell.Layer.BOTTOM)
win.show_all()
Gtk.main() Regarding documentation: There is http://lazka.github.io/pgi-docs/#GtkLayerShell-0.1 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wmww
-
Consolatis's answer looks good to me. Unfortunately we do not have documentation for each language. The C documentation is in the header file here, which should be pretty easy to translate to Python. You might also want to look at the layer shell protocol for more details. Finally, the Python example is a good place to start. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could be used to implement a desktop background with icons and context menu:
Regarding documentation: There is http://lazka.github.io/pgi-docs/#GtkLayerShell-0.1