ShellStatus
Run shell command and output its result to status bar.
Details
Installs
- Total 3K
- Win 1K
- Mac 978
- Linux 735
Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime ShellStatus plugin
Run shell command and output its result to status bar.
Demo
Installation
This plugin is part of sublime-enhanced plugin set. You can install sublime-enhanced and this plugin will be installed automatically.
If you would like to install this package separately check “Installing packages separately” section of sublime-enhanced package.
There is “sublime-status” file in this package. Put it in your “bin” folder or specify full path to it in package settings to start using the plugin with default settings.
Features
Run shell command and add its output to status bar to sublime. By default (with corrent installation) adds following information:
branch (git or mercurial if any);
time;
battery charge if it lower that 50 percent;
path of currently edited file (I'm keeping everything in “server” directory so everything before it (incling server/[folder]/) will be removed from path; probably you'll want to change this behavior).
Time and battery charge are displayed because I work on i3 with disabled status bar: that allows to focus hardly on current task. It also allows sublime to employ as much space as possible when I work on laptop.
There is an issue with displaying some icons (when battery icon is displayed all text go to bottom out of viewable region and underscores becomes invisible). If you know how to fix this so please please tell me it ASAP; I got really annoyed of this bug.
Battery charge will be displayed usign “acpi” command. So you'll need to install it in order to see battery charge. If you are not using Linux you need to fix sublime-status command (written with ruby) or write your own to display battery charge.
Usage
You can use any language to create sublime-status command. First argument to command will currently opened file name. Status will be updated on focus. Command will be executed in directory where file is located.
Note that you should use “\t\t” (two tabs) as separator to format status bar information nicely.
Example comand (php):
#!/usr/bin/env php
<?php
// don't forget to chmod u+x this file
echo "Currently editing: " . $argv[1] . "\t\t";
echo "Time is: " . date("H:i:s") . "\t\t";
Settings
Shell command could be specified globally in “command” in “ShellStatus.sublime-settings” or per-project using “status_command” setting.
Examples:
# globally, ShellStatus.sublime-settings in your User-folder
{
"command": "my-status-command"
}
# per project, "ctrl+u, p" hotkey to open project settings.
{
...,
"settings": {
"status_command": "my-status-command",
...
}
}