View previous topic :: View next topic |
Author |
Message |
phoenix_me Apprentice
Joined: 24 Dec 2003 Posts: 281 Location: Lubliniec
|
Posted: Tue Oct 24, 2006 8:54 am Post subject: Hiding the application in KDE environment |
|
|
Is it any chance or possibility to "hide" an application in KDE environment.
What I mean "hide"...
for example when you are using a "Kate" - you can find this running application on 'screen' or on the 'taskbar', hide - mean for me - to be able to hide such application, so it won't be visible either on screen or taskbar, and the only way to call such application will be some keys combination.
It something like 'services' in WinXP or 'deamons' in Linux ... but with possibility hide them and call them back to desktop. _________________ phoenix
___
myslenie ma przyszlosc
___ |
|
Back to top |
|
|
manouchk Apprentice
Joined: 08 May 2006 Posts: 288 Location: Vitória (ES), Brasil
|
Posted: Wed Oct 25, 2006 11:14 pm Post subject: |
|
|
look after dcop.
For example if you have a konqueror instance, running dcop, you would obtain :
konqueror-7051
then running dcop konqueror-7051 :
...
I thought
dcop konqueror-7051 konqueror-mainwindow#1 hide
would hide konqueror, here with enlightement, it does not work, but maybe it will work in kde?
to restore :
dcop konqueror-7051 konqueror-mainwindow#1 restore
... |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Thu Oct 26, 2006 12:14 am Post subject: |
|
|
Mmm, it is not easy, and certainly dcop can help a bit with qt programs in a direct manner, but dont forget that not all programs do have a dcop interface.
In the case of most kde programs you can do something like:
Code: |
# !/bin/sh
# khide.sh - uses dcop to hide all instances of a given application
# Argument required: program to hide
PROG_NAME=$1
COMMAND=dcop
if [[ -n $PROG_NAME ]]
then
for i in `dcop | grep -i $PROG_NAME`
do (
COMMAND="$COMMAND `dcop | grep -i $PROG_NAME`"
COMMAND="$COMMAND `$COMMAND | grep -i mainwindow` hide"
$COMMAND
)
done
else
echo Please, provide a program name to hide.
fi
|
Just turn "hide"s into "show"s, and you will have the show.sh script, save one like show.sh and the other like hide.sh, give them +x permissions, then you can hide konqueror or kmail or any other program using a -moreless- standard dcop sintaxis just like doing "./hide.sh konqueror" in command line, or "./show.sh konqueror" to get the reverse effect. Or you can bind this to keystrokes
Still, this is a quick hack that came to mind, I am not a dcop gurú nor plan to. So, it might not work for most programs, but, if it works, it will effectively hide/show all the instances of a given program.
Maybe any dcop expert can give a better solution, though I really doubt that dcop can help in all the situations. Oh, by the way, this will still not hide the app icon in the tray, if there is one. It will hide the taskbar entry, though.
Still, the script is easy enough to work with any program, and it could be extended to hide tray icons, that should not be difficult for a concrete program. If you only want to hide/unhide a concrete program or a couple of them there should be no program coding separate scripts for each one, instead of this shitty parametrization attemps that I did as a quick example.
An alternate solution could be to hide those apps in a "secret" desktop, you can send any application to a given desktop by right clicking in the tittle bar and selecting the correct option, then you can configure that app not to appear in the taskbar, pager and task cicling thingie. And then define a key combo to go to that other desktop. You need to disable the pagers so others cant go to the rest of the desktops just clicking on it, of course, that is a crappy way to do it. |
|
Back to top |
|
|
|
|
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
|
|