Skip to content

Commit

Permalink
Merge pull request #58 from l4l/systemd-logging
Browse files Browse the repository at this point in the history
Systemd-based logging
  • Loading branch information
l4l authored Jul 30, 2021
2 parents 103a696 + 26ca20d commit ba773bc
Show file tree
Hide file tree
Showing 12 changed files with 209 additions and 34 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- Redirect logs by default to systemd
- Specify colors in css-like hex (#47)
- Fallback to input at dialog overflow (#43)
- Support environments without layer-shell protocol (#42)
Expand Down
171 changes: 171 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ regex = "1.4.2"
libc = "0.2.81"
pathfinder_geometry = "0.5"
tiny-skia = "0.5.1"
systemd-journal-logger = "0.3.0"

[profile.release]
lto = true
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.48.0
1.54.0
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl Config {

pub fn terminal_command(&self) -> Vec<CString> {
if let Some(cmd) = self.term.as_ref() {
shlex::split(&cmd)
shlex::split(cmd)
.unwrap()
.into_iter()
.map(|s| CString::new(s).unwrap())
Expand Down
2 changes: 1 addition & 1 deletion src/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,5 @@ fn draw_text(
},
);

dt.draw_glyphs(font, point_size, &ids, &positions, &source, &opts);
dt.draw_glyphs(font, point_size, &ids, &positions, &source, opts);
}
6 changes: 3 additions & 3 deletions src/draw/list_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ where
dt.draw_image_at(
x_offset,
y_offset - icon_size_f32,
&icon,
icon,
&DrawOptions::default(),
);
} else {
Expand All @@ -114,7 +114,7 @@ where
icon_size_f32,
x_offset,
y_offset - icon_size_f32,
&icon,
icon,
&DrawOptions::default(),
);
}
Expand Down Expand Up @@ -186,7 +186,7 @@ where

let tail_str = substr(item.name, &(idx..item.name.chars().count()));
let color = Source::Solid(color);
draw_text(&mut dt, tail_str, &font, font_size, pos, color, &draw_opts);
draw_text(&mut dt, tail_str, font, font_size, pos, color, &draw_opts);
} else {
draw_text(
&mut dt,
Expand Down
2 changes: 1 addition & 1 deletion src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl InputHandler {
}

let _seat_listener =
env.listen_for_seats(move |seat, seat_data, _| seat_handler(seat, &seat_data));
env.listen_for_seats(move |seat, seat_data, _| seat_handler(seat, seat_data));

(Self { _seat_listener }, rx)
}
Expand Down
Loading

0 comments on commit ba773bc

Please sign in to comment.