[PR #595] [MERGED] Refactor/cli change #9249

Closed
opened 2026-05-23 03:56:03 +01:00 by JakeStanger · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JakeStanger/ironbar/pull/595
Author: @JakeStanger
Created: 5/18/2024
Status: Merged
Merged: 6/1/2024
Merged by: @JakeStanger

Base: masterHead: refactor/cli-change


📝 Commits (6)

  • dedb89b refactor(popup): rename is_visible to visible
  • a0cb01a refactor: make Ironbar#unique_id must_use
  • 7413f78 feat(cli): debug flag
  • a33e0a2 feat(cli): format flag, json output format
  • 8dda494 fix(cli): using zero exit code for error responses
  • 9dd7112 feat!: improve CLI structure, add new commands

📊 Changes

14 files changed (+565 additions, -393 deletions)

View changed files

📝 docs/Controlling Ironbar.md (+133 -45)
📝 src/bar.rs (+9 -0)
📝 src/cli.rs (+36 -6)
📝 src/error.rs (+1 -0)
📝 src/ipc/client.rs (+6 -1)
📝 src/ipc/commands.rs (+77 -38)
📝 src/ipc/mod.rs (+1 -1)
src/ipc/server.rs (+0 -297)
src/ipc/server/bar.rs (+84 -0)
src/ipc/server/ironvar.rs (+38 -0)
src/ipc/server/mod.rs (+164 -0)
📝 src/main.rs (+13 -2)
📝 src/modules/mod.rs (+2 -2)
📝 src/popup.rs (+1 -1)

📄 Description

This splits most CLI/IPC commands into two categories:

  • var for ironvars
  • bar for controlling individual bars.

It also introduces more commands for visibility, as well as breaking existing ones.

New commands:

  • show
  • hide
  • toggle_visible
  • set_popup_visible
  • get_popup_visible

The implementation of some existing commands has been improved.

The following other smaller features/fixes are introduced by this PR:

  • The CLI now supports JSON output.
  • The CLI now supports debug output for printing request/response objects.
  • The CLI will now exit code 3 on error.

BREAKING CHANGE: All IPC commands have changed. Namely, type has been changed to command, and bar/var related commands are now under a subcommand. The full spec can be found on the wiki.

BREAKING CHANGE: Several CLI commands are now located under the var and bar categories. Usage of any commands to get/set Ironvars or control bar visibility will need to be updated.

BREAKING CHANGE: The open_popup and close_popup IPC commands are now called show_popup and hide_popup respectively.

BREAKING CHANGE: The popup name argument has been renamed to widget_name on all IPC commands.

BREAKING CHANGE: The set-visibility CLI command now takes a true/false positional argument in place of the -v flag.

BREAKING CHANGE: ok_value responses will no longer print ok as the first line when using the CLI


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JakeStanger/ironbar/pull/595 **Author:** [@JakeStanger](https://github.com/JakeStanger) **Created:** 5/18/2024 **Status:** ✅ Merged **Merged:** 6/1/2024 **Merged by:** [@JakeStanger](https://github.com/JakeStanger) **Base:** `master` ← **Head:** `refactor/cli-change` --- ### 📝 Commits (6) - [`dedb89b`](https://github.com/JakeStanger/ironbar/commit/dedb89bb027c4477620410d9103d64c3f2668517) refactor(popup): rename `is_visible` to `visible` - [`a0cb01a`](https://github.com/JakeStanger/ironbar/commit/a0cb01ae5f2121581eb90f73b8f661862da12b03) refactor: make `Ironbar#unique_id` `must_use` - [`7413f78`](https://github.com/JakeStanger/ironbar/commit/7413f78e04fe9b532397144e49b7545547980723) feat(cli): debug flag - [`a33e0a2`](https://github.com/JakeStanger/ironbar/commit/a33e0a241a8d5f65f7360b5c7e34a116f3f9f092) feat(cli): format flag, json output format - [`8dda494`](https://github.com/JakeStanger/ironbar/commit/8dda49477b2ceb268b94c729aadc5986bdca8528) fix(cli): using zero exit code for error responses - [`9dd7112`](https://github.com/JakeStanger/ironbar/commit/9dd711235f21d9016fec240f1be5c8d6de1596df) feat!: improve CLI structure, add new commands ### 📊 Changes **14 files changed** (+565 additions, -393 deletions) <details> <summary>View changed files</summary> 📝 `docs/Controlling Ironbar.md` (+133 -45) 📝 `src/bar.rs` (+9 -0) 📝 `src/cli.rs` (+36 -6) 📝 `src/error.rs` (+1 -0) 📝 `src/ipc/client.rs` (+6 -1) 📝 `src/ipc/commands.rs` (+77 -38) 📝 `src/ipc/mod.rs` (+1 -1) ➖ `src/ipc/server.rs` (+0 -297) ➕ `src/ipc/server/bar.rs` (+84 -0) ➕ `src/ipc/server/ironvar.rs` (+38 -0) ➕ `src/ipc/server/mod.rs` (+164 -0) 📝 `src/main.rs` (+13 -2) 📝 `src/modules/mod.rs` (+2 -2) 📝 `src/popup.rs` (+1 -1) </details> ### 📄 Description This splits most CLI/IPC commands into two categories: - `var` for ironvars - `bar` for controlling individual bars. It also introduces more commands for visibility, as well as breaking existing ones. New commands: - `show` - `hide` - `toggle_visible` - `set_popup_visible` - `get_popup_visible` The implementation of some existing commands has been improved. The following other smaller features/fixes are introduced by this PR: - The CLI now supports JSON output. - The CLI now supports debug output for printing request/response objects. - The CLI will now exit code 3 on error. BREAKING CHANGE: All IPC commands have changed. Namely, `type` has been changed to `command`, and bar/var related commands are now under a `subcommand`. The full spec can be found on the wiki. BREAKING CHANGE: Several CLI commands are now located under the `var` and `bar` categories. Usage of any commands to get/set Ironvars or control bar visibility will need to be updated. BREAKING CHANGE: The `open_popup` and `close_popup` IPC commands are now called `show_popup` and `hide_popup` respectively. BREAKING CHANGE: The popup `name` argument has been renamed to `widget_name` on all IPC commands. BREAKING CHANGE: The `set-visibility` CLI command now takes a `true`/`false` positional argument in place of the `-v` flag. BREAKING CHANGE: `ok_value` responses will no longer print `ok` as the first line when using the CLI --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
JakeStanger 2026-05-23 03:56:03 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#9249
No description provided.