Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- menu status {
- $iif(!$away,$style(2)) Away in Titlebar
- .$iif(!%titlebar_ [ $+ [ $network ] $+ ] _autoset,$style(0),$style(3)) Show: { set -e %titlebar_ $+ $network $+ _autoset 1 | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] 0 1 check_titlebar_awaytime $network }
- .$iif(%titlebar_ [ $+ [ $network ] $+ ] _autoset,$style(0),$style(3)) Hide: { unset %titlebar_ $+ $network $+ _autoset | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off | check_titlebar_awaytime $network }
- }
- alias away {
- if ($1 == $null) && (%titlebar_ [ $+ [ $network ] $+ ] _autoset) { unset %titlebar_ $+ $network $+ _autoset | .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off | check_titlebar_awaytime $network }
- !away $1-
- }
- alias check_titlebar_awaytime {
- if (%titlebar_ [ $+ [ $1 ] $+ ] _autoset) {
- titlebar - You are currently away on $1 network. - (Reason: $awaymsg $+ ) - (AwayTime: $duration($awaytime) $+ ) .
- if ($timer([CHECK_TITLEBAR_ $+ $1 $+ _AWAYTIME]).pause) { .timer[CHECK_TITLEBAR_ $+ $1 $+ _AWAYTIME] -r }
- }
- else { titlebar $version }
- }
- ON *:DISCONNECT: {
- if (%titlebar_ [ $+ [ $network ] $+ ] _autoset) {
- unset %titlebar_ $+ $network $+ _autoset
- .timer[CHECK_TITLEBAR_ $+ $network $+ _AWAYTIME] off
- check_titlebar_awaytime $network
- }
- }
- ON *:ACTIVE:*: {
- var %w = $scid($lactivecid).network
- var %n = [CHECK_TITLEBAR_ $+ %w $+ _AWAYTIME]
- if ($network !== %w) {
- if ($timer(%n)) { .timer $+ %n -p }
- }
- check_titlebar_awaytime $network
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement