aboutsummaryrefslogtreecommitdiff
path: root/dmenu-unmount
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdmenu-unmount18
1 files changed, 16 insertions, 2 deletions
diff --git a/dmenu-unmount b/dmenu-unmount
index 2c59ec4..57f0c41 100755
--- a/dmenu-unmount
+++ b/dmenu-unmount
@@ -1,10 +1,24 @@
1#!/bin/sh 1#!/bin/sh
2 2
3# Prompts selection for mounted devices and unmounts the selected one 3# Prompts selection for mounted devices and unmounts the selected one
4# Usage: dmenu-unmount [-m menu] [-w writer]
5# Example: dmenu-unmount -m slmenu -w echo
4# Requires: udevil, dmenu (or similar), notify-send or similar (optional) 6# Requires: udevil, dmenu (or similar), notify-send or similar (optional)
5 7
6menu=${MENU:-dmenu} 8menu=dmenu
7writeout=herbe # Change this to whatever you want, e.g. echo or notify-send 9writeout=herbe
10
11while getopts "m:w:" opt; do
12 case "$opt" in
13 m)
14 menu="$OPTARG"
15 ;;
16 w)
17 writeout="$OPTARG"
18 ;;
19 esac
20done
21shift `expr $OPTIND - 1`
8 22
9listdev=$(grep "media" /proc/mounts | sed 's/\/media.*\///g' | \ 23listdev=$(grep "media" /proc/mounts | sed 's/\/media.*\///g' | \
10 awk '{print $1" ("$2")"}') 24 awk '{print $1" ("$2")"}')

Generated with cgit - Back to sebastiano.tronto.net