Skip to main content

POWERLINE DICE

A toy Powerline segment. This segment shows a result of dice combination.

By Miguel de Dios Matias.

Installation

Using pip

pip install powerline-dice

Configuration

You can activate the Powerline Slotmachine segment by adding it to your segment configuration, for example in .config/powerline/themes/shell/default.json:

{
    "function": "powerline_dice.roll",
    "priority": 90
}

By default shows a roll of d6 (dice of six faces).

screenshot roll six faces

Arguments

  • diceCombination (string): The combination of dices in dice notation format or wikipedia: Dice notation.
    • Default: "d6"
  • preContent (string): The string to show before the result.
    • Default: ""
  • postContent (string): The string to show after the result.
    • Default: "🎲"
  • facesDice list(string) or None: The faces of dice as list of string (can be emojis).
    • Default: None
  • critical int or list(int) or None: The minimum or exact values to critical hit, the background change to critical success.
    • Default: None
  • fumble int or list(int) or None: The maximum or exact values to critical fumble, the background change to critical failture.
    • Default: None

Examples

Rolls two dices of twenty faces and get critical hit with 40 and critical fumble with 1.

{
    "function": "powerline_dice.roll",
    "priority": 30,
    "args": {
        "diceCombination": "2d20",
        "critical": 30,
        "fumble": 15
    }
},

screenshot roll d20 critical and fumble

Flip a coin with the tail 🙂 and head ️☹️.

{
    "function": "powerline_dice.roll",
    "priority": 30,
    "args": {
        "diceCombination": "d2",
        "facesDice": ["🙂", "☹️"],
        "postContent": ""
    }
},

screenshot flip a coin

Thanks

  • Python Dice: for great library to parse dice combination.

License

Licensed under the GPL3 License.

Metadata

Release files for powerline-dice 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for powerline-dice 1.0.0
File Size Uploaded Provenance Actions
powerline_dice-1.0.0.tar.gz 3.3 kB Without provenance Details for powerline_dice-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for powerline-dice 1.0.0
File Interpreter ABI Platform Actions
powerline_dice-1.0.0-py2-none-any.whl Python 2 none any Details for powerline_dice-1.0.0-py2-none-any.whl

Total release size: 19.7 kB

Release files / powerline_dice-1.0.0.tar.gz

Download URL powerline_dice-1.0.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9521d1922b082a9c0b9edd08a68178bfd93a352fa7c116d9ff6efb3b7c439342
BLAKE2b-256 checksum
How to use checksums
7abb9826960023e5240e0b6fc711aa142c5df8655aaa24566df67a78537c2d1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.5rc1

Release files / powerline_dice-1.0.0-py2-none-any.whl

Download URL powerline_dice-1.0.0-py2-none-any.whl
Size 16.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
21b4197a30c88c7a1b738b36542a9fbae91c594928f09f53c8e5643266f0b0e6
BLAKE2b-256 checksum
How to use checksums
b2be5106bbe5837cc462bd5e226c6f011676f68a2ffa539012282b9bc5fe7d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.5rc1

Security for powerline-dice 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page