Giter Club home page Giter Club logo

argos's Introduction

Argos

Create GNOME Shell extensions in seconds


Screencast

Most GNOME Shell extensions do one thing: Add a button with a dropdown menu to the panel, displaying information and exposing functionality. Even in its simplest form, creating such an extension is a nontrivial task involving a poorly documented and ever-changing JavaScript API.

Argos lets you write GNOME Shell extensions in a language that every Linux user is already intimately familiar with: Bash scripts.

More precisely, Argos is a GNOME Shell extension that turns executables' standard output into panel dropdown menus. It is inspired by, and fully compatible with, the BitBar app for macOS. Argos supports many BitBar plugins without modifications, giving you access to a large library of well-tested scripts in addition to being able to write your own.

Key features

  • 100% API compatible with BitBar 1.9.2: All BitBar plugins that run on Linux (i.e. do not contain macOS-specific code) work with Argos (else it's a bug).
  • Beyond BitBar: Argos can do everything that BitBar can do, but also some things that BitBar can't do (yet). See the documentation for details.
  • Sophisticated asynchronous execution engine: No matter how long your scripts take to run, Argos will schedule them intelligently and prevent blocking.
  • Unicode support: Just print your text to stdout. It will be rendered the way you expect.
  • Optimized for minimum resource consumption: Even with multiple plugins refreshing every second, Argos typically uses less than 1% of the CPU.
  • Fully documented.

Installation

From the GNOME Shell Extensions website (recommended)

If you have a recent version of GNOME Software, you can also install Argos directly from there by simply searching for it. Note that this method may not always get you the latest release of Argos.

Manually

Clone the repository, then copy or symlink the directory [email protected] into ~/.local/share/gnome-shell/extensions. Restart GNOME Shell by pressing Alt+F2, then entering r. On some systems, you may additionally have to enable the Argos extension using GNOME Tweak Tool.

Examples

GNOME Shell log viewer

Argos plugins are great for monitoring your system, displaying anything that a command line script can output in a convenient, unobtrusive place.

Extension developers often rely on the central GNOME Shell log for debugging. That log may be viewed in a terminal with journalctl /usr/bin/gnome-shell -f – but it is also an excellent target for our first sample plugin:

shell_log.1s.sh

#!/usr/bin/env bash

LOG_ENTRY=$(journalctl /usr/bin/gnome-shell -n 1 --output=cat --no-pager)
echo "<span color='#9BF' weight='normal'><small><tt>$LOG_ENTRY</tt></small></span> | length=40"

echo "---"
echo "View GNOME Shell Log | bash='journalctl /usr/bin/gnome-shell -f'"

Make it executable and drop it into ~/.config/argos, and you should see something like this:

Shell Log

As the plugin updates every second, new log entries are shown almost without delay.

Simple launcher

Plugins are not limited to displaying information – they can also perform actions when the user clicks on a menu item. This allows you to rapidly create launchers that look and act exactly like you want.

launcher.sh

#!/usr/bin/env bash

echo "Launcher | iconName=starred"
echo "---"

WIKIPEDIA_ICON=$(curl -s "https://en.wikipedia.org/static/favicon/wikipedia.ico" | base64 -w 0)
echo "Wikipedia | image='$WIKIPEDIA_ICON' imageWidth=20 font=serif href='https://en.wikipedia.org'"

echo "---"
echo "Gedit | iconName=gedit bash=gedit terminal=false"
echo "Nautilus | iconName=system-file-manager bash=nautilus terminal=false"
echo "Process list (<span color='yellow'><tt>top</tt></span>) | iconName=utilities-terminal-symbolic bash=top"
echo "---"
echo "Looking Glass | eval='imports.ui.main.createLookingGlass(); imports.ui.main.lookingGlass.toggle();'"

Simple Launcher

Note how the Wikipedia icon is downloaded from the web and serialized into the menu item without ever needing to be saved to disk. All of this comes from a file smaller than the configuration files of most dedicated "launcher" extensions, while providing much more flexibility. Argos plugins blur the line between configuration and code.

Advanced launcher

An Argos plugin is just an executable file that writes to stdout. As such, any language can be used to create plugins. Switching from Bash to Python gives you easy access to the GNOME platform APIs, enabling even more powerful launchers.

launcher.py

#!/usr/bin/env python3

import re
from gi.repository import Gio

applications = {}

for app_info in Gio.AppInfo.get_all():
  icon, categories = app_info.get_icon(), app_info.get_categories()
  if icon is None or categories is None:
    continue
  # Remove "%U" and "%F" placeholders
  command_line = re.sub("%\\w", "", app_info.get_commandline()).strip()
  app = (app_info.get_name(), icon.to_string(), command_line)
  for category in categories.split(";"):
    if category not in ["GNOME", "GTK", ""]:
      if category not in applications:
        applications[category] = []
      applications[category].append(app)
      break

print("Applications\n---")

for category, apps in sorted(applications.items()):
  print(category)
  for app in sorted(apps):
    print("--%s | useMarkup=false iconName=%s bash='%s' terminal=false" % app)

Advanced Launcher

And there you have it: A working clone of a full-blown GNOME Shell extension – implemented using a fraction of the code.

top viewer

Argos basically pipes standard output into a panel menu. This makes for some very cool plugins like this top output viewer:

top.3s+.sh

#!/usr/bin/env bash

echo "top"
echo "---"

if [ "$ARGOS_MENU_OPEN" == "true" ]; then
  # http://stackoverflow.com/a/14853319
  TOP_OUTPUT=$(top -b -n 1 | head -n 20 | awk 1 ORS="\\\\n")
  echo "$TOP_OUTPUT | font=monospace bash=top"
else
  echo "Loading..."
fi

top Viewer

It's top at your fingertips! Of course, this approach works with any other terminal program as well.

Note that the plugin checks the ARGOS_MENU_OPEN environment variable to ensure top is run only if the dropdown menu is visible, while the + in the filename forces a re-run whenever the user opens the menu. This pattern makes output available immediately when it is needed, but keeps idle resource consumption of the plugin near zero.

Usage

Argos monitors the directory ~/.config/argos for changes. Any executable file found in this directory is considered a plugin. Files whose name starts with a dot (.) and files in subdirectories are ignored.

Plugins are run and their standard output is interpreted as described below. For each plugin, a panel button with a dropdown menu is created. The arrangement of buttons from left to right follows the alphabetical order of the files they are generated from (except when a POSITION is explicitly specified in the filename). New plugins and edits to existing plugins are automatically detected and reflected in the panel.

Filename format

A plugin file may be named anything (it only needs to be executable), but if its name has the special form

NAME.POSITION.INTERVAL[+].EXTENSION

where

  • POSITION consists of an integer (optional) + one of l (left), c (center) or r (right), and
  • INTERVAL consists of an integer + one of s (seconds), m (minutes), h (hours) or d (days)

then

  • the dropdown menu button is placed in the panel at POSITION, and
  • the plugin is re-run and its output re-rendered every INTERVAL, and
  • if INTERVAL is followed by +, the plugin is additionally re-run each time the dropdown menu is opened.

POSITION may be omitted entirely (in which case the button is placed before all other buttons on the right-hand side of the panel) while INTERVAL can be left empty. For example, a script named plugin.10s.sh is updated every 10 seconds, the button belonging to plugin.1c..sh is positioned just right of the GNOME Shell clock, and plugin.l.1m.sh is displayed left of the "Activities" button and updated every minute.

Output format

Argos plugins are executables (such as shell scripts) that print to standard output lines of the following form:

TEXT | ATTRIBUTE_1=VALUE ATTRIBUTE_2=VALUE ...

All attributes are optional, so the most basic plugins simply print lines consisting of text to be displayed. To include whitespace, attribute values may be quoted using the same convention employed by most command line shells.

Rendering

Lines containing only dashes (---) are separators.

Lines above the first separator belong to the button itself. If there are multiple such lines, they are displayed in succession, each of them for 3 seconds before switching to the next. Additionally, all button lines get a dropdown menu item, except if their dropdown attribute is set to false.

Lines below the first separator are rendered as dropdown menu items. Further separators create graphical separator menu items.

Lines beginning with -- are rendered in a submenu associated with the preceding unindented line. While Argos supports nested submenus in principle, GNOME Shell does not render them correctly.

Emoji codes like :horse: 🐴 and :smile: 😄 in the line text are replaced with their corresponding Unicode characters (unless the emojize attribute is set to false). Note that multicolor emoji rendering requires GNOME 3.26 or later.

ANSI SGR escape sequences and Pango markup tags may be used for styling. This can be disabled by setting the ansi and useMarkup attributes, respectively, to false.

Backslash escapes such as \n and \t in the line text are converted to their corresponding characters (newline and tab in this case), which can be prevented by setting the unescape attribute to false. Newline escapes can be used to create multi-line menu items.

Line attributes

Display

Control how the line is rendered.

Attribute Value Description
color Hex RGB/RGBA or color name Sets the text color for the item.
font Font name Sets the font for the item.
size Font size in points Sets the font size for the item.
iconName Icon name Sets a menu icon for the item. See the freedesktop.org icon naming specification for a list of names that should work anywhere, or run gtk3-icon-browser to see the names of all icons in your current icon theme. Argos only.
image, templateImage Base64-encoded image file Renders an image inside the item. The image is positioned to the left of the text and to the right of the icon. GNOME Shell does not have a concept of "template images", so image and templateImage are interchangeable in Argos.
imageWidth, imageHeight Width/height in pixels Sets the dimensions of the image. If only one dimension is specified, the image's original aspect ratio is maintained. Argos only.
length Length in characters Truncate the line text to the specified number of characters, ellipsizing the truncated part.
trim true or false If false, preserve leading and trailing whitespace of the line text.
dropdown true or false If false and the line is a button line (see above), exclude it from being displayed in the dropdown menu.
alternate true or false If true, the item is hidden by default, and shown in place of the preceding item when the Alt key is pressed.
emojize true or false If false, disable substitution of :emoji_name: with emoji characters in the line text.
ansi true or false If false, disable interpretation of ANSI escape sequences in the line text.
useMarkup true or false If false, disable interpretation of Pango markup in the line text. Argos only.
unescape true or false If false, disable interpretation of backslash escapes such as \n in the line text. Argos only.

Actions

Define actions to be performed when the user clicks on the line's menu item.

Action attributes are not mutually exclusive. Any combination of them may be associated with the same item, and all actions are executed when the item is clicked.

Attribute Value Description
bash Bash command Runs a command using bash inside a GNOME Terminal window.
terminal true or false If false, runs the Bash command in the background (i.e. without opening a terminal window).
param1, param2, ... Command line arguments Arguments to be passed to the Bash command. Note: Provided for compatibility with BitBar only. Argos allows placing arguments directly in the command string.
href URI Opens a URI in the application registered to handle it. URIs starting with http:// launch the web browser, while file:// URIs open the file in its associated default application.
eval JavaScript code Passes the code to JavaScript's eval function. Argos only.
refresh true or false If true, re-runs the plugin, updating its output.

Environment variables

Plugin executables are run with the following special environment variables set:

Name Value
ARGOS_VERSION Version number of the Argos extension. The presence of this environment variable can also be used to determine that the plugin is actually running in Argos, rather than BitBar or kargos.
ARGOS_MENU_OPEN true if the dropdown menu was open at the time the plugin was run, and false otherwise.

BitBar plugins with Argos

These screenshots show how some scripts from the BitBar plugin repository look when rendered by Argos compared to the "canonical" BitBar rendering (macOS screenshots taken from https://getbitbar.com).

Plugin BitBar on macOS Argos on GNOME Shell
Ping Ping/BitBar Ping/Argos
Stock Ticker Stock Ticker/BitBar Stock Ticker/Argos
World Clock World Clock/BitBar World Clock/Argos
Unicorn Unicorn/BitBar Unicorn/Argos
ANSI ANSI/BitBar ANSI/Argos

Acknowledgments

GNOME Shell is a difficult platform to develop for. At the time this project was started, the Gjs documentation hadn't been updated in three years and was missing important classes (new documentation has since appeared). Once again, Valadoc saved the day for me. While not fully identical to the Gjs API, Valadoc is the best manual for GNOME on the web today.

Argos includes emojilib's emoji name/character mappings. It's wonderful that such a comprehensive and well-maintained library is so easily available.

Without BitBar, Argos wouldn't be what it is today, or, more likely, wouldn't exist at all. There have been many attempts on many platforms to simplify panel menu creation, but BitBar was the first to get it right by finding the balance between text-only configuration and dynamic output. Thank you for showing the way!

Contributing

Contributors are always welcome. However, please file an issue describing what you intend to add before opening a pull request, especially for new features! I have a clear vision of what I want (and do not want) Argos to be, so discussing potential additions might help you avoid duplication and wasted work.

By contributing, you agree to release your changes under the same license as the rest of the project (see below).

License

Copyright © 2016-2018 Philipp Emanuel Weidmann ([email protected])

Released under the terms of the GNU General Public License, version 3

argos's People

Contributors

boppy avatar ccat3z avatar daitj avatar jefferyto avatar matthias-g avatar michel-slm avatar mwilck avatar oyale avatar p-e-w avatar rammie 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

argos's Issues

can't seem to get scripts to run [ubuntu 18.04]

i tried the example in your helpful documentation, but all i see is ... I tried to upload an example.

if i select it it just loads the the script that it describes. (but still can't get output going). ideas?

screenshot from 2018-05-26 17-18-31

Fullscreen game stutters when extension refreshes

Hi, sorry if this might be the wrong place to post, but I've observed some weird behavior with Argos. I have a script that essentially does 'ping -c1 8.8.8.8' and I named it 'ping.1s.sh'. When it's running and I run Rocket League on my other monitor, the game stutters in sync with the extension refreshing. When I disable the extension, the stuttering goes away. I can notice the stuttering as well simply when dragging around a window. Weirdly enough from what I remember, I've been using this extension for over a week and it has only started causing this problem yesterday.

My hardware is: i7 4790k, GTX 970. I'm running Arch Linux, kernel version 4.15.8, nvidia 390.25, gnome-shell 3.26.2.

Has anybody run into a similar problem? Personally I'm fine with just disabling the extension when I don't need it but it may or may not be worth looking into.

Unable to run "top" plugin

Hello
First time Argos user here, and I am already amazed by the possibilities of this plugin... thank you!

I have a problem though, when trying to use it. I copied & pasted the "top" plugin you have in your site, and although I clearly understand the logic, I can't seem to make it work.
It appears, when I click on it I can see the "Loading..." text, but it never refreshes, neither shows any actual information.
Am I missing something?

Refresh closes submenus

Firstly, amazing extension. Works wonderfully. I have a simple python script that queries the AWS API for all Beanstalk Environment Health Statuses and I can monitor it from a shell menu. I might port it to a native extension as I learn JS.

I noticed that if I have a submenu open and the refresh is invoked, all submenus close. Is this tricky to avoid? I'm guess the state needs to be recorded before a refresh and restored somehow.

Sub Menues not working

You say in your readme it is a problem with gnome 3.22, but i don't think so. on Gnome 3.24 its also not working 😉
i used the Connection Manager for a long time and it works with submenues and subsubmenues.

the only problem i see in argos is, that the parent menu closes when i try to open the child.
i hope you can fix it soon 🙂

Add keyboard shortcuts

First of all, thank you very much for this extension. It is exactly what I was looking for without knowing it :)

What I am missing most is to use keyboard shortcuts for pressing items in the dropdown menu.

I guess it might be problematic to add keyboard shortcuts directly because of conflicts. In this case I would suggest using a master hotkey (e.g. Super+Alt+a) followed by a single key or key combination specified in the item line (e.g. hotkey=q or hotkey=<ctrl>+s).

Trigger action with click on panel icon?

Hey @p-e-w,

Thanks for this extension!

The readme mentions that it's main functionality is opening and triggering actions from a dropdown menu.

Can Argos also trigger an action from a direct click on a top panel icon/button?

Thanks!

Questions

Hi, awesome extension!

  1. How does dropdown attribute work? I thought it should hide dropdown menu and just output result. But I always can click on button and get dropdown menu with the name of the script. I use it like this
#!/bin/bash

echo "test | dropdown=false"

Is this correct?

  1. The name of the script is always visible in dropdown menu, can it be hidden?

Thank you for extension! :)

Repo For Argos modded scripts

https://argos-scripts.github.io

We have a site.

Add your Argos Scripts here!

Leave a comment and I'll update this post with your links to comments, repos and gists.

Users!

Click here to search Github for scripts!

Authors

Add tags to your repos so users have a better chance of finding your scripts. Use "gnome-shell" or "gnome" and "argos"

The List

System Monitor

https://github.com/fadeouter/sysinfo

Network Monitor

#13 (comment)

Stock Quotes

https://github.com/dfaour/argos-scripts/blob/master/getquotes.py

Search For Argos Scripts On Github

https://gist.github.com/Jomik/f90a38877363b7d3d4f15df9ea4380d5

GNOME Shell menu to switch between different PulseAudio sinks

https://gitlab.com/sjohannes/argos-pasink

GiDeviceInfoMenu for the ideviceinfo tool of libimobiledevice displayed via Bitbar or Argos

https://github.com/BobyMCbobs/GiDeviceInfoMenu

CPU monitor

https://github.com/luisfpg/argos-scripts#cpu-monitor-cpu1spy

Memory monitor

https://github.com/luisfpg/argos-scripts#memory-monitor-mem1spy

Network monitor

https://github.com/luisfpg/argos-scripts#network-monitor-net1spy

Safeeyes For Argos

https://github.com/fadeouter/safeeyes

Caffeine Replacement (toggles gnome screensaver)

#13 (comment)

Gnome MFA (Google Multi-factor Authentication)

https://github.com/daniperez/gnome-mfa

Menu of applications you have sandboxed with Firejail

#13 (comment)

[request] Examples

Hello, thank you very much for this awesome extension, it's replacing almost all the other ones I've used.

However I would like to know if you could provide scripts from your screenshots, to take inspiration from them, should be useful for me but for a lot of people too I guess.

...and I have to rtfm in order to make python menus like the "applications" one :p

Greatest GS' extension without a doubt, keep up the good work!

Speed concerns

Hi,
I've found Argos to be a great tool for providing UIs for my python scripts. The Advanced Application Launcher script on the README is actually something i want to have. But the issue is, it takes about 5 seconds to start working, i.e., 5 seconds AFTER GNOME starts up every boot. The delay wouldn't be an issue if it wasn't that the system actually hangs during these 5 seconds. This is obviously worse than simply using "Frippery Applications Menu" or a similar extension.
Adding a lot of objects to the menu seems to be what is causing the delay. I'm ready to do tests if need be. For me, this results in an almost unnoticeable lag but for someone with a huge list of apps would face trouble with this.
Hope I'm of some help to you,
Thanks for this amazing piece of software

Where to find additional icon names?

The launcher example uses the icon starred which is not on the freedesktop.org icon naming specification list. Where can I get additional icon names?

Taking actions on mouse scroll

It would be lovely to be able to add some additional actions when scrolling over a Argos button.
The same way as you can change volume then scrolling with mouse hovering over volume icon, or song then mouse is over Media Player Indicator icon.

Do not start backup files as plugin

This is a feature request. Some editors leave backups of edited files like myscript.sh~ or myscript.sh.bak. They are then duplicate plugins in Argos.

Expected behaviour is Argos to ignore files matching patterns like *~ and *.bak

Identifying the background color

Hi guys,

Was wondering if anyone found a way to identify the background color?

Would be nice to adapt icons acording to theme... black icons on a dark theme looks ugly ;)

... currently trying to find a way

Allow refresh from command line

It would be nice to ask for refresh of specific or all scripts from command line. This could be a workaround for issue #7, imagine as bash="doaction; argos-refresh myscript.10h.sh"

Global app menu

is it possible to create something like global app menu with argos?

Image instead of icon

First of all, thank you! I have been wondering if there is an easy way to add a launcher to the top of the Gnome Shell.

I am having trouble with the image tag. I can get a launcher entry to show an icon if I choose an icon from an installed program, but am not able to use a custom image as an icon.
I tried specifying the path to the iimage file I want to use, but it still does not show up.

Any advice?

Ability to use functions in bash

It would be nice if functions defined in the script source could be used in the bash action. For example:

#!/bin/bash

function write() {    
    zenity --info
}

echo "Title"
echo "---"
echo "Do something | bash='write'"

this would allow to have more complex, self-contained script. For example, in my case, I would like to use zenity to get some user input, process it and perform some actions with the results. Doing that in functions instead of external script files has the advantage of being easier to maintain.

Dropbox example

I would like to contribute this super simple example that I find very useful as a substitute for the (now unsupported) dropbox systray icon:

#!/usr/bin/env bash

case $(dropbox-cli status) in
    "Up to date") echo "| iconName=dropboxstatus-idle" ;;
    "Syncing"*)   echo "| iconName=dropboxstatus-busy"
		  echo "| iconName=dropboxstatus-busy2" ;;
    *)            echo "| iconName=dropboxstatus-x" ;;
esac

Save it as dropbox.6s.sh and voila.

Hide an indicator

Maybe this is possible but I'm not able to see how.

My use case is to show an indicator when some kind of activity is happening (dropbox is syncing) but removing the indicator altogether otherwise. Nevertheless returning "|" or " " leaves a blank space in the bar and returning an empty line shows the name of the script. So I don't know how to suppress the indicator when unneeded, if that's possible at all.

Not really an issue, but a plea for help

Hi Guys,

I do a lot of work for a company in China and I often need to know what time it is there. Granted, I can click my clock in the panel and look at the world clocks, but what I would like to do is have Beijing time displayed in the panel along with my local time.
I was able to add Beijing's time to the panel using a bash script I found that was written for Bitbar:

#!/bin/bash
# <bitbar.title>Timezones+</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>Aaron Edell</bitbar.author>
# <bitbar.author.github>aaronedell</bitbar.author.github>
# <bitbar.desc>Rotates current time through four common timezones </bitbar.desc>
# <bitbar.image>http://i.imgur.com/Y4nhdZo.png</bitbar.image>
# <bitbar.dependencies>Bash GNU AWK</bitbar.dependencies>
echo -n "Beijing " ; TZ=":Asia/Shanghai +'%l:%M %p

The problem is that the time displayed in the panel does not update.
Does anyone know how I can make this script update every 60 seconds?
`

Removing script name and file shortcut from bottom of menu.

Is there a way to remove the last entry with the shortcut to the script that appears at the bottom of the menu? Something like ARGOS_SHOW_SCRIPT. Also something like ARGOS_SHOW_SCRIPT_NAME to be able to change the name of the script shown if it is desired to keep it.

[Feauture Request] option for disable refresh menu when is opened

example I open menu with sub-menu and when script refresh, submenu closed
how to reproduce

  1. click on menu in top panel
  2. click to some menu
  3. wait refresh script
  4. some menu closed
# python3

print("test menu\n---")
print("some menu")
print("--some sub menu1")
print("--some sub  menu2")

Way to accept input from user

Hi,
As of now, is there any way to accept input from user like with StEntry so that when the user clicks enter, we get a new new output from command below it?
like this:

echo "Tester"
echo "---"
echo (StEntry-Activated-With-Return-Key-or-Enter-Key)
echo (command-using-text-from-StEntry)

Is this possible? If not, can it be implemented?
Thanks

Multiple mutt profiles

I use Mutt as my email client. I have two email accounts. I can add my main account to argos with this:
echo "Mutt | iconName=dog bash=/home/john/scripts/jfn-mutt terminal=true"
The bash script for this is simply:
#!/bin/bash
mutt
In my bash aliases file I have this to launch my second profile:
alias jmutt='mutt -F ~/.mutt/profile.john
This works when I type the alias in a terminal.
In argos I added echo "JMutt | iconName=dog bash=/home/john/scripts/johnmutt terminal=true"
I tried making a bash script to call this second profile from argos with this code:
#!/bin/bash
mutt -F ~/.mutt/profile.john
However, this results in my main account being opened.
Any idea on how I can fix this so that argos will open my second email account in Mutt?

Question about the bitbar stock ticker

Hi Guys,

I am running GNOME Shell 3.18.5

I actually have a couple of questions.
1. The Bitbar Stock Ticker plugin is working on my Ubuntu 16.04 system, but looking at the python code (which I freely admit I know very little about) it looks like there is supposed to be a scrolling ticker of stock symbols. Is it possible to have a scrolling ticker move across the desktop?

2. My second question is, as you can see in the screen shot, I have no icon or title for the stock ticker. What could be the reason that a title, like Google Finance Stock Ticker does not appear in my panel? Is there a way to make a title appear?

I am also curious as to why there is no title for my basic launcher, although I did get an icon to appear.
running-on-ubuntu-16 04-gnome-shell

Thank you,

GG

Not working in GNOME Shell 3.14

Several people have reported that in GNOME Shell 3.14, this error is thrown:

Error: Expected type flags for Argument 'flags' but got type 'undefined'"

Customize button refresh time

When there are multiple lines of output for the button, argos cycles through each line after a 3 second delay. Would it be possible to make this refresh time customizable through a line attribute?

In any event, it can be modified globally by changing the below line in button.js:

this._cycleTimeout = Mainloop.timeout_add_seconds(3, Lang.bind(this, function()

Simply change the '3' to your desired refresh interval.

Thanks dev for this fantastic extension!

Command works only if terminal=true

Hey,
When I add an item like this:

echo "10 | bash='pkexec ddcutil --bus=2 setvcp 0x10 10' terminal=false"
It will not work, nothing is happening. I need to change terminal=true for it to work.

Why is that?

Improvement?

Is it possible to hide the filename on the bottom of the window.

When the script is over it's just useless to keep it, would looks nicer without

refresh=true should run after bash=command finishes

Not sure if it is by design or not, but it would be really useful if the script would reload after the command has finished to reflect the changes made by pressing the button (modifying a file in my case).

To quote the BitBar documentation:

refresh=.. to make the item refresh the plugin it belongs to. If the item runs a script, refresh is performed after the script finishes. eg. refresh=true

Test with this plugin and click on "Test delay" (on my machine output is 0.01):

#!/usr/bin/sh

FILE="/home/user/testfile"

echo "`cat $FILE`"
echo "---"
echo "Test delay | bash='echo 0.00 > $FILE; sleep 0.01; echo 0.01 > $FILE; sleep 0.05; echo 0.05 > $FILE' terminal=false refresh=true"

Issue with top viewer

I'm running GNOME 3.24 and just installed Argos. It doesn't seem to format, or even get the full output...
screenshot from 2017-04-29 14-29-07
Removing the awk part of the call makes it better... But formatting is still not proper - doesn't look as good as in the screenshot.
screenshot from 2017-04-29 14-30-41

Add Some Way to Donate to You

I've been wanting BitBar on Linux for a while and was thrilled to find this project. Please add a way for us to buy you a coffee!

Cinnamon Desktop

Since Cinnamon Desktop is a fork from Gnome 3, will argos work with it? I know the installation process would have to be different since Cinnamon doesn't make use of the ~/.local/share/gnome-shell/extensions path. I'm using Cinnamon with Mint Linux, but I don't know much about using it yet. Just started.

How can I call a bash function?

Hi, awesome project!
I'm trying to port my bash script to argos and I may be missing something obvious, but how can I call a function in argos? For example:

myfunc () { echo test ; }

echo "Option1 | iconName=gedit bash='myfunc' terminal=true"
echo "---"

and I get no output (just a terminal opens). I tried playing around with commands but couldn't get anywhere.

Limitation for sudo?

Hi,

I want to make a bash script using sometimes the sudo command (no choice sometime).

Those commands are working fine in terminal but not in Argos.
echo $password | sudo -S command --arguments > ~/log.txt
eval 'echo $password | sudo -S command --arguments' | tee -a ~/log.txt

even tried to

echo "eval 'echo $password | sudo -S command --arguments' | tee -a ~/log.txt" > ~/file.sh
bash ~/file.sh > ~/log.txt

Even tried to use the full path of the bin files used ... without any success, the "file.sh" is there and working, the "log.txt" is generated but it remains at 0 byte.

Maybe the sudo command is somehow disabled in Argos...?!?

Idea for less CPU load

I have a (hopefully) simple idea.

Is it possible to have a commandline parameter that indicates if the dropdown menu is opened?
E.g. a script that runs every some seconds and shows the CPU load in the title.
When opening the dropdown it shows the top 20 processes.

The script could exit after outputting the "---" line if the dropdown is not opened.

RangeError: invalid language tag: C

System monitor has not been working for a while, and I find this in the logs:

gnome-shell[9337]: Extension "[email protected]" had error: RangeError: invalid language tag: C

I run Debian Testing (Buster) with:

gnome-shell-extension-system-monitor 33-1
gnome-shell 3.26.2-1
gir1.2-gtop-2.0:amd64 2.38.0-1
gir1.2-networkmanager-1.0:amd64 1.10.0-1

Is there a way where I can make gnome-shell more specifically produce what line in the extension code that causes this?

BR,

/J

Possibly an easier way to load images async?

I was reading through your source code and I came across this:
https://github.com/p-e-w/argos/blob/master/argos%40pew.worldwidemann.com/lineview.js#L44-L82

I'm not exactly sure what image is? But if it's an image uri there's a much easier way to do it.

I was looking for a way myself to load remote images async with error checking for:
https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer

And this is what I came up with:

function setCoverIconAsync(icon, coverUrl, fallback_icon_name) {
  let file = Gio.File.new_for_uri(coverUrl);
  file.load_contents_async(null, function(source, result) {
    try {
      let bytes = source.load_contents_finish(result)[1];
      icon.gicon = Gio.BytesIcon.new(bytes);
    }
    catch(err) {
      icon.icon_name = fallback_icon_name;
    }
  });
}

In our case we pass the cover icon we want to change a cover url(local or remote) and a fallback icon name in case we get an error.

Works like a charm for me. Again though I may be off base of what you're actually trying to do?

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.