add support for floating panes
This commit is contained in:
parent
e0d551b5b5
commit
9e70404930
2 changed files with 6 additions and 7 deletions
|
@ -6,4 +6,4 @@ edition = "2018"
|
|||
|
||||
[dependencies]
|
||||
owo-colors = "3.2.0"
|
||||
zellij-tile = "0.23.0"
|
||||
zellij-tile = "0.25.0"
|
||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -6,9 +6,8 @@ use crate::{powerline::Powerline, util::to_owo};
|
|||
mod powerline;
|
||||
mod util;
|
||||
|
||||
// dracula background color
|
||||
// config version will be used once bug is fixed upstream
|
||||
const BG: PaletteColor = PaletteColor::Rgb((40, 42, 54));
|
||||
// There's really no good palette color to use for this in zellij. I'll add this is a custom plugin
|
||||
// option once that's possible.
|
||||
const ALT_BG: PaletteColor = PaletteColor::Rgb((68, 71, 90));
|
||||
|
||||
register_plugin!(State);
|
||||
|
@ -32,7 +31,7 @@ impl ZellijPlugin for State {
|
|||
|
||||
fn render(&mut self, _rows: usize, cols: usize) {
|
||||
let pal = self.mode.palette;
|
||||
let mut powerline = Powerline::new(to_owo(BG));
|
||||
let mut powerline = Powerline::new(to_owo(pal.bg));
|
||||
|
||||
match self.mode.mode {
|
||||
InputMode::Locked => {
|
||||
|
@ -41,7 +40,6 @@ impl ZellijPlugin for State {
|
|||
|
||||
InputMode::Normal => powerline
|
||||
.segment(Segment::palette_colors("Normal", pal.black, pal.yellow))
|
||||
// TODO: use pal.bg once https://github.com/zellij-org/zellij/issues/971 is resolved
|
||||
.segment(Segment::palette_colors("<C-g> | ", pal.blue, ALT_BG))
|
||||
.segment(Segment::palette_colors("<C-p> | ", pal.blue, ALT_BG))
|
||||
.segment(Segment::palette_colors("<C-t> | ﴵ ", pal.blue, ALT_BG))
|
||||
|
@ -65,6 +63,8 @@ impl ZellijPlugin for State {
|
|||
.segment(Segment::palette_colors("f | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("z | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("c | 凜 ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("w | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("e | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors(" | ", pal.magenta, ALT_BG)),
|
||||
|
||||
InputMode::Tab => powerline
|
||||
|
@ -75,7 +75,6 @@ impl ZellijPlugin for State {
|
|||
.segment(Segment::palette_colors("n | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("x | ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors("r | 凜 ", pal.magenta, ALT_BG))
|
||||
// TODO: find out what sync even is
|
||||
.segment(Segment::palette_colors("s | מּ ", pal.magenta, ALT_BG))
|
||||
.segment(Segment::palette_colors(" | ", pal.magenta, ALT_BG)),
|
||||
|
||||
|
|
Loading…
Reference in a new issue