-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathskypenotify
executable file
·27 lines (21 loc) · 949 Bytes
/
skypenotify
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# Decription
# -----------
# Script to run append Skype messages in Notify OSD as shown on http://thexnews.com/uploads/notify.gif
# Since `x-canonical-append` is broken in notify-send for example in Skype you will wait forever untill all messages are shown
# This script makes new messages readable in same notification window
#
# [Readme in russian](http://thexnews.com/p/554)
# Author: [Dmitry](http://dmi3.net) [Source](https://github.com/dmi3/bin)
# Requirements
# ------------
# `wget https://raw.github.com/dmi3/bin/master/notify-append -P ~/bin && chmod +x ~/bin/notify-append`
# Usage
# -----
# `skypenotify "%sname" "%smessage"`
focused_id=`xprop -root | grep "window id" | grep _NET_ACTIVE | cut -d " " -f 5 | cut -c 3-10`
app_id=`wmctrl -l | grep "$1" | cut -d " " -f 1 | cut -c 4-10`
if [[ $focused_id != $app_id ]]; then
#If chat window not in focus send message
notify-append "$1" "$2" "skype" &
fi