Skip to content

Commit

Permalink
small refactor to improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
geomat0101 authored and blrsn committed May 15, 2023
1 parent 4c238b3 commit 0583d5a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ func main() {

startups := Config.TileStartup
for i := 0; i < len(startups); i += 1 {
ws := startups[i]
if ws >= len(t.workspaces) {
log.Warn("Invalid workspace number in tile_workspaces: ", ws)
wn := startups[i]
ws := t.workspaces[uint(wn)]
if wn >= len(t.workspaces) {
log.Warn("Invalid workspace number in tile_workspaces: ", wn)
continue
}

t.workspaces[uint(ws)].IsTiling = true
t.workspaces[uint(ws)].Tile()
ws.IsTiling = true
ws.Tile()
}

// Run X event loop
Expand Down

0 comments on commit 0583d5a

Please sign in to comment.