Skip to content

Commit

Permalink
Implement basic menu bar functionality
Browse files Browse the repository at this point in the history
Contributes to #166.
  • Loading branch information
jinnovation committed Apr 11, 2024
1 parent be3a8a7 commit c5c0ce6
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
Binary file added docs/explanations/img/menu-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/explanations/integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Integrations

Kele is well-integrated with the Emacs ecosystem.

## Menu Bar

Kele is integrated with the Emacs [menu bar]. The **Kubernetes** section lets
you achieve many of the tasks that you'd normally use keybindings for.

![](./img/menu-bar.png)

[menu bar]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Menu-Bar.html
Binary file added docs/img/menu-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ With Kele, you can:
resource](./how-tos/usage.md#working-with-resources);
- [List collections of resources](./how-tos/usage.md#working-with-resources);
- Start and stop [proxy servers](./how-tos/usage.md#managing-proxy-servers);
- Use the menu bar to perform basic cluster/config management;
- And more! :sunglasses:

See [How-Tos > Usage](./how-tos/usage.md) for more details on what's possible
with Kele.

!!! warning

Kele is in **very** early stages of development. As of 2023/01/26, it is
Kele is in **very** early stages of development. As of 2024/04/11, it is
usable (I use it everyday for my day job!) but there are rough edges.

Do give things a try and I'd appreciate [issues for any bugs or rough
Expand All @@ -39,6 +40,7 @@ with Kele.
-- @jinnovation

![](./img/demo.gif)
![](./img/menu-bar.png)

!!! tip

Expand Down
6 changes: 6 additions & 0 deletions docs/references/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ versioning][semver].

## Unreleased

### Added

- [Menu bar] integration. Now you can access common tasks via the **Kubernetes**
section on the menu bar

## 0.4.2

### Fixed
Expand Down Expand Up @@ -236,3 +241,4 @@ future enhancements.
[How-Tos > Customization]:https://jonathanj.in/kele.el/how-tos/customization/
[How-Tos > Usage]: https://jonathanj.in/kele.el/how-tos/usage/
[Transient]: https://magit.vc/manual/transient.html
[Menu bar]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Menu-Bar.html
12 changes: 12 additions & 0 deletions kele.el
Original file line number Diff line number Diff line change
Expand Up @@ -1718,6 +1718,18 @@ The `scope' is the current context name."
(format-time-string "%F %T" kele--discovery-last-refresh-time)))))
(string-join msgs "\n")))

(easy-menu-define kele-menu-map kele-mode-map
"Menu for Kubernetes management.
Similar to `kele-dispatch'."
'("Kubernetes"
("Configuration"
;; TODO: Make this a menu where user can select from the available contexts
["Switch context" kele-context-switch]
["Switch namespace for current context" kele-namespace-switch-for-current-context]
"---"
["Find config file" kele-find-kubeconfig])))

(provide 'kele)

;;; kele.el ends here

0 comments on commit c5c0ce6

Please sign in to comment.