How Ubuntu implements screen-to-cut

  

In Windows, there is a multi-window mode that divides the screen into two equal parts, 4, but you want to split the Ubuntu system screen, you need to use a script to achieve. This article will introduce you to the screen-cutting skills in Ubuntu.

Installation wmctrl

sudo apt-get install wmctrl

installation shell script

#! /bin/sh

set -- $(xwininfo -root|  Awk -F ‘[ :]+’ ‘/(Width| Height):/{ print $3 }& rsquo;)

width=$1

height=$2

win1=$(xwininfo|  Awk ‘/^xwininfo: W/{ print $4 }& rsquo;)

win2=$(xwininfo|  Awk ‘/^xwininfo: W/{ print $4 }& rsquo;)

wmctrl -i -r $win1 -e 0,0,0,$((width/2)),$height

wmctrl -i -r $win2 -e 0,$((width/2)),0,$((width/2)),$height

Using the execution script, click to select 2 With two windows, you can tile the entire screen from left to right. According to this script, you can actually design a more complex segmentation scheme.

The above is the trick to implement window switching in Ubuntu. Install wmctrl and then execute the scripts listed in this article to split the screen into two or more windows.

Copyright © Windows knowledge All Rights Reserved