fikovnik/ShiftIt

Looking for a new maintainer?

fikovnik opened this issue Β· 35 comments

Here is what has happened. Some time ago I got my macbook stolen (from a hotel room in Vienna?!?). While I was waiting for a replacement (it is a long process at the university where I work), I got temporary replacement, a dell with linux. While it was kind of hard at the beginning, after some time I started to like it. Recently, I got my hands on a new macbook pro and I realized that I don't want to use it anymore (I was constantly hitting the esc key on the touchbar, the keyboard was weird and it felt slow comparing to the dell I had despite the same spec).

Since I no longer use OSX, I will not continue working on Shifit. If there is somebody (@rca, @aegamesi, @vitalibozhko, @llouim, @derekwyatt for example) who would like to maintain it I would be very happy.

Sorry to hear about your Mac, but you're on the better OS now, I think. There are days I wish I could switch.

With that said, I just recently stopped using ShiftIt, since I switched to Hammerspoon, so I'm not a candidate for maintaining ShiftIt.

Thanks for code :)

rca commented

I appreciate the consideration. Unfortunately, while I do software development, I don't know my way around Mac app development. :(

I do use this piece of software every day, so hope it continues to live on.

@derekwyatt - Hammerspoon is really cool. Do you think you could package a Hammerspoon script which basically does what shiftit does so it could become a permanent replacement?

@fikovnik Not for the average user. The issue would be about creating a customization UI, which is what your non-programmer would need. With that said, getting the equivalent of what ShiftIt provided was dead simple:

units = {
  right30       = { x = 0.70, y = 0.00, w = 0.30, h = 1.00 },
  right70       = { x = 0.30, y = 0.00, w = 0.70, h = 1.00 },
  left70        = { x = 0.00, y = 0.00, w = 0.70, h = 1.00 },
  left30        = { x = 0.00, y = 0.00, w = 0.30, h = 1.00 },
  top50         = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 },
  bot50         = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 },
  upright30     = { x = 0.70, y = 0.00, w = 0.30, h = 0.50 },
  botright30    = { x = 0.70, y = 0.50, w = 0.30, h = 0.50 },
  upleft70      = { x = 0.00, y = 0.00, w = 0.70, h = 0.50 },
  botleft70     = { x = 0.00, y = 0.50, w = 0.70, h = 0.50 },
  maximum       = { x = 0.00, y = 0.00, w = 1.00, h = 1.00 }
}

mash = { 'shift', 'ctrl', 'cmd' }
hs.hotkey.bind(mash, 'l', function() hs.window.focusedWindow():move(units.right30,    nil, true) end)
hs.hotkey.bind(mash, 'h', function() hs.window.focusedWindow():move(units.left70,     nil, true) end)
hs.hotkey.bind(mash, 'k', function() hs.window.focusedWindow():move(units.top50,      nil, true) end)
hs.hotkey.bind(mash, 'j', function() hs.window.focusedWindow():move(units.bot50,      nil, true) end)
hs.hotkey.bind(mash, ']', function() hs.window.focusedWindow():move(units.upright30,  nil, true) end)
hs.hotkey.bind(mash, '[', function() hs.window.focusedWindow():move(units.upleft70,   nil, true) end)
hs.hotkey.bind(mash, ';', function() hs.window.focusedWindow():move(units.botleft70,  nil, true) end)
hs.hotkey.bind(mash, "'", function() hs.window.focusedWindow():move(units.botright30, nil, true) end)
hs.hotkey.bind(mash, 'm', function() hs.window.focusedWindow():move(units.maximum,    nil, true) end)

I have more than that but that extra functionality goes beyond what was possible with ShiftIt so I didn't include it.

Unfortunately I don't know my way around macOS development either. Since ShiftIt seems to work mostly fine, perhaps effort would be better spent on getting a similarly simple but useful cross platform tool?

@derekwyatt - this is more less what I had in mind. Basically a github wiki page that will briefly describe how to install hammerspoon and where to put the script. Ideally, the script would contain shiftit keybindings and the same actions.

@aegamesi - cross platform is hard since you will need to somehow test it on OSX. Most of the window managers I have tried on linux already have shiftit functionality so it is not really needed there.

@fikovnik Alright, I can do that. Do you want me to make a PR for the root README.md or do you have somewhere more specific in mind?

@derekwyatt - I think a wiki page with a link from README.md would be perfect. I'll add you to the project so you can edit wiki. Thanks!

@fikovnik I had to futz with it a bit... my previous PR was mucking with it... but here you go #297.

@derekwyatt - Thanks a lot!!

@derekwyatt, is there a way for HammerSpoon to make an app centered but occupying a certain percentage of the screen (80% or 90%)?

Asking for: #295

@ryanpcmcquen Answered on #295 so that this ticket can close.

@fikovnik
I personally love the simplicity of ShiftIt when I went hunting for a this exact feature. I WAS a born and bread (hehe) Windows Dev with some Linux foo. But a few years ago the Mac bug bit hard and hasn't let go.

I'm sending this via my new Mac TrashCan.... so I'm not saying I'm interested in taking over the project yet because its been awhile since I've looked at the code base. But I'd be some what interested in holding patches up so I can keep this thing going (until something like a nice Hammerspoon or other script takes its place).

I don't have much open source contributions at the moment, but I'd be happy to send some private code your way for your considerations.

In the meantime... I have to install ShiftIt on my Mac Trashcan and new Macbook Pro... so thank you.... thank you for the awesome Application.. Even if it is time for you to retire your contributions to it. :D πŸ‘
Just know. devs like me. GREATLY APPRECIATED IT. It helped me bridge my gap between Windows 10 and OSX whatever. I think it was like Small White Cat with Spots (OSX version or something). ;)

@fikovnik Not for the average user. The issue would be about creating a customization UI, which is what your non-programmer would need. With that said, getting the equivalent of what ShiftIt provided was dead simple:

units = {
  right30       = { x = 0.70, y = 0.00, w = 0.30, h = 1.00 },
  right70       = { x = 0.30, y = 0.00, w = 0.70, h = 1.00 },
  left70        = { x = 0.00, y = 0.00, w = 0.70, h = 1.00 },
  left30        = { x = 0.00, y = 0.00, w = 0.30, h = 1.00 },
  top50         = { x = 0.00, y = 0.00, w = 1.00, h = 0.50 },
  bot50         = { x = 0.00, y = 0.50, w = 1.00, h = 0.50 },
  upright30     = { x = 0.70, y = 0.00, w = 0.30, h = 0.50 },
  botright30    = { x = 0.70, y = 0.50, w = 0.30, h = 0.50 },
  upleft70      = { x = 0.00, y = 0.00, w = 0.70, h = 0.50 },
  botleft70     = { x = 0.00, y = 0.50, w = 0.70, h = 0.50 },
  maximum       = { x = 0.00, y = 0.00, w = 1.00, h = 1.00 }
}

mash = { 'shift', 'ctrl', 'cmd' }
hs.hotkey.bind(mash, 'l', function() hs.window.focusedWindow():move(units.right30,    nil, true) end)
hs.hotkey.bind(mash, 'h', function() hs.window.focusedWindow():move(units.left70,     nil, true) end)
hs.hotkey.bind(mash, 'k', function() hs.window.focusedWindow():move(units.top50,      nil, true) end)
hs.hotkey.bind(mash, 'j', function() hs.window.focusedWindow():move(units.bot50,      nil, true) end)
hs.hotkey.bind(mash, ']', function() hs.window.focusedWindow():move(units.upright30,  nil, true) end)
hs.hotkey.bind(mash, '[', function() hs.window.focusedWindow():move(units.upleft70,   nil, true) end)
hs.hotkey.bind(mash, ';', function() hs.window.focusedWindow():move(units.botleft70,  nil, true) end)
hs.hotkey.bind(mash, "'", function() hs.window.focusedWindow():move(units.botright30, nil, true) end)
hs.hotkey.bind(mash, 'm', function() hs.window.focusedWindow():move(units.maximum,    nil, true) end)

I have more than that but that extra functionality goes beyond what was possible with ShiftIt so I didn't include it.

Post your hammerspoon configs on your github page. This script snippit seems totally functional.

hey @fikovnik
Serious question. Besides sending a few PRs your ways with bugs/features from the Issues list. Would you want some other form of "proof of work" if I was interested in becoming a maintainer?

I would hope that if you're willing to hand over the reigns of this sweet tool that you'd let me be a co-maintainer for a few months while I learn what you wanted to do. How you got here. etc.

Thoughts?

based on @derekwyatt 's advice, I created a hammerspoon config that follow ShiftIt's hotkeys
I just need move to bottom/left/right/top and maximum, so it is not a 100% replacement of ShiftIt

mods = { 'ctrl', 'alt', 'cmd' }

units = {
  bottom = { x = 0.0, y = 0.5, w = 1.0, h = 0.5 },
  left   = { x = 0.0, y = 0.0, w = 0.5, h = 1.0 },
  right  = { x = 0.5, y = 0.0, w = 0.5, h = 1.0 },
  top    = { x = 0.0, y = 0.0, w = 1.0, h = 0.5 },
}

animationDuration = 0

function createMoveWindow(rect)
  return function ()
    hs.window.focusedWindow():move(rect, nil, true, animationDuration)
  end
end

hs.hotkey.bind(mods, 'down', createMoveWindow(units.bottom))
hs.hotkey.bind(mods, 'left', createMoveWindow(units.left))
hs.hotkey.bind(mods, 'right', createMoveWindow(units.right))
hs.hotkey.bind(mods, 'up', createMoveWindow(units.top))
hs.hotkey.bind(mods, 'm', function()
  hs.window.focusedWindow():maximize(animationDuration)
end)

I just wanted to say that, huge thanks for @fikovnik, for creating this wonderful tools that benefit many of the mac users, although I'm a bit late to the party but still, have the urge to express my gratitude!

Just wondering if there's been a formal handoff yet? Or still in transition? I sincerely hope it's not being dropped. I love this tool! :)

EDIT: Just found the Wiki which mentions an alternative pathway using http://www.hammerspoon.org/
Perhaps the section warrants a more prominent display in the README.

@ybot1122 - would you like to give it a try (you can directly edit README.md on github) and do a PR. Thanks a lot!

First of all, thanks for ShiftIt. I really like it.

I don’t know enough Objective-C to volunteer as a maintainer, and I think Hammerspoon is too much for the tech savvy. The thing I liked about ShiftIt is how I could install it in my wife’s computer and have her use it without missing a beat. I couldn’t do the same with Hammerspoon.

I looked around for other alternatives, but they’re all either paid, or too full of bells and whistles, or both.

So I thought I’d try and build my own. I’m going to call it Infinite Windows. In one hour I got the features I use in ShiftIt to (mostly) work.

Instead of Objective-C, I’m using Electron & AppleScript.

Help is welcomed.

Hammerspoon though.

ToeC commented

Someone at work just posted about https://rectangleapp.com. Free, maintained and appears to work so perhaps no maintenance is needed here.

Thanks for all the hard work on ShiftIt @fikovnik!

I like the Hammerspoon alternative but wasn't very satisfied with the example configuration, so I made my own :).

https://github.com/peterklijn/hammerspoon-shiftit

It's more in line with the ShiftIt configuration.

(At the point of writing, it doesn't cover all functionality yet, WIP)

Thanks you. Once it is complete, could you do PR to feature a like to in the README?

Absolutely! πŸ˜„

@fikovnik here's the PR: #307 :)

Here is what has happened. Some time ago I got my macbook stolen (from a hotel room in Vienna?!?). While I was waiting for a replacement (it is a long process at the university where I work), I got temporary replacement, a dell with linux. While it was kind of hard at the beginning, after some time I started to like it. Recently, I got my hands on a new macbook pro and I realized that I don't want to use it anymore (I was constantly hitting the esc key on the touchbar, the keyboard was weird and it felt slow comparing to the dell I had despite the same spec).

Since I no longer use OSX, I will not continue working on Shifit. If there is somebody (@rca, @aegamesi, @vitalibozhko, @llouim, @derekwyatt for example) who would like to maintain it I would be very happy.

Thanks @fikovnik , I am wondering who is taking care of this now?

a-b commented

Any updates?

@fikovnik I would be interested to maintain this project. I know ObjC but i'm a mobile developer. But with the help of the community i think i can manage it. What do you think?

Thank you. @allanragec, @derekwyatt & @rca I would really like to become a maintainer for this project. What do you think?

I don't use this anymore myself. A few years ago I switched to Hammerspoon.

@dtogias Would be nice, we need to release a new version with new features and there are some important issues to do. Feel free to suggest new things too 😁