polybar-online


Namepolybar-online JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/Leetovskiy/polybar-online
SummaryScript for Polybar that checks connection to the Internet
upload_time2023-01-11 03:13:17
maintainer
docs_urlNone
authorVitaliy Zaitsev
requires_python>=3.10,<4.0
licenseApache-2.0
keywords polybar tuning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Polybar Online

**Polybar Online** is a script for Polybar that displays an internet connection indicator
in a
panel with the ability to send a notification when the connection is broken and restored.

## Why another one?

I've been looking for a similar module for myself and even found a couple. But they didn't
run on my machine... So I decided that it would be faster to write my own than to poke
around in someone else's. (and others are not able to send notifications!!!)

## Requirements

The script does not use any third-party libraries, but you will need to install some
[Nerd fonts](https://github.com/ryanoasis/nerd-fonts) in order for the icons to be displayed.

It's not necessary if you're going to use your own icons from other fonts, though.

## Installing

Clone the repository to a convenient location. For example, in `~/.config/polybar/`:

```shell
cd ~/.config/polybar/
git clone https://github.com/Leetovskiy/polybar-online 
```

You can also install Polybar Online from PyPI using `pip`. In this case, you may want to
run the script as a regular console program. To do this, make sure that the directory of
installed pip packages is available in the `PATH` variable.

```shell
pip install polybar-online
```

## Configuration

The script takes some arguments from the terminal to control its operation. These are, for
example, enabling and disabling Internet connection status change notifications, setting
icons, etc.

Use the command `polybar-online -h` to see the full list of available options.

```
  -h, --help            show this help message and exit
  -n, --notify, --no-notify
                        send a notification if the internet connection is broken (default: False)
  --online-icon ONLINE_ICON
                        icon that will be displayed when the Internet connection is available (default: 度)
  --offline-icon OFFLINE_ICON
                        icon that will be displayed when there is no Internet connection (default: ﴹ)
  -ci CHECK_INTERVAL, --check-interval CHECK_INTERVAL
                        Interval between checks (in seconds)
  -ri RETRY_INTERVAL, --retry-interval RETRY_INTERVAL
                        Interval between checks when Internet connection is unavailable (in seconds)
```

## Using

You need to put the script path in a special `custom/script` section of your Polybar
configuration file. You also need the tail parameter set to true. And don't forget to add
the new module to your panel's module list.

Example:

```ini
[bar/mybar]
modules-right = online

[module/online]
type = custom/script
exec = python ~/.config/polybar/polybar-online/polybar_online/main.py --notify -ci 5
tail = true
```

## License

This little project is licensed under the Apache 2.0 license, so you are free to use it
according to the terms of the license.

## Contribution

If you know how to improve this project or would like to contribute yourself, you are
welcome. I'm open to suggestions on Telegram ([@leetovskiy](https:/t.me/leetovskiy)) and
email ([dev.zaitsev@gmail.com](mailto:dev.zaitsev@gmail.com)), and I'll consider pull
requests from you as well.

## Roadmap

- [ ] Localization in Russian and other languages
- [ ] Distribution as a binary (using nuitka)
- [ ] AUR package

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Leetovskiy/polybar-online",
    "name": "polybar-online",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "polybar,tuning",
    "author": "Vitaliy Zaitsev",
    "author_email": "dev.zaitsev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/64/f64139c9a6ee757739fc898127146837b0f76f3a8b31471f9fbb9612a721/polybar_online-1.0.0.tar.gz",
    "platform": null,
    "description": "# Polybar Online\n\n**Polybar Online** is a script for Polybar that displays an internet connection indicator\nin a\npanel with the ability to send a notification when the connection is broken and restored.\n\n## Why another one?\n\nI've been looking for a similar module for myself and even found a couple. But they didn't\nrun on my machine... So I decided that it would be faster to write my own than to poke\naround in someone else's. (and others are not able to send notifications!!!)\n\n## Requirements\n\nThe script does not use any third-party libraries, but you will need to install some\n[Nerd fonts](https://github.com/ryanoasis/nerd-fonts) in order for the icons to be displayed.\n\nIt's not necessary if you're going to use your own icons from other fonts, though.\n\n## Installing\n\nClone the repository to a convenient location. For example, in `~/.config/polybar/`:\n\n```shell\ncd ~/.config/polybar/\ngit clone https://github.com/Leetovskiy/polybar-online \n```\n\nYou can also install Polybar Online from PyPI using `pip`. In this case, you may want to\nrun the script as a regular console program. To do this, make sure that the directory of\ninstalled pip packages is available in the `PATH` variable.\n\n```shell\npip install polybar-online\n```\n\n## Configuration\n\nThe script takes some arguments from the terminal to control its operation. These are, for\nexample, enabling and disabling Internet connection status change notifications, setting\nicons, etc.\n\nUse the command `polybar-online -h` to see the full list of available options.\n\n```\n  -h, --help            show this help message and exit\n  -n, --notify, --no-notify\n                        send a notification if the internet connection is broken (default: False)\n  --online-icon ONLINE_ICON\n                        icon that will be displayed when the Internet connection is available (default: \ufa01)\n  --offline-icon OFFLINE_ICON\n                        icon that will be displayed when there is no Internet connection (default: \ufd39)\n  -ci CHECK_INTERVAL, --check-interval CHECK_INTERVAL\n                        Interval between checks (in seconds)\n  -ri RETRY_INTERVAL, --retry-interval RETRY_INTERVAL\n                        Interval between checks when Internet connection is unavailable (in seconds)\n```\n\n## Using\n\nYou need to put the script path in a special `custom/script` section of your Polybar\nconfiguration file. You also need the tail parameter set to true. And don't forget to add\nthe new module to your panel's module list.\n\nExample:\n\n```ini\n[bar/mybar]\nmodules-right = online\n\n[module/online]\ntype = custom/script\nexec = python ~/.config/polybar/polybar-online/polybar_online/main.py --notify -ci 5\ntail = true\n```\n\n## License\n\nThis little project is licensed under the Apache 2.0 license, so you are free to use it\naccording to the terms of the license.\n\n## Contribution\n\nIf you know how to improve this project or would like to contribute yourself, you are\nwelcome. I'm open to suggestions on Telegram ([@leetovskiy](https:/t.me/leetovskiy)) and\nemail ([dev.zaitsev@gmail.com](mailto:dev.zaitsev@gmail.com)), and I'll consider pull\nrequests from you as well.\n\n## Roadmap\n\n- [ ] Localization in Russian and other languages\n- [ ] Distribution as a binary (using nuitka)\n- [ ] AUR package\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Script for Polybar that checks connection to the Internet",
    "version": "1.0.0",
    "split_keywords": [
        "polybar",
        "tuning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aadf36a44c860a49e7bb07db7e93c9823dc5593731a13520e322cf9920b767d0",
                "md5": "3d560115024b66b23c1a9158e9464c60",
                "sha256": "2ba81579de08b93a5f0f61df09986986545e98a9e37602745ef709f06314c0f9"
            },
            "downloads": -1,
            "filename": "polybar_online-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d560115024b66b23c1a9158e9464c60",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 13060,
            "upload_time": "2023-01-11T03:13:15",
            "upload_time_iso_8601": "2023-01-11T03:13:15.185280Z",
            "url": "https://files.pythonhosted.org/packages/aa/df/36a44c860a49e7bb07db7e93c9823dc5593731a13520e322cf9920b767d0/polybar_online-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd64f64139c9a6ee757739fc898127146837b0f76f3a8b31471f9fbb9612a721",
                "md5": "3d8c4d2e681a66dc1692ab67d8a7f79d",
                "sha256": "d9b5128f55024979bb2dfa571f0a91850b2ef6c64785e5e6e50c2d86ed980ce4"
            },
            "downloads": -1,
            "filename": "polybar_online-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3d8c4d2e681a66dc1692ab67d8a7f79d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 13316,
            "upload_time": "2023-01-11T03:13:17",
            "upload_time_iso_8601": "2023-01-11T03:13:17.126521Z",
            "url": "https://files.pythonhosted.org/packages/dd/64/f64139c9a6ee757739fc898127146837b0f76f3a8b31471f9fbb9612a721/polybar_online-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-11 03:13:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Leetovskiy",
    "github_project": "polybar-online",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "polybar-online"
}
        
Elapsed time: 0.02802s