1
0

more oneliners and stuff

This commit is contained in:
Deven Blake 2021-02-10 22:33:44 -05:00
parent 67b39ed46d
commit 98dee73710

View File

@ -9,11 +9,15 @@ source ./cdecho.sh
mkdir -p $HOME/bin/oneliners || exit mkdir -p $HOME/bin/oneliners || exit
cde $HOME/bin/oneliners cde $HOME/bin/oneliners
DMENU_LINES="40"
SHABANG="#!/bin/sh\n" SHABANG="#!/bin/sh\n"
# music stuff # music stuff
printf "selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album printf $SHABANG"selection=\"\$(find /mnt/audio -type d -mindepth 2 2>/dev/null | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_album
printf "selection=\"\$(find /mnt/audio -type f | sort | dmenu -l 50)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song printf $SHABANG"selection=\"\$(find /mnt/audio -type f | sort | dmenu -l $DMENU_LINES)\"\n[ \$selection = \$(printf \"\\n\") ] 2>/dev/null || audacious \"\$selection\"\n" >play_song
# reading
printf $SHABANG"SELECTION=\"\$(find /mnt/partone/texts/ -type f | sort | dmenu -l $DMENU_LINES)\"\nEXTENSION=\"\$(echo \$SELECTION | asplit - . 1)\"\n[ \"\$EXTENSION\" = \"pdf\" ] && xpdf \"\$SELECTION\"\n" >read_book
# private bookmarks # private bookmarks
printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks printf $SHABANG"firefox file://"$HOME"/bookmarks.html\n" >bmarks
@ -32,10 +36,13 @@ printf $SHABANG"xrandr --output VGA-1 --auto --right-of LVDS-1\n" >mv720
printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff printf $SHABANG"xrandr --output HDMI-1 --off\n" >hdmioff
printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff printf $SHABANG"xrandr --output VGA-1 --off\n" >vgaoff
# project i'm working on
printf $SHABANG"xterm -e \"source $HOME/src/ytfeed.py/bin/activate && python $HOME/src/ytfeed.py/cli.py\"\n" >ytfeed
# youtube-dl stuff # youtube-dl stuff
printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo printf $SHABANG"youtube-dl --add-metadata -i -o \"$HOME/%%(upload_date)s %%(title)s.%%(ext)s\" \"\$@\"\n" >youtube-dlo
printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp printf $SHABANG"youtube-dlo -f \"bestvideo[vcodec=vp9]+bestaudio[acodec=opus]\" \"\$@\"\n" >youtube-dlp
printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l 20 | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive printf $SHABANG"youtube-dlp -f \$(youtube-dl -F \$1 | 9 tail +4 | dmenu -p \"Choose a format.\" -l $DMENU_LINES | asplit - SP 0) \"\$@\"\n" >youtube-dl-interactive
printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv printf $SHABANG"youtube-dl-interactive \"\$@\" -o - | mpv -\n" >youtube-dl-mpv
ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x * ls && [ $(printf "Yes.\nNo." | dmenu -p "Any risky files?") = "No." ] && printf "Making executable.\n" && chmod +x *