Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # ~/.bashrc
- #
- # If not running interactively, don't do anything
- [[ $- != *i* ]] && return
- PS1='[\u@\h \W]\$ '
- export HISTSIZE=50000
- shopt -s histappend
- export EDITOR="vim"
- export BROWSER="chromium"
- export WINEARCH="win32"
- PATH=$PATH:/usr/local/Elm-Platform/0.13/.cabal-sandbox/bin
- PATH=$PATH:/home/pieter/bin
- export PATH
- export XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0"
- export LIBVA_DRIVER_NAME=vdpau
- export _JAVA_AWT_WM_NONrePARENTING=1
- # fix QTGTK
- export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
- #--------------------------------------------------
- # aliases
- #--------------------------------------------------
- alias ls='ls --color=auto'
- alias unmute='amixer -c 0 set Headphone 100% unmute'
- alias syu="yaourt -Syu && yaourt -Syua --noconfirm"
- alias df="df -h"
- alias ls="ls -F --color=auto"
- alias grep="grep --color=auto"
- alias next="binge.py"
- alias hon="hdmi-on"
- alias hoff="hdmi-off"
- alias sudo="sudo "
- alias off="systemctl poweroff"
- alias hib="systemctl hibernate"
- alias reb="systemctl reboot"
- alias b="cd ~/bin"
- alias t="cd /mnt/data/Torrent\ Downloads"
- alias m="cd ~/Dropbox/Public/KUL/masterjaar"
- alias th="cd ~/Dropbox/thesis"
- alias h="cd ~"
- alias d="cd ~/Downloads"
- alias g="gvim "
- alias mountnet="sudo mount -t cifs //192.168.1.104/netwerkschijf /mnt/netwerkschijf -o user=admin,password=vanZet8"
- # vi mode in bash
- set -o vi
- # enable history completion
- bind '"\e[A": history-search-backward'
- bind '"\e[B": history-search-forward'
- # add to cd path CDPATH=".:~/Dropbox"
- # sudo auto complete
- complete -cf sudo
- #--------------------------------------------------
- # functions
- #--------------------------------------------------
- extr () {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xjf $1 ;;
- *.tar.gz) tar xzf $1 ;;
- *.bz2) bunzip2 $1 ;;
- *.rar) rar x $1 ;;
- *.gz) gunzip $1 ;;
- *.tar) tar xf $1 ;;
- *.tbz2) tar xjf $1 ;;
- *.tgz) tar xzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *.7z) 7z x $1 ;;
- *) echo "'$1' cannot be extracted via extr()" ;;
- esac
- else
- echo "'$1' is not a valid file"
- fi
- }
- timesleep() {
- sudo rtcwake -m mem -t $(date --date="$@" +%s)
- }
- pu() {
- dropbox puburl "$@" | xsel
- }
- cd() {
- builtin cd "$@" && ls
- }
- copy() {
- cp -r "$@" ~/.drag
- }
- cut() {
- mv "$@" ~/.drag
- }
- paste() {
- mv ~/.drag/* ./
- }
- launch() {
- nohup "$@" > /dev/null 2>&1&
- }
- pdf() {
- zathura "$1" &
- }
- function subs {
- subberthehut -fns "$1"
- }
- function subsp {
- if [ -z "$1" ]; then
- file=$(find *.mkv)
- if [ -z "$file" ]; then
- file=$(find *.mp4)
- if [ -z "$file" ]; then
- file=$(find *.avi)
- fi
- fi
- subberthehut -fns "$file" && smplayer "$file" -fullscreen &
- else
- subberthehut -fns "$1" && smplayer "$1" -fullscreen &
- fi
- }
- function play {
- if [ -z "$1" ]; then
- file=$(find *.mkv)
- if [ -z "$file" ]; then
- file=$(find *.mp4)
- if [ -z "$file" ]; then
- file=$(find *.avi)
- fi
- fi
- smplayer "$file" -fullscreen &
- else
- smplayer "$1" -fullscreen &
- fi
- }
- function list-installed {
- pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
- }
- ls
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement