Terminal shortcut for Mac

114 views
Skip to first unread message

shannonlow

unread,
May 26, 2011, 1:53:29 AM5/26/11
to terminal-rocks
Hi all,

So let me start this off with a newbie question -

Is there a way to create a keyboard shortcut (e.g. Cmd-T) on OS X to
open a new terminal window wherever you are (e.g. in Finder, in
another app, in terminal)?

Best,
Shannon

Jason Ong

unread,
May 26, 2011, 4:10:11 AM5/26/11
to termina...@googlegroups.com

Hmm. I can see how that might be useful in some situations.

Shannon are you trying to drop down to terminal to execute commands?

Cheers,
Jason

----
web: http://bit.ly/jasonong

On 26 May 2011 13:53, "shannonlow" <shann...@gmail.com> wrote:

Shannon Low

unread,
May 26, 2011, 6:27:42 AM5/26/11
to termina...@googlegroups.com
Yup, that's what I'd like to do - quickly call up a terminal window via keyboard instead of fumbling about the dock or expose to launch/find one.


Jason Ong

unread,
May 26, 2011, 7:11:18 AM5/26/11
to termina...@googlegroups.com
Recommendations from stackoverflow. :)

--
Cheers,
JasonOng

---
web: http://bit.ly/jasonong

Jason Ong

unread,
May 26, 2011, 7:18:29 AM5/26/11
to termina...@googlegroups.com
I like this especially. :)

"Also, you can copy an item from the finder using command-C, jump into the Terminal (e.g. using Spotlight or QuickSilver) type 'cd ' and simply paste with command-v"

Ivan

unread,
May 26, 2011, 7:34:57 AM5/26/11
to termina...@googlegroups.com
On Thu, May 26, 2011 at 7:18 PM, Jason Ong <velv...@gmail.com> wrote:
> I like this especially. :)
> "Also, you can copy an item from the finder using command-C, jump into the
> Terminal (e.g. using Spotlight or QuickSilver) type 'cd ' and simply paste
> with command-v"

drag&drop also works

but http://decimus.net/DTerm looks much more useful.
(thanks for SO link)

Ivan

shannon low

unread,
May 26, 2011, 1:03:17 PM5/26/11
to termina...@googlegroups.com
Thanks all! The solution I found in the end was to install Quicksilver
and create a trigger that assigns "open terminal app" to a hotkey.
Works well, but not so cool that I had to install QS just to do that.

> (thanks for SO link)Th
>
> Ivan
>

onetom

unread,
May 26, 2011, 2:22:34 PM5/26/11
to termina...@googlegroups.com
im just using apple-space term enter
roughly once every month...
since 1 terminal is always open for me.
cycling to it via apple-tab never seemed to be a pain to me...

btw, talking about quicksilver, it think it's worth to mention
they give nice example how can the command line concept
augmented via gui. DTerm is trying to do something similar.

alfred is less resource hungry compared to quicksilver, afaik.

-- 
  tom

Vikram Verma

unread,
May 26, 2011, 2:52:26 PM5/26/11
to termina...@googlegroups.com

Visor may also be worth checking out.

http://visor.binaryage.com/

With it, you can maintain a single persistent console rather than an
infinity of accumulating windows.

I haven't tested that utility in particular, but it seems to offer
similar functionality to the ScratchPad I have set up within XMonad.

http://vikramverma.com/~vikram/img/screenshots/1306435809.png

Vikram

Tamas Herman

unread,
May 26, 2011, 3:22:07 PM5/26/11
to termina...@googlegroups.com
vikram,

what font r u using?

what r u reading your email in?

what's athena?

r u running an x11 server on a mac so u can use xmonad?
aren't there any focusing or window cycling problems with it?
(btw, since xmonad is a tiling wm, what does that window
doing *on top of* the other one? :)

can u share your ~/.screenrc, pls?
(i like the center aligned window names)

it's funny to see a nyuszika nick on that #vim channel;
it means bunny in hungarian ;)
r u using irssi or bitchx or what?

--
tom

Tamas Herman

unread,
May 26, 2011, 6:03:30 PM5/26/11
to termina...@googlegroups.com
> Visor may also be worth checking out.

it doesn't worth checking out.

it piggy backs the terminal, so u need the terminal app started.

then it hides your initial window.

when u open the visor window it turns out
a, it didnt inherit your default window settings
b, it has created it's own profile
c, it's not occupying the whole screen
d, u can resize, but only from it's preference pane

now u apple-tab to some other app, then an other again.
you would expect apple-tab switch between these two, right?

well, if u press the visor hot-key, the terminal app will jump
to the top of the application stack, so the next apple-tab
will bring u from the terminal to the app where u invoked it from,
but the next apple-tab will bring u back to the terminal, BUT
the visor window won't open, instead u will only see the menu
change, since ur terminal has no other windows open.

in a summary,
a, u will get another hotkey to pop the terminal app to the top,
b, but u can't use apple-tab to access the visor window, while
c, it breaks the app stack order

now i cant imagine who is the audience of this shit,
but not the hard core command line user, i guess :/

--
tom

Shannon Low

unread,
May 26, 2011, 9:39:43 PM5/26/11
to termina...@googlegroups.com
+1

Vikram's got funky screens!

What do you use to read mail?

Shannon Low

unread,
May 26, 2011, 9:42:34 PM5/26/11
to termina...@googlegroups.com
I've heard a lot abt Alfred and I think it does more than quicksilver. QS seems more like a spotlight+.

That said, I can now just opt-space to pull up a term window from anywhere, so I'm happy with the QS solution.

Jason Ong

unread,
May 26, 2011, 11:53:27 PM5/26/11
to termina...@googlegroups.com
I've been using Alfred ever since Navjot's talk at barcamp 2010 although I haven't been using it anything more than spotlight. Browsing the powerpack features is addictively veering towards to "buy" button till I took a step back and ask myself "do i really need this?" Good UX.

Btw I get reminded of Meng every time I see Alfred's tope hat. 

Jason Ong

unread,
May 26, 2011, 11:57:04 PM5/26/11
to termina...@googlegroups.com
We should have a gnu screen session for #terminology

Tamas Herman

unread,
May 27, 2011, 2:49:54 AM5/27/11
to termina...@googlegroups.com
On Fri, May 27, 2011 at 10:57 AM, Jason Ong <velv...@gmail.com> wrote:
> We should have a gnu screen session for #terminology

okay. i just opened one:

screen -S terminology

and then? :)

--
tom

Jason Ong

unread,
May 27, 2011, 2:58:20 AM5/27/11
to termina...@googlegroups.com

And then all presentations will be done through that. Haha.

Cheers,
Jason

----
web: http://bit.ly/jasonong

shannon low

unread,
May 27, 2011, 3:14:20 AM5/27/11
to termina...@googlegroups.com
And is there a way for all of us to ssh into the screen session and have the discussion _in_the_command_line_?

Roland Turner

unread,
May 27, 2011, 3:15:23 AM5/27/11
to termina...@googlegroups.com
# sure there is!

Vikram Verma

unread,
May 29, 2011, 2:11:24 PM5/29/11
to termina...@googlegroups.com
While those are certainly some pretty ridiculous behaviours, I can
understand a lot of those behaviours as design decisions from the
developer's perspective, as well as inevitable by-products of the
restrictions of the platform/operating system (yet another reason to use
GNU/Linux, or alternative BSDs!)

On 11-05-27 05:03:30 +0700, Tamas Herman wrote:
> > Visor may also be worth checking out.
>
> it doesn't worth checking out.

> it piggy backs the terminal, so u need the terminal app started.

In the use-case I was describing, Visor was used as a temporary buffer
to execute commands quickly, before dismissing it to return to whatever
you're working on. I recognised it as having the benefit of being
persistent - hurrah, toggleable man-pages (though I use vim's 'K' for
this)!

I'd expect any 'hard core command line user', to use your own phrasing
(ugh), to be maintaining other virtual terminal windows in conjunction
with this, so I wouldn't recognise it as being an issue.

Piggy-backing Terminal.app means that the developers needn't develop a
VT of their own, which would be a total pain in the ass.

> then it hides your initial window.

The active window? That's a pretty lame behaviour. I'd expect it to
simply take focus, leaving whatever you were working on in the
background.

> when u open the visor window it turns out
> a, it didnt inherit your default window settings

This offers the advantage of being able to set custom behaviours for
Visor, for the temporary terminal, which is a Good Thing (tm).

> b, it has created it's own profile

See above.

> c, it's not occupying the whole screen

This is again, an advantage. If your actions within the Terminal window
involve the process you're currently interacting with, you have the
opportunity to review that information inside the Terminal.

> d, u can resize, but only from it's preference pane

This is likely a limitation of Terminal.app, and something you'd only
have to change once, and to your liking.

> now u apple-tab to some other app, then an other again.
> you would expect apple-tab switch between these two, right?
>
> well, if u press the visor hot-key, the terminal app will jump
> to the top of the application stack, so the next apple-tab
> will bring u from the terminal to the app where u invoked it from,
> but the next apple-tab will bring u back to the terminal, BUT
> the visor window won't open, instead u will only see the menu
> change, since ur terminal has no other windows open.
>
> in a summary,
> a, u will get another hotkey to pop the terminal app to the top,
> b, but u can't use apple-tab to access the visor window, while
> c, it breaks the app stack order

I'm not a Macintosh developer, but I think it's unlikely that the system
will allow you to daemonise GUI processes (and that's not something
you'd want to do to Terminal.app, anyway.

This is a lame behaviour, but not something the developers could
control.



> now i cant imagine who is the audience of this shit,
> but not the hard core command line user, i guess :/
>
> --
> tom

I'll admit it was a bad recommendation - though as I mentioned, I haven't
used the utility. While I have Snow Leopard running on my workstation,
I instead have a number of single-purpose full-screen iTerm 2 windows, in
designated spaces, that I toggle in and out of instead.

Now that I'm thinking about it, a better solution for Shannon would be
to use iTerm2's 'Hotkey Window' feature:

http://www.iterm2.com/#/section/features/hotkey

Vikram

Vikram Verma

unread,
May 29, 2011, 2:31:13 PM5/29/11
to termina...@googlegroups.com
On 11-05-27 02:22:07 +0700, Tamas Herman wrote:
> vikram,
>
> what font r u using?

Envy Code R:

http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released

> what r u reading your email in?

Mutt, with vim as my text editor.

> what's athena?

The hostname of my netbook.

"Instead of calling Athena the goddess of war, wisdom, and macrame,
then, we should say war and technology. And here again we have the
problem of an overlap with the jurisdiction of Ares, who's supposed to
be the god of war. And let's just say that Ares is a complete asshole.
His personal aides are Fear and Terror and sometimes Strife. He is
constantly at odds with Athena even though--maybe because--they are
nominally the god and goddess of the same thing--war. Heracles, who is
one of Athena's human proteges, physically wounds Ares on two
occasions, and even strips him of his weapons at one point! You see
the fascinating thing about Ares is that he's completely incompetent.
He's chained up by a couple of giants and imprisoned in a bronze
vessel for thirteen months. He's wounded by one of Odysseus's drinking
buddies during the Iliad. Athena knocks him out with a rock at one
point. When he's not making a complete idiot of himself in battle,
he's screwing every human female he can get his hands on, and--get
this--his sons are all what we would today call serial killers. And so
it seems very clear to me that Ares really was a god of war as such an
entity would be recognized by people who were involved in wars all the
time, and had a really clear idea of just how stupid and ugly wars
are.

Whereas Athena is famous for being the backer of Odysseus, who, let's
not forget, is the guy who comes up with the idea for the Trojan
Horse. Athena guides both Odysseus and Heracles through their
struggles, and although both of these guys are excellent fighters,
they win most of their battles through cunning or (less pejoratively)
metis. And although both of them engage in violence pretty freely
(Odysseus likes to call himself 'sacker of cities') it's clear that
they are being held up in opposition to the kind of mindless, raging
violence associated with Ares and his offspring--Heracles even
personally rids the world of a few of Ares's psychopathic sons. I
mean, the records aren't totally clear--it's not like you can go to
the Thebes County Courthouse and look up the death certificates on
these guys--but it appears that Heracles, backed up by Athena all the
way, personally murders at least half of the Hannibal Lecterish
offspring of Ares.

So insofar as Athena is a goddess of war, what really do we mean by
that? Note that her most famous weapon is not her sword but her shield
Aegis, and Aegis has a gorgon's head on it, so that anyone who attacks
her is in serious danger of being turned to stone. She's always
described as being calm and majestic, neither of which adjectives
anyone ever applied to Ares....

Let's face it, Randy, we've all known guys like Ares. The pattern of
human behavior that caused the internal mental representation known as
Ares to appear in the minds of the ancient Greeks is very much with us
today, in the form of terrorists, serial killers, riots, pogroms, and
agressive tinhorn dictators who turn out to be military incompetents.
And yet for all their stupidity and incompetence, people like that can
conquer and control large chunks of the world if they are not
resisted....

Who is going to fight them off, Randy?

Sometimes it might be other Ares-worshippers, as when Iran and Iraq
went to war and no one cared who won. But if Ares-worshippers aren't
going to end up running the whole world, someone needs to do violence
to them. This isn't very nice, but it's a fact: civilization requires
an Aegis. And the only way to fight the bastards off in the end is
through intelligence. Cunning. Metis."

- Enoch Root (Neal Stephenson's Cryptonomicon)

There's a copy of the novel in the hackerspace's library if you'd like
to read it. I'd highly recommend it.

As for what it's doing there, my multiplexer wasn't setting titles
properly, I've fixed that since (though I haven't committed my changes
to the master repo.)

> r u running an x11 server on a mac so u can use xmonad?
> aren't there any focusing or window cycling problems with it?

That screenshot isn't from my Macintosh, it's on my netbook (which is
running Arch GNU/Linux.) I haven't used Quartz+XMonad, but I have a
mirror of my netbook's setup in a virtual machine on the Mac.

> (btw, since xmonad is a tiling wm, what does that window
> doing *on top of* the other one? :)

It's a persistent floating buffer I use to access programs I use often,
as well as functioning as a scratchpad (see my previous email.)

> can u share your ~/.screenrc, pls?
> (i like the center aligned window names)

I'm using tmux as my multiplexer. You can pull a (somewhat outdated
version) of it's configuration from my dotfiles repository:

https://github.com/vikramverma/dotfiles

> it's funny to see a nyuszika nick on that #vim channel;
> it means bunny in hungarian ;)
> r u using irssi or bitchx or what?

It's irssi, configuration is also in the above repository.

> --
> tom

I'd be willing to present my setup at the next Terminology meetup, if
you're still (confused|interested).

Vikram Verma

unread,
May 29, 2011, 2:33:04 PM5/29/11
to termina...@googlegroups.com
On 11-05-27 09:39:43 +0800, Shannon Low wrote:
> +1
>
> Vikram's got funky screens!
>
> What do you use to read mail?

I use the mutt email client, with vim as my text editor.

You could have just read the email header. ;)

Vikram Verma

unread,
May 29, 2011, 2:36:53 PM5/29/11
to termina...@googlegroups.com
On 11-05-27 11:57:04 +0800, Jason Ong wrote:
> We should have a gnu screen session for #terminology

I was thinking the same.

Set up a dumb user on the presenter's host, attendants connect via SSH
and attach to the multiplexer session to view at the presenter's code.

We'll have to consider security issues, though.

Shannon Low

unread,
May 29, 2011, 10:20:20 PM5/29/11
to termina...@googlegroups.com
Good tip! :)

Jason Ong

unread,
May 30, 2011, 10:27:10 PM5/30/11
to termina...@googlegroups.com
Thanks Vikram. I'm trying out Envy Code R fonts. Looking good so far. :)
Reply all
Reply to author
Forward
0 new messages