Hotkey to Switch to Open Pidgin Window

started 9 months ago | 7 posts | 633 views | topic rss | latest reply
  1. The problem with assigning hotkeys to Pidgin is that the GTK system assigns all the window names similarly - and Pidgin makes the conversation window have the title with the name of the person you are currently talking to. So I wrote up a function that assigns Alt+P to switch to the Pidgin conversation window. (I'm using the Pidgin hotkeys plugin to assign a hotkey to open/close the buddy list)

    !p::
    {
    	DetectHiddenWindows, Off
    	SetTitleMatchMode,2
    	IfWinActive,ahk_class gdkWindowToplevel
    	{
    		IfWinActive Buddy List
    		{
    		}
    		Else
    		{
    		 PostMessage, 0x112, 0xF020,,, ahk_class gdkWindowToplevel, ;  0x112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE
    		}
    	}
    	Else
    	{
    		DetectHiddenWindows, Off
    		SetTitleMatchMode,2
    		IfWinExist, ahk_class gdkWindowToplevel,,Buddy List
    		{
    			WinActivate
    		}
    	}
    Return
    }

    This function isn't perfect, though - if the buddy list is currently active, you have to hide it before switching to the conversation window. If anybody can suggest a better way to do it, please respond!


    #
    howtogeek
    Reputation:176
    Posted 9 months ago

  2. Couldn't you change that IfWinActive to this:

    IfWinNotActive Buddy List
       PostMessage, 0x112, 0xF020,,, ahk_class gdkWindowToplevel, ;  0x112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE

    Would make the code shorter.


    #
    androider
    Reputation:7
    Posted 9 months ago

  3. This is a good one. Glad you figured out how to do it cause I could never get it to work right.

    Where is the hotkeys plugin at?


    #
    crazygeek
    Reputation:11
    Posted 8 months ago

  4. @crazygeek:

    You can find the hotkeys plugin here: http://pidgin-hotkeys.sourceforge.net/


    #
    howtogeek
    Reputation:176
    Posted 8 months ago

  5. Ohhh man I have wanted to do this forever. How do I install it?


    #
    Earel
    Reputation:4
    Posted 8 months ago

  6. @Earel

    Install AutoHotkey, then New -> AutoHotkey script from the context menu. Then paste it in, save, and double click on it.


    #
    Jaewan
    Reputation:3
    Posted 8 months ago

  7. Seems like you could use this technique for a lot of stuff


    #
    Brystan
    Reputation:5
    Posted 8 months ago

You must log in to post.

Daily Email Updates

Just want the best posts in your inbox for free? Enter your name and email below:

Name:
Email

About This Topic

Our Network
About Productive Geek