Open Yakuake here (like Open Konsole)

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
5 .8
Description:

### INSTALL ###

** Service Menu Use **
- Copy yakuakehere.sh in /usr/bin (ensure that it's executable)
- Copy yakuakehere.desktop in KDE_DIR/share/apps/konqueror/servicemenus/
- Restart konqueror and test it with MouseRight->Actions->Open Yakuake here

** Default system terminal emulator **
- Copy yakuakehere.sh in /usr/bin (ensure that it's executable)
- Open Kcontrol -> System Settings -> Default Applications -> Change the
terminal emulator to "yakuakehere.sh"
- Now, if you press F4 in konqueror a new session of yakuakehere is showed! :) Thanks to Contrast for the awesome idea!

Enjoy!

SkyQuakes

11 years ago

using yakuake4 on kde4 and it is running allways. simply tried to run yakuakehere.sh, but it says "Yakuake is not running". So what's problem with yakuake4 on kde4 ?

Anyone else tried on kde4 ?

Report

folgui

11 years ago

same here :(

Report

Contrast

12 years ago

...that bothers me is I can't seem to get this integrated with the hotkey for "Open terminal here," which is how I pretty much always invoked this action. I tried changing the default terminal emulator to "yakuakehere.sh %f" under System Settings -> Default Applications, but when I press F4 in Konqueror, Yakuake just opens in ~ after displaying this output:

clear
[email protected]:~$ cd '%f'
bash: cd: %f: No such file or directory
[email protected]:~$ clear

So obviously, %f isn't getting expanded to the actual working directory. What I can't figure out is WTH not, when it's doing it perfectly fine for Konsole. I've been trying to fix this for an hour or so without any progress (tried some minor tweaks to yakuakehere.sh, replacing /usr/share/apps/konqueror/servicemenus/konsolehere.desktop with yakuakehere.desktop, setting the default terminal emulator to yakuakehere-key.sh - a one-line script whose only command is yakuakehere.sh, and probably a couple other things I don't remember at this point). If anyone knows how to "fix" this, I'd be greatly appreciative.

Report

C

slux83

12 years ago

This hack is quite simple! :)

You have to put "yakuakehere.sh" as default system emulator, and change the script:

[code]
...

#!/bin/bash

################################################################################
# Author: Alessio 'Slux' Di Fazio <[email protected]>
# Author-website: http://www.capponcino.it/alessio
# License: GPL-v3
################################################################################

dcop yakuake

if [ $? != "0" ]; then
kdialog --error "Run Yakuake before"
exit 1
fi

#open a new session
dcop yakuake DCOPInterface slotAddSession

#get the id of the new session
sess_id=`dcop yakuake DCOPInterface selectedSession`

PWD=`pwd`
#build command
command="cd ""'"$PWD"'"

#run commands
dcop yakuake DCOPInterface slotRunCommandInSession $sess_id "$command"
dcop yakuake DCOPInterface slotRunCommandInSession $sess_id "clear"

#show the terminal
dcop yakuake DCOPInterface slotToggleState


...
[/code]

Report

C

slux83

12 years ago

the 1.1 version has this feature :)

Report

Contrast

12 years ago

Awesome, works perfect now. Thanks!

Report

ssokolow

12 years ago

Here's a little recommendation of mine for ensuring that slotToggleState doesn't end up hiding your already-shown Yakuake (something that's all to easy for users on dual-monitor setups)

#show the terminal
if [ `dcop yakuake yakuake-mainwindow#1 shown` == "false" ]; then
dcop yakuake DCOPInterface slotToggleState
fi

Report

dront78

12 years ago

Not working properly for me if semi-transparent schema is selected. It's only draw the text with 100% background transparency so it's impossible to work. I use standart window manager and nvidia drivers.

Report

C

slux83

12 years ago

It's strange... what version of yakuake you have?

have you tryed to run yakuakehere.sh some/path ?

@all: thanks for comments!

Report

Contrast

12 years ago

I seem to remember trying something like this that I saw on this site some time back, and not being able to get it to work properly. This does the job perfectly. Thanks!

Report

sede

12 years ago

"One of those things you always want to do 'when there is a few minutes time' but you never come around to..."
exactly! :)

Report

arkascha

12 years ago

Thanks for the idea. One of those things you always want to do 'when there is a few minutes time' but you never come around to...
So thanks !

Just a trivial improvement:
change to top lines to open yakuake if it is not yet running:

if [ $? != "0" ]; then
yakuake
else
dcop yakuake DCOPInterface slotAddSession
fi

Report

12345678910
1
product-maker jumper47 Feb 04 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
jesusda3rd
Jul 01 2020
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
1.1
updated Aug 07 2008
added Aug 07 2008
downloads 24h
1
mediaviews 24h 0
pageviews 24h 1
System Tags addon