# HG changeset patch # User Sean E. Russell # Date 1586986979 18000 # Wed Apr 15 16:42:59 2020 -0500 # Node ID 8e718360c2425fbe6560d07f6ec6e04091e84d3c # Parent d2f77f8065a95407563448e3461abb9c265dd0bd Build binaries for multiple archs; compress assets. *** Adds a CI badge *** Asset signing diff --git a/.build.yml b/.build.yml --- a/.build.yml +++ b/.build.yml @@ -1,18 +1,41 @@ image: archlinux packages: - - go - - mercurial + - go + - mercurial + - xz + - gnupg sources: - - hg+https://hg.sr.ht/~ser/i3quake + - hg+https://hg.sr.ht/~ser/i3quake secrets: - - 45926939-38b0-4e7f-bfa5-1a5b5786a773 + - 45926939-38b0-4e7f-bfa5-1a5b5786a773 + - d7d86c19-5b94-4c65-bf07-b8b30f55bd63 +environment: + PROJ: i3quake + GOOS: linux tasks: - - build: | - cd i3quake - VERSION=`hg log -r tip --template '{bookmarks}'` - BUILDDATE=`date +%Y-%m-%dT%H%M%S` - GOOS=linux go build -ldflags "-X main.Version=${VERSION} -X main.BuildDate=${BUILDDATE}" -v -o i3quake_${VERSION} . - - upload: | - cd i3quake - VERSION=`hg log -r tip --template '{bookmarks}'` - curl --netrc-file ~/.downloads -T i3quake_${VERSION} https://downloads.ser1.net/files/ + - build: | + cd ${PROJ} + VERSION=`hg log -r tip --template '{bookmarks}'` + [[ $VERSION == "" ]] && VERSION=dev + BUILDDATE=`date +%Y-%m-%dT%H%M%S` + for T in linux:amd64 linux:arm64 linux:arm5 linux:arm6 linux:arm7 ; do + GOOS=$(echo $T | cut -d: -f1) + GOARCH=$(echo $T | cut -d: -f2) + ASSET=${PROJ}_${GOOS}_${GOARCH}_${VERSION} + [[ $GOOS == "windows" ]] && ASSET=${ASSET}.exe + go build -ldflags "-X main.Version=${VERSION} -X main.BuildDate=${BUILDDATE}" -v -o ${ASSET} . + done + - upload: | + cd ${PROJ} + VERSION=`hg log -r tip --template '{bookmarks}'` + [[ $VERSION == "" ]] && exit + for T in linux:amd64 linux:arm64 linux:arm5 linux:arm6 linux:arm7 ; do + GOOS=$(echo $T | cut -d: -f1) + GOARCH=$(echo $T | cut -d: -f2) + ASSET=${PROJ}_${GOOS}_${GOARCH}_${VERSION} + [[ $GOOS == "windows" ]] && ASSET=${ASSET}.exe + xz -6 ${ASSET} + gpg -b --local-user ECE3F91E646A3FAB5D4DED0F5E0D7ABD6668FDD1 ${ASSET}.xz + curl --netrc-file ~/.downloads -T ${ASSET}.xz https://downloads.ser1.net/files/ + curl --netrc-file ~/.downloads -T ${ASSET}.xz.sig https://downloads.ser1.net/files/ + done diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -14,19 +14,21 @@ ## Installation +[![builds.sr.ht status](https://builds.sr.ht/~ser/i4quake.svg)](https://builds.sr.ht/~ser/i4quake?) [Binaries are here](https://downloads.ser1.net/software), and are signed with the GPG key [5E0D7ABD6668FDD1](https://meta.sr.ht/~ser.pgp) (available from hkp://hkps.pool.sks-keyservers.net). + The program is `go get`-table: ``` go get code.ser1.net/i3quake ``` -Or, you can [download a binary](https://downloads.ser1.net/software). Put the executable in your path, and then use it to launch your terminal (or other application). For example, to auto-start the app from i3, put this in the `~/.i3/config`: +Put the executable in your path, and then use it to launch your terminal (or other application). For example, to auto-start the app from i3, put this in the `~/.i3/config`: ``` exec --no-startup-id i3quake -p right -H 0.6 st ``` -Subsequent runs of i3quake will toggle showing the window, but it turns out that i3quake is not necessary because toggling can be performed with commands that can be bound directly in `~/.i3/config` without the overhead of forking a process. Add this binding to your `~/.i3/config`: +Subsequent runs of i3quake will toggle showing the window, but because i3quake uses the i3 mark facility, toggling can be efficiently bound directly in `~/.i3/config`: ``` bindsym $mod+n [con_mark="i3quake"] scratchpad show @@ -38,6 +40,8 @@ $ i3-msg '[con_mark="i3quake"], scratchpad show' ``` +To bind additional instances (created with the `-m` marking flag), prepend your mark with "`i3quake`". For example, if you run `i3quake -m MYCONKY conky`, you would bind to `[con_mark="i3quakeMYCONKY"]`. + ## Examples ```bash