appimagelauncher

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

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的参数:

  • desktopFileappimage 的根目录中的 .desktop 文件。
  • iconFileappimage 的根目录中的图标文件。
  • force:强制更新,如果 force 的值为 false,当启动器已经存在,并且比 APPIMAGE 更新时,不会重复创建起动器。
示例代码
import "gitee.com/rocket049/appimagelauncher"

appimagelauncher.Create("appimage-name.desktop", "icon-name.png", false)

Documentation

Overview

Help appimage program to create .desktop file into ~/.local/share/applications

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(desktopFile, iconFile string, force bool) error

Create Copy .desktop file from APPDIR to ~/.local/share/applications. Copy icon file from APPDIR to ~/.local/share/icons Replace Exec value with APPIMAGE while copying. Skip if the launcher is newer than APPIMAGE file when 'force' is false.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL