first collection of useful scripts

This commit is contained in:
shockrahwow 2019-05-15 01:51:58 -07:00
commit 57dfb50219
13 changed files with 51 additions and 0 deletions

BIN
.usbm.swp Normal file

Binary file not shown.

14
add-projector Executable file
View File

@ -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"

3
bread Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
book=$(ls $HOME/Books/ | dmenu -l 15)
zathura "$HOME/Books/$book"

6
bright Executable file
View File

@ -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

BIN
lock/cuddle.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

4
lock/lock Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
mocp -p
sndt
i3lock -e -i ~/Rice/lock/lockscreen.png

BIN
lock/lockscreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 KiB

BIN
lock/new.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

1
newbg Executable file
View File

@ -0,0 +1 @@
feh --randomize --bg-fill ~/Pictures/Papes/

3
sndt Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
# Shut off all sounds coming from alsa
amixer -q -D pulse sset Master toggle

8
usbm Executable file
View File

@ -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)

4
wed Executable file
View File

@ -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

8
ytdl Executable file
View File

@ -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