Giter Site home page Giter Site logo

golden-ratio.el's Introduction

golden-ratio.el

When working with many windows at the same time, each window has a size that is not convenient for editing.

golden-ratio helps on this issue by resizing automatically the windows you are working on to the size specified in the "Golden Ratio". The window that has the main focus will have the perfect size for editing, while the ones that are not being actively edited will be re-sized to a smaller size that doesn't get in the way, but at the same time will be readable enough to know it's content.

Golden Ratio

For more info about the golden ratio check out

http://en.wikipedia.org/wiki/Golden_ratio

Install

Use el-get to install.

Usage

To enable automatic resizing, put on your .emacs.d/init.el

(require 'golden-ratio)

(golden-ratio-mode 1)

If you want to disable automatic resizing done by golden-ratio, just invoke M-x golden-ratio-mode

To call golden ratio manually just M-x golden-ratio

Wide Screens

If you use a large screen and have very wide frames golden-ratio makes very wide windows. This can be handled automatically by setting golden-ratio-auto-scale to true. This does a good job of keeping windows at a reasonable width regardless of how wide or narrow your frame size is. This works well on my laptop regardless of which monitor or LCD I happen to be using.

(setq golden-ratio-auto-scale t)

For those who wish for manual control, If golden-ratio-auto-scale is false, manual control can be exercised through the golden-ratio-adjust-factor variable. setting it to something less than 1 will cause the windows to be less wide. The golden-ratio-adjust function allows for experimentation with this value.

M-x golden-ratio-adjust

It is also possible to toggle between widescreen and regular width window sizing with

M-x golden-ratio-toggle-widescreen

The variable golden-ratio-wide-adjust-factor can be set to the adjustment value you desire the widescreen toggle to use.

The following code will set up golden-ratio to adjust for a moderately wide screen and also allow toggling between normal, with an adjustment factor of 1, and wide with an adjustment factor of .8. For a very wide screen/frame of ~3400 px, .4 works well giving screens with a width ~100 columns wide.

(setq golden-ratio-adjust-factor .8
      golden-ratio-wide-adjust-factor .8)

Credits

Code inspired by ideas from Tatsuhiro Ujihisa

golden-ratio.el's People

Contributors

thierryvolpiatto avatar roman avatar ericgebhart avatar hickinbottoms avatar abo-abo avatar arcanis avatar dsevilla avatar fuco1 avatar deftsp avatar vkazanov avatar zane avatar

Watchers

Wictor Lund avatar

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.