blob: d0fa8bb557998b01ca9557a535fd4f2e092b9cd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/sh
case $BLOCK_BUTTON in
1) "${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/ecrypt" secret >/dev/null ;;
2) if mount | grep -q "/mnt/"; then
"${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/unmounter"
else
"${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/mounter"
fi ;;
3) notify-send "🔒 Encrypted Media Folder " "\- Shows mount status of Media
- Left click to toggle ~/Secret
- Middle click to toggle /mnt/" ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
secret_mounted=0
mnt_mounted=0
mount | grep -q "$HOME/Secret" && secret_mounted=1
mount | grep -q "/mnt/" && mnt_mounted=1
if [ $secret_mounted -eq 1 ] && [ $mnt_mounted -eq 1 ]; then
echo "🔑"
elif [ $secret_mounted -eq 1 ]; then
echo "🔏"
elif [ $mnt_mounted -eq 1 ]; then
echo "🔐"
else
echo "🔒"
fi
|