Skip to content

Commit

Permalink
Merge commit '89e7a43f2ec0c9b3170f3c457be6ad24d3ce3ebe'
Browse files Browse the repository at this point in the history
  • Loading branch information
h1romas4 committed Jun 22, 2023
2 parents a2b5f3d + 89e7a43 commit 46e9b77
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zellij-datetime"
version = "0.11.0"
version = "0.12.0"
authors = ["h1romas4 <[email protected]>"]
edition = "2021"

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ This plugin adds a date and time pane to [Zellij](https://zellij.dev/), a termin

Since it is a WebAssembly/WASI build, it will probably work in all environments, including amd64, Arm.

## WIP
## Known Issues

- [x] Support for changing timezone by click or scroll on a pane
- [x] Support for timezone definition files.
- [ ] Support for background color specification.
- [ ] When a Zellij session is detached and reattached, the plugin stops without getting drawing and timer events.

## Require

Expand Down
7 changes: 1 addition & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ struct State {
before_minute: u32,
visible: bool,
style: Style,
update_style: bool,
line: Line,
config: Config,
}
Expand Down Expand Up @@ -75,7 +74,7 @@ impl ZellijPlugin for State {
Event::ModeUpdate(mode_info) => {
if self.style != mode_info.style {
self.style = mode_info.style;
self.update_style = true;
self.line.update_style(self.style, DATETIME_BG_COLOR);
}
}
Event::Mouse(mouse) => match mouse {
Expand All @@ -100,10 +99,6 @@ impl ZellijPlugin for State {
}

fn render(&mut self, _rows: usize, cols: usize) {
if self.update_style {
self.line.update_style(self.style, DATETIME_BG_COLOR);
}

if let Some(now) = self.now {
let date = format!(
"{year}-{month:02}-{day:02} {weekday}",
Expand Down

0 comments on commit 46e9b77

Please sign in to comment.