xbar-plugins

repository·main·Indexed 25 days ago

https://github.com/matryer/xbar-plugins

A collection of scripts, programs, and command-line tools designed to extend the functionality of xbar, a menu bar application. Includes plugins such as sunrise-sunset and disable-sleep, as well as specialized integrations for Acquia Cloud.

Tokens
1K
Snippets
5
Records
10
Agent score
81%

What's inside xbar-plugins

  1. Install the Disable sleep plugin with clean mode or custom repo

    main

    You can customize the installation of the Disable sleep plugin using environment variables or flags:

    • Clean Install: Use the --clean flag to copy runtime files directly into ~/Library/Application Support/xbar/disable-sleep-plugin/ and remove the git clone immediately after.
    • Custom Repository: If you are using a fork, set the REPO environment variable before running the script.
  2. Install the Disable sleep plugin

    main

    To install this plugin, you must first have xbar installed and launched to initialize the plugins directory (~/Library/Application Support/xbar/plugins).

    Run the install.sh script to clone the repository and symlink the plugin into your xbar folder. During the first setup, you will be prompted for your sudo password to allow the plugin to run sudo pmset (to toggle sleep) without a password prompt in the future.

    curl -fsSLO https://raw.githubusercontent.com/kiprasmel/xbar-plugins/refs/heads/main/System/disable-sleep/install.sh
    bash install.sh
  3. Install Acquia Cloud plugins

    main

    To use Acquia Cloud plugins in xBar, you must first install and configure several prerequisites: Composer, BitBar PHP, and the Acquia CLI. Once the prerequisites are set up and you are authenticated, you can install the plugins via the xBar user interface.

    # 1. Install BitBar PHP via Composer
    composer global require steveedson/bitbar-php
    
    # 2. Install Acquia CLI
    curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar
    chmod +x acli.phar
    mv acli.phar /usr/local/bin/acli
    
    # 3. Authenticate with Acquia CLI
    acli login
  4. Install the prerequisites for Acquia Cloud plugins

    main

    Before installing the plugins, ensure the following tools are installed on your system:

    1. Composer: Required for installing BitBar PHP.
    2. BitBar PHP: Install globally using Composer:
      composer global require steveedson/bitbar-php
    3. Acquia CLI: Download and move the binary to your path:
      curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar
      chmod +x acli.phar
      mv acli.phar /usr/local/bin/acli
    4. Authentication: Log in to your Acquia account via the CLI:
      acli login
  5. Install and use xbar plugins

    main

    To use a plugin with xbar, follow these steps:

    1. Drop the plugin into your xbar plugins folder (you may use the Enabled folder if you have cloned the repository).
    2. Make the plugin executable. In your terminal, run chmod +x <plugin_name>.
    3. Refresh xbar. Select Refresh all from the xbar menus to load the new plugin.
    chmod +x plugin.sh
  6. Update or modify the Disable sleep plugin

    main

    To update the plugin to the latest version, navigate to the cloned directory and pull the latest changes via git. To modify the plugin's behavior, edit the script located at ./xbar-plugins/System/disable-sleep/disable-sleep.10s.sh. xbar will automatically reload the plugin on its 10-second tick.

    cd xbar-plugins && git pull