mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 06:32:03 +00:00
Update 2025-08-11
This commit is contained in:
@@ -30,32 +30,32 @@ hash = "62251f94eb67648d42cdfcfb8be0fad2"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:git"
|
||||
rev = "de53d90"
|
||||
rev = "e95c7b3"
|
||||
hash = "63b6c222bf2103b3023389dde5e2ecfe"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:chmod"
|
||||
rev = "de53d90"
|
||||
rev = "e95c7b3"
|
||||
hash = "1adc12c2b2b025411ab61eb8f0879574"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:full-border"
|
||||
rev = "de53d90"
|
||||
rev = "e95c7b3"
|
||||
hash = "3996fc74044bc44144b323686f887e1"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:mount"
|
||||
rev = "de53d90"
|
||||
hash = "f10a14e823382d90fab5b3ee54cb38fe"
|
||||
rev = "e95c7b3"
|
||||
hash = "e1de3054c0d1a2d8dc6f007eadc0fa31"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:smart-filter"
|
||||
rev = "de53d90"
|
||||
rev = "e95c7b3"
|
||||
hash = "e56b7abf3c06e8ce496eadcca168c093"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:diff"
|
||||
rev = "de53d90"
|
||||
rev = "e95c7b3"
|
||||
hash = "47865a70cade14a0b9b6bc6a54f16bdb"
|
||||
|
||||
[[plugin.deps]]
|
||||
|
||||
@@ -4,8 +4,8 @@ A mount manager for Yazi, providing disk mount, unmount, and eject functionality
|
||||
|
||||
Supported platforms:
|
||||
|
||||
- Linux with [`udisksctl`](https://github.com/storaged-project/udisks) and [`lsblk`](https://github.com/util-linux/util-linux)
|
||||
- macOS with `diskutil`
|
||||
- Linux with [`udisksctl`](https://github.com/storaged-project/udisks), `lsblk` and `eject` both provided by [`util-linux`](https://github.com/util-linux/util-linux)
|
||||
- macOS with `diskutil`, which is pre-installed
|
||||
|
||||
https://github.com/user-attachments/assets/c6f780ab-458b-420f-85cf-2fc45fcfe3a2
|
||||
|
||||
@@ -40,7 +40,7 @@ Available keybindings:
|
||||
## TODO
|
||||
|
||||
- Custom keybindings
|
||||
- Windows support (I don't have an Windows machine for testing, PRs welcome!)
|
||||
- Windows support (I don't use Windows myself, PRs welcome!)
|
||||
- Support mount, unmount, and eject the entire disk
|
||||
|
||||
## License
|
||||
|
||||
@@ -224,6 +224,7 @@ function M.split(src)
|
||||
{ "^/dev/nvme%d+n%d+", "p%d+$" }, -- /dev/nvme0n1p1
|
||||
{ "^/dev/mmcblk%d+", "p%d+$" }, -- /dev/mmcblk0p1
|
||||
{ "^/dev/disk%d+", ".+$" }, -- /dev/disk1s1
|
||||
{ "^/dev/sr%d+", ".+$" }, -- /dev/sr0
|
||||
}
|
||||
for _, p in ipairs(pats) do
|
||||
local main = src:match(p[1])
|
||||
@@ -274,7 +275,10 @@ function M.operate(type)
|
||||
output, err = Command("diskutil"):arg({ type, active.src }):output()
|
||||
end
|
||||
if ya.target_os() == "linux" then
|
||||
if type == "eject" then
|
||||
if type == "eject" and active.src:match("^/dev/sr%d+") then
|
||||
Command("udisksctl"):arg({ "unmount", "-b", active.src }):status()
|
||||
output, err = Command("eject"):arg({ "--traytoggle", active.src }):output()
|
||||
elseif type == "eject" then
|
||||
Command("udisksctl"):arg({ "unmount", "-b", active.src }):status()
|
||||
output, err = Command("udisksctl"):arg({ "power-off", "-b", active.src }):output()
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user