Created
November 8, 2011 17:38
-
-
Save owais/1348487 to your computer and use it in GitHub Desktop.
Skype recent chat hotkey for linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import dbus | |
PLUGIN_NAME = "OpenLastSkypeChat" | |
bus = dbus.SessionBus() | |
skype_dbus_object = bus.get_object('com.Skype.API', '/com/Skype') | |
skype = dbus.Interface(skype_dbus_object, dbus_interface='com.Skype.API') | |
skype.Invoke("NAME %s" % PLUGIN_NAME) | |
skype.Invoke("PROTOCOL 8") | |
missed_chats = skype.Invoke("SEARCH MISSEDCHATS") | |
missed_chats = missed_chats.strip('CHATS ').split(',') | |
if missed_chats: | |
latest_missed_chat = missed_chats[0] | |
skype.Invoke("OPEN CHAT %s" % latest_missed_chat) | |
""" | |
# Put this scrip in /usr/bin or ~/bin or anywhere on PATH | |
# Use the following commands to bind keys | |
gconftool-2 -s /apps/metacity/global_keybindings/run_command_1 -t string "<Control><Shift>s" | |
gconftool-2 -s /apps/metacity/keybinding_commands/command_1 -t string "last-skype-chat" | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment