From 7c8abf339f6f103cf25d5f6c0d80bc6ae8ed75b6 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 27 Mar 2020 18:59:42 +0300 Subject: [PATCH] .xinitrc: calculate geometry for `xclock` --- .xinitrc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.xinitrc b/.xinitrc index 4a1b23f..664442e 100644 --- a/.xinitrc +++ b/.xinitrc @@ -76,10 +76,16 @@ synclient AccelFactor=0.1 MaxDoubleTapTime=80 MaxSpeed=1 RightEdge=5000 \ # start a small console shell #xterm -C -geometry 80x8-0+0 -n Console -T Consle -ls +ut -fn 6x10 & -#WIDTH=1024: 85x85+400+1 -#WIDTH=1600: 100x100+600+1 -#WIDTH=1920: 150x150+880+1 -xclock -geometry 100x100+600+1 -bg white -update 1 & +screen_width=`xrandr --current | head -1 | awk '{print $8}'` +if [ $screen_width = 1024 ]; then + xclcok_geom=85x85+400+1 +elif [ $screen_width = 1600 ]; then + xclcok_geom=100x100+600+1 +elif [ $screen_width = 1920 ]; then + xclcok_geom=150x150+880+1 +fi +test -n "$xclcok_geom" && xclock -geometry $xclcok_geom -bg white -update 1 & +unset screen_width xclcok_geom # multi-biff #xbuffy -fn '-*-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r' -geometry +0+125 -boxfile mail/misc/.xbuffyrc & -- 2.39.5