Added G2-status.conf, create-repo function

This commit is contained in:
Austen Adler 2016-03-19 23:03:41 -04:00
parent 1ac01513b2
commit f92cd9dda9
2 changed files with 76 additions and 0 deletions

51
i3/G2-status.conf Normal file
View File

@ -0,0 +1,51 @@
#i3status config
general {
output_format= "i3bar"
colors = true
#color_good = '#ffffff'
#color_degraded = '#ffffff'
#color_bad = '#ffffff'
color_good = '#00ff00'
color_degraded = '#ff0000'
color_bad = '#ff0000'
interval = 1
}
order += "disk /"
order += "wireless wlp2s0"
order += "ethernet enp1s0"
order += "volume master"
order += "battery 1"
order += "tztime local"
wireless wlp2s0 {
format_up = "%essid : %ip @ %quality"
format_down = "!W"
}
ethernet enp1s0 {
# if you use %speed, i3status requires root privileges
format_up = "%ip (%speed)"
format_down = "!E"
}
tztime local {
format = "%a %b%e %r"
#:%M:%S
}
load {
format = "%5min"
}
volume master {
format = "V:%volume"
format_muted = "V: 0%"
device = "default"
mixer = "Master"
mixer_idx = 0
}
battery 1 {
#format = "%status %remaining %emptytime"
format = "%status %percentage"
path = "/sys/class/power_supply/BAT1/uevent"
low_threshold = 20
}
disk "/" {
format = "%free"
}
# vim: ts=4:sw=4:et

View File

@ -281,6 +281,31 @@ mcl(){
mkdir -p $1
cd $1
}
create-repo(){
PRIVATE="true"
while getopts ":p" opt; do
case $opt in
p)
echo "-p was used, making public"
PRIVATE="false"
shift
;;
\?)
echo "Usage: create-repo [-p] name" >&2
return 1
;;
esac
done
if [ -z "$1" ]; then
echo "No repo name" >&2
return 2
fi
echo -n "Username: "
read username
echo -n "Password: "
read -s password
curl --user "$username:$password" -d name="$1" -d private="$PRIVATE" https://austenwares.com/gogs/api/v1/user/repos
}
rc(){
case $1 in
z) vim ~/.zshrc;;