commit 8701ee1132b0214ede89e2af031fa11bf81b6157 parent 3bc3af9e5173d85f327ee60b53fa884402ad708b Author: Ed van Bruggen <edvb54@gmail.com> Date: Sun, 3 Apr 2016 21:54:17 -0700 Scale prog++ better to fit in the middle of the main monitor Diffstat:
dmenu-prog++.sh | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dmenu-prog++.sh b/dmenu-prog++.sh @@ -2,9 +2,10 @@ padding=100 -read screenw screenh <<<$(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $3, $4}') +screenw=$(xrandr | fgrep '*' | sed s/x/\ / | awk '{print $1}' | tail -1) +screenh=$(xrandr | fgrep '*' | sed s/x/\ / | awk '{print $2}' | tail -1) -let "bar_width = screenw/2 - (padding * 2)" +let "bar_width = screenw - (padding * 2)" let "height = screenh/2 - (padding * 2)" dmenu_run -x $padding -y $height -w $bar_width -p ">>>" -l 10