8

I am wondering if anyone knows a way to have the entire status bar in screen change when there is a bell alert inside a screen session.

Internally at my company we use jabber, and being that I work in a screen environment 90% of the day I use a command-line based chat client. When someone in our company sends me a message I don't always see the alert right away. Right now it underlines the session name, but sometimes that is hard for me to notice.

For what it is worth, I am using mcabber for my chat client. I know you can run commands in addition to sending a bell alert for new messages - if that would help make this work.

Here is my current .screenrc

startup_message off

screen
screen -t jabber mcabber
screen -t root
screen -t misc

bind  ! select 11
bind  @ select 12
bind \# select 13
bind  $ select 14
bind  % select 15
bind \^ select 16
bind  & select 17
bind  * select 18
bind  ( select 19
bind  ) select 10

hardstatus alwayslastline
hardstatus string '%{= kC}%{g}[%{G}%H%{g}]%{C}%?%-Lw%?%{Ck}%n*%f %t%?(%u)%?%{kC}%?%+Lw%?%= %{g}[%{B}%Y%m%d %{W}%c%{g}]'
2

You can pass through the beep from background screens to the foreground session by adding bell_msg "^G" to your .screenrc, also you can add a custom message, example:

bell_msg "^GScreeno numero % is a hollerin'"

Adding the ^G (Control+G) can be done in vi / vim by first pressing Control+V in insert mode, or in emacs by pressing Control+Q.

If you need to be notified of any activity on background screens you can add monitor on to your .screenrc, and customize the message with activity "Something happened on screen %", adding ^G here to ring the bell is also possible, but annoying.


If you are running it locally you can also simply set your chat client to use aplay to play an alert sound file, to distinct it from other beeps that could be less important.

If you run on a remote host you could make some reverse ssh portmapping to some custum service on the client side, and send sound through that, that would be over-course, but add a comment if you need such a solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.