Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement basic menu bar functionality #167

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading