Browse Source

added greentext.pl

auto colour greentext
master
shmibs 6 years ago
parent
commit
340401869c
4 changed files with 25 additions and 5 deletions
  1. +3
    -2
      banshee_np.pl
  2. +17
    -0
      greentext.pl
  3. +1
    -1
      notify_send.pl
  4. +4
    -2
      wat.pl

+ 3
- 2
banshee_np.pl View File

@@ -20,9 +20,10 @@ sub banshee {
}
if($name ne ""){
weechat::command($buffer, "/me is hearing: \N{U+266B} \x{03}$colours[1]$name\x{0f} by \x{03}$colours[2]$title\x{0f} from \x{03}$colours[3]$album\x{0f} \N{U+266B}");
#~ weechat::command($buffer, "/me is hearing: \N{U+266B} \x{03}$colours[1]$name\x{0f} by \x{03}$colours[2]$title\x{0f} from \x{03}$colours[3]$album\x{0f} \N{U+266B}");
weechat::command($buffer, "/me \N{U+266B} $name by $title from $album \N{U+266B}");
} else {
weechat::command($buffer, "/me has nothing in his ears )=");
weechat::command($buffer, "/me is too dumb to use scripts, apparently )=");
}
return weechat::WEECHAT_RC_OK;
}

+ 17
- 0
greentext.pl View File

@@ -0,0 +1,17 @@
use strict;
use warnings;
use utf8;

weechat::register ("greentext", "shmibs", "0.1", "GPL", "auto-greenify greentext", "", "");
weechat::hook_modifier("input_text_for_buffer", "catch_send", "");

sub catch_send {
my ($data, $modifier_name, $buffer, $rval) = @_;

if(substr($rval, 0, 1) eq ">") {
# greenify
$rval="\x{03}09".$rval;
}

return $rval;
}

+ 1
- 1
notify_send.pl View File

@@ -24,7 +24,7 @@ my %settings_default=(
'wait_pm' => [ '180', 'necessary time delay between private messages (seconds) for command to be executed' ],
'wait_highlight' => [ '60', 'necessary time delay between highlights (seconds) for command to be executed' ],
'ignore_nicks' => [ '', 'comma-separated list of nicks to ignore' ],
'command' => [ 'notify-send $type: $name', 'system command to be executed ($type, $name, and $message will be interpreted as values)' ]
'command' => [ 'notify-send -t 2000 $type: $name', 'system command to be executed ($type, $name, and $message will be interpreted as values)' ]
);
my %settings=();


+ 4
- 2
wat.pl View File

@@ -24,7 +24,9 @@ my @replacements = (
'marsupial', 'boots', 'guided', 'titillating', 'bonds',
'bequeathing', 'delineation', 'associators', 'ballpark',
'stultify', 'ionise', 'expanders', 'cybernetics',
'alluring', 'medicinal', 'bloom'
'alluring', 'medicinal', 'bloom', 'gross', 'diluted',
'fallopian', 'bituminous', 'drake', 'soupy', 'foreign',
'whisper', 'dread', 'clocked', 'blast', 'crunchy'
);

my $state="off";
@@ -39,7 +41,7 @@ sub toggle {
if($_[2] eq "off") {
$state="off";
}
return weechat::WEECHAT_RC_OK;
return weechat::WEECHAT_RC_OK;
}

# catch words as they are typed


Loading…
Cancel
Save