unexist.dev

View .urxvt/font @ 482:93ac94dc3feb

Updated config
author unexist
date Thu, 29 Nov 2018 09:25:32 +0100
parents a8961e5de1b1
children
line wrap: on
line source
                    
#!/usr/bin/perl

sub on_user_command
{
  my($self,$cmd) = @_;

  if($cmd eq "font:increase")
    {
      font_change_size($self, 1);
    }
  elsif($cmd eq "font:decrease")
    {
      font_change_size($self, -1);
    }
}

sub font_change_size
{
  my($term, $change) = @_;

  my($fontstring) =  $term->resource("font");
  $fontstring     =~ s/(\d*)$/$1 + $change/e;

  $term->cmd_parse("\033]710;$fontstring\007");
}