Skip to content

Instantly share code, notes, and snippets.

@cirrusUK
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirrusUK/d1072980357577afa00f to your computer and use it in GitHub Desktop.
Save cirrusUK/d1072980357577afa00f to your computer and use it in GitHub Desktop.
# Copyright 2012 Cirrus Minor. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are
# permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY Cirrus Minor ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Cirrus Minor OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# All the following colours are supported: black, red, green, yellow, blue, magenta, cyan, white, default, bright, bold, dim,
# The views and conclusions contained in the software and documentation are those of the
# authors and should not be interpreted as representing official policies, either expressed
# or implied, by Cirrus Minor.
################
## .tmux.conf ##
#unbind C-b
set -g prefix C-a
#bind / command-prompt -p "man: " "split-window 'exec man %%'"
# generalized startup stuff
set -g default-command zsh
set -g default-terminal screen-256color
#setw -g aggressive-resize on
#setw -g monitor-activity on
set -g automatic-rename on
set -g set-remain-on-exit off
set -g visual-activity on
# mouse
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
# Statusbar properties
set -g display-time 1000
set -g status-bg default
set -g status-fg yellow
#set -g window-status-current-fg red
set -g window-status-fg blue
set -g window-status-bg default
set -g pane-active-border-fg blue
set -g pane-active-border-bg default
set -g status-justify centre
#set-option -g status-utf8 on
#set -g status-centre '#(rainbarf)'
set -g status-attr default
set -g message-bg default
set -g message-fg yellow
set -g status on
set -g status-interval 2
set -g status-utf8 on
set -g status-justify "centre"
set -g status-left-length 200
set -g status-right-length 120
set -g status-left "#(~/tmux-powerline/powerline.sh left)"
#set -g status-right "#(~/tmux-powerline/powerline.sh right)"
[[ $- = *i* ]] || return
#140731-001982,
export \
BROWSER=firefox \
EDITOR=leafpad \
#toilet -f mono12 --gay --w 100 Arch
alsi -c1=red -c2=blue -t red
fortune | ponysay
#command cowsay -f tux $(fortune all)
echo "\e[0;41m \e[0;47m \e[0;44m "
echo "Hello \e[1;37m\e[31m$USER.\e[0;51m"
echo "Today is \e[31m$(date)\e[0;51m"
#echo "Current working directory :\e[1;37m\e[31m$(pwd)\e[0;51m"
echo -e "\033[1mCurrent working directory. \033[35m$(pwd)\e[0;51m"
echo "\e[0;41m \e[0;47m \e[0;44m "
# Powerline & oh-my-zsh config.
ZSH=~/.oh-my-zsh
ZSH_THEME="powerline"
source $ZSH/oh-my-zsh.sh
#POWERLINE_FULL_CURRENT_PATH="false"
POWERLINE_DETECT_SSH="true"
COMPLETION_WAITING_DOTS="true"
plugins=(git colorize)
# User configuration
export PATH=$HOME/bin:/usr/local/bin:$PATH
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_GB.UTF-8
# Compilation flags
export ARCHFLAGS="-arch x86_64"
# ssh
export SSH_KEY_PATH="~/.ssh/dsa_id"
# alias
alias root="sudo -i"
alias sudo="sudo -i"
alias mount='mount |column -t'
alias rm='rm -I --preserve-root'
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
alias btsports1="mpv http://vk.com/away.php?to=http://iptv4.me:4321/btsport1"
alias pacsyy='echo -n "Pacman is Updating Mirrorlist " | pv -qL 20 && sudo pacman -Syy'
alias pacsu='echo -n "Pacman is Upgrading all installed packages " | pv -qL 20 && sudo pacman -Su'
alias pacinfo="echo -n "Pacman is showing pkg info " | pv -qL 20 && sudo pacman -Si" #show information about a package
alias pacsyu="pacman -Syu" #update all packages to latest version
alias pacs="sudo pacman -S" #install package/s
alias paclist="sudo pacman -Ql" #list all files installed by pkg
alias paclistloc="pacman -Qqm" #list all locally installed pkgs
alias pacr="sudo pacman -R" #uninstall one or more package/s
alias pacrns="sudo pacman -Rns" #uninstall package and deps
alias pacorph="sudo pacman -Qdt" #list all orphaned packages
alias pacremorph="sudo pacman -Rs $(pacman -Qtdq)"
alias pacown="echo -n "Determine which package owns a file " | pv -qL 20 && pacman -Qo" #determine which package owns a file
alias pacss="sudo pacman -Ss" #search for a package (not AUR)
alias pacachec="pacman -Sc" #delete pacman cache
alias pkglist="comm -23 <(pacman -Qeq|sort) <(pacman -Qmq|sort) > pkglist.txt"
alias starwars="telnet towel.blinkenlights.nl" #starwars ascii
alias history20="cut -f1 -d" " .bash_history | sort | uniq -c | sort -nr | head -n 20"
alias coweru="cower -u" #Check for updates in the AUR.
alias cowers="cower -s" #search AUR
alias coweri="cower -i" #info
alias cowerd="cower -d" #cower download <pkg>
alias makepkgi="makepkg -ci" #build,install
alias makepkgsci="makepkg -sci" #build,getdeps,clean,install
alias c-c="sudo cacheclean -v 2" #keep last 2 versions of packages
alias space="~/scripts/space.sh"
alias cap="~/cap" #sh script for scrot uploads
alias capsel="~/capsel" #sh script scrot -s uploads
alias shots="~/shots" #upload scrot to server
alias shotsel="~/shotsel" #upload scrot -s to server
alias reboot='espeak "system Rebooting" && sudo shutdown -r now' #reboot
alias poweroff='espeak "system is going down" && sudo shutdown -h now' #halt
alias shutdown='echo -n "system is shutting down, Goodbye Commander " | pv -qL 10 && sudo shutdown -h now' #halt
alias supy="supybot /home/cirrus/build/aur/supybot/cirrusbot.conf" #launch supybot
alias wee='echo -n "Launching Weechat IRC Command Line Client" | pv -qL 20 && weechat-curses' #launch weechat
alias empty='echo -n Taking out teh trash | pv -qL 10 && rm -rf /home/cirrus/.local/share/Trash/files'
#alias mpds="mpdscribble" #launch mpd lastfm scrobbler
alias news='echo -n " Launching Newsbeuter RSS Reader For Command Line " | pv -qL 20 && newsbeuter' #launch rss feeder
alias digit="echo dig +short txt archlinux.wp.dg.cx"
#alias twit2='echo -n " Launching TTytter Twitter Client " | pv -qL 20 && ttytter -dostream' #CLI twitter client
alias twit2='echo -n " Launching Rainbowstream Twitter Client " | pv -qL 20 && ~/venv/bin/rainbowstream -iot'
#alias rainbowstream=' Launching Rainbowstream Twitter Client " | pv -qL 20 && ~/venv/bin/rainbowstream -iot '
alias twit="echo -n 'Launching Earthquake Command Line Twitter Client ' | pv -qL 20 && earthquake" #twitter stream cli
#alias twit="~/scripts/earthq.sh"
alias adn="ayadn global --scroll"
alias adnsay="ayadn post"
alias adntv="ayadn -TV -b"
alias adnnp="ayadn -np -l -n"
alias adnrt="ayadn -O"
alias adnme="ayadn -m me"
alias adnstar="ayadnST"
alias unetbootin='echo -n " Launching Unetbootin " | pv -qL 10 && sudo unetbootin' #launch unetbootin
alias gparted="sudo gparted" #launch gparted
alias netlisten='lsof -i -P | grep LISTEN' #listening ports
alias lsl='ls -lh' #list files, dirs
alias nstat="netstat -p TCP -eWc" #netstat
alias red1="echo -n ArchLinux SubReddit For Command Line | pv -qL 10 && reddit_top -s archlinux"
alias red="echo -n Reddit For Command Line | pv -qL 10 && reddit_top"
alias usage='du -ch | grep total'
alias transon="sudo systemctl start transmission"
alias transoff="sudo systemctl stop transmission"
alias nstato="netstat -tuael --numeric-hosts --numeric-ports" #netstat
#alias dmesg="dmesg | tail" #messages
alias pizza="sleep 10m && echo ⚠⚠⚠ pizza is done ⚠⚠⚠ " #shellalert in 10 mins
alias ytdl="youtube-viewer -d" #youtube-viewer download -[URL]
alias ytv="~/scripts/ytv.sh"
alias subs="~/scripts/subs.sh"
alias tele="~/scripts/tele.sh" #Live UK TV
alias sounds="~/scripts/pms.py"
alias mpsyt="~/scripts/mpsyt"
alias zshconfig="leafpad ~/.zshrc"
alias wget='wget -c'
alias h='history'
alias grep='grep --color=auto'
alias ls='ls --color=auto'
alias pacmanlog='tail -n 40 /var/log/pacman.log' #view 40 entries in pacman log
alias size='sudo du -hsx * | sort -rh | head -10' #list 10 dir/files by size
alias sizevar='sudo du -a /var | sort -n -r | head -n 10' #list 10 dir by size
alias sizehome="sudo du -a ~/ | sort -n -r | head -n 10" #list 10 dir by size
alias uuid="echo -n Listing UUID | pv -qL 10 && ls /dev/disk/by-uuid/ -alh"
alias userlist='cat /etc/passwd |grep "/bin/bash" |grep "[5-9][0-9][0-9]" |cut -d: -f1'
alias du="du -h"
alias age="sudo dumpe2fs $(mount | grep 'on \/ ' | awk '{print $1}') | grep 'Filesystem created:'"
alias cdd="cd .." #up 1 dir
alias toprun="ps axo %cpu,%mem,comm |sort -unr| head -n 9" #top processes
alias hist="history -n 20" #shell history
alias psusage="ps aux --sort=-%cpu | grep -m 11 -v `whoami`" #cpu load
alias lsbig="echo -n listing files & directories by size | pv -qL 10 && ls -lSrh" #sort files dirs by size
alias mountbsd="~/scripts/mountbsd" #mount bsd
alias umountbsd="~/scripts/umountbsd" #umount bsd
alias mount7="~/scripts/mountwin"
alias umount7="~/scripts/umountwin"
alias mount32="~/scripts/mount32"
alias umount32="~/scripts/umount32"
alias mounts4="~/scripts/mounts4.sh"
alias umounts4="~/scripts/umounts4.sh"
alias drives="echo -n Listing conected drives | pv -qL 10 && lsblk -f" #list hdds, uuid's
alias sourcezsh="source ~/.zshrc" #source .zshrc
alias sourcebash="source ~/.bashrc" #source .bashrc
alias listmod="ls -ltr" #list modified files
alias listf="ls -F" #list alphabeticaly
alias cdvenv="cd ~/venv/bin"
alias venv="source venv/bin/activate && cd ~/venv/bin"
alias topu="top -u cirrus" #top proc for user
alias pingoogle="echo -n Pinging google.com | pv -qL 10 && ping -c 5 google.com" #ping google
alias pingnorton="echo -n Pinging norton.com | pv -qL 10 && ping -c 5 198.153.192.1"
alias pingnorton1="echo -n Pinging norton.com | pv -qL 10 && ping -c 5 198.153.194.1"
alias sshon="~/scripts/sshon.sh"
alias sshoff="~/scripts/sshoff.sh"
alias kernelmsg="sudo journalctl -f _TRANSPORT=kernel" #kernel messages
alias ports='netstat -tulanp' #netstat
alias bootmsg="echo -n Boot Messages | pv -qL 10 && sudo journalctl -b" #boot messages
#alias prebootmsg"="sudo journalctl --since=today | tac | sed -n '/-- Reboot --/{n;:r;/-- Reboot --/q;p;n;b r}' | tac"
alias systemdmsg="sudo journalctl /usr/lib/systemd/systemd"
alias blame="systemd-analyze blame"
alias recterm="echo -n Recording Terminal | pv -qL 10 && asciinema rec"
alias boot="echo -n Boot Time | pv -qL 10 && systemd-analyze"
alias units="echo -n Listing Units | pv -qL 10 && systemctl list-units"
alias errors="echo -n Journal Errors | pv -qL 10 && journalctl -b -p err"
#alias tmuxirc='tmux new-session -s irc weechat-curses'
alias irssigs="irssi -c irc.geekshed.net/" #irc server
alias cdh="cd ~" #cd to home folder
alias cdaur="cd build/aur" #cd to aur folder
alias qtconfig="/usr/lib/qt4/bin/qtconfig" #qtconfig
alias scloud="cloudruby $"
#alias meminfo='free -m -l -t' #freeRAM
alias meminfo='echo -n "RAM Information " | pv -qL 10 &&free -m -l -t' #freeRAM
#alias psmem='ps auxf | sort -nr -k 4' #top process eating memory
alias psmem='echo -n "Top Processes accesing RAM " | pv -qL 10 && ps auxf | sort -nr -k 4'
alias cpuinfo='lscpu' #CPU info
alias pscpu='echo -n "Top Processes accesing CPU " | pv -qL 10 && ps auxf | sort -nr -k 3'
alias gpumeminfo='echo -n GPU RAM Information | pv -qL 10 && grep -i --color memory /var/log/Xorg.0.log'
alias lsaur='echo -n Listing Installed AUR packages| pv -qL 20 && pacman -Qqm'
alias finch='~/scripts/finch.sh'
alias freenode="termite -e weechat-curses irc://Cirrus_Minor@irc.FreenodeSSL.net/#archlinux-offtopic,#archlinux,#darkfox,#r/linux"
alias killcli="echo -n Stopping CLI Processes | pv -qL 10 && sudo killall finch glances newsbeuter earthquake speedometer ocp pms pmsyt weechat-curses ranger youtube-viewer & ~/scripts/killmpd.sh"
alias mpdbotgs="~/scripts/mpdbotgs"
alias myos='echo -n "Current Operating System In Use " | pv -qL 20 && cat /etc/*-release'
alias osdon='mpdnotify start && espeak "M P D On Screen Display active"'
alias osdoff='mpdnotify stop && espeak "M P D On Screen Display inactive"'
alias mp3="~/scripts/mpd.sh" #launch mpd,ncmpcpp
alias killmpd="~/scripts/killmpd.sh" #kill mpd sh script
alias tclock="while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done &"
alias pony="fortune | ponysay"
alias mpdbot="~/scripts/mpdbot"
#alias weather='weatherman "Glasgow,United Kingdom" '
alias weather='echo -n "Glasgow UK Weather " | pv -qL 20 && weatherman "Glasgow,United Kingdom" '
#alias weatherx='weatherman -x "Glasgow,United Kingdom" '
alias weatherfc='echo -n "Glasgow UK Weather Weekly Forecast " | pv -qL 20 && weatherman -x " Glasgow,United Kingdom" '
alias grep="grep --color=auto"
#alias mympd="mplayer http://localhost:8000" #mpdstream
alias mympd='echo -n "Localhost MPD Server " | pv -qL 20 && mplayer http://localhost:8000'
alias findit="sudo find / -name" #find files
alias upd60="find . -mmin -60" #updated currentdir 60mins
alias rtupd60=" find / -mtime -1" #updated / 60mins
#alias myip="curl ifconfig.me/host" #see external IP,remote host
alias ocpcur="ocp-curses"
alias myip='echo -n "My External IP " | pv -qL 20 && curl ifconfig.me/host' #see external IP,remote host
alias telehack="telnet telehack.com"
#alias jukebox="ncmpcpp -h turtil.net -p 6610"
alias jukebox='echo -n "ncmpcpp via turtil.net Archlinux server" | pv -qL 20 && ncmpcpp -h turtil.net -p 6610'
alias mpdsrv='echo -n "MPD Stream via turtil.net Archlinux server" | pv -qL 20 && mplayer http://turtil.net:9001'
alias tmuxtxt="cat ./tmux"
alias sshkeygen='echo -n "Generating SSH Key" | pv -qL 20 && ssh-keygen -t rsa -C nailzuk@gmail.com'
alias serve="echo -n localhost python server on port 8080 | pv -qL 20 & python -m http.server 8080"
alias i3guide="w3m http://i3wm.org/docs/userguide.html"
alias pbay="w3m http://proxybay.de/browse/200"
alias pack="~/scripts/pac.sh"
##Video Streams
alias fam="livestreamer -p mpv ilive.to/view/55182/Family_Guy-live-stream-channel best"
alias bigbang="livestreamer -p mpv ilive.to/view/55316/Big_Bang_Theory-live-stream-channel best"
s las="mpv http://videocdn-us.geocdn.scaleengine.net/jblive-iphone/live/jblive.stream/playlist.m3u8"
alias sport="mplayer rtmp://178.22.217.150/tv/live/5.sdp"
alias sport1="mplayer mms://cht-cdn220-is-2.se.bptvlive.ngcdn.telstra.com/bp_online_tvn_med"
alias eurosport="mplayer http://esioslive2-i.akamaihd.net/hls/live/200728/AL_ESP1_UK_ENG/playlist_2500.m3u8"
alias animal="mplayer rtmp://178.22.217.150/tv/live/4.sdp"
alias twittv="mpv http://bglive-a.bitgravity.com/twit/live/high"
alias sp="livestreamer -p mpv http://veetle.com/index.php/channel/view#5362ce2ab2db3/7ccbda6467b88f6d3fa656f97ad759fa source"
alias engadget="livestreamer -p mpv filmon.com/tv/the-engadget-show low"
alias hak5="livestreamer -p mpv filmon.com/tv/hak5-hd-mp4-30fps low"
alias bbc1="livestreamer -p mplayer http://filmon.com/tv/bbc-one low"
alias bbc2="livestreamer -p mpv filmon.com/tv/bbc-two low"
alias itv1="livestreamer -p mpv filmon.com/tv/itv1 low"
alias itv2="livestreamer -p mpv filmon.com/tv/itv2 low"
alias itv3="livestreamer -p mpv filmon.com/tv/itv3 low"
alias itv4="livestreamer -p mpv filmon.com/tv/itv4 low"
alias cbsdrama="livestreamer -p mpv filmon.com/tv/cbs-drama low"
alias chan4="livestreamer -p mpv filmon.com/tv/channel-4 low"
alias dave="livestreamer -p mpv filmon.com/tv/dave low"
alias quest="livestreamer -p mpv filmon.com/tv/quest low"
alias yesterday="livestreamer -p mpv filmon.com/tv/yesterday low"
alias 5usa="livestreamer -p mpv filmon.com/tv/5usa low"
alias iplay="echo -n BBC iPlayer Shell Commands | pv -qL 10 && cat ~/iplayer.txt"
alias iplayer="echo -n Executing BBC iPlayer | pv -qL 10 && ~/iplayer"
alias speedtest="echo -n Test Download & Upload Speeds with option to share results via png file | pv -qL 10 && speedtest-cl --share"
alias speeddown="echo -n Displaying Download Speed Graph| pv -qL 10 && speedometer -rx eth0"
alias speedup="echo -n Displaying Upload Speed Graph | pv -qL 10 && speedometer -tx eth0"
alias speedrw="echo -n Show R/W speeds | pv -qL 10 && dd bs=1000000 count=100 if=/dev/zero of=testfile & speedometer testfile"
alias dclock="dclock -bg black -fg turquoise -led_off black -geometry 114x49"
alias xeyes="xeyes -bg black -center green -fg blue -geometry 114x49"
PATH=$PATH:/home/cirrus/.gem/ruby/2.1.0/bin
#PATH=$PATH:/root/.gem/ruby/2.0.0/bin
alias issue="cat /etc/issue"
# needs to be at the bottom, or completion will break highlighting.
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment