diff --git a/bread b/bread index 649a51a..0434987 100755 --- a/bread +++ b/bread @@ -1,3 +1,9 @@ #!/bin/bash -book=$(ls $HOME/Books/ | dmenu -l 15) -zathura "$HOME/Books/$book" +book=$(ls $HOME/Books/ | dmenu -i -l 15) +if [ -z "$book" ] +then + exit 0 +else + zathura "$HOME/Books/$book" +fi +#zathura "$HOME/Books/$book" diff --git a/proj b/proj new file mode 100755 index 0000000..11c7188 --- /dev/null +++ b/proj @@ -0,0 +1,26 @@ +#!/bin/sh + +# Add or remove projectors +c=`printf 'Add\nRemove' | dmenu -i -p 'Add/Remove screens'` + +if [ "$c" = "Add" ] +then + # Grab the display device + out=`xrandr | grep ' connected' | awk '{print $1}' | \ + dmenu -i -p 'Device to attach'` + if [ -z "$out" ]; then exit 0; fi + + # what side should it go on + side=`printf 'left-of\nright-of\nabove\nbelow' | \ + dmenu -i -p 'Pick side'` + if [ -z "$side" ]; then exit 0; fi + + echo 'xrandr --output $out --auto $side eDP-1' +else + # + out=`xrandr | grep ' connected' | awk '{print $1}' | \ + dmenu -i -p 'Device to dettach'` + if [ -z "$out" ]; then exit 0; fi + exit 0 +fi + diff --git a/usbm b/usbm index e271c00..d2a40f0 100755 --- a/usbm +++ b/usbm @@ -5,4 +5,5 @@ mountable=$(lsblk -lp | grep "part $" | awk '{print $1, $4 }') usb=$(echo "$mountable" |\ dmenu -i -l 5 -p "Which usb drive should we mount?" |\ awk '{print $1}') +mkdir -p ~/.mntpts mount $(basename $usb) ~/.mntpts/$(basename $usb) diff --git a/usm b/usm new file mode 100644 index 0000000..4101253 --- /dev/null +++ b/usm @@ -0,0 +1,10 @@ +#!/bin/sh +# pick out the drive but not sda because thats the main drive +choice=`lsblk -lp | \ + grep 'disk $' | awk '{print $1, $4}' | grep -v 'sda' | \ + dmenu -i -p 'Drive to mount'` +dev=`echo $choice | awk '{print $1}'` +if [ -z "$dev" ];then exit 0;fi +# Finally we can mount the thing +mkdir -p "/mnt/`basename $dev`" +mount "$dev" "$name" diff --git a/yes b/yes new file mode 100644 index 0000000..2d57af2 --- /dev/null +++ b/yes @@ -0,0 +1,2 @@ +#!/bin/sh +ls $HOME/Books/ | dmenu -l 15 | zathura