-- ################################################################################################################################### -- This configuration file was created by Matt Grotke (mgrotke@gmail.com) for the "mgconky Conky Theme" project: https://github.com/mgrotke/mgconky -- This file is in the public domain. -- --------------------------------------------------------------------------------------------------------------------------------- -- TO RUN THIS CONKY CONFIG, YOU CAN TYPE THE FOLLOWING IN A TERMINAL: -- conky -c ~/.conky/mgconky/conf -- -- TO STOP CONKY, YOU CAN TYPE THE FOLLOWING IN A TERMINAL: -- killall conky -- -- TO HAVE THIS CONKY RUN EVERY TIME AT BOOT, GO INTO "STARTUP SOFTWARE" APP AND ADD THE FOLLOWING COMMAND WITH A DELAY OF 10 SECONDS: -- conky -p 10 -c /home//.conky/mgconky/conf -- NOTE: It seems you must actually use the full path (/home/) as the shortcut (~/) does not work. -- -- !!!IMPORTANT!!! THE FOLLOWING ARE REQUIREMENTS FOR THIS SCRIPT TO WORK PROPERLY: -- (1) DEPENDENCIES. -- Install the following software, if not already installed: -- "Conky" sudo apt-get install conky-all -- "Jq" sudo apt-get install jq -- "Curl" sudo apt-get install curl -- "Wget" sudo apt-get install wget -- "python3" sudo apt-get install python3 -- (2) FONTS. -- Install the following custom fonts: -- "Neuropolitical" Place .ttf file in ~/.fonts/ https://www.dafont.com/font-comment.php?file=neuropolitical -- "StyleBats" Place .ttf file in ~/.fonts/ https://www.dafont.com/search.php?q=StyleBats -- (3) SCRIPTS. -- Set the following included script(s) as executable: -- chmod +x ~/.conky/mgconky/weather/get_weather.sh -- chmod +x ~/.conky/mgconky/weather/parse_weather.sh -- chmod +x ~/.conky/mgconky/weather/parse_forecast.sh -- chmod +x ~/.conky/mgconky/stocks/get_stocks_alphavantage.py -- chmod +x ~/.conky/mgconky/stocks/process_stocks_alphavantage.py -- chmod +x ~/.conky/mgconky/stocks/get_stocks_finnhub.py -- (4) WEATHER. -- Make a free account at https://openweathermap.org/ -- Write down your API key, which is found on the "API keys" tab after you log in. (https://home.openweathermap.org/api_key -- Find your city's location ID by entering your CITY NAME in the search box and select your city from the search results. -- Your location ID will be the number in the URL (for example: https://openweathermap.org/city/5128581) -- In the config below, complete template0 through template3. -- (5) STOCKS. -- Unfortunately the days of using the Yahoo Finance API are over. It has been shut down. There are two APIs to choose from. -- Alpha Vantage and Finnhub. You will need an API key to use either. Both offer FREE services, but with restrictions. -- Alpha Vantage only allows 25 requests per day (!!!) for free. Finnhub allows 60 requests per minute for free! -- Both services are available here. With Alpha Vantage, we must set the interval to 7200 seconds. That means your stock prices -- will only update every 2 hours. It makes 1 request per stock, so only include 1 or 2 stocks if you are using free Alpha -- Vantage. If you go With FinnHub, you cannot get historical prices at all, unless you have a paid plan, but you CAN add many -- stocks, and you can update your stocks much more frequently. Complete template4 through template7 in the config below. -- ################################################################################################################################### conky.config = { -- Window and drawing properties alignment = "top_right", minimum_width = 225, maximum_width = 225, gap_x = 15, gap_y = 15, background = false, own_window = true, own_window_transparent = true, own_window_hints = "undecorated,below,sticky,skip_taskbar,skip_pager", own_window_type = "normal", double_buffer = true, draw_shades = false, draw_outline = false, draw_borders = false, draw_graph_borders = true, no_buffers = true, imlib_cache_size = 0, cpu_avg_samples = 2, update_interval = 1.5, total_run_times = 0, -- Define fonts use_xft = true, xftalpha = 0.9, override_utf8_locale = true, -- Force UTF8? Requires XFT (see above)... will display degree symbol, instead of °, etc. short_units = true, uppercase = false, -- Define Colors default_color = "#FFFFFF", -- white default_shade_color = "#000000", -- black default_outline_color = "#00FF00", -- green color0 = "#FFA500", -- Titles (orange) color1 = "#708090", -- Horizontal lines (slategrey) color2 = "#FFFFFF", -- Not used (white) color3 = "#00FF00", -- Values (lime) color4 = "#FFFF00", -- Important (yellow) color5 = "#00FF00", -- Bar graphs (lime) color6 = "#1E90FF", -- Good values (blue) color7 = "#FF0000", -- Bad values (red) -- Weather variables template0 = "", -- OpenWeatherMap API key (https://home.openweathermap.org/api_keys) template1 = "4467657", -- OpenWeatherMap City ID (the number in the URL of your city, for example: https://openweathermap.org/city/5128581) template2 = "imperial", -- Temp unit ("default" for Kelvin, "metric" for Celsius, "imperial" for Fahrenheit) template3 = "", -- Locale (e.g., "es_ES.UTF-8") # Leave empty for default -- Stock variables template4 = "", -- FinnHub API key (https://finnhub.io/) template5 = "