A custom Waybar module that displays recent Arch Linux news from the official RSS feed with customizable styling and colors.
- π° Fetches latest Arch Linux news from official RSS feed
- β° Configurable time period (default: 7 days)
- π¨ Customizable colors via command line arguments
- π±οΈ Click to open Arch Linux news page
- π Shows count of recent news items
- π‘ Detailed tooltip with news headlines and dates
- π Auto-refresh every hour
- β‘ Lightweight and efficient, written in Bash
curlxmlstarletjq
-
Clone this repository:
git clone https://github.com/SherLock707/arch-news-waybar.git cd arch-news-waybar -
Make sure you have the required dependencies installed. On Arch Linux, you can install them with:
sudo pacman -S curl xmlstarlet jq
-
Copy the module to your Waybar config directory:
mkdir -p ~/.config/waybar/custom_modules cp arch_news ~/.config/waybar/custom_modules/ chmod +x ~/.config/waybar/custom_modules/arch_news
Add this to your ~/.config/waybar/config.json:
{
"custom/arch_news": {
"format": "{}",
"return-type": "json",
"exec": "~/.config/waybar/custom_modules/arch_news 14",
"tooltip": true,
"interval": 3600,
"on-click": "xdg-open https://archlinux.org/news/"
}
}Add "custom/arch_news" to your modules list:
{
"modules-left": [
"custom/arch_news"
]
}Add this to your ~/.config/waybar/style.css:
#custom-arch_news {
color: @main-fg;
background: alpha(@main-bg, 0.7);
opacity: 1;
padding-top: 2px;
padding-bottom: 2px;
padding-left: 6px;
padding-right: 6px;
border: 0.5px solid @main-fg;
border-bottom: 3px;
border-style: solid;
border-color: @main-fg;
border-radius: 4px;
}
#custom-arch_news.arch_news_active {
color: #ff6b6b;
border-color: #ff6b6b;
}
#custom-arch_news.arch_news_inactive {
color: #4ecdc4;
border-color: #4ecdc4;
}
#custom-arch_news.arch-news-error {
color: #ff5555;
border-color: #ff5555;
}# Show news from last 7 days (default)
./arch_news
# Show news from last 14 days
./arch_news 14
# Show news from last 30 days
./arch_news 30# Custom colors for active and inactive states
./arch_news 14 --active-color "#ff6b6b" --inactive-color "#4ecdc4"
# Using hex colors without quotes
./arch_news 7 --active-color ff6b6b --inactive-color 4ec4days(positional): Number of days to look back for news (default: 7)--active-color: Color when there are recent news items (default: #a6e3a1)--inactive-color: Color when there are no recent news items (default: system theme)--help: Show help message
{
"text": " 3",
"tooltip": "ο‘ <span color=\"#a6e3a1\">linux-firmware >= 20250613.12fe085f-5 upgrade requires manual intervention (2025-06-21 23:09)<\/span>\n\nο‘ <span color=\"#a6e3a1\">Plasma 6.4.0 will need manual intervention if you are on X11 (2025-06-20 07:08)<\/span>\n\nο‘ <span color=\"#a6e3a1\">Transition to the new WoW64 wine and wine-staging (2025-06-16 16:22)<\/span>",
"class": "arch_news_active",
"percentage": 30,
"color": "#a6e3a1"
}Edit the arch_news script and change the icon in the tooltip variable:
# Change the icon in the following line
tooltip=$(echo "$news_items_json" | jq -r --arg color "$active_color" '
map("\uf061 <span color=\"\($color)\">\(.title) (\(.pubDate | parse_rfc822_date))</span>") | .[0:3] | join("\n\n")
')Modify the interval in your Waybar config:
"interval": 1800 // 30 minutes
"interval": 7200 // 2 hoursYou can modify the RSS URL in the script:
rss_url="https://archlinux.org/feeds/news/"- Module not showing: Check if the script path is correct and the script is executable.
- No news displayed: Verify internet connection and RSS feed accessibility. Also check if
curl,xmlstarlet, andjqare installed. - Styling not applied: Ensure CSS classes match between the script and your stylesheet.
Run the script directly to see output:
~/.config/waybar/custom_modules/arch_news 7Check Waybar logs for errors:
waybar -l debug- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test them
- Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
SherLock707 (@SherLock707)
- Arch Linux team for maintaining the news RSS feed
- Waybar developers for the excellent status bar
- Community contributors
β If you find this module useful, please consider starring the repository!
