Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pseyfert committed Jul 27, 2018
1 parent 992071b commit 9dd5257
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions urxvt/shellex.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ sub get_outputs {
my @outputs = ();
for my $line (qx(xrandr --listactivemonitors)) {
next if $line =~ /Monitors: /;
# output looks like:
#Monitors: 2
# 0: +*LVDS-1 1366/277x768/156+0+0 LVDS-1
# 1: +HDMI-2 1920/518x1200/324+1366+0 HDMI-2

# output looks like:
#Monitors: 2
# 0: +*LVDS-1 1366/277x768/156+0+0 LVDS-1
# 1: +HDMI-2 1920/518x1200/324+1366+0 HDMI-2
my ($w, $h, $x, $y) = ($line =~ /(\d+)\/\d+x(\d+)\/\d+\+(\d+)\+(\d+)/);
print "found monitor with dimensions and position w=$w h=$h x=$x y=$y\n";
push @outputs, { w => $w, h => $h, x => $x, y => $y };
Expand Down

0 comments on commit 9dd5257

Please sign in to comment.