Search code examples
rxvt

how to make rxvt start as fullscreen?


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.


Solution

    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: