Giter VIP home page Giter VIP logo

xbar-plugins's Introduction

xbar Plugins

This repo contains scripts, programs and command-line tools that add functionality to xbar.

Reporting issues

The best way to report an issue with a plugin is to find the plugin on https://xbarapp.com and click "Open issue". If possible, the author will be tagged in the issue - which greatly increases your chances of getting the issue looked at quickly.

How to use them

  • Just drop the plugin into your xbar plugins folder (if you have the repo, why not use the Enabled folder?)
  • Make sure it's executable (in Terminal, do chmod +x plugin.sh)
  • Then choose Refresh all from the xbar menus

Available Plugins

To see a list of available plugins, visit https://xbarapp.com/

Contributors

Special thanks to everyone who has contributed: https://xbarapp.com/docs/contributors/index.html

Add your own plugin

To contribute your own plugin, consult the plugin development and contribution guide

xbar-plugins's People

Contributors

alexandregz avatar andrewj41 avatar anupsabraham avatar benjifs avatar carlsonorozco avatar chamini2 avatar cmaluend avatar dnicolson avatar eu81273 avatar flaming-codes avatar frese avatar gingerbeardman avatar glowinthedark avatar gomedia-adi avatar joshfindit avatar kdeldycke avatar keithamus avatar kodie avatar manojlds avatar masutaka avatar matryer avatar mauriciabad avatar oliviernt avatar parvez avatar scdf avatar seripap avatar sprak3000 avatar srdgh avatar tresni avatar weibingchen17 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  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  avatar  avatar

Watchers

 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

xbar-plugins's Issues

re: VPN Checker

FAO: (@pldubouilh)
El Capitan now supports IKEv2 VPN, and with it a new interface. On line 12, instead of using ifconfig | grep tun0 it should now use ifconfig | egrep '(utun0)|(ipsec0)' or ifconfig | grep 'utun0\|ipsec0' so it can accurately detect both types of VPN connections.

This will also need to be changed for line 14 at ifconfig utun0 2> /dev/null | grep inet | cut -d' ' -f 2 but I couldn't quite figure out how to do that.

"Couldn't posix_spawn: error 8" - no plugins work, despite running from console.

I have tried a custom plugin as well as one of the weather plugins. Both produce this error, the application was recently installed for the first time. If I go to "Run in Terminal..." the plugin works as expected and prints to standard out.

My specs:

System Software Overview:

System Version: OS X 10.10.5 (14F1021)
Kernel Version: Darwin 14.5.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Secure Virtual Memory: Enabled
Time since boot: 49 days 1:17

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro11,1
Processor Name: Intel Core i5
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Memory: 8 GB
Boot ROM Version: MBP111.0138.B16
SMC Version (system): 2.16f68
Serial Number (system): C02NJ1ZMG3QH
Hardware UUID: 0B874326-70FA-583A-A874-BCC58FA021E8

Bash version:
$ bash --version
GNU bash, version 4.3.42(1)-release (x86_64-apple-darwin14.5.0)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Note, I am using gnu core utils and not the default osx commands (ie: commands such as ls is from gnu core utils and not the default packaged command that comes with osx). For example, my ls version is not the OSX default:

$ ls --version
ls (GNU coreutils) 8.24
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Richard M. Stallman and David MacKenzie.

re: clipboard-history.3s.sh

Multi-user logins cause permission denied error. The path cannot be written by a different user than the plugin is installed.

I worked around it by including $USER environment variable as part of the tmp_dir variable:

tmp_dir="/tmp/bitbar-clipboard-history_$USER"

screen shot 2016-01-18 at 3 08 55 pm

re: iTunes Now Playing

FAO: (@daturkel)
Its not working when listen to Apple Music. I did some research and find it difficult to do that so can we just hide the widget when listen to Apple Music ?

Unrelated Menu Bar Icons Moving Back and Forth…

Just sitting on the left side of my BitBar are a group of icons moving back and forts. For example, sitting just on the left side of BitBar-related simple weather script are my f.lux icon. The latter moves half a quater inch towards the left, then revert back to its original position. It does this indefinitely. It happens for any script.

Weather plugin excessively calling forecast.io API?

@seripap

Thanks for the Weather plugin - I love it even though I only used it for a few days now.
Today, however, for the first time I only see the "Could not get weather" response.

Turns out I had over 2646 API calls yesterday and already 1217 today. I have no idea how this is possible, since the plugin should only update ever 15min, but let me know how many API calls you expect per day. I expected under 100 per day, but maybe I didn't read the code right.

Could there be something forcing the plugin to keep calling the forecast.io API (let's say my connection drops out or whatever). Or should I expect someone else using my API token (I didn't publish it anywhere and am only using it for this one purpose).

If you have any thought, please let me know!

get bitbar plugins up to par with istat menus

I would love to get into bitbar! Use it as a replacement for istatmenus. Hoever it is not yet on par with it. For example the cpu meter should be a detailed mini graph with more information when hovering over it as seen in the screenshot. Download upload rates should be able to be displayed as in the screen shot double lines etc. Is this doable atm with bitbar?

screenshot 2016-03-09 11 49 26

copy of matryer/xbar#264

[Feature] - Script parameter input

I see lots of scripts with 'YOUR KEY HERE' variables towards the top. It would be awesome if bitbar allowed a user to enter their configuration through the application UI rather than by modifying a script. This feature would lower the barrier to entry for non-developer types.

re: Gmail Checker

FAO: (@nadavc)

Would be awesome to get an image in the metadata (and to make the plugin executable).

re: CircleCI Check

FAO: (@fsegouin)

I catch this error after plugin installation (and chmod +x ~/bitbar-plugins/circleci-check.5m.py run):

ImportError: No module named requests

I have requests module installed via pip :

$ pip list

...
requests (2.9.1)
...

Any idea to solve it?

EDIT: initial issue is fixed. It was a mess with multiple python version on my mac. Ans with the linked PR, I just fix the missing no_tests index.

Plugin to move plugins from active/nonactive folders

Here is rudimentary plugin to manage plugins... except I can't figure out syntax around | bash= in the plugin API. My shell-foo is rough, so who knows what I am doing wrong.

#!/bin/bash

echo 'Plugins'
echo '---'
dirname=${0%/*}  # use this to get the directory
echo "Root directory: $dirname | color=white refresh=true"
echo "Inactive directory: ${dirname}/inactive | color=white"
echo "=========================== "

filesActive=($(ls $dirname))
filesInactive=($(ls "${dirname}/inactive"))

echo "Click on item in list to move to inactive | color=blue"

for var in "${filesActive[@]}"
do
  # this kinda works, but 1) opens terminal and 2) doesn't refresh the plug with new info
  # when I add in refresh=true terminal=false, no go...
  echo "${var} | color=red bash='mv "${dirname}/${var}" "${dirname}/inactive/${var}"'"
done

echo "Click on item in list to move to active | color=blue"

for var in "${filesInactive[@]}"
do
  echo "${var} | color=red bash='mv "${dirname}/inactive/${var}" "${dirname}/${var}"'" 
done

Getting this line echo "${var} | color=red bash='mv "${dirname}/${var}" "${dirname}/inactive/${var}"'" correct is the key. I tried every combination of " and ' and order of refresh=true and terminal=false, to no avail. Anyone see how to make it work?

re: Show / Edit network location - Long location names

FAO: (@ffittschen)

I found 2 issues with your Location plugin for bitbar

  1. sometimes It does not update the display when I change the location using the top-left APPLE menu/Location
  2. I have a location whose name is rather long "TM Innovation Centre". It appears in the dropdown menu as 3 separate lines, each of which ic clickable. That sounds/looks wrong...

cheers

Passing command line parameters to program

Let's think about a plugin, that tracks the price of a product on Amazon. The user should be allowed to pass the link to the program, so it can scrape the site and show the price in BitBar. Or we want to create a plugin, that shows whether an update is available in your favorite RSS feeds.

For these purposes, it would be nice to have the possibility to pass arguments to your program without changing its code.

If a plugin yields no output, the menu bar should be hidden

I like the situation where a menu would go away when a script no longer produces an output. For example, one of the scripts I use—because of the BitBar limitation—must be written as follows:

#!/usr/local/bin/zsh
  if  [[ -z `ifconfig | grep tun0` ]]
    then
    echo "🔓 VPN"
  else
    echo -e "\b"
  fi

The problem is that it returns a blank space in the menu bar when things are all right. Instead of this, I would like no space at all and hence, no menu at all.

whitespace

Unfortunately, the script can't be written as…

  if  [[ -z `ifconfig | grep tun0` ]]
    then
    echo "🔓 VPN"
  fi

The above script returns nothing under normal conditions. The issue then is that it makes non-BitBar menu icons sitting on its left moving back and forth continuously. Simply, because no output is returned.

movingicons

As a result, it would be nice to have the related BitBar menu item gone when a plugin output nothing.

Plugin browser

Guys,

I put together a very simple BitBar plugin browser: http://getbitbar.appspot.com (will be moved to getbitbar.com when it's ready). Real examples in the Tutorial section: http://getbitbar.appspot.com/plugins/Tutorial (and the source https://github.com/matryer/bitbar-plugins/blob/master/Tutorial/cycle_text_and_detail.sh)

By including metadata like the below in the plugin source file, authors can customise the browser:

# <bitbar.title>Cycle text and detail text</bitbar.title>
# <bitbar.version>1.0</bitbar.version>
# <bitbar.author>Mat Ryer</bitbar.author>
# <bitbar.author.github>matryer</bitbar.author.github>
# <bitbar.desc>Text above --- will be cycled through in the menu bar, whereas text underneath will be visible only when you open the menu.</bitbar.desc>
# <bitbar.image>http://www.images.com/path/to/image</bitbar.image>

It matches using regex, so tags may appear anywhere in the file (commented out however is suitable):

`<bitbar\.` + tag + `>(.*?)</bitbar\.` + tag + `>`

Would love some feedback, comments, bug reports, etc. over at https://github.com/matryer/getbitbar.com

re: Weather Underground

FAO: (@asnodgrass)
why is plugin always picking one station - in my case EVRA. There are other stations closer to my location. Is it possible to change this?
screenshot 2016-02-12 12 05 53

re: Weather

FAO: (@seripap)

michaelpak@macbook: /Users/michaelpak/Documents/BitBarPlugins/weather.15m.py
Could not get weather

weather plugin stopped working because of HTTP Error 401: Unauthorized

I get this error while running the plugin:

[~] % /Users/rbd/Projects/bitbar-plugins/Enabled/weather.15m.py
Traceback (most recent call last):
  File "/Users/rbd/Projects/bitbar-plugins/Enabled/weather.15m.py", line 53, in <module>
    print render_wx()
  File "/Users/rbd/Projects/bitbar-plugins/Enabled/weather.15m.py", line 46, in render_wx
    weather_data = get_wx()
  File "/Users/rbd/Projects/bitbar-plugins/Enabled/weather.15m.py", line 24, in get_wx
    wx = json.load(urllib2.urlopen('http://api.openweathermap.org/data/2.5/weather?id=' + location + '&units=' + units + '&appid=' + api_key + "&v=" + str(randint(0,100))))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 401: Unauthorized

ping.10s.sh use MAX_PING for pings >1000ms

Heya! On line 10 we have MAX_PING=10000 but then on on line 54 we have if [ $AVG -ge 1000 ]; then. I'm on a flight now were my avg ping time is >1000 but I still want to know what it is instead of just knowing "OMG IT IS SO SLOW".

I suggest changing line 54 to if [ $AVG -ge $MAX_PING ]; then so folks like me can easily set a higher max ping so we can see it in the menu.

If you're open to a pull request, I'd be happy to do the "heavy" lifting of the one line change ;)

Proposals for Ejector

Proposals for Ejector script (ejector.5s.sh by carlsonorozco).

(1) If the volumes are mounted DMGs, you could add another menu item: "Eject all DMGs"
(would leave physical volumes mounted)

(2) Vice versa a menu item: "Eject all physical volumes"
(would leave DMGs mounted)

and maybe

(3) "Eject all physical volumes except Time Machine"
(would leave DMGs and Time Machine volume mounted)
That would be something I'd like. ;)

(4) In addition there's an app called CleanMyDrive by MacPaw, which also has a junk cleaner for .DS_Store, .Spotlight-V100, .TemporaryItems, .fseventsd (OS X) plus Thumbs.db, RECYCLED, RECYCLER, $RECYCLE.BIN (Windows) plus resource forks, i.e. ._filename.extension

That could be added too for all writable volumes except the boot volume.

Question: Compiled plugins?

Hi @matryer ,

I'm thinking to create an plugin to get the USD <-> BRL. But I want to do that in Rust. Then I will generate an compiled executable.

Can I make an pull request here with executable (not script) plugin?

[Question] Folder's choice for my plugin

Hello,

I'm writing a plugin that gives Driving travel duration, distance and traffic delay to a favorite destination.
It uses Google maps APIs to fetch geolocation and travel data.

Where should I put my plugin before sending PR request?

I currently have it in Lifestyle/ in my fork. There is also Vehicle...

Quick and dirty concept from last night:
screenshot

re: Weather

FAO: (@seripap)

I get the following error when I try and use your BitBar plugin
File "weather.15m.py", line 94
'city': str(location["city"]),
^
SyntaxError: invalid syntax

Thanks

Weather/OpenWeatherMap/weather.15m.py UnicodeEncodeError

Hello,

This plugin isn't working properly sometimes, because of encoding issue :

Traceback (most recent call last): File "/Users/sebastien/Documents/BitBarPlugins/Enabled/weather.15m.py", line 61, in <module> print render_wx() File "/Users/sebastien/Documents/BitBarPlugins/Enabled/weather.15m.py", line 54, in render_wx weather_data = get_wx() File "/Users/sebastien/Documents/BitBarPlugins/Enabled/weather.15m.py", line 44, in get_wx 'condition': str(wx['weather'][0]['description']), UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)

My settings :

location = '2988507'
units = 'metric' # kelvin, metric, imperial
lang = 'fr'

Thanks

Se

re: TravisCI Check

FAO: (@tomkinsc)

Great plugin. When you first run it, and haven't set the token yet, you get a pretty ugly view. It would be great if it could display some nice text (like "Edit plugin to set your access token")

[Suggestion] Add global configuration files

It would be great to have a central place where we can store the plugin configuration instead of editing the plugin file itself.

For example in the jenkins-multiple-projects-status plugin, I need to change the USER, PASSWORD, etc... configs. This may lead to users wanting to make commits to a plugin to publish their configuration by mistake.

Instead we could introduce a config folder that is added to .gitignore where users will need to put their plugin configuration file.

This change would be non-breaking as old plugins would just keep the config in their plugin file while new plugins could benefit of the external config.

Security?

This might be a dumb question, but, is there any way we can ensure that these scripts we're simply chmod +xing on our machines are not malicious? I'm not necessarily questioning the integrity of the community, but I am curious if this has been thought about...

RescueTime plugin error

$ /Users/Jason/git/bitbar-plugins/Enabled/rescuetime.1h.py
Traceback (most recent call last):
  File "/Users/Jason/git/bitbar-plugins/Enabled/rescuetime.1h.py", line 26, in <module>
    result = requests.get('https://www.rescuetime.com/anapi/data', params={
NameError: name 'requests' is not defined

I commented out the "Testing hack", but now I actually need to import requests from somewhere.

I've set up the API_KEY file and also enabled the plugin (it's in my Enabled/ folder with modifications), but https://github.com/matryer/bitbar-plugins/blob/master/Dev/RescueTime/rescuetime.1h.py#L26 requires requests to be defined, so I'm not really sure where to go from here...

re: teller-track-spending

FAO: (@sebinsua)

Can you changes the permissions on the file to make it executable and submit an update? Also, please rename in metadata to nice human readable name. :)

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.