Compare commits
7 Commits
48ef0718cc
...
b1a3e5d72e
Author | SHA1 | Date | |
---|---|---|---|
b1a3e5d72e | |||
1a618bb0c1 | |||
45375ccf9a | |||
81af13a1ae | |||
46376f9242 | |||
58fdbe307f | |||
094430c1f7 |
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
if [ "$#" -eq 0 ]
|
if [ "$#" -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Requires a command. Run with 'help' for a list of commands."
|
echo "Requires a command. Run with 'help' for a list of commands."
|
||||||
@ -14,19 +16,15 @@ fi
|
|||||||
case $1 in
|
case $1 in
|
||||||
"mute")
|
"mute")
|
||||||
pactl set-sink-mute 0 toggle
|
pactl set-sink-mute 0 toggle
|
||||||
pactl list sinks | awk '/Mute/ { if ($2 == "no") print "VOL"; else print "MUT"; }'
|
|
||||||
;;
|
;;
|
||||||
"vol-up")
|
"vol-up")
|
||||||
pactl set-sink-volume 0 +5%
|
pactl set-sink-volume 0 +5%
|
||||||
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
|
|
||||||
;;
|
;;
|
||||||
"vol-down")
|
"vol-down")
|
||||||
pactl set-sink-volume 0 -5%
|
pactl set-sink-volume 0 -5%
|
||||||
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
|
|
||||||
;;
|
;;
|
||||||
"reset")
|
"reset")
|
||||||
pactl set-sink-volume 0 50%
|
pactl set-sink-volume 0 50%
|
||||||
pactl list sinks | grep '^[[:space:]]Volume:' | head -n $(( SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'
|
|
||||||
;;
|
;;
|
||||||
"help")
|
"help")
|
||||||
echo "USAGE: audio-control <command>
|
echo "USAGE: audio-control <command>
|
||||||
@ -37,7 +35,8 @@ Commands:
|
|||||||
vol-down lower the volume
|
vol-down lower the volume
|
||||||
reset reset volume (to round number)
|
reset reset volume (to round number)
|
||||||
toggle-port toggle the output port
|
toggle-port toggle the output port
|
||||||
help show this help information";;
|
help show this help information"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid command. Run with 'help' for a list of commands."
|
echo "Invalid command. Run with 'help' for a list of commands."
|
||||||
exit 1;;
|
exit 1;;
|
||||||
|
3
backup
3
backup
@ -1,2 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
rsync -aAXv --delete "$1" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/media/music/*"} "$2"
|
rsync -aAXv --delete "$1" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/media/music/*"} "$2"
|
||||||
|
3
clearmem
3
clearmem
@ -1,2 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
sync && echo 1 > /proc/sys/vm/drop_caches
|
sync && echo 1 > /proc/sys/vm/drop_caches
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
install -m 755 $1 $HOME/.local/bin
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
install -m 755 "$1" "$HOME/.local/bin"
|
||||||
|
5
iplocate
5
iplocate
@ -1,2 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
curl ipinfo.io/$1
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
curl "ipinfo.io/$1"
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
[ "$#" -eq 0 ] &&
|
[ "$#" -eq 0 ] &&
|
||||||
echo "Requires a command. Run with 'help' for a list of commands." &&
|
echo "Requires a command. Run with 'help' for a list of commands." &&
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"wallet")
|
"wallet")
|
||||||
monero-wallet-cli --daemon-address node.monero.net:13666;;
|
monero-wallet-cli --daemon-address node.monero.net:13666
|
||||||
|
;;
|
||||||
"address")
|
"address")
|
||||||
echo "42espNaUqPdJK4vTir4NDfH4gT6brFR4F5KPRADrg5t98LkzHnQfFnUDZZEetp3Zw5K8V4v364tN3TMxfg4eXEN9RpnrNBG";;
|
echo "42espNaUqPdJK4vTir4NDfH4gT6brFR4F5KPRADrg5t98LkzHnQfFnUDZZEetp3Zw5K8V4v364tN3TMxfg4eXEN9RpnrNBG"
|
||||||
"mine")
|
;;
|
||||||
xmr-stak-cpu $XDG_CONFIG_HOME/xmr-stak/cpu-config.txt;;
|
|
||||||
"help")
|
"help")
|
||||||
echo "USAGE: monero-client [command]
|
echo "USAGE: monero-client [command]
|
||||||
Commands:
|
Commands:
|
||||||
address print out the monero public address
|
address print out the monero public address
|
||||||
mine start the miner
|
mine start the miner
|
||||||
wallet open the monero wallet
|
wallet open the monero wallet
|
||||||
help show this help information";;
|
help show this help information"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid command '$1'. Please run with the 'help' option.";;
|
echo "Invalid command '$1'. Please run with the 'help' option."
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
12
setbg
12
setbg
@ -1,12 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
if [ $# -gt 1 ]
|
if [ $# -gt 1 ]
|
||||||
then
|
then
|
||||||
echo "Too many arguments"
|
echo "Too many arguments"
|
||||||
exit 1
|
exit 1
|
||||||
|
elif [ $# -eq 1 ]
|
||||||
|
then
|
||||||
|
cp "$1" "$HOME/.local/share/wallpaper.jpg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ $# -eq 1 ] &&
|
xwallpaper --zoom "$HOME/.local/share/wallpaper.jpg"
|
||||||
cp $1 $HOME/.local/share/wallpaper.jpg
|
|
||||||
|
|
||||||
xwallpaper --zoom $HOME/.local/share/wallpaper.jpg
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - Add options for port
|
# - Add options for port
|
||||||
@ -6,4 +8,4 @@
|
|||||||
|
|
||||||
PORT=12800
|
PORT=12800
|
||||||
|
|
||||||
ssh -N -D $PORT nortega@themusicinnoise.net
|
ssh -N -D "$PORT" nortega@themusicinnoise.net
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -euo pipefail
|
||||||
|
|
||||||
CAMERA_DEVICE=""
|
CAMERA_DEVICE=""
|
||||||
MOUNT_DIR="/tmp/camera-mount"
|
MOUNT_DIR="/tmp/camera-mount"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user