update plugin documentation
parent
635c380a91
commit
3f8fe6157c
|
|
@ -6,6 +6,9 @@
|
||||||
#
|
#
|
||||||
# [issue 108]: https://github.com/revans/bash-it/issues/108
|
# [issue 108]: https://github.com/revans/bash-it/issues/108
|
||||||
|
|
||||||
|
cite about-plugin
|
||||||
|
about-plugin 'automatically set your xterm title with host and location info'
|
||||||
|
|
||||||
set_xterm_title () {
|
set_xterm_title () {
|
||||||
local title="$1"
|
local title="$1"
|
||||||
echo -ne "\e]0;$title\007"
|
echo -ne "\e]0;$title\007"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cite about-plugin
|
||||||
|
about-plugin query and display info about your battery charge level
|
||||||
|
|
||||||
battery_percentage(){
|
battery_percentage(){
|
||||||
|
about 'displays battery charge as a percentage of full (100%)'
|
||||||
|
group battery
|
||||||
|
|
||||||
if command_exists acpi;
|
if command_exists acpi;
|
||||||
then
|
then
|
||||||
local ACPI_OUTPUT=$(acpi -b)
|
local ACPI_OUTPUT=$(acpi -b)
|
||||||
|
|
@ -65,6 +71,9 @@ battery_percentage(){
|
||||||
}
|
}
|
||||||
|
|
||||||
battery_charge(){
|
battery_charge(){
|
||||||
|
about graphical display of your battery charge
|
||||||
|
group battery
|
||||||
|
|
||||||
# Full char
|
# Full char
|
||||||
local F_C='▸'
|
local F_C='▸'
|
||||||
# Depleted char
|
# Depleted char
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,19 @@
|
||||||
# based on https://gist.github.com/318247
|
# based on https://gist.github.com/318247
|
||||||
|
|
||||||
# Usage: browser
|
cite about-plugin
|
||||||
# pipe html to a browser
|
about-plugin 'render commandline output in your browser'
|
||||||
# e.g.
|
|
||||||
# $ echo "<h1>hi mom!</h1>" | browser
|
|
||||||
# $ ron -5 man/rip.5.ron | browser
|
|
||||||
|
|
||||||
function browser() {
|
function browser() {
|
||||||
|
about pipe html to a browser
|
||||||
|
example '$ echo "<h1>hi mom!</h1>" | browser'
|
||||||
|
example '$ ron -5 man/rip.5.ron | browser'
|
||||||
|
group browser
|
||||||
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
open $1
|
open $1
|
||||||
else
|
else
|
||||||
cat <<usage
|
reference browser
|
||||||
Usage: browser
|
|
||||||
pipe html to a browser
|
|
||||||
|
|
||||||
$ echo '<h1>hi mom!</h1>' | browser
|
|
||||||
$ ron -5 man/rip.5.ron | browser
|
|
||||||
usage
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -29,14 +24,11 @@ usage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# pipe hot spicy interwebs into textmate and cleanup!
|
|
||||||
#
|
|
||||||
# Usage: wmate
|
|
||||||
# wget into a pipe into TextMate and force Tidy (you can undo in textmate)
|
|
||||||
# e.g.
|
|
||||||
# $ wmate google.com
|
|
||||||
|
|
||||||
function wmate() {
|
function wmate() {
|
||||||
|
about 'pipe hot spicy interwebs into textmate and cleanup!'
|
||||||
|
example '$ wmate google.com'
|
||||||
|
group browser
|
||||||
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
wget -qO- $1 | /usr/bin/mate
|
wget -qO- $1 | /usr/bin/mate
|
||||||
|
|
@ -64,34 +56,21 @@ end tell
|
||||||
EOT`
|
EOT`
|
||||||
|
|
||||||
else
|
else
|
||||||
cat <<usage
|
reference wmate
|
||||||
Usage: wmate google.com
|
|
||||||
wget into a pipe into TextMate and force Tidy (you can undo in textmate)
|
|
||||||
|
|
||||||
$ wmate google.com
|
|
||||||
usage
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# Usage: raw google.com
|
|
||||||
# wget into a temp file and pump it into your browser
|
|
||||||
#
|
|
||||||
# e.g.
|
|
||||||
# $ raw google.com
|
|
||||||
function raw() {
|
function raw() {
|
||||||
|
about 'write wget into a temp file and pump it into your browser'
|
||||||
|
example '$ raw google.com'
|
||||||
|
group browser
|
||||||
|
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
wget -qO- $1 | browser
|
wget -qO- $1 | browser
|
||||||
else
|
else
|
||||||
cat <<usage
|
reference raw
|
||||||
Usage: raw google.com
|
|
||||||
wget into a temp file and pump it into your browser
|
|
||||||
|
|
||||||
$ raw google.com
|
|
||||||
usage
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue