Pin OS X Terminal to the Desktop Background - macos

I am looking for a tool that can 'stick' the OS X terminal app to the desktop background. I want it to be below the desktop icons, on top or instead of the background image.
I am using the terminal through out the day, from time to time. But I don't really need it for ongoing tasks, only to check something very fast. So having an active corner that shows the desktop would be the ideal guesture to reveal the terminal.
GeekTool has the ability to present the output of a terminal command on a desktop, however, I haven't been able to type something into the terminal overlay, GeekTool is showing. Is there any other tool, that could achieve that?

You can use the stock Script Editor app to save the following script as an application (.app file):
tell application "Terminal"
do script "cd ~/Desktop"
end tell
You can edit the script above to specify the directory you want the new window to use by default.
Once you've created your .app file you can put it on your desktop and conveniently double click it to open a new terminal window.

Related

Applescript open app in certain desktop without switching focus

I am trying to make a simple AppleScript to open Spotify on my computer. I have assigned Spotify to always open on Desktop 2. However, every time it opens, it switches my focus from whatever desktop I am currently using to Desktop 2 where Spotify is being opened. Is there any way for me to prevent this, that is, for the app to open without switching my focus to a different desktop?
Current code:
tell application "Spotify"
activate
delay 3
playpause
end tell
I have also tried to open Spotify using commands like open -g -a 'Spotify', but this just opens the app in the background and still switches desktops.
Thanks for the help.

Why does the safari app gets launched when I open apple script?

I have an applescript. The script goes like this..
tell application "Safari"
open location "http://www.google.com" -- mentions the perticular webpage to be loaded
activate --makes the Safari application the front most application
end tell
Whenever I open this script, the Safari application gets launched. To be very clear, I'm not running this application instead I am just opening this script in applescript editor.
Can anyone please explain me why the Safari is getting launched. The Safari gets launched but it will be hidden or say it does not put up any window. [Neither it does load any pages in the background, it just gets launched in the dock and a dot saying that the app is launched will be present].
Once I run the script then the safari puts up the window and loads the desired web-page.
Please Help.
In general, applescript must launch an application to learn what commands it understands. Over time applescript has gotten better at not launching applications for this task, but some apps still get launched. iPhoto is one I notice gets launched when I open applescripts that use it. As such it's not something you can avoid.
However, in your case there may be a fix. The "open location" command is a generic applescript command. You do not need to tell Safari to execute that command. Therefore you can probably change your script to this and avoid the launching issue. The open location command should just open the link in your default browser which I assume in your case is Safari. It should also automatically activate it for you.
Good luck.
open location "http://www.google.com"

OSX bash - window focusing on launched executables/apps?

If i launch a executable/another app from a bash script, this executable/app starts up normally, but with it's application window not in focus.
If you launch the script from a window for example, the bash script calls upon the other executable/app, but you can't see the app's interface because it gets launched below all windows.
For Linux there exist some window managers that can do this, like these tips here:
Is there something for OSX as well?
I realize i can set the active window via AppleScript (osascript via bash), but i wanted to do this without AS.
("tell application \"newapp\" to
activate")
My appswitch tool does exactly this.

How do you duplicate a shell instance in Unix?

My specific problem is the following: I am using Mac OS X with the Visor app for terminal. This lets me do cool pop-in/out stuff with terminal for quick access. The problem is, I lose the ability to move the window around and re-size it, something that becomes important when I start opening up multiple buffers in emacs and want to view some at the same time in a window larger than 80 wide.
Does anyone know how to duplicate a shell window/instance, so that a new window appears with the same history, current working dir, aliases, etc...? Even more specifically, can this be done in Mac OS X such that the new window is in a different "style", (basic, pro, sands, etc..).
I'm not familiar with Visor, but simply using a terminal emulator such as screen might give you what you need. From a terminal, invoke 'screen'. That will give you a shell prompt. From another terminal, invoke 'screen -x'. Now each terminal will be attached to the same shell, with the same history, etc. See screen(1) for details.

Remembering terminal states in OS X (like Fluid for the shell...)

I have a few different things open in the terminal whenever I'm developing -- log tailing, Ruby console, plain shell in a certain directory, and so on.
How do I:
start all those things at once, hopefully in the right position on the screen?
make them distinct so I can switch to them with Quicksilver / Alt-Tab?
Fluid solved this problem with all of my web apps, so now I want to do it with my terminals.
And while we're on the topic, has anyone found a working solution for getting OS X to remember window positions on an external monitor? If I unplug it and plug it back in, I have to drag everything back to the same position (although at least Mercury Mover makes it possible to do it with the keyboard.)
Open Terminal, and go into Preferences, then go into the settings tab, and create a new setting for each of your windows that you want. Either give them all different colour schemes, or duplicate a colour scheme multiple times for them all to have the same settings. Under the shell sub-tab, add "Run command" to be run at shell startup. (This is the command that will cd to the directory you want, or tail a log).
Then initialise the windows as you want. Then click Window in the main menu and select Save Windows as Group...
In OSX Yosemite you can use (in Terminal) Window -> Save group. It will do all the work for you.

Resources