Hey,
I've been trying to find a way to change URxvt's background opacity on
the fly (with a keyboard shortcut).
I know I can change it using the escape sequence
printf "\033]11;$newbackgroundcolor\007" #for the background
printf "\033]708;$newbackgroundcolor\007" #background of the border
The problem is that I can't know the current value so that I can
change relative to it (increase or decrease).
The workaround I've found is to save the current value in a file, but
the problem is that, since all instances of URxvt will read and write
to the same file, I can't change opacities independently.
If you want to know exactly how I did it, read the bash script
(https://gitlab.com/-/snippets/2005314) I wrote.
It is simply called from a perl extension. It works.
So I went on to write a perl extension that first gets the value,
increments or decrements it, and then sets it.
I know I can get some resources with
my $var = $term->resource('resourceName');
but, as (not) said the man page
(https://linux.die.net/man/3/urxvtperl), neither 'background' nor
'borderColor' is a resourceName which can be obtained via this method,
although they are resources.
Notice that there is a perl extension out there that increases and
decreases the font size using that method
(https://github.com/majutsushi/urxvt-font-size)
As a side note, I also tryed using this script:
https://gist.github.com/blueyed/c8470c2aad3381c33ea3
and following the same idea of by bash script, change it.
Indeed it works as expected but only if called from the command line,
because when called from a perl extension using a keyboard shortcut,
the second 'stty' command freezes the terminal and nothing more
happens.
Is there anything that can be done about it?
Thanks.
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode