https://github.com/rocket049/appimagelauncher
Help appimage program to create .desktop launcher into ~/.local/share/applications for it's self.
https://github.com/rocket049/appimagelauncher
Last synced: 6 months ago
JSON representation
Help appimage program to create .desktop launcher into ~/.local/share/applications for it's self.
- Host: GitHub
- URL: https://github.com/rocket049/appimagelauncher
- Owner: rocket049
- License: apache-2.0
- Created: 2019-07-15T06:44:37.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-20T02:16:36.000Z (almost 7 years ago)
- Last Synced: 2024-06-20T12:41:41.251Z (about 2 years ago)
- Language: Go
- Homepage: https://gitee.com/rocket049/appimagelauncher
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# appimagelauncher 帮助 appimage 程序把自己加入启动菜单
安装:`go get -v gitee.com/rocket049/appimagelauncher`
只需在`appimage`程序中调用`Create`函数,就可以在`~/.local/share/applications`中为当前的 `appimage` 程序创建`.desktop`启动器,把自己加入启动菜单。如果程序不是以`APPIMAGE`格式打包的,本程序会返回一个`error`。
函数 `func Create(desktopFile, iconFile string, force bool) error`的参数:
- `desktopFile`:`appimage` 的根目录中的 `.desktop` 文件。
- `iconFile`:`appimage` 的根目录中的图标文件。
- `force`:强制更新,如果 `force` 的值为 `false`,当启动器已经存在,并且比 `APPIMAGE` 更新时,不会重复创建起动器。
### 示例代码
```
import "gitee.com/rocket049/appimagelauncher"
appimagelauncher.Create("appimage-name.desktop", "icon-name.png", false)
```