Commits

Jason Ryan committed 345ac55

Udiskie changes and streaming script

Comments (0)

Files changed (3)

 $HOME/Scripts/proc-check &
 
 # automounting
-udiskie -s &
+/usr/bin/udiskie -s &
 
 # ---- window manager ----
 # launch dwm
 exec $HOME/Scripts/dwm-start
-
-# openbox
-#exec openbox-session
 target=$(awk '/media\/[\^A-Z]/ {print $3}' <(mount))
 
 if [[ -n "$target" ]]; then
-    udiskie-umount "$target" &&
-    printf "%s\n" "${target##*/} unmounted…"
+    udiskie-umount -s "$target" &>/dev/null
+    if [[ $? = 0 ]]; then
+        printf "%s\n" "${target##*/} unmounted…"
+    else
+        printf "%s\n" "Unmounting failed."
+    fi
 else
     printf "%s\n" "No drive mounted…"
 fi
+#!/bin/bash
+# screensaving when streaming video
+
+case "$1" in
+    on) xautolock -disable &&
+        xset s off; xset s noblank; xset -dpms
+        ;;
+    off) xautolock -enable &&
+        xset s on; xset s blank; xset +dpms
+        ;;
+esac
+