rice.shawn Posted November 19, 2013 Share Posted November 19, 2013 You do it pretty much the same way that I mentioned before. Look at the difference between the script filters for "lay" and "layother" "lay" is /usr/bin/python layout_select.py "{query}" And "layother" is /usr/bin/python layout_select.py "{query}" +1 So, if the hotkey argument for the "full" was "set:0,0,1,1" then the argument should just be "set:0,0,1,1 +1" I'm not using multiple monitors, so I can't test this out. But, theoretically, that should be it. Link to comment
manjaro Posted November 20, 2013 Share Posted November 20, 2013 Hi Shawn, I tried that it didnt work.On looking into layout_select.py, it was slightly different.the command was"set:0,0,1,1:+1"The colon is necessary instaed of the space and this works.ThanksJoe. Link to comment
untoldwind Posted November 21, 2013 Author Share Posted November 21, 2013 (edited) Sorry, I was quite busy the last week and kind of lost track of this thread. Thanks for the feedback, I just forgot to update the "documentation". You can now find the details of this little ":+1" here: https://github.com/untoldwind/alfred2-layout/wiki/Hacking-the-Mavericks-version I also found an issue: For some reason the new Activity Monitor of Mavericks does not react to the layout events (i.e. it just won't move). I'll have to investigate a bit if there is a way to fix this. Edited November 21, 2013 by untoldwind Link to comment
untoldwind Posted November 21, 2013 Author Share Posted November 21, 2013 (edited) Just pushed a new version that should fix the problem. On a side note: in the Apple developer documentation ruby-cocoa and python PyObjC have both moved to legacy with a hint that Object-C is the preferred language for Cocoa applications: https://developer.apple.com/legacy/library/documentation/Cocoa/Conceptual/RubyPythonCocoa/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005422-SW1 For the time being there should not be a problem ... but ... well ... um ... Edited November 21, 2013 by untoldwind Link to comment
Efty.Edge Posted November 21, 2013 Share Posted November 21, 2013 Great workflow. I will use it to replace 'Moom'. But i have a litte feature request for the Full an Center Views. Can you please make it possible to change the value of the border. In Center it is a default of 10 % in Full view none. It like 15 % and maybe 20 px. Nevertheless, your Workflow is fantastic. Efty Link to comment
untoldwind Posted November 22, 2013 Author Share Posted November 22, 2013 Actually you can do that by yourself - more or less - easily. Just open the layout_select.py with the text editor of your choice and tweak the following lines: layouts = [ .... Layout("full", "Full", True, "set:0,0,1,1"), .... Layout("center", "Center", True, "set:0.1,0.1,0.9,0.9"), In your case to layouts = [ .... Layout("full", "Full", True, "set:0.01,0.01,0.99,0.99"), .... Layout("center", "Center", True, "set:0.15,0.15,0.85,0.85"), (I translated the "20px" border to 1% border since the layouter just works with relative numbers at the moment. The drawback is that these changes would be overwritten with the next "release". May I should add some kind of configuration (nothing fancy) were people can set their own preferences. Link to comment
Efty.Edge Posted November 23, 2013 Share Posted November 23, 2013 @untoldwind Thank you very much. It works like charm and 'Moom' is now History. It would be really nice if in the future this personal settings will not be overwritten. But now - i'm really happy. Kind regards. Efty Link to comment
rice.shawn Posted November 23, 2013 Share Posted November 23, 2013 The drawback is that these changes would be overwritten with the next "release". May I should add some kind of configuration (nothing fancy) were people can set their own preferences. Probably the easiest way to do that would be to set up a folder in the appropriate data location for your workflow and then just have a text file that can be parsed for extra arguments (with a syntax guide commented out at the top of the document). Then just setup another keyword "lay config" to open the file. If you want to make it a bit fancier, then you could also add in a "lay reset" to reset the config file in case someone accidentally breaks the document syntax. s Link to comment
untoldwind Posted November 26, 2013 Author Share Posted November 26, 2013 (edited) I know you will hate me for this, but since I was kind of unhappy with the recent developments of Ruby's and Python's Cocoa-binding I just remembered this old comic: http://xkcd.com/224/ ... so in short: I redid everything with Perl, which is so low level that Apple will not mess with it (hopefully). On the plus side, it is also the fastest binding. An experimental version is available here: https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow New feature: With "lay_config" you should now be able to edit your own configuration file (format described below)Hopefully this will open the "TextEdit" if there are no other editors available (that's hard to test for me, since I have so many editors on my system) If the editor does not open you can also use "lay_config" with Cmd-Enter/Cmd-Click, which should open the configuration directory in Finder. If it all fails: The configuration file should be this one: ~/Library/Application Support/Alfred 2/Workflow Data/de.leanovate.alfred.layout/layout.yaml Of course there is a default-version in the workflow itself (i.e. to reset the workflow to default, just remove the file above) Note: The keywords are NOT merged, i.e. if you do not like some keywords, you are actually able to remove them The configuration file itself is YAML, which should be easily understandable: - { name: "togglefullscreen", display: "Toggle full screen mode", forOtherScreen: No, command: "fullscreen:toggle" } - { name: "full", display: "Full", forOtherScreen: Yes, command: "set:0,0,1,1" } - { name: "left", display: "Left", forOtherScreen: Yes, command: "set:0,0,0.5,1" } name: is the keyword (and also the name of the icon) display: the display text/title that appears in Alfred forOtherScreen: Yes/No toggle if the keyword should also appear in "layother" command: the actual command for the layouter (as described here: https://github.com/untoldwind/alfred2-layout/wiki/Hacking-the-Mavericks-version#parameters-of-the-layouter ... well lets see if it all works as intended. PS: If this is too spooky for you (or simply not working), the previous release is still available here: https://github.com/untoldwind/alfred2-layout/raw/1.1_Mavericks/Layout.alfredworkflow (in case I forgot to update links in the previous posts) Edited November 26, 2013 by untoldwind Benzi and Don Dahl 2 Link to comment
Don Dahl Posted November 30, 2013 Share Posted November 30, 2013 I know you will hate me for this, but since I was kind of unhappy with the recent developments of Ruby's and Python's Cocoa-binding I just remembered this old comic: http://xkcd.com/224/ ... so in short: I redid everything with Perl, which is so low level that Apple will not mess with it (hopefully). On the plus side, it is also the fastest binding. An experimental version is available here: https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow New feature: With "lay_config" you should now be able to edit your own configuration file (format described below)Hopefully this will open the "TextEdit" if there are no other editors available (that's hard to test for me, since I have so many editors on my system) If the editor does not open you can also use "lay_config" with Cmd-Enter/Cmd-Click, which should open the configuration directory in Finder. If it all fails: The configuration file should be this one: ~/Library/Application Support/Alfred 2/Workflow Data/de.leanovate.alfred.layout/layout.yaml Of course there is a default-version in the workflow itself (i.e. to reset the workflow to default, just remove the file above) Note: The keywords are NOT merged, i.e. if you do not like some keywords, you are actually able to remove them The configuration file itself is YAML, which should be easily understandable: - { name: "togglefullscreen", display: "Toggle full screen mode", forOtherScreen: No, command: "fullscreen:toggle" } - { name: "full", display: "Full", forOtherScreen: Yes, command: "set:0,0,1,1" } - { name: "left", display: "Left", forOtherScreen: Yes, command: "set:0,0,0.5,1" } name: is the keyword (and also the name of the icon) display: the display text/title that appears in Alfred forOtherScreen: Yes/No toggle if the keyword should also appear in "layother" command: the actual command for the layouter (as described here: https://github.com/untoldwind/alfred2-layout/wiki/Hacking-the-Mavericks-version#parameters-of-the-layouter ... well lets see if it all works as intended. PS: If this is too spooky for you (or simply not working), the previous release is still available here: https://github.com/untoldwind/alfred2-layout/raw/1.1_Mavericks/Layout.alfredworkflow (in case I forgot to update links in the previous posts) I've been using it for a while now and i have noticed increase in overall snappyness and speed. Seems to be working as expected! Can you do any resizing of VLC.app? I can't get VLC.app to do anything. Maybe a bug? Thanks for sharing Link to comment
untoldwind Posted December 2, 2013 Author Share Posted December 2, 2013 Hmm ... what version of VLC are you using. I just tested the most recent 2.1.1 and was able to resize the playlist window and the player itself quite nicely. Uh ... just for clarification: We are talking about the VideoLan player, right? Link to comment
Don Dahl Posted December 3, 2013 Share Posted December 3, 2013 Hmm ... what version of VLC are you using. I just tested the most recent 2.1.1 and was able to resize the playlist window and the player itself quite nicely. Uh ... just for clarification: We are talking about the VideoLan player, right? Yes, its the VideoLan player. Im using the latest, 2.1.1 just as you. That's weird. I cant get alfred to interact at all with VLC. Everything else seems to be working just fine. Hmm... :x Link to comment
untoldwind Posted December 5, 2013 Author Share Posted December 5, 2013 (edited) Ok, lets see if there is a way to figure this out. I hacked a little test script that should explicitly move the the current window of VLC: https://dl.dropboxusercontent.com/u/3815280/tester.pl (in its core that's what the workflow is doing via the scripting bridge.) To run it you need to have an open VLC window somewhere (obviously) and open a terminal: cd <where-ever you downloaded the script above> /usr/bin/perl tester.pl Please note, you have to temporarily grant UI-Scripting rights to the Terminal.app (or iTerm) for this to work: http://www.tekrevue.com/2013/06/25/how-to-enable-access-for-assistive-devices-in-os-x-mavericks/ The output should look like this: └──➤ perl tester.pl Found process Name: VLC ID: org.videolan.vlc Active window: VLC media player Position: 1083, 425 Size: 1365, 950 Alternative: Alternative Position: 1083, 425 Alternative Size: 1365, 950 Try set position to 0,0 ... ... and the current VLC window should be moved to the top-left corner. Edited December 5, 2013 by untoldwind Link to comment
Don Dahl Posted December 5, 2013 Share Posted December 5, 2013 Ok, lets see if there is a way to figure this out. I hacked a little test script that should explicitly move the the current window of VLC: https://dl.dropboxusercontent.com/u/3815280/tester.pl (in its core that's what the workflow is doing via the scripting bridge.) To run it you need to have an open VLC window somewhere (obviously) and open a terminal: cd <where-ever you downloaded the script above> /usr/bin/perl tester.pl Please note, you have to temporarily grant UI-Scripting rights to the Terminal.app (or iTerm) for this to work: http://www.tekrevue.com/2013/06/25/how-to-enable-access-for-assistive-devices-in-os-x-mavericks/ The output should look like this: └──➤ perl tester.pl Found process Name: VLC ID: org.videolan.vlc Active window: VLC media player Position: 1083, 425 Size: 1365, 950 Alternative: Alternative Position: 1083, 425 Alternative Size: 1365, 950 Try set position to 0,0 ... ... and the current VLC window should be moved to the top-left corner. Thanks for helping out mate. I tried to do as described and here's the error; Dahls-MacBook-Air:Downloads Dahl$ /usr/bin/perl tester.pl Found process Name: VLC ID: org.videolan.vlc Can't call method "name" on unblessed reference at tester.pl line 28. Dahls-MacBook-Air:Downloads Dahl$ I'm no developer so i have no clue to fix line 28 by myself Link to comment
untoldwind Posted December 6, 2013 Author Share Posted December 6, 2013 Believe it or not, but this was actually helpful and let me to an ugly little error. Instead of if ( !$window ) { ... one actually has to write if ( !$$window ) { ... Just the little wonders of perl that are really (really really) hard to get Anyhow, I just updated the workflow with that fix: https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow Not sure if that actually fixes your problem, so I've updated the "tester.pl" as well. Maybe you can try it again if VLC still refuses to move. Link to comment
Don Dahl Posted December 6, 2013 Share Posted December 6, 2013 Believe it or not, but this was actually helpful and let me to an ugly little error. Instead of if ( !$window ) { ... one actually has to write if ( !$$window ) { ... Just the little wonders of perl that are really (really really) hard to get Anyhow, I just updated the workflow with that fix: https://github.com/untoldwind/alfred2-layout/raw/master/Layout.alfredworkflow Not sure if that actually fixes your problem, so I've updated the "tester.pl" as well. Maybe you can try it again if VLC still refuses to move. Awesome dude. With the recent update VLC finally moves I was happy with your workflow before - now i can't express myself in words - thanks man! Link to comment
scottfwalter Posted July 25, 2014 Share Posted July 25, 2014 FYI the Mavericks version seems to be working with Yosemite. Link to comment
Don Dahl Posted August 15, 2014 Share Posted August 15, 2014 Is this one still developed? I use it countless times each day and i'm sad to see little to no development Link to comment
gerryh Posted August 27, 2014 Share Posted August 27, 2014 (edited) FYI the Mavericks version seems to be working with Yosemite. Hm, I'm trying it on Yosemite Dp6 and see this getting logged: [ERROR: alfred.workflow.action.script] Code 127: /bin/bash: line 4: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: No such file or directory [EDIT] Never mind, I found that installing the "Experimental" mavericks version works. Edited August 27, 2014 by gerryh Link to comment
rice.shawn Posted August 28, 2014 Share Posted August 28, 2014 If you look at the path, you'll see that it's looking for Ruby 1.8. Yosemite has Ruby 2.0 on it, so you could just change those paths if something else like this comes up. Link to comment
scottfwalter Posted August 28, 2014 Share Posted August 28, 2014 S If you look at the path, you'll see that it's looking for Ruby 1.8. Yosemite has Ruby 2.0 on it, so you could just change those paths if something else like this comes up. Actually you can't use Ruby 2.0 with this Workflow. One of the underlying Ruby libraries the workflow uses is not compatible with Ruby 2.0. You can use the experimental version (there's a link in the first post) which uses Perl instead of Ruby. Link to comment
rice.shawn Posted August 28, 2014 Share Posted August 28, 2014 @scottfwalter Makes sense. Good pointing that out. Link to comment
mixterdee Posted October 17, 2014 Share Posted October 17, 2014 I've just upgraded to 10.10 today and this workflow has stopped working. I am gutted because this is one of the workflows that I use numerous times a day. Is this just me or are others having the same problem? Link to comment
scottfwalter Posted October 17, 2014 Share Posted October 17, 2014 I've just upgraded to 10.10 today and this workflow has stopped working. I am gutted because this is one of the workflows that I use numerous times a day. Is this just me or are others having the same problem? Use the experimental version listed in the first post. It works with Yosemite. I am using it right now. mixterdee 1 Link to comment
mixterdee Posted October 18, 2014 Share Posted October 18, 2014 Use the experimental version listed in the first post. It works with Yosemite. I am using it right now. Thanks for that Scott. Note to self - look through the thread before posting Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now