how to make rxvt start as fullscreen?

hero2008 picture hero2008 · Mar 20, 2012 · Viewed 7.7k times · Source

I can't find it within man page.
I am using rxvt-unicode-256color from debian squeeze mirror.
Gnome 3 environment, composite enabled in xorg.conf.

Answer

Chu-Siang Lai picture Chu-Siang Lai · May 23, 2013
  1. Install wmctrl

    $ sudo apt-get install wmctrl
    
  2. Create the extension directory

    $ mkdir -p ~/.urxvt/ext/
    
  3. Create a plugin for Rxvt

    $ vi ~/.urxvt/ext/fullscreen
    #!perl
    sub on_user_command {
        my ($self, $cmd) = @_;
        if ($cmd eq "fullscreen:switch") {
            my $dummy = `wmctrl -r :ACTIVE: -b toggle,fullscreen` ;
        }
    }
    
  4. Enable the plugin

    $ vi ~/.Xdefaults
    ...
    " Fullscreen switch
    URxvt.perl-ext-common:  fullscreen
    URxvt.keysym.F11:       perl:fullscreen:switch
    

Now, you can toggle fullscreen with the F11 key.


Reference: