{"id":17058295,"url":"https://github.com/garthdb/windowresizer","last_synced_at":"2025-03-23T07:18:21.721Z","repository":{"id":8831101,"uuid":"10533011","full_name":"GarthDB/WindowResizer","owner":"GarthDB","description":"An Alfred 2 Workflow that will resize windows to exact pixel dimensions.","archived":false,"fork":false,"pushed_at":"2013-10-05T20:53:02.000Z","size":176,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T09:57:56.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"AppleScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GarthDB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-06T18:11:11.000Z","updated_at":"2018-10-12T01:36:18.000Z","dependencies_parsed_at":"2022-09-19T08:10:48.995Z","dependency_job_id":null,"html_url":"https://github.com/GarthDB/WindowResizer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2FWindowResizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2FWindowResizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2FWindowResizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GarthDB%2FWindowResizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GarthDB","download_url":"https://codeload.github.com/GarthDB/WindowResizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066710,"owners_count":20555431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T10:29:17.020Z","updated_at":"2025-03-23T07:18:21.686Z","avatar_url":"https://github.com/GarthDB.png","language":"AppleScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"WindowResizer\n=============\n\nAn [Alfred 2](http://www.alfredapp.com/) Workflow that will resize windows to exact pixel dimensions.\n\n\nInstallation\n=============\nDownload the [workflow](https://github.com/GarthDB/WindowResizer/releases) file and double click it to install it in Alfred.\n\n\nUsage\n=============\n\nThe worklow is simple.  It just resizes the topmost window to the pixel dimensions entered.  Format the dimensions as `WIDTHxHEIGHT` (replacing `WIDTH` and `HEIGHT` with the size in pixels).\n\nExmaple:\n\n```\nresizer 400x500\n```\n![Resizer](//screenshot.png)\n\nScript\n===\n\nThe actual AppleScript is:\n\n```AppleScript\nto splitString(aString, delimiter)\n\tset retVal to {}\n\tset prevDelimiter to AppleScript's text item delimiters\n\tset AppleScript's text item delimiters to {delimiter}\n\tset retVal to every text item of aString\n\tset AppleScript's text item delimiters to prevDelimiter\n\treturn retVal\nend splitString\non alfred_script(q)\n\tset newDimensions to splitString(q as text, \"x\")\n\ttell application \"System Events\"\n\t\tset frontApp to name of first application process whose frontmost is true\n\tend tell\n\t\n\ttry\n\t\ttell application frontApp\n\t\t\tset current to bounds of the first window\n\t\t\ttell window 1\n\t\t\t\tset the bounds to {item 1 of current, item 2 of current, (item 1 of current) + (item 1 of newDimensions), (item 2 of current) + (item 2 of newDimensions)}\n\t\t\tend tell\n\t\tend tell\n\ton error errMsg\n\t\ttell application \"System Events\" to tell application process frontApp\n\t\t\ttell window 1\n\t\t\t\tset size to {item 1 of newDimensions, item 2 of newDimensions}\n\t\t\tend tell\n\t\tend tell\n\tend try\n\t\nend alfred_script\n```\n\nColophon\n===\n\n* This workflow uses Geert JM Vanderkelen's [string splitter example](http://geert.vanderkelen.org/splitting-as-string-and-joining-a-list-using-applescript/).\n* The resize icon has been added to [The Noun Project](http://thenounproject.com/garthdb/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarthdb%2Fwindowresizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgarthdb%2Fwindowresizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgarthdb%2Fwindowresizer/lists"}