How to close several tabs in a pidgin conversation window from a script (some #general and #nickserv tabs). I tried using xdotool and devilspie but no result.
How to close several tabs in a pidgin conversation window from a script (some
Share
You can use Pidgin’s DBus API to close a conversation. See Pidgin’s DbusHowto. The following Python code closes all conversation windows with name matching the
to_closelist. (I tested this with IM usernames, but not with IRC chatroom names, so it may require some additional tweaking for your purposes.)Put the following at the top of your Python file to initialize the
purpleobject for communicating with Pidgin/Finch over D-Bus (from the DbusHowTo):For those of you who don’t like Python, here’s the same thing rewritten in
shusingpurple-remote(note thatfor argiterates over the arguments to the script):I am completely unsure how brittle that pipeline of
seds is, though. The Python seems much cleaner.