- This topic has 7 replies, 4 voices, and was last updated Dec 17-5:30 pm by PPC.
-
AuthorPosts
-
December 16, 2020 at 5:22 pm #47542Member
PPC
Hi, everyone, I’m still away from scripting, but I had this “mutated” unplugdrive laying around in my hard drive, so, here it is:
https://pastebin.com/raw/bCY1YUvU
Changes:
– it now uses no window decorations and places the yad windows near the mouse pointer – I did this because I think most people just click that script’s toolbar icon, and it’s expected that the “unplug drive” window appears next to it.
– I also made the warning windows disappear after a few seconds, so there’s on less button for the users to click
– The main window is a bit more stylized, and now easier to understand in almost any language, also easier to localizeTodo: I wish that, when I adapted the script I also included a way to only display the name of the mounted USB device’s partition, not the (useless) full path…
P.
- This topic was modified 2 years, 4 months ago by PPC.
December 16, 2020 at 5:53 pm #47544ModeratorBobC
::I also modified the original version from the repos. My mod was to reduce the number of screen popups when there was no problem. I’ll give your new one a try, and see if its working better than before.
December 16, 2020 at 8:12 pm #47547Anonymous
December 16, 2020 at 8:31 pm #47548Moderator
Brian Masinick
December 16, 2020 at 8:43 pm #47549Anonymous
December 16, 2020 at 10:41 pm #47551ModeratorBobC
December 17, 2020 at 12:38 pm #47592MemberPPC
::Just because seeing the mount point path of the USB device’s mounted partition always bugged me, and it was just a matter of adding a single line with the right sed command, here’s the latest code, much more newbie friendly and plain simply easier to read for hardcore users:
https://pastebin.com/raw/HqtK3f14
P.
December 17, 2020 at 5:30 pm #47601MemberPPC
::This is part of the reason why I have to stay away from scripting… It keeps nagging at me until I get the script to to what I want…
New extremely different version of the unplugdrive script, that lists only drive’s name and mount point for the first partition of that drive:
https://pastebin.com/raw/qr8jd6de
(you can edit the main YAD window to show all partition names- I just commented the original main yad window, on line 79- thats only handy for cases like antiX live usb drives, that have more than one partition… Generally speaking, users tend to have one partition per usb drive, and most people don’t have more than 1 or 2 usb drives plugged it, so this setup seems more logical and intuitive to me)
P.
It looks like this: easy to read, understandable for newbies and advanced users alike…
- This reply was modified 2 years, 4 months ago by PPC.
Attachments:
-
AuthorPosts
- You must be logged in to reply to this topic.

