Fix typos (#429)

* Fix typos reported by "typos" crate

https://github.com/crate-ci/typos

* Ignore typo datas -> data

See https://github.com/crate-ci/typos?tab=readme-ov-file#false-positives
for more configureability.

---------

Co-authored-by: Carl Hjerpe <git@hjerpe.xyz>
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
Ujp8LfXBJ6wCPR 2024-06-09 10:50:22 +00:00 committed by GitHub
parent f203c8729a
commit af6d84a7f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 13 additions and 11 deletions

View file

@ -307,7 +307,7 @@ pub enum OutputAction {
Mode { Mode {
/// Mode to set, or "auto" for automatic selection. /// Mode to set, or "auto" for automatic selection.
/// ///
/// Run `niri msg outputs` to see the avaliable modes. /// Run `niri msg outputs` to see the available modes.
#[cfg_attr(feature = "clap", arg())] #[cfg_attr(feature = "clap", arg())]
mode: ModeToSet, mode: ModeToSet,
}, },

View file

@ -34,7 +34,7 @@ fi
# Start niri and wait for it to terminate. # Start niri and wait for it to terminate.
systemctl --user --wait start niri.service systemctl --user --wait start niri.service
# Force stop of grahical-session.target. # Force stop of graphical-session.target.
systemctl --user start --job-mode=replace-irreversibly niri-shutdown.target systemctl --user start --job-mode=replace-irreversibly niri-shutdown.target
# Unset environment that we've set. # Unset environment that we've set.

View file

@ -142,7 +142,7 @@ impl CursorManager {
.unwrap() .unwrap()
} }
/// Currenly used cursor_image as a cursor provider. /// Currently used cursor_image as a cursor provider.
pub fn cursor_image(&self) -> &CursorImageStatus { pub fn cursor_image(&self) -> &CursorImageStatus {
&self.current_cursor &self.current_cursor
} }

View file

@ -132,7 +132,7 @@ impl CompositorHandler for State {
let output = let output =
output.filter(|o| self.niri.layout.monitor_for_output(o).is_some()); output.filter(|o| self.niri.layout.monitor_for_output(o).is_some());
// Chech that the workspace still exists. // Check that the workspace still exists.
let workspace_name = workspace_name let workspace_name = workspace_name
.filter(|n| self.niri.layout.find_workspace_by_name(n).is_some()); .filter(|n| self.niri.layout.find_workspace_by_name(n).is_some());

View file

@ -3355,7 +3355,7 @@ fn compute_new_view_offset(
return -(new_col_x - cur_x); return -(new_col_x - cur_x);
} }
// Otherwise, prefer the aligment that results in less motion from the current position. // Otherwise, prefer the alignment that results in less motion from the current position.
let dist_to_left = cur_x.abs_diff(new_x); let dist_to_left = cur_x.abs_diff(new_x);
let dist_to_right = (cur_x + view_width).abs_diff(new_right_x); let dist_to_right = (cur_x + view_width).abs_diff(new_right_x);
if dist_to_left <= dist_to_right { if dist_to_left <= dist_to_right {

View file

@ -161,7 +161,7 @@ pub struct Niri {
pub is_at_startup: bool, pub is_at_startup: bool,
// Each workspace corresponds to a Space. Each workspace generally has one Output mapped to it, // Each workspace corresponds to a Space. Each workspace generally has one Output mapped to it,
// however it may have none (when there are no outputs connected) or mutiple (when mirroring). // however it may have none (when there are no outputs connected) or multiple (when mirroring).
pub layout: Layout<Mapped>, pub layout: Layout<Mapped>,
// This space does not actually contain any windows, but all outputs are mapped into it // This space does not actually contain any windows, but all outputs are mapped into it
@ -236,7 +236,7 @@ pub struct Niri {
/// When this happens, the pointer also loses any focus. This is so that touch can prevent /// When this happens, the pointer also loses any focus. This is so that touch can prevent
/// various tooltips from sticking around. /// various tooltips from sticking around.
pub pointer_hidden: bool, pub pointer_hidden: bool,
// FIXME: this should be able to be removed once PointerFocus takes grabs into accound. // FIXME: this should be able to be removed once PointerFocus takes grabs into account.
pub pointer_grab_ongoing: bool, pub pointer_grab_ongoing: bool,
pub tablet_cursor_location: Option<Point<f64, Logical>>, pub tablet_cursor_location: Option<Point<f64, Logical>>,
pub gesture_swipe_3f_cumulative: Option<(f64, f64)>, pub gesture_swipe_3f_cumulative: Option<(f64, f64)>,
@ -377,7 +377,7 @@ struct SurfaceFrameThrottlingState {
} }
pub enum CenterCoords { pub enum CenterCoords {
Seperately, Separately,
Both, Both,
} }
@ -535,7 +535,7 @@ impl State {
let y_in_bound = cur_loc.y >= rect.loc.y && cur_loc.y <= rect.loc.y + rect.size.h; let y_in_bound = cur_loc.y >= rect.loc.y && cur_loc.y <= rect.loc.y + rect.size.h;
let p = match mode { let p = match mode {
CenterCoords::Seperately => { CenterCoords::Separately => {
if x_in_bound && y_in_bound { if x_in_bound && y_in_bound {
return false; return false;
} else if y_in_bound { } else if y_in_bound {
@ -596,7 +596,7 @@ impl State {
return false; return false;
} }
self.move_cursor_to_focused_tile(CenterCoords::Seperately) self.move_cursor_to_focused_tile(CenterCoords::Separately)
} }
pub fn maybe_warp_cursor_to_focus_centered(&mut self) -> bool { pub fn maybe_warp_cursor_to_focus_centered(&mut self) -> bool {

2
typos.toml Normal file
View file

@ -0,0 +1,2 @@
[default.extend-words]
datas = "datas"

View file

@ -26,7 +26,7 @@ vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
// //
// The shader runs over an area of unspecified size and location, so you must // The shader runs over an area of unspecified size and location, so you must
// expect and handle coordinates outside the [0, 1] range. The area will be // expect and handle coordinates outside the [0, 1] range. The area will be
// large enough to accomodate a crossfade effect. // large enough to accommodate a crossfade effect.
// //
// * size_curr_geo: size of the current window geometry in logical pixels. // * size_curr_geo: size of the current window geometry in logical pixels.
// //