-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc.funcs.linux
67 lines (56 loc) · 1.1 KB
/
.bashrc.funcs.linux
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
function acc() {
autoninja -C $csrc/out/cros chrome "$@"
}
function defdis() {
export DISPLAY=$DEFAULT_DISPLAY
}
function e() {
if which vim > /dev/null
then
vim "$@"
else
vi "$@"
fi
}
function edis() {
echo $DISPLAY
}
function ge() {
if which gvim > /dev/null
then
gvim "$@"
else
e "$@"
fi
}
function nulldis() {
if [ $(ps auxww | grep Xvfb | grep -v grep | wc -l) = 0 ]
then
Xvfb :4 -screen 0 1024x768x24 -ac -nolisten tcp > /dev/null 2> /dev/null &
fi
export DISPLAY=:4
}
function occ() {
$csrc/out/cros/chrome --user-data-dir=$src/udd.cros --enable-logging=stderr \
--log-level=0 "$@"
}
function odc() {
$csrc/out/dbg/chrome --user-data-dir=$src/udd.dbg --enable-logging=stderr \
--log-level=0 "$@"
}
function orc() {
$csrc/out/rel/chrome --user-data-dir=$src/udd.rel --enable-logging=stderr \
--log-level=0 "$@"
}
function or2c() {
$csrc/out/rel2/chrome --user-data-dir=$src/udd.rel2 --enable-logging=stderr \
--log-level=0 "$@"
}
function v() {
if which vim > /dev/null
then
vim -R "$@"
else
view "$@"
fi
}