Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- вставь этот код в файл ~/.mcabber/mcabberrc
- set username = korodm@gmail.com
- set password = твой пароль
- set server = talk.google.com
- set ignore_self_presence = 1
- set ssl = 1
- set ssl_verify = 0
- set nickname = korodm
- set cmdhistory_lines = 250
- set events_command = ~/.mcabber/eventcmd
- set message_autoaway = Auto-away (idle)
- set escdelay = 50
- set event_log_files = 1
- set event_log_dir = ~/.mcabber/
- alias me = say /me
- alias online = status online
- alias away = status away
- alias dnd = status dnd
- alias notavail = status notavail
- #alias names = room names
- #alias topic = room topic
- # Set use_mouse to 1 to map mouse buttons like keycodes.
- #set use_mouse = 1
- # Key bindings
- # Ctrl-q (17) bound to /roster unread_next
- bind 17 = roster unread_next
- # Ctrl-x (24) bound to /roster alternate
- bind 24 = roster alternate
- # F5 (269) bound to /roster toggle_offline (centericq-like, IIRC)
- bind 269 = roster toggle_offline
- # F12 (276) bound to /roster toggle
- bind 276 = roster toggle
- # Ctrl-Up/Ctrl-Down bound to /buffer up/down (like Ctrl-p/Ctrl-n)
- bind 521 = buffer up
- bind 514 = buffer down
- # Sample alias to join mcabber channel with "/jmc"
- #alias jmc = room join mcabber@conf.lilotux.net
- set color_background = white
- set color_general = black
- set color_info = blue
- set color_msgin = cyan
- set color_msgout = black
- set color_msghl = magenta
- set color_bgstatus = black
- set color_status = white
- set color_roster = black
- set color_bgrostersel = black
- set color_rostersel = white
- set color_rosterselmsg = red
- set color_rosternewmsg = red
- set log_win_height = 1
- set roster_width=15
- set log_win_on_top = 1
- set roster_win_on_right = 1
- set time_prefix = 1
- Потом вот этот код вставь в файл ~/.mcabber/eventcmd
- #!/bin/bash
- event=$1
- arg1=$2
- jid=$3
- msg_file=$4
- web_browser="firefox"
- # Проверка того, стоит ли удалять файл, переданный
- # четвертым параметром :-)
- del=$(echo "$msg_file" | grep -c 'mcabber-')
- [ "$del" -eq 1 ] && trap "rm $msg_file" 0 1 2 3 6 9 14 15
- # Если пришло входящее сообщение
- if [ "$event" = "MSG" -a "$arg1" == "IN" ]; then
- # Воспроизводим звук
- # ...
- # Сигнализируем о том, что было получено новое сообщение
- notify-send "mcabber: message from $jid" &
- # Ищем url в полученном сообщении и открываем в
- # web-обозревателе
- if [ -f "$msg_file" -a -r "$msg_file" ]; then
- cat $msg_file | grep -E -o '(http|https|ftp)\://([a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})(:[a-zA-Z0-9]*)?/?([а-яА-Яa-zA-Z0-9\._\?\,\\x27/\\\+&%\$#\=~!\-])*' | \
- while read url; do
- (sleep 1 && $web_browser $url) &
- done
- fi
- fi
- Потом выполни следущие команды:
- chmod +x ~/.mcabber/eventcmd
- mkdir ~/.mcabber/history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement