-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.functions
executable file
·84 lines (76 loc) · 1.74 KB
/
.functions
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
function mc(){ mkdir "$@" && cd "$@"; }
function print(){
for var in "$@"
do
if [ -f "$var" ];then
lp "$var"
else
echo "$var is an invalid file. Not Printing."
fi
done
}
function swiper(){
echo `find . -type f -regex '.*.swp$'`
find . -type f -regex '.*.swp$' -delete
echo deleted
}
function vj(){
for var in "$@"
do
if [ -f "$var" ];then
vim "$var"; astyle *.java; javac *.java
else
echo "$var doesn't exist."
fi
done
}
function vc(){
for var in "$@"
do
if [ -f "$var" ];then
vim "$var"; astyle *.c; gcc "$var"
else
echo "$var doesn't exist."
fi
done
}
# alias volume="pactl set-sink-volume @DEFAULT_SINK@"
function volume(){
if [ $# -ne 1 ]
then
echo "Usage : volume <0-15>"
return
fi
if (( $1 <= 0 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 0%
elif (( $1 <= 1 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 10%
elif (( $1 <= 10 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 100%
elif (( $1 <= 11 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 110%
elif (( $1 <= 12 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 120%
elif (( $1 <= 13 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 130%
elif (( $1 <= 14 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 140%
elif (( $1 <= 15 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 150%
elif (( $1 <= 16 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 160%
elif (( $1 <= 17 ))
then
command pactl set-sink-volume @DEFAULT_SINK@ 170%
fi
}