8000 GitHub - rullo24/SnapWit: SnapWit is a basic program that resizes the currently focused window, based on user parameters; written entirely in Go.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SnapWit is a basic program that resizes the currently focused window, based on user parameters; written entirely in Go.

Notifications You must be signed in to change notification settings

rullo24/SnapWit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnapFit

NOTE: This currently only works on Windows

Basic Description

This program resizes the currently focused window to dimensions specified in a configuration file when the "alt"+"shift"+"9"/"8"/"7" keys are pressed. Further, "alt"+"shift"+"0" has been configured to maximise the currently focused window. Created out of necessity, this program was produced as I found myself wasting quite a lot of time resizing windows on my Ultrawide monitor (e.g. opening a 2nd VS Code would create a very small window).

Requirements

  • Windows 10/11
  • Go 1.21.4 (or sooner)

How it Works

This program works by checking every 30ms for the pressed shortcut keys. If the required shortcut keys are pressed, the program then resizes the currently focused window to match the settings detailed in the config file. There are 3 sizes that can be set with 3x shortcuts to do so.

Installation

Download the source code. Open a terminal in the directory containing the source code. Run the following command to build the program:

go build -ldflags -H=windowsgui

Running from Startup

To ensure that the program is always running in the background (checking for key presses), open "Run" from the Windows Start Menu or press WindowsKey+r. Once this "Run" window opens, enter in the following command to open the Startup folder:

shell:startup

Paste a shortcut created from the compiled executable in this Startup folder. The program will now run at startup (the program starts after all other necessary processes boot).

Configuration

All lines must follow the convention as shown below:

size:key:value

Example: L:startHeight:50

For the program to function, "startHeight", "windowX" and "windowY" keys are required for each of the 3 sizes (S, M, L). All other keys will be ignored.

  • startHeight defines the resized window's top distance from the top of the working area
  • windowX defines the width of the new window
  • windowY defines the height of the new window

About

SnapWit is a basic program that resizes the currently focused window, based on user parameters; written entirely in Go.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0