View previous topic :: View next topic |
Author |
Message |
ld50 Tux's lil' helper
Joined: 13 Feb 2005 Posts: 135
|
Posted: Fri Sep 19, 2008 5:55 pm Post subject: Tip: Open a yakuake tab instead of konsole in konqueror |
|
|
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 |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sat Sep 20, 2008 8:41 am Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror |
|
|
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 |
|
|
ld50 Tux's lil' helper
Joined: 13 Feb 2005 Posts: 135
|
Posted: Tue Oct 07, 2008 12:37 am Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror |
|
|
steveL wrote: | Nice post ld50. Couldn't it fall back to konsole?
|
I deleted konsole
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 |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Oct 15, 2008 10:42 pm Post subject: Re: Tip: Open a yakuake tab instead of konsole in konqueror |
|
|
ld50 wrote: | I deleted konsole :P |
Heh I always thought it was the same app underneath, but nm ;) |
|
Back to top |
|
|
|