GithubHelp home page GithubHelp logo

deivard / windowquicksize Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 582 KB

Simple AHK script that positions and rezises windows to some frequently used (by me) sizes and positions.

License: GNU General Public License v3.0

AutoHotkey 100.00%
autohotkey-script quality-of-life

windowquicksize's Introduction

WindowQuickSize

Bask in the glory of my shitty divine AutoHotkey script that positions and resizes windows to some frequently used (at least in my workflow) sizes and positions. This script is helpful if you have an ultrawide monitor and a similar workflow as me.

Definitions

These are the different types of windows I have created. Note that I designed this script to give the windows some padding, simply because I think it looks and feels good. The padding is the same for all dimensions (x and y). It is only defined by the distance from the left edge of your screen to the active window the momemt you configure the main window by pressing Shift+ctrl+alt+1. This means that the vertical position of the window you configure to be the main window does not matter. The height will automatically be resized to screen_height - 2 * padding once you pressed the configure keybinding. The only things you need to keep in mind when configuring the main window is the width of the active window and its distance from the left edge of your screen.

Main window

The main window is supposed to act as the window that you primarly focus on, which will likely take up major part of your screen, this could for example be a code editor.

Support window

This window acts as a support window to the main window, this could for example be a web browser or file explorer that you browse while you code in the main window. Note that the main window is always on the left side, if you try to place it on the right side, this script will misinterpret that as a lot of padding and everything will be bonk.

Cycle window

This window have three (cyclable) preset size: large, medium and small. Try them out and you'll see what I mean. I use the large window size when I casually browse the web. The medium window is a good size for spotify and discord (in my opinion) and the small window is the typical file explorer size for me.

Full screen window

Pretty self explanatory, except that it is full screen with padding.

Custom window

This window is customisable, just resize and place a window in a position and size you want and this window will be defined by that size and position.

Keybindings

Shift+ctrl+alt+1 Initialize the dimensions, including padding, for the main window, which in turn define the dimensions for the support window (width and padding) and the full screen window (padding).

Shift+alt+1 Place and resize the active window so it has the positon and size of the main window.

Shift+alt+2 Place and resize the active window so it has the positon and size of the support window.

Shift+alt+3 Cycle through the cycle window sizes for the active window.

Shift+alt+4 Make the active window a full screen window.

Shift+alt+q Place and resize the active window so it has the positon and size of the custom window.

Shift+alt+r Undo the size and position change of the active window. Note: almost as buggy as it can be, no plan for fixing it at the moment.

Shift+ctrl+alt+s Save current configuration to the .ini file. You won't ever need to press this since the other commands already save to the .ini file. I just thought I would include it just in case.

How do I run this magnificent gift to mankind

  1. Clone the repository
  2. Click (twice) on the executable

To automatically run the script on startup see: https://www.autohotkey.com/docs/FAQ.htm#Startup

Note: you don't need AutoHotkey installed to run the executable.

windowquicksize's People

Contributors

deivard avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

windowquicksize's Issues

.ini stored hot key settings?

Great idea! It looks like a mini i3wm!

Is there any way to make the keybindings persistent in a .ini file, so you won't need to go in the code to change it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.