gpouilloux / gnome-shell-extension-docker

An extension for managing docker containers
GNU General Public License v3.0
146 stars 71 forks source link

Added commands to restart running containers and to open TTY #48

Closed alessandrodolci closed 4 years ago

alessandrodolci commented 4 years ago

Hello!

First of all thanks for the effort in starting the development of this tool, I've been using it for quite a bit and find it to be a good solution when I need a quick look at the state of my containers.

So, I thought it would be nice to contribute with some simple new functionalities I felt the need for and implemented for myself. Basically, I've added two new actions for running containers: one to restart them and one to spawn a new terminal emulator with a shell for the selected container, like so:

Screenshot from 2020-04-25 00-34-09

I tested and ran everything on gnome-shell 3.34 on Ubuntu 19.10 (eoan), but I also tried to solve the problem you had with maintaining backwards compatibility, by detecting at runtime the version of gnome-shell and registering GObject classes only if necessary based on that. I still have some doubt on the DockerSubMenuMenuItem constructor, which I had to replace, but it should be ok. Unfortunately, I have no means of testing on older versions by now, but I could think about it if you need.

I hope you can make some sense of the code and that you don't find it too messy, I'm always available to refactor it or to rearrange things if you want, so feel free to ask!

gpouilloux commented 4 years ago

Recent changes you pushed yesterday look okay. I replied to the other ongoing discussion so we can merge your contribution with the actual implementation but still have some ideas for later improvements.

gpouilloux commented 4 years ago

@alessandrodolci if you have more spare time, feel free to keep contributing to this extension. I have labeled some feature requests that make sense to implement. (See https://github.com/gpouilloux/gnome-shell-extension-docker/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)

Thanks again for your help on this, looking forward to merge this pull request.

alessandrodolci commented 4 years ago

Thank you for the advice! Will definitely give a look to the other issues! At the moment, I was thinking about the cherry-pick of the Docker status feature from the other pull request. Let's see if I can manage to pull it inside before merging.

gpouilloux commented 4 years ago

Nice! thank you. Can you send the cherry-pick of the Docker status feature in another PR? I will likely merge this one tomorrow and roll-up a new release of this extension :+1:

alessandrodolci commented 4 years ago

Absolutely, I'm working on it, I'll open a new PR when done!