GithubHelp home page GithubHelp logo

jigish / slate Goto Github PK

View Code? Open in Web Editor NEW
7.8K 7.8K 509.0 47.63 MB

A window management application (replacement for Divvy/SizeUp/ShiftIt)

License: GNU General Public License v3.0

Objective-C 96.78% C 0.12% JavaScript 2.16% Ruby 0.94%

slate's People

Contributors

cmsj avatar dmac avatar gplessis avatar iindigo avatar jangxyz avatar jigish avatar jlebrech avatar josh- avatar kvs avatar mattgillooly avatar mgax avatar richo avatar rjmunro avatar sabberworm avatar thomasjachmann avatar trishume avatar valpackett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slate's Issues

Don't raise the entire app with window hints

Just raise the window that was selected. This is especially important for apps like Terminal, where you will have many open but which are interleaved with other windows (like browser and vim).

Default Layouts

Ability to specify a set of default locations for new windows per application (also with priority-based locations per monitor configuration i.e. put it on monitor 2 if it exists, otherwise monitor 1, otherwise monitor 0)

Also re-compute layouts on monitor plug-in/unplug?

Chains aren't smart

Maintain chain state per window, not globally. Also reset chain state on window resize/move/close.

Intelligent Config Parsing

Config file tokens currently can only be delimited by single space characters. Improve this to allow multiple spaces/tabs between tokens.

For example, this should be valid config file syntax:

bind 1:ctrl       push     down

Also attempt to replace the config with screen/window contants and compute the result to see if it is parsed properly. Throw error if not.

Hints do not appear instantly

If you have many windows, the hints windows appear onscreen separated by 50ms or so --it doesn't feel instant (my original implementation had this problem, and Caleb noticed it as well).

I'm not sure what is taking the time (probably the accessibility API), but if it's window creation time, you could keep those hint windows around in memory and use them again the next time the hint operation is triggered.

Windows dont resize properly still

Even though this is a performance hit I think instead of trying to intelligently decide whether to resize first or move first, we should just resize->move->resize. It seems like Lion has issues resizing windows that are offscreen for some reason.

Implement Window Hints

Implement teh hints of teh windowz!

probably should look something like:

bind BLAH hint

and would be good to have a bunch of config options to tweak it

Add options to push

Ability to specify:

  1. style - bar (push and resize to a top/bottom/left/right bar)
  2. monitor option?

Screen ordering doesn't take into account monitor layout updates

I have two Apple thunderbolt displays daisy chained together. The screens are laid out like this:

Left    Right
   Laptop

OSX unfortunately does not remember the Apple displays layout across disconnects. 50% of the time I plug in to these monitors, I need to swap their layout positions by using the Display Preferences Pane.

After doing this adjustment via Preferences, the Slate screen numbering does not update -- screen 1 could now be on the right, while screen 3 is on the left, for instance.

Do you think this problem is solvable? Mechanically this could be handled by polling for position changes every few seconds, but should Slate dynamically change its screen numbering in response to layout changes?

Add Snapshot operation

Similar to get config info, add snapshot operation to take a snapshot of the current screen state as well as activate-snapshot operation to go back to a saved snapshot

Automatically create new snapshot when a new screen is plugged in

The worst is when I plug my laptop into a projector and all of my windows get resized because all of my displays are resized to 800x600.

Is it possible to save my window configuration automatically when a new monitor is plugged in but before all the resizing happens?

Binding parse error when starting up Slate when referencing unconnected screens

I suspect if you reference a screen number which is not currently connected, Slate has trouble parsing bindings related to that screen. The third command in this series:

bind 1:ctrl;cmd throw 0 resize
bind 2:ctrl;cmd throw 1 resize
bind 3:ctrl;cmd throw 2 resize

Causes Slate to give this error in a message box upon startup (titled "Unable to Parse Binding"):

Unable to parse '*** -[NSCFArray objectAtIndex:]: index (2) beyond bounds (2)' in 'bind 3:ctrl;cmd throw 2 resize'

Consider adding UI options for basic snapshot management

The most common use of snapshots is probably to save and then later restore windows when unplugging a laptop from a monitor setup. For that use case, a menu option would be nice to have, because it requires no slate config setup, and it's not used often enough dedicate a whole hotkey to it (I sat down and tried, but couldn't pick something I would remember).

Adding a very basic UI for this (save/restore current state) will make it a drop-in replacement for Stay.

Add corner operation

Add operation to move windows to corners:

bind key:modifiers corner <top-left|top-right|bottom-left|bottom-right> <optional:resize?>

Screen Size takes into account menu bar

It seems that screen size takes into account the OS X menu bar making things like stacking two windows on top of each other not line up properly. Can there be a built in property where the screenSizeY is the height of the available window region excluding the menu bar? Thanks Jigish!

Move Operation fails to resize sometimes

If the move operation first moves the window so some of it is off screen, for some reason the resize fails. Maybe move should be smarter to know whether or not it should move first or resize first. Like:

  1. Check what the new size should be, and what the new top left should be
  2. Check if the new size + new top left causes the window to be off screen
  3. if so, either move first or resize first depending on what works better.

Feature request: show a hint in the center of the window if the window's upper left corner is obscured.

This will allow you to show hints for more windows. Today, if the bulk of a window is showing but something is obscuring the upper left corner of the window, you can't select it with window hints.

The caveats to doing this are

  1. You may need to visibility test two points in a window instead of just one, which may slow down how quickly you can show hints if that visibility test is expensive.
  2. The placement of the hints will not always be in the same place on the window -- sometimes it's the upper left, sometimes its centered.

Consider making window hints less customizable

The README lists these as customizable parameters:

windowHintsFontColor
windowHintsFontName
windowHintsFontSize
windowHintsRoundedCornerSize
windowHintsBackgroundColor

windowHintsTopLeftX
windowHintsTopLeftY

If you provide a nice UI out of the box, none of these will be needed. Having customizable behavior is nice, but having customizable appearance limits what you can do in the future. If you wanted to add a nice visual effect upon selection (e.g. animating the text color from white->yellow), you can't, because you don't control the appearance.

In particular, letting users specify the hint positioning prevents you from doing smart hint placement in the future. A really nice feature would be to show a hint in the upper left corner or the center of the app, depending on which is visible. This happens to me all the time now -- I'll have a terminal which obscures the left side of some window, and I can't select those underlying windows using window hints, because their upper left corner is hidden (but the rest of the window is visible).

It's up to you, but I'd rather you take control of the aesthetic instead of letting the user mess with it so that you can provide a nice one and keep your software and README simpler.

Throw resize overlaps right/left dock

When using throw with the resize option, the resized window will overlap a static right/left dock but will not overlap a static bottom dock. Maybe add an option to specify whether or not to overlap?

Move does not work when the window is moved offscreen and then resized

This move command moves the window, but does not properly resize it. This is as of version f3f3982.

On screen 1, hit CTRL+CMD+left. This will resize the window to fill the left half of the screen. Next, hit CTRL+CMD+SHIFT+down. This should move and resize the window to fill the bottom left corner of the screen, but the window remains its original size.

bind left:ctrl;cmd push left bar-resize:screenSizeX/2
bind down:ctrl;shift;cmd move screenOriginX;screenOriginY+screenSizeY/2 screenSizeX/2;screenSizeY/2

Note that this move command does properly move and resize the window:

bind up:ctrl;shift;cmd move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY/2

Note that this is with a monitor configuration of

1   3
  2

Window hints are re-using characters

I have 6 windows which are being hinted and "G" is being used twice.

Probably related is that typing some hints does not raise the corresponding window, and link hints aren't dismissed. It may be because of this exception:

3/13/12 11:27:51.816 AM Slate: *** -[__NSArrayM objectAtIndex:]: index 12 beyond bounds [0 .. 6]

Anchor moves on resize with certain applications

Current resize operation doesn't play nice with applications like mvim/terminal/iTerm2 because they have discrete widths/heights. Add the ability to specify an actual anchor corner that will for sure stay in one place on resize/move.

Screens should be ordered by default from left to right

This is the least surprising behavior and implicitly addresses issue #7, where connecting your screens in a different order will re-order your screen numberings. I think it's less work than defining screens based on resolution.

In particular, defining screens based on resolution doesn't help when you have multiple monitors of the same resolution (e.g. two 24" side-by-side).

I haven't tested the latest on master so apologies if it's there already, but I didn't see it in the commit stream.

The hint letters change based on which window is focused

On my screen, I have 3 windows from left to right, with the first one focused. The hints are A B C.

If I focus the second window, the hints are B A C. The hint letters change depending on which window is focused. I think it will be less disturbing if the hints had a stable ordering from left to right across the screen (i.e. the leftmost window is always A).

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.