Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Not as glamourous but a one-liner' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Not as glamourous but a one-liner
Authored by: SOX on Feb 11, '09 02:32:40PM
defaults read /Library/Preferences/com.apple.windowserver | perl -nwe 'chomp;chop;print "$_\n" if m/^\s+(Height|Width|OriginX|OriginY|Unit)/; print "\n" if m/\}/'
This prints out groupings like this:

                Height = 1024
                OriginX = 0
                OriginY = 0
                Unit = 1
                Width = 1600

                Height = 900
                OriginX = 336
                OriginY = 1024
                Unit = 0
                Width = 1440


[ Reply to This | # ]
Not as glamourous but a one-liner
Authored by: Cerberus on Feb 21, '09 08:40:18AM

This works for me, but the main one does not... I am usually a good debuger but AWK gives me a headache ;-)



[ Reply to This | # ]