Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Tip: Open a yakuake tab instead of konsole in konqueror
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ld50
Tux's lil' helper
Tux's lil' helper


Joined: 13 Feb 2005
Posts: 135

PostPosted: Fri Sep 19, 2008 5:55 pm    Post subject: Tip: Open a yakuake tab instead of konsole in konqueror Reply with quote

This is tip is for anyone that uses konqueror and yakuake.

Konqueror has a very nice feature: when F4 is pressed it opens konsole on the current dir.

Here's how to open a yakuake tab instead of konsole (tested with yakuake 2.8.1):

Code:

dcop yakuake DCOPInterface slotAddSession

if [ $? != 0 ]; then

        # failing back to xterm
        xterm
        exit
fi

a=`dcop yakuake DCOPInterface selectedSession`
b=`dcop yakuake DCOPInterface selectedTerminal`

dcop yakuake DCOPInterface slotRunCommandInSession $a $b "cd `pwd`"

# this makes yakuake visible
dcop yakuake DCOPInterface slotToggleState


Now just rebind the F4 key call this script.

If you're lasy just like me just rm konsole and make a symlink

Code:

ln -s this_script.sh /usr/bin/konsole
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Sep 20, 2008 8:41 am    Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror Reply with quote

Nice post ld50. Couldn't it fall back to konsole?
Code:

#!/bin/sh
dcop yakuake DCOPInterface slotAddSession || exec konsole
a=`dcop yakuake DCOPInterface selectedSession`
b=`dcop yakuake DCOPInterface selectedTerminal`

dcop yakuake DCOPInterface slotRunCommandInSession "$a" "$b" "cd `pwd`"

# this makes yakuake visible
dcop yakuake DCOPInterface slotToggleState

I love yakuake, so this is nice, thanks :-)
Back to top
View user's profile Send private message
ld50
Tux's lil' helper
Tux's lil' helper


Joined: 13 Feb 2005
Posts: 135

PostPosted: Tue Oct 07, 2008 12:37 am    Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror Reply with quote

steveL wrote:
Nice post ld50. Couldn't it fall back to konsole?


I deleted konsole :P

I also found a bug, if the path has spaces it doesnt work, adding some double quotes fixes it:

Code:

#!/bin/sh
dcop yakuake DCOPInterface slotAddSession || exec xterm
a=`dcop yakuake DCOPInterface selectedSession`
b=`dcop yakuake DCOPInterface selectedTerminal`

dcop yakuake DCOPInterface slotRunCommandInSession "$a" "$b" "cd \"`pwd`\""

# this makes yakuake visible
dcop yakuake DCOPInterface slotToggleState
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Oct 15, 2008 10:42 pm    Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror Reply with quote

ld50 wrote:
I deleted konsole :P

Heh I always thought it was the same app underneath, but nm ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum