l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2004 Dec 28 10:53

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] Show & hide Konversation via dcop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] Show & hide Konversation via dcop



So I'm using Konversation as my main IRC client these days.

You can completely close the window without disconnecting from any
servers or channels you're in, which is a nice way to clear out screen
(and taskbar) real estate.

It shows a little icon in the sysem tray which flashes if there are any
new messages in channels I'm sitting in, and can show little call-outs
(that look like comic strip speech bubbles) with messages contain certain
words (like my nickname; so I know people are talking to me -- or about me).

Click the icon in the system tray, and the Konversation window reappears.

However, I'm pretty lazy when it comes to moving my hand from the keyboard
to the mouse, so I just whipped up a little shell script that uses KDE's
dcop system to ask Konversation to show itself (and raise itself, if it's
already showing).

I used the 'Keyboard Shortcuts' section of KDE's Control Center to assign
a keystroke to my shell script (which I had to first add to my K menu using
the KDE Menu Editor).  Go to Settings->Control Center, then in there
go to the Regional & Accessibility section and click Keyboard Shortcuts.

Once in Keyboard Shortcuts, go to the Command Shortcuts tab.
(There's actually a hyperlink to launch KDE's menu editor from there, too!)
Then go in and assign a shortcut!


Here's the simple shell script.  It will launch Konversation if it appears
it's not even running.  If it's running and hidden, it will show it
(and raise it, if it's already shown, but covered by other windows).
If it's running and shown, it will hide it.  (So this acts as a toggle,
just like the Konv. icon in the systray).

Enjoy!



---begin---
#!/bin/sh

KONV=`dcop konversation\* | head -1`

if [ "x$KONV" == "x" ]; then
  konversation
else
  SHOWING=`dcop $KONV konversation-mainwindow\#1 shown`

  if [ $SHOWING == "true" ]; then
    dcop $KONV konversation-mainwindow\#1 hide
  else
    dcop $KONV konversation-mainwindow\#1 show
    dcop $KONV konversation-mainwindow\#1 raise
  fi
fi
---end---


-bill!
bill@newbreedsoftware.com                               Have I been helpful?
http://newbreedsoftware.com/    http://svcs.affero.net/rm.php?r=billkendrick
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!