Gtk Paned on both Gtk HeaderBar and Window - python-3.x

I'm trying to make a code editor (like gedit) in Python + Gtk3. On gedit there is a handle for the files view that is extended to the headerbar, any idea how to make something like that?
Check this image to see what I mean.

Related

running a Program from vim that opens another window messes up the formating of my terminal

Im using vim inside a gnome-Terminal to edit a Python Program. Im also using a tiling Window manager calles awesome-wm.
Inside my Python program im plotting some data to a matplotlib graph (when executed that opens another window). When i want to test my Program i use the following comand to run the Program from inside of vim.
:!python3 %
when the Program runs it prints three messages to the shell and opens a matplotlib window to plot the data.
Sometimes i can only see the messed up linebreaks and have to scroll up to see the messages.
My question now is why is the formating inside the console messed up an how do i fix it?
My guess would be that the Terminal Window does not notice that it is beeing resized when the plot window is beeing opend, but i dont know how to refresh the terminal in that case.
using :!clear; python3 % does not help.
Thanks in advance.
(Well, it isn't a direct solution to your problem, but here it goes.)
Most terminal don't handle reflow in resize properly. There is no right ways to do it so most don't attempt to pull all the tricks in the book to make this better. After all, for classic floating window manger, resizing isn't something you do very often. LibVTE/Gnome-terminal isn't designed for tiling WMs and has not been patched over the years to make it better.
Urxvt is probably the most common terminal for AwesomeWM (the default is xterm because it is much more commonly installed by default). It has more advanced features like tabs and transparency you expect from modern terminals. Note that some of them (tabs) are disabled by default.
Sometime using software like tmux can be used to mitigate some of the limitations of any given terminal, but it comes with limitations of its own.

tkinter set window on bottom of all other windows as desktop widget

I'm using Python3 on ubuntu gnome 16.04.
I wrote a whole UI project using tkinter and now I'm stuck because I cant find a way to solve the next issue:
My question:
is there any way to set a window on the bottom of all other windows using tkinter?
so that when I press 'win' + 'd' shortcut and go back to the desktop I will see my widget running?
edit:
If tkinter does not support that, I would be glad to hear other solutions
to make my widget run on the bottom of other windows, in a way that my main GUI library will still be tkinter (I don't want to refactor all my project because on that) maybe adding bash commands that pin my window to the desktop, maybe using some other python window attributes libraries.

Splitting Vim window into three panels

I am new to Vim and I want to consider Vim as a potential code IDE for developing Python and C/C++ codes.
After struggling a lot I finally managed to install enough Plugins such as YCM,color-schemes,... to get a minimum development environment.
What I am struggling to fix are as follows:
1-Vim must automatically split a window into three panels for a python or C/C++ file to edit like the attached image.
Note: The vim or .vimrc setting must be set to be plain for other file types.
2-YouCompleteMe popup menu must be limited in size and get specific background(bg) and font color.
3-The 2 extra panels YCM popup doc and GDB/Compiler output should not write to file and the user should insert only once :q! or :wq to quit from the main file window (user should not close all the panels separately).
4-The compiler/gdb output must be shown in its dedicated window with scroll capability.
Thanks

Is it possible to display multiple choice dialog in gVIM?

I have a gVIM script that parses current buffer and offers user to select one of multiple choices. It is implemented as console input, but since i'm using graphical version of gVIM, maybe it's possible to use graphical version of multiple choice dialog? I have tried to use python + Tkinter but it's very unstable and is not working on some NIX boxes :(. Any ideas?
GVim has, in its functions and settings, nothing that would enable showing GUI elements (with a few noble exceptions, like closing dialog and such.).
That being said, GVim is open source, and nothing stops you from downloading the source and messing with it.
After some research i have found a solution. VIM supports so-called "clientserver" mode and external application can send a command to it. So this task (and many others) can be solved with following technique (tested on Windows, OSX and Ubuntu):
VIMscript that handles a command launches standalone GUI script in
separate process and returns.
Standalone GUI script (python/ruby/.exe/whatever) displays GUI and
waits for user interaction.
After user interaction, standalone GUI script closes it's window,
communicates back to VIM via "clientserver" interface (call another
script, open file, move cursor etc) and exits.

Embed Qt window into firefox, via plugin, on Linux

So this is a trivial example of what I'm trying to accomplish:
Using QX11EmbedContainer, and QX11EmbedWidget, I can create two separate apps that embed the widget from one into the window of the other (container <- widget). I would like to do the same in Firefox, and embed the widget into a plugin.
So I created a basic plugin that just contains the QX11EmbedContainer (starting from the 'trivial' example of qtbrowserplugin), and just for testing purposes, another generic widget.
The result is that the generic widget shows inside the plugin just fine, but the container widget 'pops' out to a separate window.
This occurs under Firefox, Chrome, and even Konqueror.
So the question is - Is it possible to embed external Qt widgets into a plugin?
The answer is yes, but the Qt code is buggy, which is why I'm not including it- you wouldn't want it anyway. Managed (with the help of Trolltech engineers) to insert a vanilla QTextEdit widget. Upon attempting to enter text, the plugin would crash, often taking Firefox with it. So clearly, embedding Qt objects directly into a plugin is a no-go.
I also tried launching it separately with mozplugger, but that had it's own issues - mainly focus was not tracked correctly, and would often be lost, requiring you to restart the plugin to get it back.

Resources