### Create Default Config Directory and Copy Example Config Source: https://github.com/octobanana/peaclock/blob/master/README.md These commands create the default configuration directory (~/.peaclock) if it doesn't exist and copy the example configuration file into it. Ensure the directory is created with verbose output and the copy operation is unique. ```sh mkdir -pv ~/.peaclock cp -uv ./cfg/default ~/.peaclock/config ``` -------------------------------- ### Install Peaclock in Release Mode Source: https://github.com/octobanana/peaclock/blob/master/README.md Use this command to install the project in release mode. It executes the install subcommand via the provided shell script. ```sh ./RUNME.sh install ``` -------------------------------- ### Install GCC on macOS with Brew Source: https://github.com/octobanana/peaclock/blob/master/README.md Installs the latest GCC compiler using Homebrew. Ensure you have Brew installed and follow the linking instructions. ```shell brew install gcc brew link gcc ``` -------------------------------- ### Peaclock Configuration File Setup Source: https://context7.com/octobanana/peaclock/llms.txt Set up the configuration file by creating the default directory and copying the bundled default config. Use a shell alias to permanently set a custom config directory. ```sh # Create default config directory and copy the bundled default config mkdir -pv ~/.peaclock cp -uv ./cfg/default ~/.peaclock/config ``` ```sh # Use a custom config directory permanently via shell alias echo 'alias peaclock="peaclock --config-dir ~/.config/peaclock"' >> ~/.bashrc ``` -------------------------------- ### Build and Install Peaclock Source: https://context7.com/octobanana/peaclock/llms.txt Build the project from source using the included shell script with CMake. Specify a C++17-capable compiler if necessary, especially on macOS. ```sh # Build release binary ./RUNME.sh build ``` ```sh # Install to system ./RUNME.sh install ``` ```sh # macOS: specify a GCC/Clang that supports C++17 (Apple Clang may not) ./RUNME.sh build -- -DCMAKE_CXX_COMPILER='/usr/local/bin/g++-12' ``` -------------------------------- ### Build Peaclock with Custom Compiler on macOS Source: https://github.com/octobanana/peaclock/blob/master/README.md Builds the Peaclock project while specifying a custom C++ compiler, such as a newer GCC installed via Homebrew. Replace `` with the actual canonical path to the g++ compiler binary. ```shell ./RUNME.sh build -- -DCMAKE_CXX_COMPILER='' ``` -------------------------------- ### Control Timer and Stopwatch State Source: https://context7.com/octobanana/peaclock/llms.txt Start, stop, or clear the timer and stopwatch. The stopwatch can also have its starting offset set. ```shell timer start # start the timer timer stop # pause the timer timer clear # reset to initial value stopwatch start # start counting up from 00:00:00 stopwatch stop # pause stopwatch clear # reset to zero stopwatch 1h:0m:0s # set stopwatch starting offset ``` -------------------------------- ### Export Current Settings with mkconfig Source: https://context7.com/octobanana/peaclock/llms.txt Use the `mkconfig` command to save current runtime settings to a configuration file. The `!` variant overwrites existing files. ```bash mkconfig ~/.peaclock/config ``` ```bash mkconfig! ~/.peaclock/config ``` ```bash mkconfig ~/.peaclock/my-theme ``` -------------------------------- ### Peaclock CLI Usage Source: https://context7.com/octobanana/peaclock/llms.txt Launch Peaclock with optional flags to select a config file or directory, control color output, or print version/license information. Runtime behavior is controlled interactively. ```sh # Launch with defaults (reads ~/.peaclock/config) peaclock ``` ```sh # Override config file only peaclock --config "./path/to/config/file" ``` ```sh # Override config directory peaclock --config-dir "~/.config/peaclock" ``` ```sh # Skip all config initialisation peaclock --config NONE ``` ```sh # Print help without colour peaclock --help --colour=off ``` ```sh # Print version (format: major.minor.patch (day.month.year)) peaclock --version # Output: 0.4.3 (11.09.2020) ``` ```sh # Print license peaclock --license ``` -------------------------------- ### Build Peaclock Project Source: https://github.com/octobanana/peaclock/blob/master/README.md Builds the Peaclock project in release mode using the provided shell script. This command should be executed from the root directory of the repository. ```shell ./RUNME.sh build ``` -------------------------------- ### Interactive Key Bindings - Layout Adjustment Source: https://context7.com/octobanana/peaclock/llms.txt Activate layout adjustment mode and use `hjkl` keys to fine-tune block size, padding, margin, and ratio. ```shell # Layout adjustment (activate a target, then use hjkl to increment/decrement) p → toggle block size adjustment o → toggle padding adjustment i → toggle margin adjustment u → toggle ratio adjustment ``` -------------------------------- ### Set Input Polling Interval Source: https://context7.com/octobanana/peaclock/llms.txt Configure the interval in milliseconds for polling keyboard input. Lower values increase responsiveness but also CPU usage. ```shell rate-input 50 # poll keyboard every 50 ms ``` -------------------------------- ### Interactive Key Bindings - Color Adjustment Source: https://context7.com/octobanana/peaclock/llms.txt Activate color adjustment mode and use `hjkl;'` keys to modify hue, saturation, and lightness for various foreground and background elements. ```shell # Colour adjustment (activate a target, then use hjkl;' for HSL) x → active-fg (h=hue j=sat-down k=sat-up l=hue ;=lum-down '=lum-up) c → inactive-fg v → colon-fg b → active-bg n → inactive-bg m → colon-bg , → background . → date colour / → clear currently toggled style ``` -------------------------------- ### Interactive Key Bindings - Mode Switching Source: https://context7.com/octobanana/peaclock/llms.txt Switch between different application modes (clock, timer, stopwatch) using single key presses. ```shell # Mode switching w → mode clock e → mode timer r → mode stopwatch ``` -------------------------------- ### Binary Clock with 24-bit Color Theme Source: https://context7.com/octobanana/peaclock/llms.txt Configuration for a binary clock using a 24-bit color theme. Includes settings for block layout, padding, margins, and detailed styling for various elements including date and status indicators. ```ini mode clock view binary block 2 1 padding 2 1 margin 2 1 ratio 2 1 set hour-24 on set seconds on set date on set auto-size on set auto-ratio on date '%a %d %b - %I:%M:%S %P' style active-bg reverse style inactive-bg #2c323c style date white style background clear style success green style error red rate-refresh 1000 ``` -------------------------------- ### Peaclock View Command Source: https://context7.com/octobanana/peaclock/llms.txt Select the visual rendering style for the current mode value using the 'view' command. Supported views include date, ascii, digital, binary, and icon. ```plaintext view date # plain date/time text only view ascii # large ASCII-art block numerals with date line view digital # seven-segment-style digital numerals with date line view binary # binary column clock (each column = one time digit) with date view icon # decorative icon art with date text (used in octobanana theme) ``` -------------------------------- ### Peaclock Style Command - Colour and Text Styling Source: https://context7.com/octobanana/peaclock/llms.txt Apply colors or effects to UI elements using the 'style' command. Supports 24-bit hex, 8-bit index, 4-bit named colors, 'reverse', 'clear', and 'party' for dynamic effects. ```plaintext # 24-bit hex colours style active-bg #4feae7 style inactive-bg #1b1e24 style background #1b1e24 ``` ```plaintext # 8-bit palette index style active-bg 214 ``` ```plaintext # 4-bit named colours style date white style success green bright style error red ``` ```plaintext # Special values style active-bg reverse # invert background/foreground style active-bg party # animated rainbow cycling style colon-fg clear # reset to terminal default ``` ```plaintext # Prompt UI elements style text #4feae7 # command-prompt input text style prompt #424957 # ':' prompt symbol style success #89e051 # success status message style error #f34b7d # error status message ``` -------------------------------- ### Peaclock Mode Command Source: https://context7.com/octobanana/peaclock/llms.txt Select the time value source for display using the 'mode' command. Options include 'clock' for system time, 'timer' for countdown, and 'stopwatch' for elapsed time. ```plaintext # In config file or interactive prompt: mode clock # display current system time mode timer # display countdown timer mode stopwatch # display elapsed stopwatch time ``` -------------------------------- ### Interactive Key Bindings - View Switching Source: https://context7.com/octobanana/peaclock/llms.txt Change the visual display mode (date, ASCII, digital, binary, icon) with single key commands. ```shell # View switching W → view date E → view ascii R → view digital T → view binary Y → view icon ``` -------------------------------- ### Set Locale for Date Formatting Source: https://context7.com/octobanana/peaclock/llms.txt Override the system locale for date and time rendering. An empty string resets to the system default. ```shell locale 'en_CA.utf8' # Canadian English UTF-8 locale for date formatting locale 'fr_FR.utf8' # French locale locale '' # clear; use system default ``` -------------------------------- ### Peaclock Set Command - Feature Toggles Source: https://context7.com/octobanana/peaclock/llms.txt Enable or disable display and behavior features using the 'set' command with 'on' or 'off'. Toggles include hour format, seconds display, date string, and auto-scaling options. ```plaintext set hour-24 on # use 24-hour time (off = 12-hour AM/PM) set seconds on # show the seconds digit set date on # display the date string beneath the clock set auto-size on # scale clock to fill terminal; overrides block size set auto-ratio on # scale clock to the configured ratio; overrides auto-size ``` -------------------------------- ### Minimal 24-hour Digital Clock Configuration Source: https://context7.com/octobanana/peaclock/llms.txt A basic configuration for a 24-hour digital clock with auto-sizing enabled. It sets the date format and basic styling for active and inactive elements. ```ini # ~/.peaclock/config mode clock view digital set hour-24 on set seconds off set date on set auto-size on set auto-ratio on ratio 2 1 date '%a %b %d' style active-bg reverse style inactive-bg clear style background clear rate-refresh 1000 rate-input 50 ``` -------------------------------- ### Set Timer Initial Value Source: https://context7.com/octobanana/peaclock/llms.txt Configure the initial duration for the countdown timer. The format is `HHh:MMm:SSs`, with optional components. ```shell timer 10m:0s # set timer to 10 minutes (run from config at startup) timer 1h:30m:0s # set timer to 1 hour 30 minutes ``` -------------------------------- ### Icon View with Custom Multi-line Date Source: https://context7.com/octobanana/peaclock/llms.txt Configuration for an icon-based clock view with a custom, multi-line date format. It specifies detailed styling for various elements including foreground, background, colons, date, text, prompt, success, and error states. ```ini mode clock view icon block 1 1 ratio 1 1 set hour-24 on set seconds off set date on set auto-size on set auto-ratio on date 'OCTOBANANA\n%a %d %b - %I:%M:%S %P' style active-bg party style colon-fg #808080 style colon-bg #424957 style date #c0c0c0 style background #1b1e24 style text #4feae7 style prompt #424957 style success #89e051 style error #f34b7d rate-refresh 250 ``` -------------------------------- ### Interactive Key Bindings - Feature Toggles Source: https://context7.com/octobanana/peaclock/llms.txt Toggle various features on or off, such as 24-hour format, seconds display, date display, and auto-sizing. ```shell # Feature toggles a → toggle hour-24 s → toggle seconds d → toggle date display f → toggle auto-size g → toggle auto-ratio ``` -------------------------------- ### Set Date Line Spacing Source: https://context7.com/octobanana/peaclock/llms.txt Specify the number of blank lines between the clock display and the date string. ```shell date-padding 1 # lines of space between the clock and the date string ``` -------------------------------- ### Set Auto-Ratio Aspect Ratio Source: https://context7.com/octobanana/peaclock/llms.txt Define the target aspect ratio for automatic cell sizing. `ratio-x` and `ratio-y` allow setting individual components of the ratio. ```shell ratio 2 1 # target aspect ratio for auto-ratio mode (2:1 ≈ square cells) ratio-x 2 ratio-y 1 ``` -------------------------------- ### Party Binary Clock with Large Colored Blocks Source: https://context7.com/octobanana/peaclock/llms.txt A festive binary clock configuration featuring large colored blocks and a 'party' style for active foreground elements. It includes a timer execution command to send a notification upon completion. ```ini mode clock view binary block 8 4 padding 4 1 margin 1 1 fill 'peaclock' set hour-24 on set seconds on set date on set auto-ratio on ratio 2 1 date '%a %d %b %H:%M:%S' style active-fg party style inactive-fg #1a525a style colon-bg #002b36 style date #2aa198 style background #002b36 timer-exec 'notify-send -a peaclock "timer complete"' rate-refresh 1000 ``` -------------------------------- ### Set Timezone for Date Formatting Source: https://context7.com/octobanana/peaclock/llms.txt Override the system timezone for date and time rendering. An empty string resets to the system local time. ```shell timezone 'America/Vancouver' # Pacific time timezone 'Europe/Berlin' # Central European time timezone '' # clear; use system local time ``` -------------------------------- ### Set Shell Command on Timer Completion Source: https://context7.com/octobanana/peaclock/llms.txt Register a shell command to execute when the countdown timer reaches zero. An empty string clears the command. ```shell timer-exec 'notify-send -a peaclock "timer complete"' timer-exec 'paplay /usr/share/sounds/freedesktop/stereo/complete.oga' timer-exec 'wall "Time is up!"' timer-exec '' # clear; no action on completion ``` -------------------------------- ### Set Clock Cell Dimensions Source: https://context7.com/octobanana/peaclock/llms.txt Configure the width and height of individual clock cells. Use `block-x` or `block-y` to set only one dimension. ```shell block 2 1 # each clock cell is 2 chars wide, 1 char tall block-x 4 # set only the x (width) component block-y 2 # set only the y (height) component ``` -------------------------------- ### Set Screen Refresh Interval Source: https://context7.com/octobanana/peaclock/llms.txt Adjust the interval in milliseconds for redrawing the screen. Lower values provide smoother animation, especially when seconds are displayed. ```shell rate-refresh 1000 # redraw every 1000 ms (sufficient for HH:MM display) rate-refresh 250 # redraw every 250 ms (needed when showing seconds) ``` -------------------------------- ### Set Custom Date Format Source: https://context7.com/octobanana/peaclock/llms.txt Configure the strftime-compatible format string for the date display. An empty string disables the date line. Supports `\n` for multiline dates. ```shell date '%a %b %d' # Mon Jan 01 date '%a %d %b - %I:%M:%S %P' # Mon 01 Jan - 02:30:45 pm date '%a %d %b %H:%M:%S' # Mon 01 Jan 14:30:45 date 'OCTOBANANA\n%a %d %b - %I:%M:%S %P' # two-line date with label date '' # clear / disable date display ``` -------------------------------- ### Alias Peaclock for Custom Config Directory Source: https://github.com/octobanana/peaclock/blob/master/README.md Add this alias to your shell profile to permanently use a custom configuration directory, such as ~/.config/peaclock. This overrides the default config directory. ```sh alias peaclock="peaclock --config-dir ~/.config/peaclock" ``` -------------------------------- ### Set Block Fill Characters Source: https://context7.com/octobanana/peaclock/llms.txt Define the characters used to render clock blocks. Use `fill` for all regions, or `fill-active`, `fill-inactive`, `fill-colon` for specific regions. ```shell fill '' # use background colour only (no text character) fill '♥' # Unicode heart fills all blocks (binary-unicode theme) fill 'peaclock' # repeating word fills all blocks (binary-party theme) fill-active '*' # only active (lit) blocks use '*' fill-inactive '' # inactive blocks are blank fill-colon '.' # colon separator blocks use '.' ``` -------------------------------- ### Set Status Message Display Duration Source: https://context7.com/octobanana/peaclock/llms.txt Configure how long status messages are displayed in milliseconds. ```shell rate-status 5000 # show prompt status messages for 5 seconds ``` -------------------------------- ### Unicode Binary Clock with Heart Characters Source: https://context7.com/octobanana/peaclock/llms.txt Configuration for a binary clock that uses Unicode heart characters ('♥') for display. Auto-sizing and auto-ratio are turned off, and specific styling is applied to active and inactive foreground elements. ```ini mode clock view binary block 1 1 padding 1 0 fill '♥' set hour-24 on set seconds on set date off set auto-size off set auto-ratio off style active-fg clear style inactive-fg #2c2e3b rate-refresh 1000 ``` -------------------------------- ### Set Spacing Between Cells Source: https://context7.com/octobanana/peaclock/llms.txt Define the horizontal and vertical gaps between clock cells. `padding-x` and `padding-y` can be used to set individual dimensions. ```shell padding 2 1 # 2-char horizontal gap, 1-char vertical gap between cells padding-x 4 padding-y 1 ``` -------------------------------- ### Set Terminal Margins Source: https://context7.com/octobanana/peaclock/llms.txt Control the spacing between the clock display and the terminal edges. `margin-x` and `margin-y` adjust horizontal and vertical margins respectively. ```shell margin 2 1 # 2-char border from terminal edge (horizontal), 1 (vertical) margin-x 1 margin-y 1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.