#!/usr/bin/perl =pod =head1 NAME w-toggle-full - toggle switch to put a window in full-screen mode =head1 SYNOPSIS w-toggle-full [I] =head1 DESCRIPTION I toggles _NET_WM_STATE_FULLSCREEN for the specified window; or, by default, for the currently active window. Note, this has the effect of forcing the window on top. It may be preferable, instead, to maximize and undecorate it using the window manager, if you might want other windows to appear over top of it. =cut use strict; use warnings; my $window_ID = shift; if( !defined $window_ID ) { $window_ID = `/usr/local/bin/w-get-active`; chop $window_ID; } exit 1 if $window_ID eq '0x0'; # none active system( "wmctrl -i -r $window_ID -b toggle,fullscreen" ); __END__ =pod =head1 AUTHOR Michael Allan =cut