dotfiles

configuration files for different softwares
git clone git://z3bra.org/dotfiles
Log | Files | Refs

commit 38dc32960b3007e4b84223d2f59558bc2c61e1a4
parent 5cce28c061c0039a11b8e75c4a2ccbd552a94201
Author: Willy Goiffon <z3bra@blinkenshell.org>
Date:   Mon Nov  4 00:05:12 2013

Merge branch 'master' of gitorious.org:z3bra/dotfiles

Diffstat:
 Xresources      |  4 +--
 bashrc          | 81 ++++++++++++++++++++++++++++++++++++++++++----------------
 cwmrc           |  4 +--
 elinks/gotohist | 32 +-----------------------
 ratpoisonrc     |  5 +---
 xbindkeysrc     | 16 +++++------
 zshrc           | 11 ++++----
 7 files changed, 79 insertions(+), 74 deletions(-)

diff --git a/Xresources b/Xresources @@ -33,8 +33,8 @@ URxvt*loginShell: false URxvt*saveLines: 1024 URxvt*geometry: 96x20 URxvt*depth: 32 -URxvt*font: -misc-tamsyn-medium-*-*--14-101-*-*-*-*-* -URxvt*boldFont: -misc-tamsyn-medium-*-*--14-101-*-*-*-*-* +URxvt*font: -misc-tamsyn-medium-*-*--14-101-*-*-*-*-*,-*-stlarch-medium-r-*--10-*-*-*-*-*-* +URxvt*boldFont: -misc-tamsyn-medium-*-*--14-101-*-*-*-*-*,-*-stlarch-medium-r-*--10-*-*-*-*-*-* URxvt*scrollBar: false URxvt*cursorBlink: false URxvt*cursorColor: white diff --git a/bashrc b/bashrc @@ -3,11 +3,29 @@ # ## INIT {{{ + +# MPD server name +export MPD_HOST="gavroche" + # If not running interactively, don't do anything [[ $- != *i* ]] && return # add folders to PATH -export PATH=$PATH:~/bin:. +export PATH="$PATH:~/bin:." + +# Fancy prompt +fg=('\[\e[0;30m\]' '\[\e[0;31m\]' '\[\e[0;32m\]' '\[\e[0;33m\]' + '\[\e[0;34m\]' '\[\e[0;35m\]' '\[\e[0;36m\]' '\[\e[0;37m\]' + '\[\e[1;30m\]' '\[\e[1;31m\]' '\[\e[1;32m\]' '\[\e[1;33m\]' + '\[\e[1;34m\]' '\[\e[1;35m\]' '\[\e[1;36m\]' '\[\e[1;37m\]') + +export PS1="\n ${fg[11]}: ${fg[8]}($(hostname|cut -b-3)) ${fg[15]}" + +# Default editor to use +export EDITOR="vim" + +# command line editing +set -o vi # use auto-completion after those words complete -cf sudo @@ -17,9 +35,13 @@ complete -cf pkill # }}} ## FUNCTIONS {{{ -function start() { sudo /etc/rc.d/$1 start; } -function stop() { sudo /etc/rc.d/$1 stop; } -function restart() { sudo /etc/rc.d/$1 restart; } + +function start() { sudo systemctl start $@; } +function stop() { sudo systemctl stop $@; } +function restart() { sudo systemctl restart $@; } +function status() { sudo systemctl status $@; } +function enable() { sudo systemctl enable $@; } +function disable() { sudo systemctl disable $@; } function thumbify() { if [ -f $1 ]; then @@ -30,13 +52,13 @@ function thumbify() { mogrify -resize 250x250 thumb-$1 fi else - echo "Error: '$1' is not a valid file!" + echo "$1: not a regular file" fi } function ttycolors() { if [ "$TERM" = "linux" ]; then - echo -en "\e]P0232323" #black -> this is the background color as well. + echo -en "\e]P0222222" #black -> also the background echo -en "\e]P18b3e2f" #darkred echo -en "\e]P2526f33" #darkgreen echo -en "\e]P38b814c" #brown @@ -51,10 +73,20 @@ function ttycolors() { echo -en "\e]PC9ac0cd" #blue echo -en "\e]PD9f79ee" #magenta echo -en "\e]PE79cdcd" #cyan - echo -en "\e]PFffffff" #white -> this is the foreground color as well. + echo -en "\e]PFffffff" #white -> also the foreground clear #for background artifacting fi } + +# auto-cd into a created directory +mcd () { + mkdir $@ && cd $_ +} + +# perform 'ls' right after entering a directory +function cd() { + builtin cd $@ && ls -CF +} ## }}} ## ALIASES {{{ @@ -65,23 +97,22 @@ alias c="clear" alias so="source ~/.bashrc" # Add a 'proctection' on rm | mv | cp -alias rm='rm -i' -alias cp='cp -rvi' -alias mv='mv -i' +alias cp="cp -rvi" +alias mv="mv -i" # Alias to avoid some "RAAAAAAAAAH !!" alias :q="quit" alias cd..="cd .." -alias fuck='sudo $(fc -n -l -1)' +alias fuck="sudo $(fc -n -l -1)" # Make some output colorfull -alias ls='ls --color=auto' +alias ls="ls --color=auto" -alias grep='grep --color=auto' +alias grep="grep --color=auto" # some more ls aliases -alias ll='ls -alhF --color=auto' -alias l='ls -CF --color=auto' +alias ll="ls -alhF --color=auto" +alias l="ls -CF --color=auto" ## Applications export EDITOR="vim" @@ -90,16 +121,22 @@ alias sv="sudo vim" alias vol="alsamixer" -alias t="tmux" -# }}} +# TMUX / DTACH +alias t='tmux' +alias d='dtach -A ~/tmp/irssi.sk /usr/bin/irssi' -## CONFIG {{{ -# vim as default editor -export EDITOR='vim' +# BTPD +alias btc="btcli -d ~/var/btp" -# use vi-like CLI -set -o vi +# desktop recording +alias rec="ffmpeg -f x11grab -s 1440x900 -r 25 -i :0.0 output.mkv" + +# HANDY RICKY SCRIPT +alias rick="echo 'curl -L \'http://bit.ly/10hA8iC\' | bash'" +alias rcommit="curl -s 'http://whatthecommit.com/index.txt'" +# }}} +## TWEAKS {{{ # change tty colors ttycolors # }}} diff --git a/cwmrc b/cwmrc @@ -9,7 +9,7 @@ command term urxvt command internet surf http://duckduckgo.com/lite command fichier pcmanfm command libreoffice libreoffice -command quakelive "xinit ~/.quakelive/xinit -- :1" +command quakelive "xinit /home/z3bra/.quakelive/xinit -- :1" command defrag /opt/quake3/iodfengine.x86_64 # automatic grouping for specific windows @@ -95,7 +95,7 @@ bind CM-q quit bind 4-Return terminal bind 4-space terminal bind 4-w dwb -bind 4-q 'xinit ~/.quakelive/xinit -- :1' +bind 4-q 'xinit /home/z3bra/.quakelive/xinit -- :1' bind 4-exclam exec bind 4-colon ssh bind 4S-slash search diff --git a/elinks/gotohist b/elinks/gotohist @@ -1,32 +0,0 @@ -http://mafreebox.freebox.fr/settings.php?page=net_redirs -www.goosh.org -www.duckduckgo -defrag.fr -www.danstonchat.com/random.html -exiled.lebonforum.com -facebook.com -z3bra.no-ip.org -http://z3bra.no-ip.org/gavroche/.?s=media -goosh.org -startpage.org -google.com -danstonchat.com/random.html -startpage.com -mafreebox.freebox.fr -z3bra.no-ip.org/gavroche -danstonchat.com -viedemerde.com -cdm.com -vdm.com -viedemerde.fr -api.allocine.fr/rest/v3/movie?code=56910&partner=YW5kcm9pZC12M3M -http://127.0.0.1/gavroche/.?s=media -192.168.0.254 -exiledclan.cwebh.org -127.0.0.1 -z3bra.no-ip.org/tournament -http://localhost:631 -http://localhost/lan/subscribe -http://localhost/lan -www.codingconfessional.com -https://aur.archlinux.org/submit diff --git a/ratpoisonrc b/ratpoisonrc @@ -1,7 +1,6 @@ # ~/.ratpoisonrc unmanage rdesktop -unmanage MPlayer # options startup_message off @@ -9,8 +8,8 @@ startup_message off # ratpoison set border 28 set padding 16 36 16 16 -set fgcolor #e8e9ca -set bgcolor #232323 +set fgcolor #ffffff +set bgcolor #222222 set font "tamsyn" set winname name set winfmt %s%8t diff --git a/xbindkeysrc b/xbindkeysrc @@ -24,26 +24,26 @@ XF86AudioLowerVolume XF86AudioMute # ----------------------------------------------------------- }}} -- -# -- MPC remote control ------------------------------------- {{{ -- -"mpc toggle" +# -- mpc -h gavroche remote control ------------------------------------- {{{ -- +"mpc -h gavroche toggle" XF86AudioPlay -"mpc stop" +"mpc -h gavroche stop" XF86AudioStop -"mpc prev" +"mpc -h gavroche prev" XF86AudioPrev -"mpc next" +"mpc -h gavroche next" XF86AudioNext -"mpc volume +10" +"mpc -h gavroche volume +10" control + XF86AudioRaiseVolume -"mpc volume -10" +"mpc -h gavroche volume -10" control + XF86AudioLowerVolume -"mpc pause" +"mpc -h gavroche pause" XF86AudioMute # ----------------------------------------------------------- }}} -- # diff --git a/zshrc b/zshrc @@ -4,7 +4,7 @@ export PATH=$PATH:$HOME/bin:. # Remote MPD server -export MPD_HOST='mpdconf@gavroche' +export MPD_HOST='gavroche' ## }}} @@ -83,7 +83,7 @@ alias btc="btcli -d ~/var/btp" alias rec="ffmpeg -f x11grab -s 1440x900 -r 25 -i :0.0 output.mkv" # HANDY RICKY SCRIPT -alias rick="echo 'curl -L \'http://bit.ly/10hA8iC\' | bash'" +alias rick="curl -s -L 'http://bit.ly/10hA8iC' | bash" alias rcommit="curl -s 'http://whatthecommit.com/index.txt'" ## }}} @@ -122,9 +122,10 @@ extract () { gifify() { if [[ -n "$1" && -n "$2" ]]; then - ffmpeg -i $1 -pix_fmt rgb24 temp.gif - convert -layers Optimize temp.gif $2 - rm temp.gif + mkdir gif-tmp + ffmpeg -i $1 -r 1 -f image2 gif-tmp/%05d.jpg + convert -delay 100 gif-tmp/*.jpg $2 + rm -rf gif-tmp/ else echo "proper usage: gif-ify <input_movie.mov> <output_file.gif>" echo "You DO need to include extensions."