As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label notification. Show all posts

I use command-line a lot and sometimes a command takes time to execute. So, months ago, I started to use the following alias:
alias beeps='for i in {1..5}; do aplay -q /usr/share/sounds/generic.wav; sleep 0.5s; done'
I ran it like:
command ; beeps
I just left the command to run and came back when I heard the beeping sound. That alias was just ugly simple and did what I need: getting notified when the job is done. It's very help for running commands don't have notifications, which most command-line program wouldn't have. I just append the beeps after the commands, such as eix-sync, emerge, etc.

I updated the alias, so it would play different sounds depending on the exit status, also it retains the exit status after it plays the sound. Although, I don't think retain of exit status is really necessary, nonetheless it's not hard to implement and nice to have.
alias beeps='(BEEPS_RET=$? ; ((BEEPS_RET)) && BEEPS=error || BEEPS=generic ; for i in {1..5} ; do (aplay -q /usr/share/sounds/$BEEPS.wav &) >/dev/null ; sleep 1 ; done ; exit $BEEPS_RET)'
With pretty-print:
(
  BEEPS_RET=$?
  ((BEEPS_RET)) && BEEPS=error || BEEPS=generic
  for i in {1..5}; do
    (aplay -q /usr/share/sounds/$BEEPS.wav &) >/dev/null
    sleep 1
  done
  exit $BEEPS_RET
)
I use sub-shell to so the variables don't contaminate the current shell. This may look better by using function, but I started with alias, so continued with alias. If you wants to use function, just replace sub-shell with function, declare the variables are local, replace exit with return.

I just blocked this guy on Google+ after I received 7 notification within less 48 hours:


I don't use Google+, but didn't delete it, either. It becomes more like the typical so-call social networking websites, which has nothing to do with social engagements at all but spamming, pardon me, but it's just the fact.

This guy has 4,752 in his circle and 1,602 have him in circles, the number says all. The ratio is almost 2.97, people spam the add person to circle button just like on Twitter or Facebook.

Since I don't use Google+, I have no one in any circles. I checked up the notification setting. It seems even I set only Extended Circles can send me notification, but I still receive notifications. That settings seem only affect on post related stuff. In Receive notification section, that doesn't matter who the person does the action, you will always receive such notification.

When I first paid attention to Google+, I already had four people added me in their circles. I even posted telling not to add me, I still got added. Right now, 13 people have me, really don't know why people added me when there was no recent stuff posted.