SShortSingh.
Back to feed

Developer builds one-command script to snap 8 Terminal windows into ultrawide grid

0
·1 views

A developer working with multiple Claude Code sessions on a 3440×1440 ultrawide monitor created a shell script to automatically arrange eight Terminal.app windows into a 4×2 grid with a single command. The manual process of dragging windows into position each morning was taking about a minute, prompting the automation effort. The solution combines Swift and AppleScript, using Swift to handle coordinate-system conversion between macOS's Cocoa Y-up framework and AppleScript's Y-down global coordinates. Implementation revealed five key traps, including silent failures in AppleScript's set position command, incorrect window heights, and a missing 30-pixel menu bar offset on non-primary screens. The script resolves these issues through a convergence loop that re-scans window indexes on every pass rather than relying on names or IDs.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Browser Tool Generates Custom .gitignore Files Locally Without Login

The Gitignore Generator is a free, browser-based utility from DevTools that creates tailored .gitignore files by combining vetted templates for selected languages, frameworks, editors, and operating systems. Developers choose the components matching their tech stack, and the tool merges relevant ignore patterns into a single, organized file in real time. Duplicate entries are automatically removed, keeping the output clean and conflict-free. Because the tool runs entirely in the browser, no data is sent to a server, aligning with DevTools' privacy-first approach across its 200-plus free utilities. It requires no account or configuration, making it useful for both bootstrapping new repositories and standardizing ignore rules across team projects.

0
ProgrammingDEV Community ·

Why Bitcoin's Leaderless Structure, Not First-Mover Status, Drives Its 'Digital Gold' Tag

Bitcoin analyst Dex Calloway argues that Bitcoin's reputation as digital gold stems not from being the first cryptocurrency but from its uniquely leaderless structure. Unlike Ethereum, Solana, Cardano, and Ripple — each with active founders or foundations that shape protocol direction — Bitcoin has had no identifiable leader since Satoshi Nakamoto went silent in April 2011. Approximately 1.1 million BTC attributed to Satoshi's early mining activity have remained untouched for over 15 years, across wildly varying price levels. Calloway contends that with no founder to lobby, no premine, and a fixed supply that has resisted change, Bitcoin structurally mirrors gold in a way no other crypto asset does. He distinguishes this 'foundational decentralization' from mere node distribution, noting that major protocol changes at rival chains consistently follow their founders' or foundations' public roadmaps.

0
ProgrammingDEV Community ·

Code Mode Technique Can Cut MCP Token Costs by Up to 92% at Scale

A developer named Anthony Max published a technical guide on DEV Community on July 21 explaining how to significantly reduce token costs when using Model Context Protocol (MCP). The article identifies inefficient retry loops as a major hidden driver of token consumption at scale. By switching to a method called Code Mode, developers can reportedly cut MCP-related token usage by as much as 92%. The post, tagged under AI, web development, programming, and open source, garnered 114 reactions within a short period. The writeup is aimed at developers looking to optimize costs when building or scaling AI-powered applications.

0
ProgrammingDEV Community ·

Lalal.ai Lets Users Split Vocals and Instruments from Any Audio Track

Lalal.ai is an online tool designed to separate vocals from instrumentals in music tracks. Users can upload a song and the platform quickly isolates the voice from the background music with reportedly high audio quality. Beyond vocals, the tool can also extract individual instruments such as drums, bass, guitar, and piano. It is aimed at use cases like remixes, karaoke, covers, and audio cleanup. A free tier is available, allowing users to preview results before committing to a full export.

Developer builds one-command script to snap 8 Terminal windows into ultrawide grid · ShortSingh