Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An optional, high-performance CLI for the Ignis widget framework

License

ignis-sh/goignis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goignis

goignis is an optional CLI for the ignis widget framework.

Installation

Prerequisites

Install the latest go tool chain.

Or install with a package manager:

pacman -S go

Quick start

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

Shell completions

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

Install from AUR

paru -S goignis

Build manually

Clone and build:

git clone https://github.com/ignis-sh/goignis.git
cd goignis
go build

Usage

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...]

Development

Install gopls, the Go language server:

pacman -S gopls

Contribution

  • Use gopls or gofumpt formatters.
  • Write docs and add examples or unit tests if new features are introduced.
  • Keep package pkg and cmd their own roles:
    • Package pkg provides exported APIs for third-party derivations.
    • Package cmd provides APIs for customizing subcommands.
# clone and install dependencies
git clone https://github.com/ignis-sh/goignis.git
cd goignis
go mod tidy
# start coding here
nvim

Derivation

  • 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

About

An optional, high-performance CLI for the Ignis widget framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages