Add inital files, starting to mig bash scripts

main
rwxrob 2 years ago
parent af91a0c78d
commit 75b9660e00
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77

@ -14,6 +14,10 @@ connection and `z update`.
## Install ## Install
Note: you'll have to remove `go.work` yourself if you want to use this
build yourself (or clone all my structure the same way). I'm saving my
`go.work` in this Go repo only because it is a personal build.
``` ```
go install github.com/rwxrob/z@latest go install github.com/rwxrob/z@latest
``` ```

@ -3,5 +3,9 @@ go 1.19
use ( use (
. .
../bonzai ../bonzai
../fs
../config
../term
../twitch
../yaml2json ../yaml2json
) )

@ -1,8 +1,10 @@
package main package main
import ( import (
"github.com/rwxrob/bonzai" Z "github.com/rwxrob/bonzai"
"github.com/rwxrob/bonzai/inc/help" "github.com/rwxrob/bonzai/inc/help"
"github.com/rwxrob/config"
"github.com/rwxrob/twitch"
"github.com/rwxrob/yaml2json" "github.com/rwxrob/yaml2json"
) )
@ -10,11 +12,13 @@ func main() {
Cmd.Run() Cmd.Run()
} }
var Cmd = &bonzai.Cmd{ var Cmd = &Z.Cmd{
Name: `z`, Name: `z`,
Summary: `rwxrob's bonzai command tree`, Summary: `rwxrob's bonzai command tree`,
Version: `v0.0.1`, Version: `v0.0.1`,
Copyright: `Copyright 2021 Robert S Muhlestein`, Copyright: `Copyright 2021 Robert S Muhlestein`,
License: `Apache-2.0`, License: `Apache-2.0`,
Commands: []*bonzai.Cmd{help.Cmd, yaml2json.Cmd}, Commands: []*Z.Cmd{
help.Cmd, yaml2json.Cmd, twitch.Cmd, config.Cmd, tmux,
},
} }

@ -0,0 +1,25 @@
package main
import (
"strings"
Z "github.com/rwxrob/bonzai"
"github.com/rwxrob/bonzai/inc/help"
)
var tmux = &Z.Cmd{
Name: `tmux`,
Summary: `make tmux updates`,
Commands: []*Z.Cmd{help.Cmd, tmuxUpdate},
}
var tmuxUpdate = &Z.Cmd{
Name: `update`,
Summary: `update the onscreen status`,
Call: func(_ *Z.Cmd, args ...string) error {
msg := strings.Join(args, " ")
return Z.Exec(
"tmux", "-L", "live", "set", "-g", "status-right", msg,
)
},
}
Loading…
Cancel
Save