@@ 17,7 17,7 @@ tasks:
cd ${PROJ}
VERSION=`hg log -r tip --template '{bookmarks}'`
[[ $VERSION == "" ]] && VERSION=dev
- BUILDDATE=`date +%Y-%m-%dT%H%M%S`
+ 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)
@@ 7,6 7,8 @@ package main
// TODO: AUR
// TODO: https://github.com/joshuarubin/go-sway
// TODO: Can we dynamically map bindsym using the API?
+// TODO: Adjust height so isn't bigger than screen
+// TODO: Not all screens are the same height
import (
"flag"
@@ 213,11 215,12 @@ func (c con) position(mark string, pos i
height = ws.Rect.Height
width = wwidth
}
+ mn := NAME + mark
cmd := fmt.Sprintf(`[con_mark="%s"],
resize set %d px %d px,
move absolute position %dpx %dpx,
move scratchpad,
- scratchpad show`, NAME+mark, width, height, posx, posy)
+ scratchpad show`, mn, width, height, posx, posy)
suc := false
var retries int
var err error
@@ 230,6 233,25 @@ func (c con) position(mark string, pos i
}
retries++
}
+ t, e := c.GetTree()
+ if e != nil {
+ panic(e)
+ }
+ w := t.FindMarked(mn)
+ if w.Rect.Height > height {
+ cmd = fmt.Sprintf(`[con_mark="%s"] resize shrink height`, mn)
+ suc = false
+ retries = 0
+ for suc == false {
+ suc, err = c.Command(cmd)
+ if retries > 10 {
+ if err != nil {
+ panic(err)
+ }
+ }
+ retries++
+ }
+ }
}
func (c con) getCurrentWorkspace() i3ipc.Workspace {