summaryrefslogtreecommitdiffstats
path: root/.config/fish/config.fish
blob: c397118c801438247a32b83af31327e929f30367 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#! /usr/bin/fish

function fish_prompt -d "Write out the prompt"
    printf '(%s%s %s%s%s)> ' (set_color 'magenta') (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
end

function cower
    /usr/bin/cower --color=always --target=$HOME/var/aur $argv
end

function grep
    /bin/grep --color=always $argv
end

function less
    /bin/less -FXRS $argv
end

function ls
    /bin/ls -F --color=always $argv
end

function mysql
    /usr/bin/mysql --pager $argv
end

function slrn
    set -x NNTPSERVER 'news.gmane.org'
    /usr/bin/slrn $argv
end

function shutdown
    dbus-send --system --print-reply \
        --dest="org.freedesktop.ConsoleKit" \
        /org/freedesktop/ConsoleKit/Manager \
        org.freedesktop.ConsoleKit.Manager.Stop
end

function reboot
    dbus-send --system --print-reply \
        --dest="org.freedesktop.ConsoleKit" \
        /org/freedesktop/ConsoleKit/Manager \
        org.freedesktop.ConsoleKit.Manager.Restart
end

set -x PAGER 'less -FXRS'
set -x BROWSER firefox