Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- my @windows = `wmctrl -l | cut -d ' ' -f1`;
- my @desktops = `wmctrl -l | cut -d ' ' -f3`;
- #my @windows2 = ("0x01600029","0x01400003","0x00c00126","0x0180000d","0x02000003");
- my $j_atual = `xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" | cut -d ' ' -f5`;
- my $d_atual = `xprop -root | grep "_NET_CURRENT_DESKTOP(CARDINAL)" | cut -d ' ' -f3`;
- $j_num = @windows;
- $ind = "0";
- $g_to = @windows[$ind];
- if ( $j_atual ne $g_to )
- {
- print "ne\n";
- print "Indo Para $g_to\n";
- system("xdotool windowactivate $g_to");
- exit;
- }
- if ( $j_atual eq $g_to )
- {
- print "le\n";
- $ind = ++$ind;
- $g_to = @windows[$ind];
- print "Indo Para $g_to\n";
- system("xdotool windowactivate $g_to");
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement