From f6a3b6ccb678823f1296b95c38c4fad4c895b0f2 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 12 Feb 2025 03:04:54 +0900 Subject: modified qutebrowser/config.py, modified bin/mounter, modified bin/unmounter --- ar/.local/bin/mounter | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'ar/.local/bin/mounter') diff --git a/ar/.local/bin/mounter b/ar/.local/bin/mounter index 6f294d2..026f9b3 100755 --- a/ar/.local/bin/mounter +++ b/ar/.local/bin/mounter @@ -49,6 +49,16 @@ mountedphones="$(grep "simple-mtpfs" /etc/mtab)" echo "$phone" done)" +iphones="$(ideviceinfo | grep -E "^DeviceName" | sed "s/DeviceName: //;s/^/🍎/")" +mountediphones="$(grep "ifuse" /etc/mtab)" +[ -n "$mountediphones" ] && iphones="$(for iphone in $iphones; do + for mounted in $mountediphones; do + esciphone="$(escape "$iphone")" + [[ "$mounted" =~ $esciphone ]] && break 1 + done && continue 1 + echo "$iphone" +done)" + # Check for drives. lsblkoutput="$(sudo lsblk -rpo "uuid,name,type,size,label,mountpoint,fstype")" # Get all LUKS drives @@ -114,6 +124,7 @@ done)" # Add all to one variable. If no mountable drives found, exit. alldrives="$(echo "$phones +$iphones $unopenedluks $normalparts $smbs" | sed "/^$/d;s/ *$//")" @@ -161,9 +172,16 @@ case "$chosen" in getmount number="${chosen%%:*}" number="${chosen:1}" # This is a bashism. - sudo -A simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" + sudo -A simple-mtpfs -o allow_other -o fsname="simple-mtpfs-$(escape "$chosen")" --device "$number" "$mp" 2>dev/null notify-send "🤖 Android Mounted." "Android device mounted to $mp." ;; +🍎*) + getmount + number="${chosen%%:*}" + number="${chosen:1}" # This is a bashism. + sudo -A ifuse "$mp" 2>dev/null + notify-send "🍎 iPhone Mounted." "$chosen mounted to $mp." + ;; 📡*) chosen="${chosen##* }" path="${chosen##*/}" -- cgit v1.2.3