terminal-widgets


Nameterminal-widgets JSON
Version 1.2 PyPI version JSON
download
home_pageNone
SummaryA fully functional program for Terminal to show information about system, display, shell, package and many more.
upload_time2024-11-08 12:20:27
maintainerNone
docs_urlNone
authorIm Geek (Ankush Bhagat)
requires_pythonNone
licenseNone
keywords python style terminal widgets sysfetch
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<div align="center">
<kbd>
  <img src="https://github.com/user-attachments/assets/d0094956-31b6-4969-b64a-ae51fd4e36bc" alt="Preview" />
</kbd>
</div><br>

Terminal Widgets is a versatile CLI program designed to enhance your terminal experience by providing various widgets and customizable features. Below is a list of features offered by Terminal Widgets:

<div align="center">
<img src="https://img.shields.io/static/v1?label=build with&message=♡&color=ff7751&labelColor=1e2528&style=for-the-badge">
<br>
<img src="https://img.shields.io/github/stars/imegeek/terminal-widgets?color=F2CD80&labelColor=1e2528&style=for-the-badge">
<img src="https://img.shields.io/static/v1?label=license&message=MIT&color=8ccf7e&labelColor=1e2528&style=for-the-badge">
<img src="https://img.shields.io/github/forks/imegeek/terminal-widgets?color=8EC8D8&labelColor=1e2528&style=for-the-badge">
</div>

## Features:

- **System Information Widgets:**

  - Displays system-related information such as battery status, weather, shell, storage details, hostname, date, RAM usage and many more.
- **Customizable build-in Widgets:**

  - Users can customize widgets according to their preferences, including text, color, icon, index and state.
- **Addons Widgets:**

  - Supports addon widgets with customizable text, color, script execution, icon display, and position settings.
- **Dynamic Content Configuration:**

  - Offers a dynamic way to set content inside text, script, or program files without explicitly defining color or icon keys.
- **Configuration Options:**

  - Provides a configuration file (`~/.twidgets.json`) for users to modify settings like custom color codes, addon widgets, and built-in widget configurations.
- **Orientation Support:**

  - Enables users to customize widget layout orientation, allowing display in either horizontal (row) or vertical (column) configurations for improved flexibility across different terminal setups.
- **Custom Logo Support:**

  - Provides the option to add a personalized logo through the configuration file (`~/.twidgets.json`).
- **Easy Installation:**

  - Available for installation via pip or as a local install for convenient setup.
- **Color Formatting Support:**

  - Supports color formatting using both named colors (e.g., `[red]`) and hexadecimal color codes.
- **Icon Integration:**

  - Allows integration of icons into text content using Unicode characters, enhancing visual representation within widgets.
- **Supports Command Line Arguments**

  - Terminal-Widgets offers support for command line arguments, providing users with flexibility in configuring and managing the program directly from the terminal.
  - Refer to the [Argument Options](#argument) for more detailed information.

## Screenshots

<kbd>
<p align="center">Windows
<img src="https://github.com/imegeek/terminal-widgets/assets/63346676/0915b7ad-671d-4e37-b68d-cd3e292cb2ed">
</p>
</kbd>

<kbd>
<p align="center">Linux
<img src="https://github.com/imegeek/terminal-widgets/assets/63346676/64132f65-748e-4ee3-966b-7be73d5ce8b7">
</p>
</kbd>

<kbd>
<p align="center">macOS
<img src="https://github.com/imegeek/terminal-widgets/assets/63346676/5697d372-9855-4929-9935-641291ffe8cb">
</p>
</kbd>

<kbd>
<p align="center">Android
<img src="https://github.com/imegeek/terminal-widgets/assets/63346676/386088c8-5229-4899-bc1b-45f74aaeaa8d">
</p>
</kbd>

## Supported platforms

- Linux
- Windows
- Darwin (macOS)
- Android (Termux)
- WSL (Windows Subsystem for Linux)

## Getting Started

To start using Terminal Widgets, follow these steps:

1. Install the program via pip or perform a local install.
2. Ensure you have Nerd Font installed for optimal display.
3. Customize your widgets and addons using the configuration file (`~/.twidgets.json`).
4. Refer to the [Configuration](#configuration) for more detailed information on configuration options and usage.

## Prerequisites

Before using Terminal Widgets, please ensure that you have the following prerequisites installed:

1. **Python 3.x**: Terminal Widgets is written in Python and requires Python 3.x to be installed on your system.
2. **Nerd Font**: Terminal Widgets requires Nerd Font for display glyphs. If not installed, download one from [here](https://www.nerdfonts.com/).
3. **For Android users using Termux**:

   - **Termux**: Terminal Widgets can be used on Android devices via Termux. Ensure that you have [Termux](https://f-droid.org/en/packages/com.termux/) installed on your Android device from the Google Play Store or F-Droid.
   - **Termux-API**: Terminal Widgets requires the Termux-API app for certain functionalities. Install the [Termux-API](https://f-droid.org/en/packages/com.termux.api/) app from the Google Play Store or F-Droid.
   - **termux-api**: Terminal Widgets requires the termux-api package for certain functionalities. Install termux-api by running the following command in your Termux terminal:

     ```
     pkg install termux-api
     ```

## Installation

You can install Terminal Widgets using pip, or you can clone the repository and install it locally.

### Install via pip

To install Terminal Widgets via pip, simply run the following command:

```
pip install terminal-widgets
```

or

```
pip3 install terminal-widgets
```

This will download and install the latest version of Terminal Widgets from the Python Package Index (PyPI) along with its dependencies.

### Manual Installation

To install Terminal Widgets locally, follow these steps:

1. Clone this repository to your local machine.
   `git clone https://github.com/imegeek/terminal-widgets`
2. Navigate to the cloned directory.
   `cd terminal-widgets`
3. Install the package using pip:
   `pip install .`
   or
   `pip3 install .`

This will install Terminal Widgets along with its dependencies from the local source files.

## Usage

Simply run the **`twidgets`** in your terminal to get an overview of your system status.
try these command if not working:

```shell
python -m twidgets
```

or

```shell
python3 -m twidgets
```

`<a name="argument"></a>`

## Argument Options:

Terminal-Widgets supports the following command line options for customization and control:

**-h, --help**               Show this help message and exit.
**--configs**                Display the configuration file.
**--widgets**                List built-in widgets and their values.
**--stdout**                 Disable colors and ASCII graphics, displaying only plain text.
**--json**                   Output widget data as a JSON object.
**--no-badge**               Display widgets without badge styling.
**--color-bars**             Enable color bars in terminal widgets.
**--text {detailed, compact}**
                         Set text mode for terminal widgets:
                         - 'detailed' includes extended information
                         - 'compact' shows concise info (default: compact)
**--color [normal, vivid, random, custom]**
                         Select color mode for terminal widgets (default: normal).
**--logo [pacman, linux, windows, macos, android]**
                         Choose a logo to display before widgets
                         (default: auto, based on system).
**--show [logo, widgets]**   Specify what to display: 'logo' or 'widgets'.
**--align [left, center]**   Set alignment mode for terminal widgets (default: center).
**--direction [row, column]**
                         Choose layout direction for widgets (default: row).
**--weather location**       Set the location for the weather widget.
**--weather-api API_KEY**    Provide OpenWeather API key for weather data.
**--bypass-system-api**      Bypass system API requirement checks.
**-c, --config file**        Specify a JSON configuration file to load.
**--column length**          Set the number of widgets per row.
**--column-gap length**      Set gap between widgets in each column.
**--row-gap length**         Set gap between widgets in each row.
**--margin length**          Set whitespace lines before and after execution.

These options allow users to customize the behavior and appearance of Terminal-Widgets according to their preferences.

`<a name="configuration"></a>`

## Configuration

Terminal Widgets supports configuration options, allowing users to customize their widgets or add new ones.

To configure Terminal Widgets:

1. Open the configuration file located at `~/.twidgets.json`.
2. Modify the following key-value pairs according to your preferences:

- **colors**: Define custom color codes for widgets and addons. This option requires all color names (`red`, `cyan`, etc.) to be specified, to show custom colors pass `--color custom` argument to the program.

- **logo**: Customize the logo displayed before the widgets. You can define an ASCII art logo by entering it as an array of strings under the `"logo"` key. This logo will appear in the terminal before other widgets, providing a personalized visual touch.

- **weather_api**: Provide your OpenWeatherMap API key for weather data.
  - API_KEY: Provide your OpenWeatherMap API key here (e.g., "weather_api": "xxxxxxxxxxxxxxxx").

<br>

- **addons**: Customize addon widgets. Use properties like `text`, `color`, `script`, `exec`, `icon`, and `index`.
  - **text**: The text content to display for the addon.
  - **color**: The color code for the addon text or icon.
  - **script**: The Python script file or code to execute for dynamic text content.
  - **exec**: The terminal command to execute for dynamic text content.
  - **icon**: The UTF-8 code of the icon or glyph to display for the addon.
  - **index**: The position of the addon in the widget layout.
- **widgets**: Configure built-in widgets like `username`, `hostname`, `platform`, `shell`, `package`, etc. Use properties like `text`, `color`, `icon`, `index`, and `state`.
  - **text**: The text content to display for the widget.
  - **color**: The color code for the widget icon.
  - **icon**: The UTF-8 code of the icon or glyph to display for the widget.
  - **index**: The position of the widget in the widget layout.
  - **state**: Use "disabled" value to hide specific widget.

3. Dynamic Method for Defining **widget-addon** without Specifying 'color' or 'icon'.

- **Add Text**:

  - Simply input the desired text.
- **Add Color**:

  - "[color_name or hex_code]" marks the beginning of the color for the content.
  - "[/]" signifies the end of color formatting.
- **Add Icon**:

  - Incorporate icons into text content using Unicode characters. For instance, utilize "\uf255" to depict a custom Unicode character as an icon within the text.
- Refer to Example 11 for further clarification.

4. Save the changes and restart Terminal Widgets to apply the new configuration.

## Configuration Examples

- **Example 1:**
  - This example defines custom **colors** code for terminal-widgets.

```json
{
    "colors": {
        "red": "#FF0000",
        "cyan": "#00FFFF",
        "purple": "#a06efc",
        "green": "#9ACB73",
        "yellow": "#f8d255",
        "sky": "#6AA1DA"
    }
}
```

- **Example 2:**
  - This example customize the logo in the Terminal Widgets.

```json
{
  "logo": [
    "        ,.=:!!t3Z3z.,                 ",
    "       :tt:::tt333EE3                 ",
    "       Et:::ztt33EEEL @Ee.,      ..,  ",
    "      ;tt:::tt333EE7 ;EEEEEEttttt33#  ",
    "     :Et:::zt333EEQ. $EEEEEttttt33QL  ",
    "     it::::tt333EEF @EEEEEEttttt33F   ",
    "    ;3=*^```\"*4EEV :EEEEEEttttt33@.   ",
    "    ,.=::::!t=., ` @EEEEEEtttz33QF    ",
    "   ;::::::::zt33)   \"4EEEtttji3P*     ",
    "  :t::::::::tt33.:Z3z..  `` ,..g.     ",
    "  i::::::::zt33F AEEEtttt::::ztF      ",
    " ;:::::::::t33V ;EEEttttt::::t3       ",
    " E::::::::zt33L @EEEtttt::::z3F       ",
    "{3=*^```\"*4E3) ;EEEtttt:::::tZ`       ",
    "             ` :EEEEtttt::::z7        ",
    "                 \"VEzjt:;;z>*`        "
  ]
}
```

- **Example 3:**
  - Configures the **build-in** widget `username` to change set custom color of icon.

```json
{
    "widgets": {
        "username": {
            "color": "#d0ff1f"
        }
    }
}
```

- **Example 4:**
  - Configures the **build-in** widget `hostname` to display the text "macbook pro" at index 2 in the layout.

```json
{
    "widgets": {
        "hostname": {
            "text": "macbook pro",
            "index": 2
        }
    }
}
```

- **Example 5:**
  - Configures the **build-in** widget `platform` to display the text "macos" with the custom icon.

```json
{
    "widgets": {
        "platform": {
          "text": "macos",
          "icon": "\uf179"
        }
    }
}
```

- **Example 6:**
  - Configures the **build-in** widget `shell` to display the text "zsh".

```json
{
    "widgets": {
          "shell": {
            "text": "zsh"
        }
    }
}
```

- **Example 7:**
  - Disables the **build-in** widget `storage`, preventing it from being displayed.

```json
{
    "widgets": {
        "storage": {
            "state": "disabled"
        }
    }
}
```

- **Example 8:**
  - Adds a welcome message **addon** with custom text, color, and position in the layout.

```json
{
    "addons": {
        "welcome": {
            "text": "Welcome to Terminal Widgets",
            "color": "#afdaaf",
            "index": 2
        }
    }
}
```

- **Example 9:**
  - Configures the `cputemp` **addon** to execute a Python script that prints a random temperature between 30°C and 60°C, with custom color and icon.

```json
{
    "addons": {
      "cputemp": {
          "script": "import random\nprint(random.randint(30, 60), '\u00B0C')",
          "color": "#ff8522",
          "icon": "\udb84\udcc3"
      }
    }
}
```

- **Example 10:**
  - Configures the `process` **addon** to execute a Python script located at "/path/to/the/file/script.py".

```json
{
    "addons": {
        "process": {
            "script": "/path/to/the/file/script.py"
        }
    }
}
```

- **Example 11:**
  - Configures the `pwd` addon to execute the "pwd" command in the terminal, displaying the current directory path with custom color and icon.

```json
{
    "addons": {
        "pwd": {
          "exec": "pwd",
          "color": "#ffa0f4",
          "icon": "\uf07b"
        }
    }
}
```

- **Example 12:**
  - Configures the `hi` addon to display custom formatted text with colors.
    - **text**: Sets the text content to "[#ff0000]\uf255[/] [#eeff00]Hi, there[/]", where:
      - "[#ff0000]" specifies the start of red color for the text.
      - "\uf255" represents a custom Unicode character.
      - "[#eeff00]" specifies the start of yellow-green color for the text "Hi, there".
      - "[/]" specifies the end of the color formatting.
      - "Hi, there" is the content to be displayed in yellow-green color and icon displayed in red color.

```json
{
    "addons": {
        "hi": {
          "text": "[#ff0000]\uf255[/] [#eeff00]Hi, there[/]"
        }
    }
}
```

- **Example 13:**
  - Configures the `color` addon to display custom color palette widget.
    - Uses a Python script to generate colored blocks representing each color in the palette.
    - Each color block is enclosed in color formatting tags, providing a visual representation of the color.
    - The color key specifies the color of the palette widget.
    - The icon key sets an icon for the palette widget.

```json
{
  "addons": {
    "color": {
        "script": "print(' '.join([f'[{color}]\ueabc[/]' for color in ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']]))",
        "color": "#6aafff",
        "icon": "\ue22b"
    }
  }
}
```

## Contributing

Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request on GitHub.

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/imegeek/terminal-widgets/blob/master/LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "terminal-widgets",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, style, terminal, widgets, sysfetch",
    "author": "Im Geek (Ankush Bhagat)",
    "author_email": "<imegeek@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/48/4a/42d9973f32ce61d8deca7adfbecd867793c4a8f71886c849c216cb04ae75/terminal_widgets-1.2.tar.gz",
    "platform": null,
    "description": "\n<div align=\"center\">\n<kbd>\n  <img src=\"https://github.com/user-attachments/assets/d0094956-31b6-4969-b64a-ae51fd4e36bc\" alt=\"Preview\" />\n</kbd>\n</div><br>\n\nTerminal Widgets is a versatile CLI program designed to enhance your terminal experience by providing various widgets and customizable features. Below is a list of features offered by Terminal Widgets:\n\n<div align=\"center\">\n<img src=\"https://img.shields.io/static/v1?label=build with&message=\u2661&color=ff7751&labelColor=1e2528&style=for-the-badge\">\n<br>\n<img src=\"https://img.shields.io/github/stars/imegeek/terminal-widgets?color=F2CD80&labelColor=1e2528&style=for-the-badge\">\n<img src=\"https://img.shields.io/static/v1?label=license&message=MIT&color=8ccf7e&labelColor=1e2528&style=for-the-badge\">\n<img src=\"https://img.shields.io/github/forks/imegeek/terminal-widgets?color=8EC8D8&labelColor=1e2528&style=for-the-badge\">\n</div>\n\n## Features:\n\n- **System Information Widgets:**\n\n  - Displays system-related information such as battery status, weather, shell, storage details, hostname, date, RAM usage and many more.\n- **Customizable build-in Widgets:**\n\n  - Users can customize widgets according to their preferences, including text, color, icon, index and state.\n- **Addons Widgets:**\n\n  - Supports addon widgets with customizable text, color, script execution, icon display, and position settings.\n- **Dynamic Content Configuration:**\n\n  - Offers a dynamic way to set content inside text, script, or program files without explicitly defining color or icon keys.\n- **Configuration Options:**\n\n  - Provides a configuration file (`~/.twidgets.json`) for users to modify settings like custom color codes, addon widgets, and built-in widget configurations.\n- **Orientation Support:**\n\n  - Enables users to customize widget layout orientation, allowing display in either horizontal (row) or vertical (column) configurations for improved flexibility across different terminal setups.\n- **Custom Logo Support:**\n\n  - Provides the option to add a personalized logo through the configuration file (`~/.twidgets.json`).\n- **Easy Installation:**\n\n  - Available for installation via pip or as a local install for convenient setup.\n- **Color Formatting Support:**\n\n  - Supports color formatting using both named colors (e.g., `[red]`) and hexadecimal color codes.\n- **Icon Integration:**\n\n  - Allows integration of icons into text content using Unicode characters, enhancing visual representation within widgets.\n- **Supports Command Line Arguments**\n\n  - Terminal-Widgets offers support for command line arguments, providing users with flexibility in configuring and managing the program directly from the terminal.\n  - Refer to the [Argument Options](#argument) for more detailed information.\n\n## Screenshots\n\n<kbd>\n<p align=\"center\">Windows\n<img src=\"https://github.com/imegeek/terminal-widgets/assets/63346676/0915b7ad-671d-4e37-b68d-cd3e292cb2ed\">\n</p>\n</kbd>\n\n<kbd>\n<p align=\"center\">Linux\n<img src=\"https://github.com/imegeek/terminal-widgets/assets/63346676/64132f65-748e-4ee3-966b-7be73d5ce8b7\">\n</p>\n</kbd>\n\n<kbd>\n<p align=\"center\">macOS\n<img src=\"https://github.com/imegeek/terminal-widgets/assets/63346676/5697d372-9855-4929-9935-641291ffe8cb\">\n</p>\n</kbd>\n\n<kbd>\n<p align=\"center\">Android\n<img src=\"https://github.com/imegeek/terminal-widgets/assets/63346676/386088c8-5229-4899-bc1b-45f74aaeaa8d\">\n</p>\n</kbd>\n\n## Supported platforms\n\n- Linux\n- Windows\n- Darwin (macOS)\n- Android (Termux)\n- WSL (Windows Subsystem for Linux)\n\n## Getting Started\n\nTo start using Terminal Widgets, follow these steps:\n\n1. Install the program via pip or perform a local install.\n2. Ensure you have Nerd Font installed for optimal display.\n3. Customize your widgets and addons using the configuration file (`~/.twidgets.json`).\n4. Refer to the [Configuration](#configuration) for more detailed information on configuration options and usage.\n\n## Prerequisites\n\nBefore using Terminal Widgets, please ensure that you have the following prerequisites installed:\n\n1. **Python 3.x**: Terminal Widgets is written in Python and requires Python 3.x to be installed on your system.\n2. **Nerd Font**: Terminal Widgets requires Nerd Font for display glyphs. If not installed, download one from [here](https://www.nerdfonts.com/).\n3. **For Android users using Termux**:\n\n   - **Termux**: Terminal Widgets can be used on Android devices via Termux. Ensure that you have [Termux](https://f-droid.org/en/packages/com.termux/) installed on your Android device from the Google Play Store or F-Droid.\n   - **Termux-API**: Terminal Widgets requires the Termux-API app for certain functionalities. Install the [Termux-API](https://f-droid.org/en/packages/com.termux.api/) app from the Google Play Store or F-Droid.\n   - **termux-api**: Terminal Widgets requires the termux-api package for certain functionalities. Install termux-api by running the following command in your Termux terminal:\n\n     ```\n     pkg install termux-api\n     ```\n\n## Installation\n\nYou can install Terminal Widgets using pip, or you can clone the repository and install it locally.\n\n### Install via pip\n\nTo install Terminal Widgets via pip, simply run the following command:\n\n```\npip install terminal-widgets\n```\n\nor\n\n```\npip3 install terminal-widgets\n```\n\nThis will download and install the latest version of Terminal Widgets from the Python Package Index (PyPI) along with its dependencies.\n\n### Manual Installation\n\nTo install Terminal Widgets locally, follow these steps:\n\n1. Clone this repository to your local machine.\n   `git clone https://github.com/imegeek/terminal-widgets`\n2. Navigate to the cloned directory.\n   `cd terminal-widgets`\n3. Install the package using pip:\n   `pip install .`\n   or\n   `pip3 install .`\n\nThis will install Terminal Widgets along with its dependencies from the local source files.\n\n## Usage\n\nSimply run the **`twidgets`** in your terminal to get an overview of your system status.\ntry these command if not working:\n\n```shell\npython -m twidgets\n```\n\nor\n\n```shell\npython3 -m twidgets\n```\n\n`<a name=\"argument\"></a>`\n\n## Argument Options:\n\nTerminal-Widgets supports the following command line options for customization and control:\n\n**-h, --help**               Show this help message and exit.\n**--configs**                Display the configuration file.\n**--widgets**                List built-in widgets and their values.\n**--stdout**                 Disable colors and ASCII graphics, displaying only plain text.\n**--json**                   Output widget data as a JSON object.\n**--no-badge**               Display widgets without badge styling.\n**--color-bars**             Enable color bars in terminal widgets.\n**--text {detailed, compact}**\n                         Set text mode for terminal widgets:\n                         - 'detailed' includes extended information\n                         - 'compact' shows concise info (default: compact)\n**--color [normal, vivid, random, custom]**\n                         Select color mode for terminal widgets (default: normal).\n**--logo [pacman, linux, windows, macos, android]**\n                         Choose a logo to display before widgets\n                         (default: auto, based on system).\n**--show [logo, widgets]**   Specify what to display: 'logo' or 'widgets'.\n**--align [left, center]**   Set alignment mode for terminal widgets (default: center).\n**--direction [row, column]**\n                         Choose layout direction for widgets (default: row).\n**--weather location**       Set the location for the weather widget.\n**--weather-api API_KEY**    Provide OpenWeather API key for weather data.\n**--bypass-system-api**      Bypass system API requirement checks.\n**-c, --config file**        Specify a JSON configuration file to load.\n**--column length**          Set the number of widgets per row.\n**--column-gap length**      Set gap between widgets in each column.\n**--row-gap length**         Set gap between widgets in each row.\n**--margin length**          Set whitespace lines before and after execution.\n\nThese options allow users to customize the behavior and appearance of Terminal-Widgets according to their preferences.\n\n`<a name=\"configuration\"></a>`\n\n## Configuration\n\nTerminal Widgets supports configuration options, allowing users to customize their widgets or add new ones.\n\nTo configure Terminal Widgets:\n\n1. Open the configuration file located at `~/.twidgets.json`.\n2. Modify the following key-value pairs according to your preferences:\n\n- **colors**: Define custom color codes for widgets and addons. This option requires all color names (`red`, `cyan`, etc.) to be specified, to show custom colors pass `--color custom` argument to the program.\n\n- **logo**: Customize the logo displayed before the widgets. You can define an ASCII art logo by entering it as an array of strings under the `\"logo\"` key. This logo will appear in the terminal before other widgets, providing a personalized visual touch.\n\n- **weather_api**: Provide your OpenWeatherMap API key for weather data.\n  - API_KEY: Provide your OpenWeatherMap API key here (e.g., \"weather_api\": \"xxxxxxxxxxxxxxxx\").\n\n<br>\n\n- **addons**: Customize addon widgets. Use properties like `text`, `color`, `script`, `exec`, `icon`, and `index`.\n  - **text**: The text content to display for the addon.\n  - **color**: The color code for the addon text or icon.\n  - **script**: The Python script file or code to execute for dynamic text content.\n  - **exec**: The terminal command to execute for dynamic text content.\n  - **icon**: The UTF-8 code of the icon or glyph to display for the addon.\n  - **index**: The position of the addon in the widget layout.\n- **widgets**: Configure built-in widgets like `username`, `hostname`, `platform`, `shell`, `package`, etc. Use properties like `text`, `color`, `icon`, `index`, and `state`.\n  - **text**: The text content to display for the widget.\n  - **color**: The color code for the widget icon.\n  - **icon**: The UTF-8 code of the icon or glyph to display for the widget.\n  - **index**: The position of the widget in the widget layout.\n  - **state**: Use \"disabled\" value to hide specific widget.\n\n3. Dynamic Method for Defining **widget-addon** without Specifying 'color' or 'icon'.\n\n- **Add Text**:\n\n  - Simply input the desired text.\n- **Add Color**:\n\n  - \"[color_name or hex_code]\" marks the beginning of the color for the content.\n  - \"[/]\" signifies the end of color formatting.\n- **Add Icon**:\n\n  - Incorporate icons into text content using Unicode characters. For instance, utilize \"\\uf255\" to depict a custom Unicode character as an icon within the text.\n- Refer to Example 11 for further clarification.\n\n4. Save the changes and restart Terminal Widgets to apply the new configuration.\n\n## Configuration Examples\n\n- **Example 1:**\n  - This example defines custom **colors** code for terminal-widgets.\n\n```json\n{\n    \"colors\": {\n        \"red\": \"#FF0000\",\n        \"cyan\": \"#00FFFF\",\n        \"purple\": \"#a06efc\",\n        \"green\": \"#9ACB73\",\n        \"yellow\": \"#f8d255\",\n        \"sky\": \"#6AA1DA\"\n    }\n}\n```\n\n- **Example 2:**\n  - This example customize the logo in the Terminal Widgets.\n\n```json\n{\n  \"logo\": [\n    \"        ,.=:!!t3Z3z.,                 \",\n    \"       :tt:::tt333EE3                 \",\n    \"       Et:::ztt33EEEL @Ee.,      ..,  \",\n    \"      ;tt:::tt333EE7 ;EEEEEEttttt33#  \",\n    \"     :Et:::zt333EEQ. $EEEEEttttt33QL  \",\n    \"     it::::tt333EEF @EEEEEEttttt33F   \",\n    \"    ;3=*^```\\\"*4EEV :EEEEEEttttt33@.   \",\n    \"    ,.=::::!t=., ` @EEEEEEtttz33QF    \",\n    \"   ;::::::::zt33)   \\\"4EEEtttji3P*     \",\n    \"  :t::::::::tt33.:Z3z..  `` ,..g.     \",\n    \"  i::::::::zt33F AEEEtttt::::ztF      \",\n    \" ;:::::::::t33V ;EEEttttt::::t3       \",\n    \" E::::::::zt33L @EEEtttt::::z3F       \",\n    \"{3=*^```\\\"*4E3) ;EEEtttt:::::tZ`       \",\n    \"             ` :EEEEtttt::::z7        \",\n    \"                 \\\"VEzjt:;;z>*`        \"\n  ]\n}\n```\n\n- **Example 3:**\n  - Configures the **build-in** widget `username` to change set custom color of icon.\n\n```json\n{\n    \"widgets\": {\n        \"username\": {\n            \"color\": \"#d0ff1f\"\n        }\n    }\n}\n```\n\n- **Example 4:**\n  - Configures the **build-in** widget `hostname` to display the text \"macbook pro\" at index 2 in the layout.\n\n```json\n{\n    \"widgets\": {\n        \"hostname\": {\n            \"text\": \"macbook pro\",\n            \"index\": 2\n        }\n    }\n}\n```\n\n- **Example 5:**\n  - Configures the **build-in** widget `platform` to display the text \"macos\" with the custom icon.\n\n```json\n{\n    \"widgets\": {\n        \"platform\": {\n          \"text\": \"macos\",\n          \"icon\": \"\\uf179\"\n        }\n    }\n}\n```\n\n- **Example 6:**\n  - Configures the **build-in** widget `shell` to display the text \"zsh\".\n\n```json\n{\n    \"widgets\": {\n          \"shell\": {\n            \"text\": \"zsh\"\n        }\n    }\n}\n```\n\n- **Example 7:**\n  - Disables the **build-in** widget `storage`, preventing it from being displayed.\n\n```json\n{\n    \"widgets\": {\n        \"storage\": {\n            \"state\": \"disabled\"\n        }\n    }\n}\n```\n\n- **Example 8:**\n  - Adds a welcome message **addon** with custom text, color, and position in the layout.\n\n```json\n{\n    \"addons\": {\n        \"welcome\": {\n            \"text\": \"Welcome to Terminal Widgets\",\n            \"color\": \"#afdaaf\",\n            \"index\": 2\n        }\n    }\n}\n```\n\n- **Example 9:**\n  - Configures the `cputemp` **addon** to execute a Python script that prints a random temperature between 30\u00b0C and 60\u00b0C, with custom color and icon.\n\n```json\n{\n    \"addons\": {\n      \"cputemp\": {\n          \"script\": \"import random\\nprint(random.randint(30, 60), '\\u00B0C')\",\n          \"color\": \"#ff8522\",\n          \"icon\": \"\\udb84\\udcc3\"\n      }\n    }\n}\n```\n\n- **Example 10:**\n  - Configures the `process` **addon** to execute a Python script located at \"/path/to/the/file/script.py\".\n\n```json\n{\n    \"addons\": {\n        \"process\": {\n            \"script\": \"/path/to/the/file/script.py\"\n        }\n    }\n}\n```\n\n- **Example 11:**\n  - Configures the `pwd` addon to execute the \"pwd\" command in the terminal, displaying the current directory path with custom color and icon.\n\n```json\n{\n    \"addons\": {\n        \"pwd\": {\n          \"exec\": \"pwd\",\n          \"color\": \"#ffa0f4\",\n          \"icon\": \"\\uf07b\"\n        }\n    }\n}\n```\n\n- **Example 12:**\n  - Configures the `hi` addon to display custom formatted text with colors.\n    - **text**: Sets the text content to \"[#ff0000]\\uf255[/] [#eeff00]Hi, there[/]\", where:\n      - \"[#ff0000]\" specifies the start of red color for the text.\n      - \"\\uf255\" represents a custom Unicode character.\n      - \"[#eeff00]\" specifies the start of yellow-green color for the text \"Hi, there\".\n      - \"[/]\" specifies the end of the color formatting.\n      - \"Hi, there\" is the content to be displayed in yellow-green color and icon displayed in red color.\n\n```json\n{\n    \"addons\": {\n        \"hi\": {\n          \"text\": \"[#ff0000]\\uf255[/] [#eeff00]Hi, there[/]\"\n        }\n    }\n}\n```\n\n- **Example 13:**\n  - Configures the `color` addon to display custom color palette widget.\n    - Uses a Python script to generate colored blocks representing each color in the palette.\n    - Each color block is enclosed in color formatting tags, providing a visual representation of the color.\n    - The color key specifies the color of the palette widget.\n    - The icon key sets an icon for the palette widget.\n\n```json\n{\n  \"addons\": {\n    \"color\": {\n        \"script\": \"print(' '.join([f'[{color}]\\ueabc[/]' for color in ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']]))\",\n        \"color\": \"#6aafff\",\n        \"icon\": \"\\ue22b\"\n    }\n  }\n}\n```\n\n## Contributing\n\nContributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request on GitHub.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/imegeek/terminal-widgets/blob/master/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A fully functional program for Terminal to show information about system, display, shell, package and many more.",
    "version": "1.2",
    "project_urls": null,
    "split_keywords": [
        "python",
        " style",
        " terminal",
        " widgets",
        " sysfetch"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb5364c91a3015761faa8af8019c00ed6775ea0fb014870627973653836140c7",
                "md5": "c32fbf9c9dcedf1e4747f3d4362c7a21",
                "sha256": "623c80436ecf02cbf4b4bbd87132d9957392aabbeeaecc45049342159b7efba5"
            },
            "downloads": -1,
            "filename": "terminal_widgets-1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c32fbf9c9dcedf1e4747f3d4362c7a21",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 30384,
            "upload_time": "2024-11-08T12:20:25",
            "upload_time_iso_8601": "2024-11-08T12:20:25.693505Z",
            "url": "https://files.pythonhosted.org/packages/bb/53/64c91a3015761faa8af8019c00ed6775ea0fb014870627973653836140c7/terminal_widgets-1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "484a42d9973f32ce61d8deca7adfbecd867793c4a8f71886c849c216cb04ae75",
                "md5": "4e1c4b1bee6b489e9ae0ffc07854c15e",
                "sha256": "6e80ea000659eaa615b70830544d23b868196e79065282c07694f93ee1c1aa33"
            },
            "downloads": -1,
            "filename": "terminal_widgets-1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4e1c4b1bee6b489e9ae0ffc07854c15e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30586,
            "upload_time": "2024-11-08T12:20:27",
            "upload_time_iso_8601": "2024-11-08T12:20:27.254189Z",
            "url": "https://files.pythonhosted.org/packages/48/4a/42d9973f32ce61d8deca7adfbecd867793c4a8f71886c849c216cb04ae75/terminal_widgets-1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-08 12:20:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "terminal-widgets"
}
        
Elapsed time: 0.70685s