added bin/ scripts, created cdg
This commit is contained in:
1
.bashrc
1
.bashrc
@@ -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
|
||||
|
||||
10
bin/audiochngout
Executable file
10
bin/audiochngout
Executable 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
7
bin/cdg
Executable 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
2
bin/dirsize
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
du -sh $1
|
||||
13
bin/myi3
Executable file
13
bin/myi3
Executable 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
9
bin/playpause
Executable 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
5
bin/resetscreen
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
xrandr --output VGA1 --left-of LVDS1 --auto
|
||||
|
||||
feh --randomize --bg-fill ~/Pictures/Backgrounds/*
|
||||
Reference in New Issue
Block a user