diff options
Diffstat (limited to 'mga-bg-res/mga-bg-res.xinit')
-rwxr-xr-x | mga-bg-res/mga-bg-res.xinit | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mga-bg-res/mga-bg-res.xinit b/mga-bg-res/mga-bg-res.xinit new file mode 100755 index 0000000..d3dd2dd --- /dev/null +++ b/mga-bg-res/mga-bg-res.xinit @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/bin/mga-bg-res $( xrandr | awk '/\sconnected/{i=split(substr($0,0,index($0,"+")-1),a);if($0~/\sprimary\s/){if(p==""){p=a[i]}}else{if(d==""){d=a[i]}}}END{if(p==""){print d}else{print p}}' ) |