diff --git a/.gitignore b/.gitignore index 4b3a757..5052bd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -why \ No newline at end of file +why +why.app + +.DS_Store diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d798906 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +why: + go build . + +why.app: why + go tool appify -author "David Ashby" -id "in.yetaga.why" -name "why" ./why diff --git a/go.mod b/go.mod index 6e1a3f9..73db8fb 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.24.0 require modernc.org/tk9.0 v0.62.1-0.20250222163156-e78eb59c0674 require ( + github.com/JackMordaunt/icns v1.0.0 // indirect github.com/adrg/xdg v0.5.3 // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -12,9 +13,12 @@ require ( github.com/evilsocket/islazy v1.11.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect + github.com/machinebox/appify v0.0.0-20180512101119-15c1e09ce924 // indirect github.com/mat/besticon/v3 v3.18.0 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/ncruces/go-strftime v0.1.9 // indirect + github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect golang.org/x/image v0.20.0 // indirect @@ -49,3 +53,5 @@ require ( modernc.org/tcl9.0 v0.15.25 // indirect modernc.org/token v1.1.0 // indirect ) + +tool github.com/machinebox/appify diff --git a/go.sum b/go.sum index aee0fc2..c35c71c 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/JackMordaunt/icns v1.0.0 h1:41cNyWyQrG6beMw7m93LFK5o1GhefflsBTkauUkUtG8= +github.com/JackMordaunt/icns v1.0.0/go.mod h1:ubRqphS0f2OD07BuNaQSuw9uHUVQNBX5g38n6i2bdqM= github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -16,12 +18,18 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4= github.com/hashicorp/golang-lru/v2 v2.0.1/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/machinebox/appify v0.0.0-20180512101119-15c1e09ce924 h1:uXvs2WoTfOUZuGu+qJUUZWb5UxBU59DLlZhZBxNgBFs= +github.com/machinebox/appify v0.0.0-20180512101119-15c1e09ce924/go.mod h1:sqsRpT+VgEXox31qA9IQ9sEO8VQ/q7v7Y9WFxWkQTF0= github.com/mat/besticon/v3 v3.18.0 h1:dEDT5cXp8s/UH4Gh2uWEmguxGexU7q22MKjBzZmfd70= github.com/mat/besticon/v3 v3.18.0/go.mod h1:J8y+A9X0Oxxsq5+gaeIzn5/6XcJe1rsnhpFOXsq9/6A= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= +github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= diff --git a/main.go b/main.go index 3d86cd5..b227acd 100644 --- a/main.go +++ b/main.go @@ -193,6 +193,10 @@ func main() { if metaActive { newFileInDirectory(img)() } + case "a": + if metaActive { + tk.Toplevel() + } case "Up": if curr > 0 { updateImage(filepath.Join(directoryState.currentDirectory, directoryState.images[curr-1]), img)