The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   Black background - no distractions? (http://hintsforums.macworld.com/showthread.php?t=66076)

melon 01-11-2007 02:18 AM

Quote:

Originally Posted by lxmorj (Post 348289)
Melon, that app is handy but I think it crashed my Safari. (When I used it with Adium...) Anyways, is there anyway it could just change when you command+tab between apps, and black out all but front? I feel like that is possible, but I don't know how much harder it is than binding the shade to one app.

I didn't write any of the apps, I just found and linked them.

If you're talking about http://www.mikey-san.net/Blackout.zip then look again at who posted it, Mikey-San wrote that ;)

It seems like a simple app, the trick that most of these programs have used is to create a layer (which you can set it's opacity) that covers the whole screen. It's why when you use Expose you can see it come apart with the rest of the windows.

The way Zazen have gone around the problem with Mikey-San's app is to list all the programs in the menubar where you can select which app to be at the front. It's still not perfect, but better. Though clicking on the background (in Zazen) removes it which is annoying especially if you accidently click on it.

Mikey-San 01-12-2007 09:01 AM

Quote:

The way Zazen have gone around the problem with Mikey-San's app is to list all the programs in the menubar where you can select which app to be at the front. It's still not perfect, but better. Though clicking on the background (in Zazen) removes it which is annoying especially if you accidently click on it.
I only worked on it for 30 minutes. Let's just say I'm still playing with ideas:

http://www.mikey-san.net/blackout.png

ArcticStones 01-12-2007 09:22 AM

.
Quote:

Originally Posted by Mikey-San (Post 348817)
I only worked on it for 30 minutes. Let's just say I'm still playing with ideas...

Well, I’m definitely interested. :)

From my point of view, Mikey-San, a nice additional function would be a short-key combo to hide menu bars/etc. That way when I am just writing, for instance, my page would float elegantly on a background of black.

Mikey-San 01-12-2007 10:01 AM

Quote:

Originally Posted by ArcticStones (Post 348825)
.

Well, I’m definitely interested. :)

From my point of view, Mikey-San, a nice additional function would be a short-key combo to hide menu bars/etc. That way when I am just writing, for instance, my page would float elegantly on a background of black.

I wanted to implement this, but the system UI mode is set at the application level, not system-wide. If Blackout sets the mode to no menubar/etc, all of that stuff will hide, but once you switch to Safari it will all return. (I think this is good overall, because it prevents dumb developers from screwing up other applications' interfaces.)

The system UI mode setting is what determines whether the Dock is removed, as well. If the Dock were scriptable, I would auto-hide it and leave the menu bar in place.

Edit: Taking suggestions for hiding the Dock. Scripting the key combination is not an option, because the user can change that and there is no future-proof method of determinin the user's setting for this.

melon 01-12-2007 10:02 AM

That mock-up (?) looks sexy.

One thing I'd like to add, would it be possible to make the settings box only appear when you move the cursor in that area? Though it may not be obvious then how to change it's settings to new users.

Another thing which you may already be aware of is that clicking on the black layer brings it in front/focus which hides the application you're using. Maybe that's why Zazen removes the background as there's no simple work around for this?

Also, I agree with ArcticStones that the menubar needs to go as well, the dock can be hidden manually anway. MenuShade that I linked to earlier said it was open source on t's site so I guess you can use it's code.

Other than that, for a 30 minute job, great work. Wish I knew how to code then I could help/make my own rather than just shoving suggestions your way :)

Mikey-San 01-12-2007 10:07 AM

I am considering some kind of auto-hiding for the control panel. I've got ideas and am weighing them. The panel itself is definitely unfinished.

Clicking on the black layer should jump for a split-second and immediately return you to the illuminated application. Does it not?

See my above post re: menu bar. I'll look into MenuShade's source, if it's open. As for 30 minutes, the release I linked to was 30 minutes, and the mock-up . . . well, it's not a mock up. That is the current state of the application. Not sure how much time I've actually put into it. Less than a day, more than a breadbox.

Quote:

Wish I knew how to code then I could help/make my own rather than just shoving suggestions your way
Never assume that feedback is the opposite of helping.

melon 01-12-2007 10:19 AM

Quote:

Originally Posted by Mikey-San (Post 348843)
Clicking on the black layer should jump for a split-second and immediately return you to the illuminated application. Does it not?

It does work but only for the first 2 goes. If you click on the background again for the third it disappears for good. Also Alt+tabbing TextEdit back in and then clicking the background again brings the background into focus again.

I think Alt+tabbing sort of breaks it as you can bring several windows/applications above the black layer, click on the background and it shows the application that you opened through Blackout. At a guess you've set something to remember what application was opened so as it will bring it to the front?

Not sure if it makes a difference but I'm using an iMac G5 PPC on 10.4.8.

Mikey-San 01-12-2007 10:25 AM

Quote:

It does work but only for the first 2 goes.
It should continue to re-focus the chosen application. The internals of that are mostly rewritten, so maybe I'm just not seeing it anymore because I've fixed it. Heh.

Quote:

Alt+tabbing sort of breaks it
Clicking on an app in the Dock or command-tabbing will (probably) not be suppressed. I absolutely can't stand it when applications hijack command-tab. Here's the workflow scenario I found myself in while playing with the app at work yesterday:

1. I illuminate an application so I can concentrate on it. Let's say it's Xcode, since I stare at that a lot during the day.

2. I need to jump to BBEdit for a moment, to get a snippet of source or run something on my clipboard through one of my text macros. I don't want to change illumination or quit Blackout, just to go /back/ to the previous state, because that tells my brain, "HEY BRAIN I AM TOTALLY GOING TO MAKE YOU THINK ABOUT A LOT OF STUFF IN THE NEXT 20 SECONDS. SO MUCH FOR CONCENTRATION."

2b. I flip back and forth once or twice between Xcode and BBEdit, doing whatever I needed to do.

3. After I'm done with BBEdit, I click back into the blackness to re-illuminate Xcode. BBEdit returns to being out of mind. All of this happens in anywhere from ten seconds to five minutes. Just depends on what I'm doing.

Being able to bring something else into the blacked-out world for a short moment made me giddy, so I kept it that way.

Make sense? :)

Mikey-San 01-12-2007 10:30 AM

Also, Blackout is a code name while I think of something better. I don't like the connotation, as blackouts are usually bad things; losses of functionality.

I've been calling the focused application the "illuminated" application internally, and the act of focusing "illumination". If anyone has ideas along these lines--or simply something that doesn't directly contradict it--throw 'em out there.

melon 01-12-2007 10:36 AM

Quote:

Originally Posted by Mikey-San (Post 348848)
command-tab

Ah command-tab that's what I meant, not Alt+tab, you can tell I come from a Windows environment no? :)

Quote:

Originally Posted by Mikey-San (Post 348848)
Being able to bring something else into the blacked-out world for a short moment made me giddy, so I kept it that way.

I did think that was a feature but wasn't sure because of the bug that I get.

What if you want another program to be the one in focus, i.e. as if you opened that app originally through Blackout?

Mikey-San 01-12-2007 10:37 AM

Quote:

Originally Posted by melon (Post 348852)
What if you want aonther program to be the one in focus, i.e. as if you opened that app originally through Blackout?

In the version I posted a screenshot of, you can click the blank button in the control panel to display the Illumination Panel (the app switcher-lookin' thing). Click an icon and that app becomes the new illuminated app.

In other words: You can do it in 0.2, but not the version I linked to for download earlier.

Edit: The blank button won't be blank when I'm done. It looks like crap right now, because I'm working on other pieces.

melon 01-12-2007 10:49 AM

Already one step ahead of me :)

As for names how about:

Illuminate - as you suggested or a variation like Illumine or Illuminati (though that's getting off course somewhat)
Limelight or Floodlight - though maybe too close to Spotlight
Bedazzle

Having a quick search on versiontracker there doesn't seem to be another app with those names which is good as it can't be confused :)

Personally, I don't mind the name Blackout.

lxmorj 01-12-2007 11:10 AM

Dock Hide
 
I don't know what you wrote your app in, but you can hide the dock by editing the com.apple.dock.plist file. You can determine its hidden status using (do shell script "defaults read com.apple.dock autohide"). If it returns 1, autohide is enabled. Not sure of the best way to edit it.

Mikey-San 01-12-2007 11:14 AM

I'm not going to edit another application's properly list file. Sorry. Additionally, after changing the setting, you must relaunch the Dock for it to take effect. That's also a no-no.

I know how to determine if the Dock has auto-hide enabled, but I don't know of a way to determine the user's defined "Hide Dock" keystroke.

Edit: It's written in C/Objective-C.

lxmorj 01-12-2007 11:31 AM

standard key command
 
tell application "System Events"
keystroke "d" using command & option down
end tell

-- i know nothing about c. I will look for a way to read the keystroke from a system events plist file or something. i assume reading it is alright, just not editing?

Mikey-San 01-12-2007 11:42 AM

Quote:

Originally Posted by lxmorj (Post 348870)
tell application "System Events"
keystroke "d" using command & option down
end tell

I know how to trigger keystrokes. The problem is that the user can change the keystroke that triggers Dock auto-hiding, inside the Keyboard & Mouse preferences pane. I am unaware of a way to determine what the user's setting is. There might be one, but I haven't found it yet. Until I can determine the user's setting, I can't just assume command-option-d hides the Dock, because it may do something entirely different, or nothing at all.

I'm looking around in various plists, but honestly, I don't consider that very reliable, because Apple may change that without notice in future updates.

Edit: And if I can avoid it, I'd like to keep AppleScript out of the picture. ;)

lxmorj 01-12-2007 12:04 PM

Found Something...
 
hayne had a comment way back called watchfile or something, perl that monitored files for any change. when i changed the key command back and forth, the only file modified in the ~/Preferences folder was com.apple.systempreferences.plist, but I am having trouble making any sense of it.

Mikey-San 01-12-2007 12:12 PM

Again, sniffing preference files is not future-proof and I probably won't do it, so I don't recommend that you spend much time investigating this path.

Hiding the Dock really is not at the top of my to-do list. In the end, someone who wants to hide the Dock will know how to do it manually, so if I dont come up with a solid way to hide the Dock, it will remain possible for the user to do so.

Mikey-San 01-12-2007 07:43 PM

Blackout 0.2, enjoy. I'll probably do more work on it this weekend.

http://www.mikey-san.net/Blackout02.dmg

- 90% rewrite.
- Some bugs squished.
- Prettier.
- Emily said she wanted to change the blackout colour.
- Smarter control panel. Stays out of your way, relocatable.

Edit: This post is post #1,337 for me. Heh. \m/

Edit #2: I apologize for the ugly controls inside the control panel. They're on my list.

mark hunte 01-12-2007 08:07 PM

Hi Mikey,

Nice app,
I just tried it, when I quit an app, say textedit.app and then click the black
the textedit.app being the last app illuminated re-launches.

Can I suggest the app detects if the last illuminated app is running or not ,
and if not offers up your floating app dock.


All times are GMT -5. The time now is 10:52 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.