Giter Club home page Giter Club logo

vagrant-appindicator's Introduction

Vagrant Application Indicator for Ubuntu Unity / Gnome

Application Indicator to display last known state of Vagrant-managed VMs in the notification area (system tray) on Ubuntu Unity and in Gnome.

Main features:

  • displays last known ("current") state of VMs
  • optionally, shows notifications when machines state changes
  • allows opening Terminal in the VM home directory from the indicator menu
  • allows bringing VMs up, halting them and destroying them via an indicator menu

alt tag

Usage

Install:

$ sudo pip install git+https://github.com/candidtim/vagrant-appindicator.git

Update

Vagrant AppIndicator will notify you automatically if a newer version is available (provided that there is an access to the internet). To update, run again same command as for install.

Update checker can be deactivated in the AppIndicator menu, if necessary.

Run

To run Vagrant AppIndicator, start it from Unity Dash or Gnome Desktop Menu (whichever desktop you use).

Few more details, if you want

Install process will install the indicator directly from the source code on GitHub. pip basically clones the repo and builds and installs everything locally. One can as well do all that manually (why though?) - see below if you're interested.

Just in case, you can as well run Vagrant AppIndicator from command line: use vgapplet or, nohup vgapplet &.

To uninstall Vagrant AppIndicator and all files accompanying it, run sudo pip uninstall vagrantappindicator.

Development

Project directory layout

  • bin/ - entry point scripts
  • img/ - image files used in runtime (icons)
  • vgapplet/ - root application package (all source code)
  • **/test/ - test packages
  • Makefile - provides basic tasks to run tests, run appindicator, etc.
  • setup.py - python packaging script
  • README - readme file for distributed pacakge
  • README.md - this file

Python 2 and Python 3

Current indicator implementation runs on both Python 2.7 and Python 3. All tests are as well executed on "both pythons".

Running and testing

Running tests

$ make venv  # run only once, or run again to re-create the virtualenv
$ make tests

Getting test coverage (reports to ./coverage/)

$ make cover

Creating python source package

$ make sdist

Running appindicator without installing it

$ make run

Building and installing/uninstalling locally

$ sudo make install
$ sudo make uninstall

Cleaning up the project directory (remove dist/, *.pyc, etc.)

$ make clean

Reminder - release process

  1. Make changes, update and run tests, ensure good coverage
  2. Update setup.py and change the version according to semantic versioning
  3. Tag new version; tag format is 'vX.Y.Z'; e.g.: v1.2.1
  4. Push changes and a new tag

Copying

Copyright 2014, candidtim

This Application Indicator is distributed under GNU GENERAL PUBLIC LICENSE, either version 3 of the License, or (at your option) any later version.

GPLv3

This copyright or licensing doesn't apply to the icons used in the AppIndicator. See Attributions below.

Attributions

Main AppIndicator is a modified version of the icon originally distributed under CC BY 3.0 license. Icon made by Picol from www.flaticon.com

vagrant-appindicator's People

Contributors

candidtim avatar hakansund avatar markbaas avatar tdebatty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vagrant-appindicator's Issues

Feature: Different icon if vagrant is running

Hello there,

Just thought it would be a nice feature if the icon was different when one or more vagrants were up, could possibly help prevent data loss if it was more visual, so if the user running the vagrant had forgotten it was running and was about to shut down their computer

Cheers

Crash at startup if no network

The applet will crash at startup if no network is available:

Traceback (most recent call last):
  File "/usr/lib/python3.4/urllib/request.py", line 1182, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.4/http/client.py", line 1088, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.4/http/client.py", line 1126, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.4/http/client.py", line 922, in _send_output
    self.send(msg)
  File "/usr/lib/python3.4/http/client.py", line 857, in send
    self.connect()
  File "/usr/lib/python3.4/http/client.py", line 1223, in connect
    super().connect()
  File "/usr/lib/python3.4/http/client.py", line 834, in connect
    self.timeout, self.source_address)
  File "/usr/lib/python3.4/socket.py", line 512, in create_connection
    raise err
  File "/usr/lib/python3.4/socket.py", line 503, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network is unreachable

Support latest Gtk3

In latest Gtk3, file listener doesn't behave as previously and is not working in tests.

Document the state of indicator in Gnome 3

In latest releases Gnome 3 dropped support of app indicators in favor of persistent notification messages. This app indicator is not intended for this use and the state of it needs to be documented. This indicator will continue to work in other desktops with Gtk Indicators support.

Update notifications

AppIndicator should notify user if newer version is available:

  1. vreify if newer version is available at startup (e.g. by searching newer releases with GutHub REST API), and, if the newer version is indeed available:
  2. show popup notification
  3. change icon to the one with excalmation mark?
  4. add menu item saying there is a newer version; clicking on it might open a wiki page explaning how to update (basically uninstall and install newer version)

For other services

Could I use it to monitor another service, for example, mysql or httpd (apache)?

Sorry English, I'm Brazilian. [Google Translate]

Query VMs state on startup

It is often the case that some VMs may be left in an "inconsistent" state after system restart: some running VMs may have been killed while this will be not tracked in vagrant's machine-index, which is used as the data source for the indicator. As a result, after restart, Vagrant AppIndicator shows VMs as running, while they are actually shut down.

As Vagrant's machine-index doesn't provide means to track these changes made outside of Vagrant, AppIndicator might query Vagrant to find out the states of all known machines. Querying just once att AppIndicator start will cover most of the desynchronization cases.

Update VM name format in the menu and notifications

Current VM name format is " ()".

The name format needs to be updated, and, optionally made configurable. By default it should be: " ()".

Update notifications messages: make clearer.

The choice whether to display full path to only the dirname of it may be made configurable via the dedicated "check menu item", as some users may prefer having full path.

UI theme: make configurable

UI theme (dark or light) is currently chosen automatically based on color of the pixel at coordinates 2,2. While this works in Unity, this may provide inaccurate estimation on other desktops. Users should be able to change color theme manually in the configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.