Created
May 25, 2011 07:04
-
-
Save averrin/990485 to your computer and use it in GitHub Desktop.
config.fish
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt -d "Write out the prompt" | |
set tt (math (random)/5000) | |
switch tt | |
case 0 | |
set tt green | |
case 1 | |
set tt red | |
case 2 | |
set tt yellow | |
set '*' | |
set tt blue | |
set '**' | |
set tt brown | |
end | |
printf '%s[%s%s%s]%s#:%s '(set_color green) (set_color normal) (set_color $tt --bold --underline) (echo $PWD) (set_color normal) (set_color red) (set_color normal) | |
end | |
set fish_greeting | |
function pipi | |
sudo pip install $argv | |
end | |
function ccd | |
clear | |
cd $argv | |
end | |
function dpkgi | |
sudo dpkg -i $argv | |
end | |
function df | |
df -h -x tmpfs $argv | |
end | |
function mkdir | |
mkdir -p $argv | |
end | |
function fish_title | |
echo 'Terminal: '$_ ' ' | |
pwd | |
end | |
function ekill | |
ps aux |grep $argv |awk '{print "kill -9 " $2}'|bash 2>/dev/null | |
end | |
function filemon | |
strace -f -e trace=open,close,connect -p $argv | |
end | |
function fh | |
sort /home/averrin/.config/fish/fish_history | sed '/#.*$/d' | uniq -c | sort -nb $argv | |
end | |
function m | |
~/bin/mocc $argv | |
end | |
function make | |
~/bin/wrap make $argv | |
end | |
function mkinstall | |
wrap sudo make install $argv | |
end | |
function conf | |
wrap ./configure $argv | |
end | |
function esources | |
sudo vim /etc/apt/sources.list $argv | |
end | |
function fin | |
find | while read file; cat "$file" | sed '1d' | grep -H --label="$file" "$argv"; end | |
end | |
function mv | |
mv $argv | |
rls | |
end | |
function ! | |
sudo $argv | |
end | |
function editcolors | |
gvim ~/.lscolors $argv | |
end | |
function ls | |
ls -CLX --group-directories-first --color=auto $argv | |
end | |
function gvim | |
nohup gvim $argv & | |
end | |
function rf | |
rm -r $argv | |
end | |
function rls | |
clear | |
ls $argv | |
end | |
function shut | |
sudo shutdown -h 0 $argv | |
end | |
function reboot | |
sudo shutdown -r 0 $argv | |
end | |
function sc | |
xrandr -s 1024x768 | |
xrandr -s 1280x1024 | |
nvidia-settings -l $argv | |
end | |
function su | |
sudo su $argv | |
end | |
function egrub | |
sudo vim /boot/grub/menu.lst $argv | |
end | |
function exorg | |
sudo vim /etc/X11/xorg.conf $argv | |
end | |
function egrub | |
sudo vim /boot/grub/menu.lst $argv | |
end | |
function efstab | |
sudo vim /etc/fstab $argv | |
end | |
function editbash | |
gvim ~/.bashrc $argv | |
end | |
function apt-get | |
sudo apt-get -y $argv | |
end | |
function freespace | |
sudo apt-get autoremove | |
sudo apt-get clean $argv | |
end | |
function xorg | |
sudo nano /etc/X11/xorg.conf $argv & | |
end | |
function k | |
killall $argv | |
end | |
function p | |
~/bin/wrap ~/bin/p $argv | |
end | |
function efish | |
vim ~/.config/fish/config.fish $argv | |
end | |
function rm | |
rm $argv | |
rls | |
end | |
function cd | |
cd $argv | |
rls | |
end | |
cd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment