Open shivankgarg98 opened 1 year ago
https://ibb.co/RDYtQhX - this is how it looks on my system using above position for yad.
Thanks for the solution!
If you have two monitors, the RESOLUTION_X
will output two lines, one for each, I added head -n 1
to select the first one (primary monitor).
RESOLUTION_X=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1 | head -n 1)
I guess there are many ways to make that more resilient, but it works for me.
Expected behavior
calendar(yad) dialog should display near calendar button when it is clicked on i3block.
Actual behavior
calendar dialog is displayed at right bottom if i3 bar position is set at top. It is far from i3block button and mouse pointer, making it unclickable.
i3blocks config relevant to blocklet(s)
[calendar] interval=30 LABEL= HEIGHT=180 WIDTH=220
Output of any relevant other commands that might help diagnostics
BLOCK_X, BLOCK_Y are not used properly to calculate calendar position.
Suggested Fix
Many people use calendar on upper right corner, using below suggestion can fix the issue (tested on my installation) Using multiple cases for different i3 bar position and checking screen constraint can give generic fix.