How to make tkinter Window floating in i3 windowmanager

Viewed 3515

I'm just playing around with tkinter in python a little, but have some "troubles" with my i3 (tiling) windowmanager.

I want to create a floating window for entering a value (similar to a "Open File" Dialog). This has to be possible, since Gimp for example works with floating windows in i3, too. Of course I'm not sure if it's possible with tkinter.

Does someone happen to know the problem and found the solution? I guess there's got to be some sort of flag to set on the tkinter.Tk() widget.

2 Answers

You can tell i3wm that this is a dialog by setting your root element's type attribute to dialog

from Tkinter import Tk
root = Tk()
root.attributes('-type', 'dialog')
root.mainloop()

i3 will open the window automatically in floating mode instead of tiling.

Related