goignis is an optional CLI for the ignis widget framework.
Install the latest go tool chain.
Or install with a package manager:
pacman -S goInstall with Go tool chain:
# install into $GOPATH/bin, usually ~/go/bin
go install github.com/ignis-sh/goignis@latestOptionally, manage packages with gup:
# install gup
go install github.com/nao1215/gup@latest
# manage packages
gup list
gup check
gup updateBash:
# prerequisite: install bash-completion
pacman -S bash-completion
# current shell session only
source <(goignis completion bash)
# install permanently
mkdir -p ~/.local/share/bash-completion/completions/
goignis completion bash >~/.local/share/bash-completion/completions/goignis.bashFish:
# current shell session only
goignis completion fish | source
# install permanently
mkdir -p ~/.config/fish/completions/
goignis completion fish >~/.config/fish/completions/goignis.fishparu -S goignisClone and build:
git clone https://github.com/ignis-sh/goignis.git
cd goignis
go buildAn optional CLI for ignis
Usage:
goignis [command]
Available Commands:
close-window Close a window
completion Generate the autocompletion script for the specified shell
help Help about any command
init Initialize Ignis
inspector Open GTK Inspector
list-commands List names of all commands
list-windows List names of all windows
open-window Open a window
quit Quit Ignis
reload Reload Ignis
run-command Run a custom command
systeminfo Print system information
toggle-window Toggle a window
Flags:
-h, --help help for goignis
-j, --json Print results in json
Use "goignis [command] --help" for more information about a command.Read the manual:
goignis help
goignis help init
goignis list-windows -hInitialize an ignis instance:
goignis init -dList all ignis windows:
goignis list-windows -j | jqList and run ignis custom commands:
goignis list-commands
goignis run-command command-name [args...]Install gopls, the Go language server:
pacman -S gopls- Use gopls or gofumpt formatters.
- Write docs and add examples or unit tests if new features are introduced.
- Keep package
pkgandcmdtheir own roles:- Package
pkgprovides exported APIs for third-party derivations. - Package
cmdprovides APIs for customizing subcommands.
- Package
# clone and install dependencies
git clone https://github.com/ignis-sh/goignis.git
cd goignis
go mod tidy
# start coding here
nvim- Import
github.com/ignis-sh/goignis/pkgif you're willing to make use of those APIs. - Import
github.com/ignis-sh/goignis/cmdif you want to add custom subcommands. - If your features can benefit other users, please consider contributing here :).
# create a new project and add goignis as a dependency
mkdir myowncli && cd myowncli
go mod init github.com/username/myowncli
go get github.com/ignis-sh/goignis
# then you can write your features with APIs from goignis
nvim main.go