Inspired and shamelessly copied code from https://github.com/ZeeshanLive/conky-publicip-widget
step 1 : Install conky and conky manager https://vitux.com/how-to-install-conky-and-conky-manager-on-ubuntu/
NOTE:
- The above link has example for Ubuntu 18, search for conky manager for your distribution.
- Don't start the conky yet.
step 2: clone the repository to the ~/.conky directory
step 3 : open conky manager under widgets you'll see the file publicip-widget please select that
step 4: once you have selected the widget a widget popup on the bottom right corner of the screen which will be checking your public ip, country every 3 seconds
step 5: make sure the widget gets started on every boot. Go to widget settings and select "run conky at system startup"