Skip to content

Commit

Permalink
tidying up doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Jun 12, 2024
1 parent a5394a4 commit 355cc7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
4 changes: 1 addition & 3 deletions src/core/layout/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ impl Message {

/// Marker trait for a type that can be sent as a [Message].
///
/// The [impl_message][0] macro can be used to easily implement this trait and mark
/// The [impl_message][crate::impl_message] macro can be used to easily implement this trait and mark
/// a type as being usable as a layout message:
/// ```
/// use penrose::impl_message;
///
/// struct MyMessage;
/// impl_message!(MyMessage);
/// ```
///
/// [0] crate::impl_message
pub trait IntoMessage: Any {
/// Wrap this value as a dynamically typed message for sending to a layout
fn into_message(self) -> Message
Expand Down
6 changes: 3 additions & 3 deletions src/extensions/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub use combinators::Conditional;
pub mod quickcheck_tests;

/// Inspired by the Fibonacci layout available for dwm:
/// https://dwm.suckless.org/patches/fibonacci/
/// <https://dwm.suckless.org/patches/fibonacci/>
///
/// The ratio between the main and secondary regions can be adjusted by sending [ShrinkMain]
/// and [ExpandMain] messages to this layout.
Expand Down Expand Up @@ -141,7 +141,7 @@ impl Layout for Fibonacci {
}

/// Inspired by the Tatami layout available for dwm:
/// https://dwm.suckless.org/patches/tatami/
/// <https://dwm.suckless.org/patches/tatami/>
///
/// This is very much a "for looks" layout rather than something particularly practical. It
/// provides a set of 6 specific layouts depending on the number of clients present on the
Expand Down Expand Up @@ -189,7 +189,7 @@ impl Tatami {
Self { ratio, ratio_step }
}

/// Create a new [Tatami] layout returned as a trait object ready to be added to your [LayoutStack].
/// Create a new [Tatami] layout returned as a trait object ready to be added to your layout stack.
pub fn boxed(ratio: f32, ratio_step: f32) -> Box<dyn Layout> {
Box::new(Tatami { ratio, ratio_step })
}
Expand Down
15 changes: 5 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,19 @@
//! ## Digging into the API
//!
//! The suggested reading order for getting to grips with the penrose API is to first look at the
//! [pure][7] data structures that represent the logical state of your window manager before digging
//! in to the [core][8] module which contains the majority of the functionality you are likely to
//! [pure] data structures that represent the logical state of your window manager before digging
//! in to the [core] module which contains the majority of the functionality you are likely to
//! want to work with. If you are interested in the lower level X11 interactions (or need to make
//! requests to the X server directly) you should check out the [x][9] module and its associated
//! traits. To add functionality and flexability to your window manager, there are the [builtin][10]
//! and [extensions][11] modules which offer capabilities built on top of the rest of penrose.
//! requests to the X server directly) you should check out the [x] module and its associated
//! traits. To add functionality and flexability to your window manager, there are the [builtin]
//! and [extensions] modules which offer capabilities built on top of the rest of penrose.
//!
//! [1]: https://dwm.suckless.org/
//! [2]: https://xmonad.org/
//! [3]: http://www.qtile.org/
//! [4]: https://www.rust-lang.org/learn
//! [5]: https://doc.rust-lang.org/book/
//! [6]: https://github.com/sminez/penrose/tree/develop/examples
//! [7]: crate::pure
//! [8]: crate::core
//! [9]: crate::x
//! [10]: crate::builtin
//! [11]: crate::extensions
#![warn(
clippy::complexity,
clippy::correctness,
Expand Down

0 comments on commit 355cc7c

Please sign in to comment.