GithubHelp home page GithubHelp logo

juanscr / waybar-updates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from savely-krasovsky/waybar-updates

0.0 0.0 0.0 37 KB

Tiny Waybar module to check Arch Linux updates from official repositories and AUR.

Home Page: https://aur.archlinux.org/packages/waybar-updates

License: MIT License

Shell 92.40% Makefile 7.60%

waybar-updates's Introduction

waybar-updates

ShellCheck

Tiny Waybar module to check Arch Linux updates from official repositories and AUR.

Features

  • Sends notifications about updates.
  • Supports GNU gettext localization (contribute new po-files!)
  • Checks updates from AUR using Aurweb RPC, so works independently.
  • Can check for development packages upstream changes (see -d options)
  • Shows updates in the tooltip.
  • Supports two states: pending-updates and updated to use different icons or hide module.
  • Uses infinite loop to supply Waybar JSON updates.
  • Configurable interval between checks.

Installation

  1. Using AUR package waybar-updates.
  2. Manually by using make && make install.

Dependencies

  • pacman-contrib
  • gettext
  • curl
  • jq
  • libnotify
  • git (if using --devel option)

Usage

~/.config/waybar/config:

"modules-left": [
  ...
  "custom/pacman",
  ...
],

...

"custom/pacman": {
  "format": "{icon}{}",
  "return-type": "json",
  "format-icons": {
    "pending-updates": "",
    "updated": ""
  },
  "exec-if": "which waybar-updates",
  "exec": "waybar-updates"
}

~/.config/waybar/style.css

@keyframes blink-update {
	to {
		background-color: dodgerblue;
	}
}

#custom-pacman {
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-direction: alternate;
}
#custom-pacman.pending-updates {
	animation-name: blink-update;
	animation-duration: 3s;
}

You can copy compiled mo-files and use TEXTDOMAINDIR="$HOME/.config/waybar/scripts" in case you want to use localization and don't want to store them in /usr/share/locale.

Command-line options

The following options are available:

  • -i, --interval: Interval between checks (default: 6 seconds)
  • -c, --cycles: Cycles between online checks (e.g. 6s * 600 cycles = 3600s = 1h between online checks) (default: 600 cycles)
  • -l, --packages-limit: Maximum number of packages to be shown in notifications and tooltip (default: 10)
  • -d, --devel: Also check for development packages upstream changes (default:disabled)
  • -n , --notify: Turns on notifications for updates.

Localization

Supported languages:

  • English
  • Russian
  • French
  • Turkish
  1. Open po/waybar-updates.pot in poedit or any alternative.
  2. Generate po-file for your language.
  3. Translate!
  4. Submit po-file by opening Pull Request!

Inspired by waybar-module-pacman-updates.

waybar-updates's People

Contributors

savely-krasovsky avatar juanscr avatar julian-poidevin avatar ouzbirki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.