This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
from PIL import Image | |
import io | |
import re | |
from time import time | |
API_TOKEN = "" # token in case you want to use private API | |
headers = { | |
# "Authorization": f"Bearer {API_TOKEN}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function layout() { | |
return { | |
name: "Grid", | |
getFrameAssignments: (windows, screenFrame) => { | |
const numWindows = windows.length; | |
const numRows = Math.floor(Math.sqrt(numWindows)); | |
const numCols = Math.ceil(Math.sqrt(numWindows)); | |
const cellWidth = screenFrame.width / numCols; | |
const cellHeight = screenFrame.height / numRows; |
OlderNewer