Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Oh-My-Zsh
- ZSH=/usr/share/oh-my-zsh/
- ZSH_THEME="msjche" #kardan agnoster af-magic bira clean candy gentoo terminalparty
- # Lines configured by zsh-newuser-install
- HISTFILE=~/.histfile
- HISTSIZE=1000
- SAVEHIST=1000
- # Set to this to use case-sensitive completion
- CASE_SENSITIVE="true"
- # Comment this out to disable bi-weekly auto-update checks
- DISABLE_AUTO_UPDATE="true"
- # Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
- # export UPDATE_ZSH_DAYS=13
- # Uncomment following line if you want to disable colors in ls
- # DISABLE_LS_COLORS="true"
- # Uncomment following line if you want to disable autosetting terminal title.
- # DISABLE_AUTO_TITLE="true"
- # Uncomment following line if you want red dots to be displayed while waiting for completion
- COMPLETION_WAITING_DOTS="true"
- # Default Programs
- export EDITOR="vim"
- export PAGER="less"
- export BROWSER="dwb"
- export MOVPLAY="mplayer"
- export PICVIEW="feh"
- export SNDPLAY="mplayer"
- # File Extensions
- for ext in html org php com net no; do alias -s $ext=$BROWSER; done
- for ext in txt tex py PKGBUID; do alias -s $ext=$EDITOR; done
- for ext in png jpg gif; do alias -s $ext=$PICVIEW; done
- for ext in mpg wmv avi mkv; do alias -s $ext=$MOVPLAY; done
- for ext in wav mp3 ogg; do alias -s $ext=$SNDPLAY; done
- ########################################################
- ######################## ALIASES #######################
- ########################################################
- alias bub='say en beau is a bunkace'
- ## Pacman / Yaourt
- alias UU='packer-color -Syu'
- alias Y='yaourt'
- alias YI='yaourt -S'
- alias P='packer-color'
- alias PI='packer-color -S'
- alias pac='sudo pacman -S'
- alias pac-r='sudo pacman -R'
- alias pac-search='sudo pacman -Ss'
- alias pkg-list='pacman -Ql'
- ## Directories
- alias ll='ls -l'
- alias la='ls -A'
- alias l='ls'
- alias C='clear'
- alias SV='sudo vim'
- alias home='cd ~'
- alias ..='cd ..'
- alias k='exit'
- alias te='trash-empty'
- alias tl='trash-list'
- alias trash='trash-put'
- alias tr='trash-rm'
- alias lsTrash='ls ~/.local/share/Trash/files/'
- alias cdTrash='cd ~/.local/share/Trash/files/'
- alias lD='ls ~/Downloads'
- alias D='cd ~/Downloads'
- alias yt='cd ~/Downloads/YouTube'
- alias cleanYT='rm ~/Downloads/YouTube/*.webm*'
- alias sG='sudo gedit'
- ## Awesome Theming
- alias eAZ='vim ~/Scripts/ThemeFiles/rc.lua.zenburn'
- alias eAD='vim ~/Scripts/ThemeFiles/rc.lua.dunzor'
- alias eAO='vim ~/Scripts/ThemeFiles/rc.lua.obscur'
- alias eAM='vim ~/Scripts/ThemeFiles/rc.lua.matrix'
- alias eXZ='vim ~/Scripts/ThemeFiles/.Xresources.zenburn'
- alias eXD='vim ~/Scripts/ThemeFiles/.Xresources.dunzor'
- alias eXM='vim ~/Scrtips/ThemeFiles/.Xresources.matrix'
- ## X Resources Stuff
- alias eX='vim ~/.Xresources'
- alias XTR='xrdb -merge ~/.Xresources'
- ## Zsh Stuff
- alias eZ='vim ~/.zshrc'
- alias eZG='gedit ~/.zshrc'
- alias eOMZ='sudo vim /usr/share/oh-my-zsh/themes/msjche.zsh-theme'
- alias Z='source ~/.zshrc'
- ## Vim Stuff
- alias eV='vim ~/.vimrc'
- alias e='vim'
- ## Rip CDs
- alias CDinfo='cdparanoia -vsQ'
- alias rip='cdparanoia -B'
- alias mp3='for t in track{01-14}*.wav; do lame -b 320 $t; done'
- ## Scripts
- alias activate='chmod 755'
- alias BB='sudo ~/Scripts/brightness.sh'
- alias dunzor='~/Scripts/dunzor.sh'
- alias zenburn='~/Scripts/zenburn.sh'
- alias darkburn='~/Scripts/darkburn.sh'
- alias obscur='~/Scripts/obscur.sh'
- alias matrix='~/Scripts/matrix.sh'
- alias tpb='~/Scripts/tpb.sh'
- alias torrentzeu='~/Scripts/torrentzeu.sh'
- alias top100='~/Scripts/top100.sh'
- alias time_international='~/Scripts/time_international.sh'
- alias natgeo='~/Scripts/natgeo.sh'
- alias ballz='python ~/Scripts/Games/Ballz.py'
- ## Transmission
- alias TN='transmission-daemon && transmission-remote-cli'
- ## News and Music
- alias MP='ncmpcpp'
- alias news='newsbeuter'
- alias pods='podbeuter'
- alias T='turses'
- alias ut='youtube-viewer'
- ## Multimedia
- alias irc='irssi -c irc.freenode.net'
- alias M='mplayer'
- alias watch='livestreamer -p mplayer'
- ## Google Calenar
- alias gcal-week='gcalcli --width 12 calw'
- alias gcal='gcalcli --width 12 calm'
- alias gcal-add='gcalcli quick'
- alias gcal-agenda='gcalcli agenda'
- ## Peer Guardian
- alias pgl-update='sudo pglcmd update'
- alias pgl-start='sudo pglcmd restart'
- alias pgl-status='sudo pglcmd status'
- alias pgl-dump='sudo pglcmd stats'
- alias pgl-test='sudo pglcmd test'
- alias pgl-stop='sudo pglcmd stop'
- ## w3m
- alias net='w3m'
- alias net-cookie='w3m -cookie'
- ## Check Screencast
- alias FF-check-raw='mplayer ~/Screencasts/screencast.avi'
- alias FF-check-final='mplayer ~/Screencasts/screencast.mp4'
- ## Net
- alias WW='wicd-curses'
- alias net-hogs='sudo nethogs wlp1s0'
- alias net-driftnet='echo "see pics from other computers on network" && sudo driftnet -i wlan0'
- alias net-ettercap='echo "set up interface to capture network data" && sudo ettercap -TQM arp -i wlan0 //'
- alias net-urlsnarf='echo "see which websites others on network are visiting" && sudo urlsnarf -i wlan0 |cut -d\" -f4'
- alias net-scan='sudo arp-scan -l'
- alias iftop='sudo iftop -p -n'
- alias slurm='slurm -i wlan0'
- ## Misc
- alias flux='xflux -z 94596'
- alias X='xscreensaver &'
- alias kX='pkill xscreensaver'
- alias kF='pkill xflux'
- alias pic='tiv'
- alias nvidia='nvidia-smi -q -d TEMPERATURE'
- alias clock='tty-clock -c -C 4'
- alias date-time='watch -n 1 -t date'
- alias stopwatch='echo "cntl-z to end" & time cat'
- alias starwars='telnet towel.blinkenlights.nl'
- alias info='inxi -F'
- alias cap='scrot -d 4'
- alias rip='sound-juicer'
- alias vidterm='mplayer -vo caca'
- alias music='sh ~/Scripts/music.sh & '
- alias comp='compton &'
- alias kcomp='pkill compton'
- ###########################################################
- ######################## FUNCTIONS ########################
- ###########################################################
- ## No video / music only
- ut-listen() { youtube-viewer -n $@ ;}
- ## Vim help page
- :h() { vim +":h $1" +'wincmd o' +'nnoremap q :q!<CR>' ;}
- ## Command-line calculator
- calc() { python -ic "from __future__ import division; from math import *; from random import *" ;}
- ## Commandline Fu
- cmdfu() { curl "http://www.commandlinefu.com/commands/matching/$(echo "$@" \
- | sed 's/ /-/g')/$(echo -n $@ | base64)/plaintext" ;}
- ##Check if websites are down
- down4me() { curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g';}
- ### Transmission ###
- # lightweight torrent daemon, has option for cli, webui, ncurses, and gui frontend
- tsm-clearcompleted() {
- transmission-remote -l | grep 100% | grep Done | \
- awk '{print $1}' | xargs -n 1 -I % transmission-remote -t % -r ;}
- tsm() { transmission-remote --list ;}
- tsm-start() { transmission-daemon ;}
- tsm-stop() { pkill tramsmission-daemon ;}
- tsm-altspeedenable() { transmission-remote --alt-speed ;}
- tsm-altspeeddisable() { transmission-remote --no-alt-speed ;}
- tsm-add() { transmission-remote --add "$1" ;}
- tsm-askmorepeers() { transmission-remote -t"$1" --reannounce ;}
- tsm-pause() { transmission-remote -t"$1" --stop ;}
- tsm-start-torrent() { transmission-remote -t"$1" --start ;}
- tsm-purge() { transmission-remote -t"$1" --remove-and-delete ;} # will delete data also
- tsm-remove() { transmission-remote -t"$1" --remove ;} # does not delete data
- tsm-info() { transmission-remote -t"$1" --info ;}
- tsm-speed() { while true;do clear; transmission-remote -t"$1" -i | grep Speed;sleep 1;done ;}
- ### FFMPEG Screencasting ###
- ffx_MONO="1" # mono
- ffx_DUAL="2" # dual channel
- ffx_HW="hw:1,0" # alsa; run 'cat /proc/asound/pcm' to change to the correct numbers
- ffx_PULSE="pulse" # pulseaudio; might have to install pavucontrol to change volume
- ffx_FPS="15" # frame per seconds
- ffx_WIN_FULL=1440x900 # record fullscreen
- ffx_AUDIO="pcm_s16le" # audio codec
- ffx_VIDEO="libx264" # video codec
- ffx_PRESET="ultrafast" # preset error? run 'x264 -h' replace with fast,superfast, slow ..etc
- ffx_CRF="0"
- ffx_THREADS="0"
- ffx_SCALE="scale=1920x1080" # scale resolution, no black bars on sides of video on youtube
- ffx_OUTPUT=~/Screencasts/screencast.avi
- ffx_OUTPUT_FINAL=~/Screencasts/screencast.mp4
- # Note: -vf is optional delete if you want, -y is to overwrite existing file
- FF-full() { ffmpeg \
- -f alsa \
- -ac $ffx_MONO \
- -i $ffx_PULSE \
- -f x11grab \
- -r $ffx_FPS \
- -s $ffx_WIN_FULL \
- -i :0.0 \
- -acodec $ffx_AUDIO \
- -vcodec $ffx_VIDEO \
- -preset $ffx_PRESET \
- -crf $ffx_CRF \
- -threads $ffx_THREADS \
- -vf $ffx_SCALE \
- -y $ffx_OUTPUT
- }
- # capture single window, use mouse cursor to select window you want to record
- FF-window() {
- ffx_INFO=$(xwininfo -frame)
- ffmpeg \
- -f alsa \
- -ac $ffx_MONO \
- -i $ffx_PULSE \
- -f x11grab \
- -r $ffx_FPS \
- -s $(echo $ffx_INFO \
- | grep -oEe 'geometry [0-9]+x[0-9]+'\
- | grep -oEe '[0-9]+x[0-9]+') \
- -i :0.0+$(echo $ffx_INFO | grep \
- -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' \
- | grep -oEe '[0-9]+\+[0-9]+' | sed \
- -e 's/\+/,/' ) \
- -acodec $ffx_AUDIO \
- -vcodec $ffx_VIDEO \
- -preset $ffx_PRESET \
- -crf $ffx_CRF \
- -threads $ffx_THREADS \
- -y $ffx_OUTPUT \
- }
- FF-convert() {
- ffmpeg \
- -i $ffx_OUTPUT \
- -ar 22050 \
- -ab 32k \
- -strict -2 \
- $ffx_OUTPUT_FINAL
- }
- Convert() {
- ffmpeg \
- -i $1 \
- -ar 22050 \
- -ab 32k \
- -strict -2 \
- output.avi
- }
- ## Check Internal and External IPs ##
- my-ip() {
- echo "--------------- Network Information ---------------"
- # newer system like arch
- ip addr | awk '/global/ {print $1,$2}' | cut -d\/ -f1
- ip addr | awk '/global/ {print $3,$4}'
- ip addr | awk '/ether/ {print $1,$2}'
- ip addr | awk '/scope link/ {print $1,$2}' | cut -d\/ -f1
- # older system like debian
- ifconfig | awk '/inet addr/ {print $1,$2}' | awk -F: '{print $1,$2}'
- ifconfig | awk '/Bcast/ {print $3}' | awk -F: '{print $1,$2}'
- ifconfig | awk '/inet addr/ {print $4}' | awk -F: '{print $1,$2}'
- ifconfig | awk '/HWaddr/ {print $4,$5}'
- ifconfig | awk '/Scope:Link/ {print $1,$3}' | cut -d\/ -f1
- echo Current IP $(curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+")
- echo "---------------------------------------------------"
- }
- ## Google Translate Functions ##
- say() {
- mplayer -user-agent Mozilla \
- "http://translate.google.com/translate_tts?ie=UTF-8&tl="$1"&q=$(echo "$@" \
- | cut -d ' ' -f2- | sed 's/ /\+/g')" > /dev/null 2>&1 ;}
- say-translation() {
- lang=$1
- trans=$(translate {=$lang} "$(echo "$@" | cut -d ' ' -f2- | sed 's/ /\+/g')" )
- echo $trans
- mplayer -user-agent Mozilla \
- "http://translate.google.com/translate_tts?ie=UTF-8&tl=$lang&q=$trans" > /dev/null 2>&1 ;}
- ##############################################################
- ########################## PODCASTS ##########################
- ##############################################################
- nvlc-podcast() { nvlc --no-color -S podcast --podcast-urls "$@" ;}
- pods-LinuxActionShow() { nvlc-podcast "http://feeds.feedburner.com/computeractionshowvideo" ;}
- pods-Unfiltered() { nvlc-podcast "http://www.jupiterbroadcasting.com/feeds/unfilterHD.xml" ;}
- pods-Scibyte() { nvlc-podcast "http://feeds.feedburner.com/scibytelarge " ;}
- pods-RonPaul() { nvlc-podcast "https://www.google.com/url?q=http://www.ronpaul2012podcast.com/feed/&sa=U&ei=h8NIUbzfJoXJiQL4uoCoDw&ved=0CDYQFjAI&sig2=N2y3rxIlKxYDRI-Z9U8yRw&usg=AFQjCNGmGih9EAkV2JfSw2Nj64V90Jk5qg" ;}
- pods-StefanMolyneux() { nvlc-podcast "http://feeds.feedburner.com/FreedomainRadioVolume6" ;}
- pods-JoeRoganExperience() { nvlc-podcast "htthttp://joeroganexp.joerogan.libsynpro.com/irssp://joeroganexp.joerogan.libsynpro.com/irss" ;}
- pods-FreedomFeens() { nvlc-podcast "http://www.freedomfeens.com/feed/" ;}
- pods-GoldMoneyVideos() { nvlc-podcast "http://feeds.feedburner.com/GoldmoneyRssFeedGoldVideos" ;}
- pods-GoldMoneyPodcasts() { nvlc-podcast "http://feeds.feedburner.com/GoldmoneyFoundationPodcasts" ;}
- #pod-() { nvlc-podcast "" ;}
- ##############################################################
- ######################## LIVE STREAMS ########################
- ##############################################################
- # News
- live-news-cnn() { livestreamer -p mplayer http://www.justin.tv/msnbc_live_stream_cnn#/w/5008673600 live ;}
- live-news-cnn_international() { livestreamer -p mplayer http://www.justin.tv/rentadrone_cnbc#/w/5011049360/22 live ;}
- live-news-cbs() { livestreamer -p mplayer http://www.ustream.tv/cbsnews live ;}
- live-news-fox() { livestreamer -p mplayer http://www.justin.tv/newswatch_2#/w/5013818384/5 live ;}
- live-news-prisonplanet() { livestreamer -p mplayer http://www.ustream.tv/channel/alex-jones---infowars-com---prisonplanet-tv live ;}
- live-news-KRON_San_Francisco() { livestreamer -p mplayer http://www.ustream.tv/kron4news best ;}
- live-news-The_FED() { livestreamer -p mplayer http://www.ustream.tv/federalreserve live ;}
- # Series
- live-series-simpsons() { livestreamer -p mplayer http://www.justin.tv/arconai_244#/w/5013781232/19 live ;}
- live-series-southpark() { livestreamer -p mplayer http://www.justin.tv/arconai_229#/w/5622202400/179 best ;}
- live-series-survival() { livestreamer -p mplayer http://www.justin.tv/survivor101#/w/5531579536/12 best ;}
- live-series-criminal_minds() { livestreamer -p mplayer http://www.justin.tv/lurking_in_the_dark17 live ;}
- live-series-mythbusters() { livestreamer -p mplayer best ;}
- live-series-married_with_children() { livestreamer -p mplayer http://www.justin.tv/mwconjtv#/w/4992184096/88 live ;}
- live-series-stargate_SG1() { livestreamer -p mplayer http://www.justin.tv/oldngr8#/w/5006964064/9 live ;}
- live-series-that_70s_show() { livestreamer -p mplayer http://www.justin.tv/highspothorror128#/w/4994695216/102 live ;}
- # Science
- live-science-the_universe() { livestreamer -p mplayer http://www.justin.tv/the_lost_continent#/w/5005014000/48 live ;}
- # Movies
- #live-movies-horror-2000_2013_HQ() { livestreamer -p mplayer http://www.justin.tv/horrorhq0010#/w/5074870864/20 live ;}
- live-movies-horror4life() { livestreamer -p mplayer http://www.justin.tv/finn_horrorstfu51 live ;}
- #live-movies-horror-2() { livestreamer -p mplayer http://www.justin.tv/jags__movies04#/w/5008275648/4 live ;}
- live-movies-new_releases-2010_2013() { livestreamer -p mplayer http://www.justin.tv/videoisnothere6 live ;}
- #live-movies-new_releases-2012_2013_HQ() { livestreamer -p mplayer http://www.justin.tv/movies_tv68#/w/5056426000/115 live ;}
- live-movies-movies_2010_2013() { livestreamer -p mplayer http://www.justin.tv/gewinnen_duh_bringen live ;}
- live-movies-general() { livestreamer -p mplayer http://www.justin.tv/420nomad554 live ;}
- #live-movies-general-movies_n_that() { livestreamer -p mplayer http://www.justin.tv/walterkronic#/w/5013245536/8 live ;}
- ## Capture video streams
- sniff-begin() { sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT ;}
- sniff-capture-rtmpsrv() { rtmpsrv ;}
- sniff-end() { sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -m owner \! --uid-owner root -j REDIRECT ;}
- ## Rtmpsrv Feeds (may need to add -v before -r)
- # Russia Today US
- iptv-RT_US() { rtmpdump \
- -r "rtmp://rt.fms-04.visionip.tv/live" \
- -a "live" \
- -f "LNX 11,2,202,270" \
- -W "http://rt.com/s/swf/player5.4.viral.swf" \
- -p "http://rt.com" -y "RT_US_2" \
- | mplayer - ;}
- # Bloomberg
- iptv-Bloomberg() { rtmpdump \
- -v \
- -r rtmp://cp116697.live.edgefcs.net:80/live/BnazlkNDpCIcD-QkfyZCQKlRiiFnVa5I_640_360_440@18679 \
- -W http://player.ooyala.com/cacheable/c78f866930724ffedfe8cf5349712569/player_v2.swf \
- -p http://tvpc.com \
- | mplayer - ;}
- # MSNBC
- iptv-MSNBC() { rtmpdump \
- -v \
- -r "rtmp://a.cdn.msnbclive.eu/edge" \
- -y "msnbc_live" \
- -W "http://msnbclive.eu/getswf.php?name=player.swf" \
- -p "http://www.rentadrone.tv/msnbc-live-rockinroosters/" \
- | mplayer - ;}
- # Rueters
- iptv-Rueters() { rtmpdump \
- -r "rtmp://media9.lsops.net/reuters/" \
- -a "reuters/" -W "http://reuters.cdn.livestation.com/flash/player/5.7/player.swf" \
- -p "http://reuters.livestation.com/demo" \
- --live \
- -y "reuters_rlsweba_en_veryhigh.sdp" \
- | mplayer -;}
- ##########################################################
- ########################## MODS ##########################
- ##########################################################
- plugins=(git archlinux vi-mode themes zsh-completions color-command)
- source /usr/share/zsh/plugins/zsh-syntax-highlight/zsh-syntax-highlighting.zsh
- source $ZSH/oh-my-zsh.sh
Add Comment
Please, Sign In to add comment