Conky is a lightweight system monitor that can be customized to display various information on your desktop. One of its many uses is creating a custom widget for RSS feeds, which allows you to stay updated with the latest news and articles from your favorite websites without having to open a browser. In this article, we will guide you through the process of using Conky in i3 to create a custom widget for RSS feeds.
Step 1: Install Conky
The first step is to install Conky on your system. Open the terminal and run the following command:
sudo apt-get install conky
Step 2: Install i3
If you haven't already, you need to install i3, a tiling window manager, which will be used to display Conky on your desktop. Run the following command in the terminal:
sudo apt-get install i3
Step 3: Create a Conky Configuration File
Now, we need to create a configuration file for Conky. Open a text editor and create a new file with the following contents:
conky.config = {
alignment = 'top_right',
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=10',
gap_x = 20,
gap_y = 60,
minimum_height = 5,
minimum_width = 5,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'normal',
own_window_transparent = false,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false
}
conky.text = [[
${execi 300 curl -s "https://example.com/rss" | sed -n '/- /,/<\/item>/p' | sed -n 's/.*
\(.*\)<\/title>.*/\1/p' | head -n 5}
]]
Save the file with a .conkyrc extension in your home directory.
Step 4: Configure i3
Next, we need to configure i3 to display Conky on the desktop. Open the i3 configuration file by running the following command in the terminal:
vim ~/.config/i3/config
Add the following line to the end of the file:
exec --no-startup-id conky -c ~/.conkyrc
Save and exit the file.
Step 5: Restart i3
Finally, restart i3 to apply the changes. Press Mod+Shift+R to reload the configuration.
Step 6: Enjoy Your Custom RSS Widget
That's it! You have successfully created a custom widget for RSS feeds using Conky in i3. You should now see the latest news and articles from the specified RSS feed on your desktop.
You can customize the appearance of the widget by modifying the Conky configuration file. For example, you can change the font, colors, and position of the widget by editing the appropriate settings in the configuration file.
Stay updated with your favorite websites without the need to open a browser by using this handy Conky widget!
References
| Reference | Link |
|---|---|
| Conky Documentation | https://github.com/brndnmtthws/conky/wiki |
| i3 User's Guide | https://i3wm.org/docs/userguide.html |