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.
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.
If you know the title of the window, or any pattern of the title, you can add the following line in your i3 config file to make it float on start:
for_window [title="title of your window"] floating enable
For example, I use this config to make my gnome-keyring floating every time it asks me for password:
for_window [title="Unlock private key"] floating enable
EDIT:
According to this https://faq.i3wm.org/question/61/forcing-windows-as-always-floating.1.html:
"i3 sets dialog, utility, toolbar and splash windows to floating."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With