summaryrefslogtreecommitdiff
path: root/ar/.local/bin/statusbar/sb-ecrypt
blob: 199c93c5cecb4f97b042c95862d1f852217b7f17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

case $BLOCK_BUTTON in
1) "${XDG_SCRIPTS_HOME:-${HOME}/.local/bin}/ecrypt" >/dev/null ;;
3) notify-send "🔒 Encrypted Media Folder " "\- Shows mount status of Media
- Left click to toggle mount" ;;
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