# powerline-keebs
[![PyPI](https://img.shields.io/pypi/v/powerline-keebs)](https://pypi.org/project/powerline-keebs/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/powerline-keebs)
A custom [Powerline](https://github.com/powerline/powerline) segment for displaying currently connected keyboards.
Keyboard detection and parsing based off of [kbdetector](https://github.com/j4ckofalltrades/kbdetector).
![](https://res.cloudinary.com/j4ckofalltrades/image/upload/v1645293862/foss/powerline_keebs_hwsshp.png)
## Installation
### Using pip
`$ pip install powerline-keebs`
## Configuration
### Colorscheme
Add the following config items to your Powerline colorscheme config file (usually located at `~/.config/powerline/colorschemes/`),
see [Powerline Colorschemes](https://powerline.readthedocs.io/en/master/configuration/reference.html#colorschemes) for more info.
```json
{
"keebs": { "fg": "solarized:base3", "bg": "solarized:base01", "attrs": ["bold"] },
"keebs:divider": { "fg": "gray4", "bg": "solarized:base02", "attrs": [] }
}
```
### Segment
Add the following config item to your Powerline segments config file,
see [Powerline Segment reference](https://powerline.readthedocs.io/en/master/configuration/segments.html#segment-reference) for more info.
```json
{
"function": "powerline_keebs.keebs",
"priority": 30,
"args": {
"no_dongles": true,
"exclude_list": "comma,separated,keyboard,list"
}
}
```
- If adding the segment to the shell, edit `~/.config/powerline/themes/shell/default.json`.
- If adding the segment to the tmux status line, edit `~/.config/powerline/themes/tmux/default.json`.
#### Configuration items
| config_item | description | value |
|--------------|-------------------------------------------------|---------------------------------------|
| no_dongles | exclude keyboard dongles and/or receivers | `true` or `false` (defaults to false) |
| exclude_list | exclude pre-defined keyboard(s) from the result | comma-separated string |
### Toggle visibility
Toggle entire segment or specific section's visibility with the following environment variables:
- `POWERLINE_KEEBS_SHOW`
```shell
# toggle segment visibility
$ POWERLINE_KEEBS_SHOW=0 powerline-daemon --replace # hide powerline-keebs segment
$ POWERLINE_KEEBS_SHOW=1 powerline-daemon --replace # show powerline-keebs segment (default)
```
Alternatively you can add the following function to your shell for easier toggling:
```shell
toggle_powerline_keebs() {
case "$1" in
# toggle segment visibility
if [[ "${POWERLINE_KEEBS_SHOW:-1}" -eq 1 ]]; then
export POWERLINE_KEEBS_SHOW=0
else
export POWERLINE_KEEBS_SHOW=1
fi
;;
esac
}
```
## Stats
![Alt](https://repobeats.axiom.co/api/embed/49028c098050f2ec944637634225038be092c693.svg "Repobeats analytics image")
Raw data
{
"_id": null,
"home_page": "https://github.com/j4ckofalltrades/powerline-keebs",
"name": "powerline-keebs",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "powerline,keyboards",
"author": "Jordan Duabe",
"author_email": "me@jduabe.dev",
"download_url": "https://files.pythonhosted.org/packages/54/76/6550daeffdd5b394566a66e0a8413122d3784a141c68967337bf6dda82ca/powerline_keebs-0.2.3.tar.gz",
"platform": null,
"description": "# powerline-keebs\n\n[![PyPI](https://img.shields.io/pypi/v/powerline-keebs)](https://pypi.org/project/powerline-keebs/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/powerline-keebs)\n\nA custom [Powerline](https://github.com/powerline/powerline) segment for displaying currently connected keyboards.\n\nKeyboard detection and parsing based off of [kbdetector](https://github.com/j4ckofalltrades/kbdetector).\n\n![](https://res.cloudinary.com/j4ckofalltrades/image/upload/v1645293862/foss/powerline_keebs_hwsshp.png)\n\n## Installation\n\n### Using pip\n\n`$ pip install powerline-keebs`\n\n## Configuration\n\n### Colorscheme\n\nAdd the following config items to your Powerline colorscheme config file (usually located at `~/.config/powerline/colorschemes/`),\nsee [Powerline Colorschemes](https://powerline.readthedocs.io/en/master/configuration/reference.html#colorschemes) for more info.\n\n```json\n{\n \"keebs\": { \"fg\": \"solarized:base3\", \"bg\": \"solarized:base01\", \"attrs\": [\"bold\"] },\n \"keebs:divider\": { \"fg\": \"gray4\", \"bg\": \"solarized:base02\", \"attrs\": [] }\n}\n```\n\n### Segment\n\nAdd the following config item to your Powerline segments config file,\nsee [Powerline Segment reference](https://powerline.readthedocs.io/en/master/configuration/segments.html#segment-reference) for more info.\n\n```json\n{\n \"function\": \"powerline_keebs.keebs\",\n \"priority\": 30,\n \"args\": {\n \"no_dongles\": true,\n \"exclude_list\": \"comma,separated,keyboard,list\"\n }\n}\n```\n\n- If adding the segment to the shell, edit `~/.config/powerline/themes/shell/default.json`.\n- If adding the segment to the tmux status line, edit `~/.config/powerline/themes/tmux/default.json`.\n\n#### Configuration items\n\n| config_item | description | value |\n|--------------|-------------------------------------------------|---------------------------------------|\n| no_dongles | exclude keyboard dongles and/or receivers | `true` or `false` (defaults to false) |\n| exclude_list | exclude pre-defined keyboard(s) from the result | comma-separated string |\n\n### Toggle visibility\n\nToggle entire segment or specific section's visibility with the following environment variables:\n\n- `POWERLINE_KEEBS_SHOW`\n\n```shell\n# toggle segment visibility\n$ POWERLINE_KEEBS_SHOW=0 powerline-daemon --replace # hide powerline-keebs segment\n$ POWERLINE_KEEBS_SHOW=1 powerline-daemon --replace # show powerline-keebs segment (default)\n```\n\nAlternatively you can add the following function to your shell for easier toggling:\n\n```shell\ntoggle_powerline_keebs() {\n case \"$1\" in\n # toggle segment visibility\n if [[ \"${POWERLINE_KEEBS_SHOW:-1}\" -eq 1 ]]; then\n export POWERLINE_KEEBS_SHOW=0\n else\n export POWERLINE_KEEBS_SHOW=1\n fi\n ;;\n esac\n}\n```\n\n## Stats\n\n![Alt](https://repobeats.axiom.co/api/embed/49028c098050f2ec944637634225038be092c693.svg \"Repobeats analytics image\")\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A custom Powerline segment for displaying currently connected keyboards",
"version": "0.2.3",
"project_urls": {
"Bug Tracker": "https://github.com/j4ckofalltrades/powerline-keebs/issues",
"Homepage": "https://github.com/j4ckofalltrades/powerline-keebs",
"Repository": "https://github.com/j4ckofalltrades/powerline-keebs"
},
"split_keywords": [
"powerline",
"keyboards"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "703d6ca80277dfa0dabc2fdd4be37dad46b813536ab86a3a55977bfe62fa1895",
"md5": "f84cede869913675124a7de7dc2bc908",
"sha256": "f7a4fe0f77f334dd45c05129ca490c8c1dd870329f2517754b58feb9d05fd76e"
},
"downloads": -1,
"filename": "powerline_keebs-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f84cede869913675124a7de7dc2bc908",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 5172,
"upload_time": "2023-08-14T13:27:01",
"upload_time_iso_8601": "2023-08-14T13:27:01.963342Z",
"url": "https://files.pythonhosted.org/packages/70/3d/6ca80277dfa0dabc2fdd4be37dad46b813536ab86a3a55977bfe62fa1895/powerline_keebs-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "54766550daeffdd5b394566a66e0a8413122d3784a141c68967337bf6dda82ca",
"md5": "6407e5c2e9696eb24dac8d57f2c8a8eb",
"sha256": "b83045c748297966e16b0ff496298d14c8268874291c563b546e0b67aff8a2b0"
},
"downloads": -1,
"filename": "powerline_keebs-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "6407e5c2e9696eb24dac8d57f2c8a8eb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 4346,
"upload_time": "2023-08-14T13:27:03",
"upload_time_iso_8601": "2023-08-14T13:27:03.439552Z",
"url": "https://files.pythonhosted.org/packages/54/76/6550daeffdd5b394566a66e0a8413122d3784a141c68967337bf6dda82ca/powerline_keebs-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-14 13:27:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "j4ckofalltrades",
"github_project": "powerline-keebs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "powerline-keebs"
}