83 lines
1.8 KiB
Plaintext
Executable File
83 lines
1.8 KiB
Plaintext
Executable File
# convenient music play
|
|
# tons of repeated code, should be fixed
|
|
album() {
|
|
selection="$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)"
|
|
[ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection"
|
|
}
|
|
song() {
|
|
selection="$(find /mnt/audio -type f | sort | dmenu -l 50)"
|
|
[ $selection = $(echo -e "\n") ] 2>/dev/null || i3-swallow audacious "$selection"
|
|
}
|
|
|
|
# audio drive
|
|
alias audio="sudo mount -L 'AUDIO' /mnt/audio"
|
|
|
|
# private bookmarks
|
|
alias bmarks="firefox file://"$HOME"/bookmarks.html"
|
|
|
|
alias cat="9 cat"
|
|
|
|
alias cls="clear"
|
|
|
|
alias firefox="firefox-developer-edition"
|
|
|
|
# useful aliases
|
|
alias iftoggle="sudo ip link set"
|
|
alias ifswitch="iftoggle $1 down && iftoggle $1 up"
|
|
|
|
alias imount="idevicepair pair && sudo ifuse -o allow_other /mnt/iphone/"
|
|
|
|
alias ipconfig="ifconfig"
|
|
|
|
# other volumes
|
|
mnt() {
|
|
test -d /mnt/$1 || sudo mkdir /mnt/$1
|
|
sudo mount /dev/$1 /mnt/$1 && cd /mnt/$1
|
|
}
|
|
|
|
# music player
|
|
alias mu="audacious"
|
|
|
|
# i always forget this one but it's useful
|
|
alias p="ping 1.1.1.1"
|
|
|
|
# my media hard drive
|
|
alias partone="sudo mount -L 'PARTONE' /mnt/partone"
|
|
|
|
# copy web-browser path to file to clipboard
|
|
path() {
|
|
printf "file://%s" $(realpath $1) | xclip
|
|
}
|
|
|
|
pyenv() {
|
|
if [ $# -eq 0 ]; then
|
|
source ./bin/activate
|
|
else
|
|
source $1/bin/activate
|
|
fi
|
|
}
|
|
|
|
alias sudo="doas"
|
|
|
|
# Wacom Intuos 2
|
|
alias taboff="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput LVDS-1"
|
|
alias tabon="xsetwacom set 'Wacom Intuos2 6x8 Pen stylus' MapToOutput VGA-1"
|
|
|
|
alias tracert="tracepath"
|
|
|
|
webm() {
|
|
ffmpeg -i $1 -c:v libvpx -b:v 1M -c:a libvorbis $(printf "$1" | asplit - . 0).webm
|
|
}
|
|
|
|
alias yta="youtube-dl -f bestaudio"
|
|
|
|
# project i'm working on
|
|
ytfeed() {
|
|
pyenv $HOME/src/ytfeed.py/
|
|
python $HOME/src/ytfeed.py/cli.py
|
|
}
|
|
ytfeedsh() {
|
|
pyenv $HOME/src/ytfeed.py/
|
|
python $HOME/src/ytfeed.py/shell.py
|
|
}
|