1 unstable release
new 0.1.0 | May 3, 2025 |
---|
#866 in Filesystem
11KB
220 lines
desktop-link
Create shortcut files simply.
Usage
let link = Link::targeting("/bin/sh")
.set_arguments("-c 'echo Hello World!'")
.set_name("Hello World")
.set_icon(path_to_icon);
// Creates a link in the current user's application menu
link.save_to_menu("helloworld");
// Creates a link in a specific location
link.save(some_path);
Supported platforms
OS | Method | "Menu" saves to |
---|---|---|
Linux | .desktop files |
applications folder in XDG data directory |
Windows | Native APIs to generate .lnk files |
"Programs" known folder |
MacOS | Unsupported* | - |
*: MacOS has its own conventions that make this crate not applicable, there is no expectation of applications registering themselves accessible.
Dependencies
~0.2–29MB
~475K SLoC