Commit 0c5905d0 authored by TheOuterLinux's avatar TheOuterLinux

...

parent 497403ab
#!/bin/bash
##
## Script to open an xterm and display weather data <damo> March 2016
##
## If City parameter is passed to script, then that is city data retrieved,
## else default is used (current IP location)
#
########################################################################
#
# wttr.in uses wego as a backend
#Usage: (from http://wttr.in/:help )
#$ curl wttr.in # current location
#$ curl wttr.in/muc # weather in the Munic airport
#Supported locations:
#/paris # city name
#/muc # airport code (3 letters)
#/@stackoverflow.com # domain name
#Special URLs:
#/:help # show this page
#
########################################################################
if [[ $1 ]];then
xterm -g 130x40 -hold -T "Weather in $1" -e curl -4 http://wttr.in/$1 &
else
xterm -g 130x40 -hold -T "Local Weather" -e curl -4 http://wttr.in/ &
fi
exit
......@@ -64,7 +64,7 @@ function twitch_list() { curl -s "https://tmi.twitch.tv/group/user/$1/chatters"
#Nano for writing and spell-checking
function spellcheck() { aspell -c "$1"; }
function spell() { echo "$1" | aspell -a; }
alias nano="nano -m -u -c -W --tabsize=4 --fill=100 --autoindent"
alias nano="nano -m -u -c -W --tabsize=4 --autoindent"
alias writer="nano -m -u -c -W -l --tabsize=4 --fill=85 --autoindent --smooth"
# Print a word from a certain column of the output when piping.
......@@ -211,7 +211,7 @@ function 2flv() { fname="${1%.*}"; ffmpeg -threads 0 -i "$1" "$fname.flv" && rm
function 2mpg() { fname="${1%.*}"; ffmpeg -threads 0 -i "$1" "$fname.mpg" && rm "$1"; }
#Converting documents and images
function 2txt() { soffice --headless txt "$1"; }
function 2txt() { soffice --headless --convert-to txt "$1"; }
function 2pdf() {
if [ ${1: -4} == ".html" ]
then
......@@ -219,11 +219,11 @@ function 2pdf() {
soffice --headless --convert-to odt "$1"
soffice --headless pdf "$fname.html"
else
soffice --headless pdf "$1"
soffice --headless --convert-to pdf "$1"
fi
}
function 2doc() { soffice --headless doc "$1"; }
function 2odt() { soffice --headless odt "$1"; }
function 2doc() { soffice --headless --convert-to doc "$1"; }
function 2odt() { soffice --headless --convert-to odt "$1"; }
function 2pcx() { fname="${1%.*}"; convert "$1" -colors 256 "$fname.pcx" && rm "$1"; }
function 2jpeg() { fname="${1%.*}"; convert "$1" "$fname.jpg" && rm "$1"; }
function 2jpg() { fname="${1%.*}"; convert "$1" "$fname.jpg" && rm "$1"; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment