Home Page
Projects > Status Hot Keys
Search:
Status Hot Keys Thumbnail
Status Hot Keys v1.5.2
Completed
A Pidgin plugin that utilizes global shortcut keys (hotkeys) to set status and manipulate the buddy window visibility
Rating: 9 (I feel I’ve made it configurable enough now that it could be useful to a lot of people.)
Project Time: 1/1/2010-1/18/2010: 25
Languages: C
Requirements: Pidgin
Downloads: Binary Source (See any updates below for prior versions)
Sections: Information, Content, Concepts, Notes, Updates, Comments
Information
Dynamically configure any global hot key to: Set availability status (message can be chosen many ways including via a popup); Move pidgin Buddy List to top/bottom of windows; Hide the Buddy List window or taskbar window.
Content
This Pidgin plugin has the following functionality, accessible through user-set global shortcut keys:
  • Set status per hot key action, configurable as follows through the configuration dialog:
    • Set Status State:
      • KEEP CURRENT: Does not change the current “Status State”
      • Offline: Disconnects
      • Available, Away, Do Not Disturb, or Invisible: Also sets online if currently offline
    • Set Status Message:
      • Keep Current Message: Does not change the current “Status Message”
      • Static Message: Sets to a pre-user-defined message
      • Last Non-Empty Message: Sets to the last “Status Message” that was not blank
      • Prompt with Static Message: Prompts user to enter the message via a popup dialog. The default in the prompt is a pre-user-defined message
      • Prompt with Last Non-Empty: Prompts user to enter the message via a popup dialog. The default in the prompt is the last “Status Message” that was not blank
    • Focus Buddy List: Buddy List is set as the focused window
    • Hide Buddy List: Buddy List is hidden (still accessible through the Task Tray Icon/Docklet)
    • Set Buddy List as Bottom Window: Move Buddy List below all other windows
    • Toggle Taskbar Visibility: Turns on/off the current visibility of the Buddy List in the taskbar
    • Show Pending Conversation: This shows the current pending conversation (like when clicking on the task tray [docklet] icon for an unread message)
  • Other functionality:
    • Define Buddy List taskbar visibility for when Pidgin starts up
    • Toggle taskbar visibility through the Pidgin menu

Screenshots:
Status Hot Keys v1.5 Configuration Dialog Screen Shot Status Hot Keys v1.5 Prompt for Message

Installing:
  1. Copy the StatusHotKeys.dll (StatusHotKeys.so in Linux) to either:
    • Your Pidgin plugins directory
      • In Windows: Most likely at “C:\Program Files\Pidgin\plugins”
    • Your Pidgin profile plugins directory
      • In Windows: Most likely at “C:\Documents and Settings\USERNAME\Application Data\.purple\plugins”
      • In Linux: “~/.purple/plugins” (the directory may need to be made)
  2. Run Pidgin and go to: Pidgin Menu > Tools > Plugins
  3. Activate “Status Hot Keys”

Compatibility:
  • This has been fully tested and confirmed working using Pidgin 2.6.4 in:
    • Windows XP SP2
    • A default install of Ubuntu [Linux] v9.04 [Gnome]
    • A default install of Slackware [Linux] v13.0 [KDE]

How to Use:
  • Add a Hot Key Action:
    1. Set up the Shortcut Key by selecting its box and pressing the key you wish to use (including “Ctrl”, “Alt”, “Shift”, or “Win” keyboard modifiers). The “Local Only” option, which will allow setting shortcut keys that are only accessible when the buddy list has focus, is currently unsupported.
    2. Choose the configuration options that you would like to use for either a “Set Status” or “Set Other” action and click the “add” button besides the one you wish to add
  • Delete/Modify a Hot Key Action:
    1. Select an action from the list
    2. After an action is selected, you can “delete” or “edit” it by clicking the appropriate button. Both buttons remove the action from the list, but “Edit” transfers its settings into the “Add Hot Key” section
  • Using a Hot Key:
    • Just press the appropriate hot key to run the action from anywhere in your window environment
    • Note that a hot key in an operating system can only be hooked once. If another application already owns the hot key, the hot key action cannot be triggered in this application until it is added again or the plugin is reloaded, assuming the other application no longer owns the hot key

Defaults:
  • These defaults are set whenever the plugin is loaded and no hot key actions are found.
  • State Message Hot Key
    Away afk or unavailable Ctrl+Shift+a
    Available NO MESSAGE Ctrl+Shift+b
    Offline NO MESSAGE Ctrl+Shift+d
    Away PROMPT:afk Ctrl+Shift+s
    --OTHER-- Focus Buddy ListCtrl+Shift+t
  • Buddy List taskbar hidden upon startup: TRUE

Compiling:
  • The libraries and includes for the following libraries/products are required: Pidgin (Download) [includes libpurple], GLIB and GTK (Download), Cairo, Pango, ATK
  • In Windows:
    1. Mingw-gcc and Cygwin are both required
    2. Edit the “USER CONFIGURATION” section in the config.windows file
    3. In Cygwin in your “StatusHotKeys” directory run “make install” (if it doesn’t detect you are on Windows, run “make install OS=win”)
  • In Linux:
    1. Edit the “USER CONFIGURATION” section in the config.linux file
    2. In your “StatusHotKeys” directory run “make install

  • List of Make Targets:
    • make: Calls “make lib”
    • make lib: Compiles the plugin file (which is a DLL or shared object [library file])
    • make install: Calls “make lib” and copies the plugin file to an appropriate directory
    • make uninstall: Removes the plugin file from the directory it was installed to
    • make exe: Makes a test bed executable to experiment with the project without having it interface with Pidgin
    • make test: Calls “make exe” and runs the executable
    • make clean: Removes everything created by any of the above make targets

  • Troubleshooting compiling:
    • Make sure the “Compile” directory exists inside the “StatusHotKeys” folder
    • In Windows, the needed library files (gtk, glib, libpurple, etc) might be improperly renamed for use with GCC. If anyone needs help with this, I can add a write-up for it
    • I’ll add to this as things come up :-)
Concepts
GUI Design
Notes
I hate branching library dependencies ^_^ (and creating GUIs!)
Updates
Status Hot Keys: Show Pending Conversation Action @ 2010-02-18 18:33:07 - Download

Per a user request, The “Show Pending Conversation” action has been added. This shows the current pending conversation (like when clicking on the task tray [docklet] icon for an unread message).

Download: v1.5.2 Binary, Source

Status Hot Keys v1.5.1 - Window Z-Order Fix @ 2010-01-18 03:36:08 - Download

This will probably be my final update (v1.5.1, binary, source) on this project for a while unless other bugs are found, or enough interest is generated on a specific request by enough people.

The problem with window raising/lowering in KDE is now fixed. GTK/GDK was not acting how it was supposed to in regards to focusing and changing window Z-order (gdk_window_lower/gdk_window_raise/gdk_window_focus/gtk_window_present) and I had to add a very hack-ey solution to get it working in both Gnome and KDE. It’s not a pretty or elegant solution, but it works. It also still won’t give focus to the Buddy List window when it is raised in KDE, but I feel the end result is close enough for government work.


I’m going to go ahead and announce it today by adding it to the Pidgin plugin wiki :-). I’m finally interfacing with the rest of the open source world, yay! XD


Oh yes, I forgot to add something on my last update post. I originally had planned to also add an option so that double clicking the taskbar/docklet icon would always open the Buddy List instead of toggling visibility. This was unfortunately not possible due to how Pidgin is programmed. I found exactly where the problem was, and know how to fix it by modifying the Pidgin source (probably by generating a signal for an event), but I am not really interested in trying to get a patch pushed through for that on Pidgin, so alas.

Status Hot Keys v1.5 @ 2010-01-17 12:09:46 - Download

I’ve updated the project (v1.5, binary, source) to where it’s not even recognizable from its last version :-). A configuration dialog has been added so that everything can now be set dynamically. It’s very configurable to let people work with Pidgin quickly through global shortcut keys however they want to. Any status change or showing/hiding the buddy list can be done without using the mouse, which is how I personally like to work with computers, as it is much faster ;-).

This update ended up taking a lot more hours (and many many many more lines of code [~1500]) than I planned on because I had to learn how to work with multiple libraries from scratch (GTK, Pidgin, GLib, X11). I learned a lot though, and that, and seeing how different people set up their APIs/libraries, is always fun.

I’ll probably be adding this to the Pidgin 3rd party plugins Wiki in the next few days. I might want to fix a few bugs first though (KDE might be messing some things up).

Status Hot Keys (for Pidgin) v1.00 @ 2010-01-02 23:51:01 - Download

I started this Pidgin plugin yesterday and had just finished it right before going to sleep, so I finally now have the time to post it ^_^ (v1.0, binary, source). The goal of this project was to fill in some gaps in Pidgin that were features I had in Trillian.

This plugin allows the user, using global shortcut keys, to set their status state and message, show the buddy list, and toggle the buddy list visibility on the taskbar.

It currently only works in Windows, as that was my primary concern and I need to get a Linux test environment set up to finish it. I had to use Window’s specific APIs for the taskbar visibility and HotKey functionality, as “gdk_window_add_filter” (for the HotKeys) and “gtk_window_set_skip_taskbar_hint” (for the TaskBar visibility) do not seem to work in Windows.

It is also only configurable through the source itself, at the moment, but I should hopefully soon be adding a configuration dialog with the following abilities:

  • The ability to set multiple [away] status states with messages (or leave the message alone)
  • Choose whether to start the Buddy List as visible or not on the taskbar
  • Configure as many events as you want against hot keys, which don’t have to use ctrl+shift, and may be able to be just triggered locally when the buddy list has focus (which also need to check for conflicts)
Controls/Use (Included in this update since this information will be changed in the next version):
  • All of the functionality can be accessed through: Pidgin Menu > Tools > Status Hot Keys
  • Global Shortcut Keys
    AwayCtrl+Shift+A
    Back [Available]Ctrl+Shift+B
    Disconnect [Offline]Ctrl+Shift+D
    Show Pidgin Buddy ListCtrl+Shift+P
    Toggle Buddy List in TashbarCtrl+Shift+T

License: I am unsure if Pidgin plugins need to also be licensed under the GPL, as I am not using any of their files beyond linking to the headers. I am including their copy of the GPL from the main directory of the Pidgin source code in the file “COPYING”, just in case. I am considering this to be under the Dakusan License though until I found out if it definitely needs to be GPLed.

Comments
To add comments, please go to the forum page for this project (guest comments are allowed for the Projects, Posts, and Updates Forums).
Comments are owned by the user who posted them. We accept no responsibility for the contents of these comments.

Re: Status Hot Keys on 02/14/10 7:09am by RestorePosts
[Posted by unknown romb]

Thanks :) That's what i needed ;)
But ... for me and other guys  migrated from miranda it would be great to have one more useful feature  :) I'm talking about assigning a hotkey to focus proper chat tab/window  when there are pending unread messages (tray icon flashes).
Thanks again :)
Re: Status Hot Keys on 02/15/10 2:27pm by Dakusan
This should be relatively easy. I'll look into getting that done in the very near future :-).
Re: Status Hot Keys on 02/22/10 1:17am by RestorePosts
[Posted by Pennidren]

Great project man!
Minor request if you have the time; I think it'd be  easy enough.
Can you add, in addition to Focus Buddy List and Hide Buddy  List, a Toggle Buddy List that will show/hide back and forth as  appropriate?  It would complete the package for me :)
Re: Status Hot Keys on 02/22/10 2:59am by Dakusan
Do you mean like when double clicking the taskbar/docklet icon? If so, sure, I should be able to get that one done within a few days when I have the time.

FYI to romb, if you hadn't noticed, I got your request online 3 days ago :-) (figured I should mention it here too).

[Edit on 2/27/2010] Waiting to here if that is what you are asking for x.x;
Re: Status Hot Keys on 03/10/10 4:30pm by mihai.birsan
Hello, Dakusan.

Thanks for the great project! It's the perfect replacement for the recently unmaintained pidgin_hotkeys plugin.

Just like romb I was looking for the "switch to most recent message" hotkey option, so thanks for implementing!

And like Pennidren I'd love the "Toggle" option. However, I'd love it worked like "Activate or Hide", namely: Focus the Buddy List if it's not focused; hide it if it's focused.

Thanks again!
Re: Status Hot Keys on 03/14/10 1:12am by Dakusan
One of the problems is that I don't want to make the number of possible options bloated and confusing, and adding in too many ways to hide/display the buddy list might do that... Technically implementing either of these would already be duplicating functionality (hide/show can be bound to separate keys...).

Even so, I think it would be good to go ahead and implement at least one of the two... and I'm thinking the toggle visibility (not paying attention to focus) would be more useful to people.

I guess I COULD add both... but I have had a past bad habit of adding too many features in my apps and causing bloat (not code, but user interface), and I'm trying to avoid that nowadays. x.x;

Any thoughts anyone? If I don't hear anything convincing in the near future, I'll probably add a hotkey to duplicate the functionality of double clicking the task tray icon.


On another note, I already have the option to stop displaying the buddy list in the task tray... and I'm thinking about adding another option to not have it show up in alt+tab. This would take a large rewrite of the functionality of a few sections though and I'm not sure if I want to deal with that without the pressing need to, heh. Would this be really useful to anyone? (Not that I'm necessarily expecting many people to see this :-(. Original intent of this site was to get a large user base going but then I never pushed or advertised it, bleck).
Re: Status Hot Keys on 11/05/10 10:20pm by Dakusan
I just installed a copy of Ubuntu 10.10 in vmware with Pidgin 2.7.3 to confirm this and focusing the buddy list (ctrl+shift+t by default) seems to work for me?
Re: Status Hot Keys on 02/14/11 9:52pm by Dakusan
Nope, sorry. Since there are so many Linux distributions you generally can't compile one "universal binary" like you can for windows. It's one of the downsides of Linux, but they go with a different paradigm for it via package management systems. Someone would have to make a package of it for your specific distribution for that to be possible. That being said, if you are running Unbuntu (just a guess), I think all you have to do (if memory serves) is extract the source, edit the "INSTALL_PATH" in config.linux to point to your libpurple user directory (hopefully it should already be right), and then run "make install".
Re: Status Hot Keys on 09/27/12 3:00am by RestorePosts
[Posted by unknown user]

Says "Error: ABI version mismatch 2.6.x (need 2.5.x)Check the plugin website for an update."
Re: Status Hot Keys on 09/27/12 5:07pm by Dakusan
Sigh. A pidgin version update must have broken compatibility. I'll look into getting this recompiled and/or fixed in the next few days. Thanks for the report.
Re: Status Hot Keys on 09/28/12 2:45am by Dakusan
I installed the latest version of pidgin on a fresh windows install and could not reproduce the problem. Could you give me more information that might help me reproduce this? Operating system version and CPU type (x86 or x64)? If there is any other information that might help me diagnose it?

If you are running linux, you might check this thread: https://developer.pidgin.im/ticket/14490
Re: Status Hot Keys on 01/04/13 10:39pm by proxy
Dakusan, are you still open for user feature requests with this plugin?

When Status Hot Keys is the only plugin for binding hot keys to focus buddy list I'm missing feature that Meta Key (Windows Key in my mind) works as modifier, like CTRL, ALT, SHIFT guys.

Or is it even possible to make Meta Key as a modifier?

Best regards,
~proxy
Re: Status Hot Keys on 01/05/13 8:22pm by Dakusan
Strange, I checked the code and it looks like it was programmed to accept the windows key as a meta/bucky key. I tested it myself and I have confirmed it does not seem to be working as intended with that. To help me narrow down the problem, what operating system are you using? Do you happen to be using apple hardware?
Re: Status Hot Keys on 01/05/13 10:21pm by proxy
I'm using up to date Win7 with standard Windows keyboard layout.

Windows Key is detected correctly as Meta_L so the problem is not in hardware.

Just can't make 'Meta_L + w' combination.
Re: Status Hot Keys on 01/11/13 9:12pm by Dakusan
I'm betting this is due to the GTK command key mappings being changed in a new version, or maybe on Windows 7.

This should theoretically be fixable by adding values in Config.c lines 179-181 to the ends of the GDKControlMasks, ControlMasks, and ControlKeyValues variables.

Add to the end of "GDKControlMasks" one of the values from: http://developer.gnome.org/gdk/stable/gdk-Windows.html#GdkModifierType
Add to the end of "ControlMasks" another "MODK_WIN"
Add to the end of "ControlKeyValues" 2 appropriate values from: http://docs.adacore.com/gtkada-docs/gtkada_rm/gtkada_rm/gdk-types-keysyms.ads.html (Maybe "GDK_Meta_L" and "GDK_Meta_R"?)

I'll have to get my development environment set back up to figure out what the values should be for me, and hopefully for you, and release a new version. Not sure when I'll get to this, but maybe soon. If you want to try to compile the code yourself you might be able to figure it out too.
Re: Status Hot Keys on 01/15/13 9:47pm by Dakusan
This is fixable by editing the preferences directly (See last part of this post), as this is just a problem with the configuration section.

I went ahead and got my development environment set up and the problem tested. Unfortunately, this looks like a problem with either our hardware (I am suspect since I am running on mac hardware w/ EFI), or GTK itself. GTK isn't detecting the windows key at all as a meta key (like shift, alt, or ctrl), so I would have to do some major changes in that section to program around this. A new version of GTK may have this fixed. This report looks like it may be promising.

So I'll have to experiment with newer versions of GTK later and see if these are compatible with pidgin to fix this...

I wouldn't hold your breath on this getting fixed any time soon though, sorry.

However, you can manually set your own keyboard shortcuts that will work directly with windows by editing your prefs.xml (C:\Users\USERNAME\AppData\Roaming\.purple\prefs.xml) WHEN PIDGIN IS CLOSED. Search for "<pref name='StatusHotKeys'>" and then edit the associated "Action#_Key" by adding 524288 to its number to add the win key. I have tested and confirmed this works.