added bin/ scripts, created cdg

This commit is contained in:
2015-05-27 20:24:12 -07:00
parent 50228d94ae
commit 8f6dfcca30
9 changed files with 54 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ alias shell='ps -p $$ -o comm='
alias math='rlwrap MathKernel'
alias style='clang-format-3.5 -style=Google'
alias telnet='rlwrap telnet'
alias cdg='. cdg'
# Enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile

4
bin/afs Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
kinit
aklog
klist

10
bin/audiochngout Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
sinks=($(pacmd list-sinks | grep index | \
awk '{ if ($1 == "*") print "1",$3; else print "0",$2 }'))
inputs=($(pacmd list-sink-inputs | grep index | awk '{print $2}'))
[[ ${sinks[0]} = 0 ]] && swap=${sinks[1]} || swap=${sinks[3]}
pacmd set-default-sink $swap &> /dev/null
for i in ${inputs[*]}; do pacmd move-sink-input $i $swap &> /dev/null; done

7
bin/cdg Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
# cd's to the parent directory until a .git folder is found
while [ ! -d ".git" ] && [ ! "$PWD" == "/" ]
do
cd ..
done

2
bin/dirsize Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
du -sh $1

13
bin/myi3 Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
i3status | while :
do
read line
MPC=`mpc current`
if [[ -z $MPC ]]
then
echo "$line" || exit 1
else
echo "Playing: $MPC | $line" || exit 1
fi
done

9
bin/playpause Executable file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
playing=($(mpc | grep "^\[playing\]"))
if [ ! -z "$playing" ]; then
mpc -q pause;
else
mpc -q play;
fi

5
bin/resetscreen Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
xrandr --output VGA1 --left-of LVDS1 --auto
feh --randomize --bg-fill ~/Pictures/Backgrounds/*

3
bin/wifi Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
nmcli d wifi list
nmcli -a d wifi connect