aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/chwp
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-07-17 11:30:31 +0200
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 11:59:40 +0200
commitca69a254f8351e0a23c86ee8075a33ec8c7e7503 (patch)
treee21013d177be70c254211c92fc95bd9ecebdb671 /.local/bin/chwp
parent9f6c0fbbdbd0d60ac629f0c38effd97a3ff48b6b (diff)
Update X configs
Diffstat (limited to '.local/bin/chwp')
-rwxr-xr-x.local/bin/chwp16
1 files changed, 3 insertions, 13 deletions
diff --git a/.local/bin/chwp b/.local/bin/chwp
index c25078a..0bec61b 100755
--- a/.local/bin/chwp
+++ b/.local/bin/chwp
@@ -1,4 +1,4 @@
-#! /usr/bin/env sh
+#!/bin/sh
main()
{
@@ -55,18 +55,8 @@ make_pape()
xrandr -q | grep -F ' connected ' > "$monitorlist"
- while read -r monitor
+ for resolution in $CHWP_MONITORS
do
- if [ -f "$HOME/.local/etc/x/chwp-filter" ]
- then
- if printf "%s" "$monitor" | grep -qf "$HOME/.local/etc/x/chwp-filter"
- then
- printf "Filtering %s\n" "$monitor" >&2
- continue
- fi
- fi
-
- resolution="$(printf "%s" "$monitor" | grep -Eo '\b[[:digit:]]+x[[:digit:]]+')"
current_pape=$(get_pape "$resolution")
if [ "$current_pape" = "" ]
@@ -81,7 +71,7 @@ make_pape()
unset resolution
unset current_pape
- done < "$monitorlist"
+ done
# shellcheck disable=SC2046
# shellcheck disable=SC2086