Struct lazybar_core::panels::Github
source · pub struct Github { /* private fields */ }Expand description
Displays the number of github notifications you have.
Trait Implementations§
source§impl PanelConfig for Github
impl PanelConfig for Github
source§fn parse(
name: &'static str,
table: &mut HashMap<String, Value>,
_global: &Config,
) -> Result<Self>
fn parse( name: &'static str, table: &mut HashMap<String, Value>, _global: &Config, ) -> Result<Self>
Configuration options:
interval: how long to wait between requests. The panel will never poll more often than this, but it may poll less often according to theX-Poll-Intervalheader of the reponse. See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#about-github-notifications for more information.token: A file path containing your GitHub token. Visit https://github.com/settings/tokens/new to generate a token. Thenotificationsscope is required.filter: An array of strings corresponding to notification reasons. See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#about-notification-reasons for details.include: Whether to include or exclude the reasons infilter. Ifincludeis true, only notifications with one of the reasons infilterwill be counted. Otherwise, only notifications with reasons not infilterwill be counted.show_zero: Whether or not the panel is shown when you have zero notifications.format: The formatting option. The only formatting option is%count%.attrs: A string specifying the attrs for the panel. SeeAttrs::parsefor details.highlight: A string specifying the highlight for the panel. SeeHighlight::parsefor details.- See
PanelCommon::parse_common.
source§fn props(&self) -> (&'static str, bool)
fn props(&self) -> (&'static str, bool)
Returns the name of the panel. If the panel supports events, each
instance must return a unique name.
source§fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>> + 'async_trait>>where
Self: 'async_trait,
fn run<'async_trait>(
self: Box<Self>,
cr: Rc<Context>,
global_attrs: Attrs,
height: i32,
) -> Pin<Box<dyn Future<Output = Result<(PanelStream, Option<ChannelEndpoint<Event, EventResponse>>)>> + 'async_trait>>where
Self: 'async_trait,
Performs any necessary setup, then returns a
PanelStream
representing the provided PanelConfig. Read moreAuto Trait Implementations§
impl Freeze for Github
impl !RefUnwindSafe for Github
impl !Send for Github
impl !Sync for Github
impl Unpin for Github
impl !UnwindSafe for Github
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)