A custom Powerline segment for displaying currently connected keyboards
Project description
powerline-keebs
A custom Powerline segment for displaying currently connected keyboards.
Keyboard detection and parsing based off of kbdetector.
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 for more info.
{
"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 for more info.
{
"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
# 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:
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file powerline_keebs-0.2.2.tar.gz
.
File metadata
- Download URL: powerline_keebs-0.2.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83a117fad28fad0e1c1f02c37785e168b7c68cec30f33375639d98405aefdfa3 |
|
MD5 | e800ef0e2dd15da216419e3134d65c01 |
|
BLAKE2b-256 | ad951e644b854bcc38211c9d6f33f4cac5bb1a5a648eb69f542f875d78cccad7 |
File details
Details for the file powerline_keebs-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: powerline_keebs-0.2.2-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae89d7894e557c37f95e700bc5f86ddd218bf18ebbe2ed9899b265a096011d8 |
|
MD5 | f319a36cf46f45b0f01a72702a3d8c81 |
|
BLAKE2b-256 | a87a7f1e08b892ed6f0f78526cb1bafb8c6396ba44c3b4963f87c7324c627267 |