goignis
is an optional CLI for the ignis widget framework.
Install the latest go tool chain.
Or install with a package manager:
pacman -S go
Install with Go tool chain:
# install into $GOPATH/bin, usually ~/go/bin
go install github.com/ignis-sh/goignis@latest
Optionally, manage packages with gup:
# install gup
go install github.com/nao1215/gup@latest
# manage packages
gup list
gup check
gup update
Bash:
# 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.bash
Fish:
# current shell session only
goignis completion fish | source
# install permanently
mkdir -p ~/.config/fish/completions/
goignis completion fish >~/.config/fish/completions/goignis.fish
paru -S goignis
Clone and build:
git clone https://github.com/ignis-sh/goignis.git
cd goignis
go build
An 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 -h
Initialize an ignis instance:
goignis init -d
List all ignis windows:
goignis list-windows -j | jq
List 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
pkg
andcmd
their own roles:- Package
pkg
provides exported APIs for third-party derivations. - Package
cmd
provides 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/pkg
if you're willing to make use of those APIs. - Import
github.com/ignis-sh/goignis/cmd
if 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