commit 57dfb50219df0cab39c06e1c47a731e65a41312c Author: shockrahwow Date: Wed May 15 01:51:58 2019 -0700 first collection of useful scripts diff --git a/.usbm.swp b/.usbm.swp new file mode 100644 index 0000000..8aada94 Binary files /dev/null and b/.usbm.swp differ diff --git a/add-projector b/add-projector new file mode 100755 index 0000000..fc4c539 --- /dev/null +++ b/add-projector @@ -0,0 +1,14 @@ +#!/bin/bash +# In case you've ever needed to setup + +output=$(xrandr|grep ' connected'|awk '{print $1}' | \ + dmenu -i -p 'Device to attach') +[ -z "$output" ] && exit 0 + +# Now we pick out where this goes +side=$(printf 'left-of\nright-of\nabove\nbelow' | \ + dmenu -i -p 'Side') +[ -z "$side" ] && exit 0 + +# Just echo for demonstrative purposes +echo "xrandr --output $output --auto --$side eDP-1" diff --git a/bread b/bread new file mode 100755 index 0000000..649a51a --- /dev/null +++ b/bread @@ -0,0 +1,3 @@ +#!/bin/bash +book=$(ls $HOME/Books/ | dmenu -l 15) +zathura "$HOME/Books/$book" diff --git a/bright b/bright new file mode 100755 index 0000000..72ae7a2 --- /dev/null +++ b/bright @@ -0,0 +1,6 @@ +#!/bin/bash +# Script to siimply change the brightness +level=$(echo "$(seq 1 100)" | dmenu -i -p 'Brightnesss from 1-100') +percentage=$(echo "$level/100" | bc -l | head -c 4) +[ -z "$percentage" ] && exit 0 +xrandr --output eDP-1 --brightness $percentage diff --git a/lock/cuddle.jpg b/lock/cuddle.jpg new file mode 100644 index 0000000..43045d1 Binary files /dev/null and b/lock/cuddle.jpg differ diff --git a/lock/lock b/lock/lock new file mode 100755 index 0000000..11d4c06 --- /dev/null +++ b/lock/lock @@ -0,0 +1,4 @@ +#!/bin/bash +mocp -p +sndt +i3lock -e -i ~/Rice/lock/lockscreen.png diff --git a/lock/lockscreen.png b/lock/lockscreen.png new file mode 100644 index 0000000..3a8441c Binary files /dev/null and b/lock/lockscreen.png differ diff --git a/lock/new.png b/lock/new.png new file mode 100644 index 0000000..22fbfaf Binary files /dev/null and b/lock/new.png differ diff --git a/newbg b/newbg new file mode 100755 index 0000000..0cc5ba8 --- /dev/null +++ b/newbg @@ -0,0 +1 @@ +feh --randomize --bg-fill ~/Pictures/Papes/ diff --git a/sndt b/sndt new file mode 100755 index 0000000..73078b4 --- /dev/null +++ b/sndt @@ -0,0 +1,3 @@ +#!/bin/bash +# Shut off all sounds coming from alsa +amixer -q -D pulse sset Master toggle diff --git a/usbm b/usbm new file mode 100755 index 0000000..e271c00 --- /dev/null +++ b/usbm @@ -0,0 +1,8 @@ +#!/bin/bash +# Mounting script for usb drives for use in dmenu +mountable=$(lsblk -lp | grep "part $" | awk '{print $1, $4 }') +[ -z "$mountable" ] && exit 0 +usb=$(echo "$mountable" |\ + dmenu -i -l 5 -p "Which usb drive should we mount?" |\ + awk '{print $1}') +mount $(basename $usb) ~/.mntpts/$(basename $usb) diff --git a/wed b/wed new file mode 100755 index 0000000..a3af57e --- /dev/null +++ b/wed @@ -0,0 +1,4 @@ +#!/bin/bash +choice=$(printf "on\noff" | dmenu -i -p "Wifi $(nmcli r w)") +[ -z "$choice" ] && exit 0 +nmcli r w $choice diff --git a/ytdl b/ytdl new file mode 100755 index 0000000..e5de5da --- /dev/null +++ b/ytdl @@ -0,0 +1,8 @@ +#!/bin/bash +dir=$(find ~/Music/ -maxdepth 1 -type d | dmenu -i -p "Pick a directory") +url="$(echo '' | dmenu -p 'Enter a url')" +[ -z "$url" ] && exit 0 +youtube-dl --extract-audio \ + --audio-format mp3 \ + -o "$dir/%(title)s.%(ext)s" \ + $url