1
0
src/dotfiles-old/scripts/oneliners.sh
Deven Blake ae3ef5f182 changes
2021-01-19 11:48:13 -05:00

28 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
# a bunch of one-line programs i want in my dmenu (and sometimes elsewhere)
# these have use outside the terminal and thus are generated here
# - because why make fifty files when i can make one file that does that for me?
source ./cdecho.sh
mkdir -p $HOME/bin/oneliners || exit
cde $HOME/bin/oneliners
# deemix
printf "python $HOME/src/deemix-pyweb/deemix-pyweb.py\n" >deemix
# settings for specific monitors
printf "xrandr --output HDMI-1 --auto --mode 720x480 --right-of LVDS-1\n" >1702
printf "xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720
# more monitor settings
printf "xrandr --output HDMI-1 --off\n" >hdmioff
printf "xrandr --output VGA-1 --off\n" >vgaoff
# youtube-dl stuff
printf "youtube-dl -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 10 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive
printf "youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-mpv
ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x *