Argos is like BitBar for Gnome Shell: it displays script output on the panel (top bar)

While looking for a way to display the script output on the Gnome Shell panel (top bar), I came across Argos. This Gnome Shell extension does only one thing: it adds a new item to the panel with a drop-down menu, displays the output of the script, and exposes features. The extension is inspired by BitBar, a popular program that puts the output of any script on the macOS menu bar, and is even compatible with most BitBar scripts.

Using it, you can basically write your own custom Gnome Shell extension in a language you are already familiar with (e.g. Bash, Python, etc.). Since the Argos plugin is just an executable script written to stdout, you can create plugins for it in any language.
Don’t know Bash, Python, etc? No problem, you will find that Argos / BitBar plugins compatible with Argos already exist and can perform a variety of tasks.
Argos features:

  • 100% API compatible with BitBar 1.9.2. All plugins that do not contain macOS specific code can be used with Argos
  • Asynchronous execution engine: Argos prevents blocking by intelligently scheduling scripts
  • Unicode support
  • Optimized to reduce resource consumption; developers claim that Argos uses less than 1% of CPU even if multiple scripts are refreshed per second

In addition to installing Argos and some basic usage, this article includes some additional Argos plugins / scripts, and some places to find Argos plugins. continue reading!

Argos installation and quick use guide

You have several ways to install Argos:

Using the basics of the Argos plugin can help you get started:

  • Argos monitoring ~/.config/argos/ New script folder. All executable scripts placed in this folder are treated as plugins and their output is placed in the Gnome Shell panel (top bar) as soon as it is displayed. Names that begin with a dot (.)be ignored
  • The plugin file name has a special form: NAME.POSITION.INTERVAL[+].EXTENSION:
    • POSITION: Is optional and you can use it to specify the button position on the panel. The position is an integer + l (Remaining), c (Center) or r (Correct)
    • INTERVAL: Is optional, you can use it to tell the plugin how much time it should refresh. Interval is integer + s (second), m (Minutes), h (Hours) or d (day)
    • +:in case + Follow INTERVAL, Which tells the script to update every time the drop-down menu is opened.
    • Example Argos plugin (script) file name: plugin.1r.10m+.sh. The plugin will be on the right side of the Gnome Shell clock (if you haven’t moved it from the center of the panel), it will run the script to update the information every 10 minutes, and it will also run on every drop-down menu.
  • The buttons displayed by Argos on the panel are arranged alphabetically from left to right, unless POSITION As mentioned above, specify in the file name

It’s time to “install” your first Argos plugin. First download a simple example and say this Ping plugin (To download the script, click View source Link and press Ctrl + s Save), copy the script to ~/.config/argos/, And make it executable (you can make it executable from the Files app: right-click the script, select PropertiesAnd go to Permissions Label and enable Allow executing file as program).
Once Argos finds a new executable script in it ~/.config/argos/And it will show its output on the panel and drop-down menu:Argos BitBar ping plugin

You can delete argos.sh A script that already exists in the script ~/.config/argos/ Because it is just a bookmark for the Argos configuration folder and the Argos GitHub project page.
If you want to write your own Argos plugin, it is recommended that you start with an existing example and then check Argos rendering and line properties documentation.

Argos plugin example

Argos already has some features Plug-in example On its GitHub page, such as the application launcher or top viewer. You will also find some BitBar plugin example Can be used with Argos, such as Ping plugin, Stock Ticker or World Clock.
In addition to these, I also found some examples of Argos plugins that I want to share with you. 1. the weather Insert Argos weather plugin

This is a sophisticated Argos plugin that displays the current weather and 7-day weather forecast with icons and various other information such as wind speed, humidity, etc. It supports automatic detection of your current location and manual location assignment.
To use it, you must open the script with a text editor and modify it:

  • api_key: Change api_key The value of your darksky.net API key. You can obtain free DarkSky API keys from: https://darksky.net/dev
  • Optional:
    • If you want to use a custom location:
      • Change man_loc Latitude and longitude coordinates of your location. You can find it using Google Maps. For example, searching for Berlin on Google Maps, you will get the following URL: https://www.google.com/maps/place/Berlin,+Germany/@52.5175012,13.1539869,10.25z.... Copy Latitude and Longitude (52.5175012,13.1539869) And paste it as man_loc Value (for example: man_loc = '52.5065116,13.1438652')
      • Change man_name Value as the name of your location. E.g man_name = 'Berlin, Germany'
    • Color and font appearance can also be customized, which is explained in the weather script

2. BitBar’s VPN Checker plugin (Compatible with Argos)Argos BitBar VPN Checker plugin

This is a very simple but useful plugin to check if you are currently using a VPN (it will check the availability of tun0 or ipsec0). It can also kill programs when you disconnect from the VPN.
If you want the plugin to kill the program when disconnected from the VPN, uncomment #killall Firefox... OK and then replace Firefox Program 3 to be killed when you want to disconnect from VPN. Cryptocurrency interest rate BitBar plugin Compatible with ArgosArgos BitBar cryptocurrency plugin

This is a plugin that displays cryptocurrency exchange rates on the panel. By default it shows the exchange rate in GBP (Pound Sterling), but you can change the URL to https://cryptomate.co.uk/api/all/GBP/ to https://cryptomate.co.uk/api/all/USD/, Then simply search and replace with £ versus $ So it shows the correct currency symbol. As you can see, I changed its screenshot to USD.
This also applies to the Euro and other currencies4. GetNews for Argos (Download getnews.py script)Argos News RSS Feed Plugin

GetNews is a simple Python3 plugin for Argos that gets the latest stories (only titles) from a configurable RSS feed and displays them in the menu. By default, it uses Google News RSS feeds, but I changed its screenshot to Linux Uprising.
You can refresh the feed directly from the plugin menu displayed on the Gnome Shell panel. Clicking on any news item will open the article in your default web browser.
Change feed_url The value of a valid RSS feed to extract news from. This can be a single site RSS feed or a feed aggregator. You can also use some subreddit RSS feeds (e.g. https://old.reddit.com/r/linux/.rss). Change stories Value is 5 to show the number of stories in the plugin menu. SimpleWattage-ArgosArgos is like BitBar for Gnome Shell: it displays script output on the panel (top bar)

SimpleWattage-Argos is an Argos plugin for displaying power and battery information, such as the voltage and amperage used, percentage of battery power, battery capacity, etc.
I can’t use my laptop right now, which is why I don’t try this Argos plugin, and the screenshots are from its project page. 6. Algos Airly.sh Air Quality. (Script download link)Argos Air Quality Checker

Airly.sh reads the air quality index from it airly.eu Sensor to display it on the panel. This method works only if airly.eu has an air quality sensor in your city.
To use it, make sure jq with curl Installed on your system. You also need to get your airly.eu API key.
After obtaining the API key, use it as the API_KEY value in the script. You also need to get the sensor ID-can be obtained by visiting https://airapi.airly.eu/v2/installations/nearest?lat=YOUR_LAT&lng=YOUR_LNG&maxDistanceKM=5&maxResults=3&apikey=YOUR_API_KEY, Replace YOUR_LAT The latitude of your location, and YOUR_LNG Related to the longitude of your location. I have explained how to get latitude and longitude using Google Maps in the description of the Weather Argos plugin. After accessing the URL with these parameters, you should get the following id Followed by some numbers. Copy these numbers into the script and replace them with SENSOR_ID value. Where to find more Argos plugins:

Source

Sidebar