Skip to main content

Source

Enum Source 

Source
pub enum Source {
    Launcher,
    Window {
        identifier: String,
    },
    File {
        path: PathBuf,
    },
    Clipboard {
        text: String,
    },
    Plugin {
        plugin: String,
        arg: String,
        variables: Vec<(String, String)>,
        mods: Vec<Mod>,
    },
    System {
        id: String,
    },
    Process {
        pid: u32,
    },
    Emoji {
        emoji: String,
    },
    Calc {
        answer: String,
    },
    Url {
        url: String,
    },
}
Expand description

Where a result came from. Determines how it is activated.

Variants§

§

Launcher

Produced by the pop-launcher service; activate by Indice.

§

Window

An open window, activated through the compositor rather than by launching anything. Carries only the compositor’s identifier string, so the engine stays free of Wayland types.

Fields

§identifier: String

The compositor’s opaque handle for the window.

§

File

A file on disk, opened with the user’s default handler.

Fields

§path: PathBuf

Absolute path to the file.

§

Clipboard

A clipboard history entry; activating it copies the text back.

Fields

§text: String

The stored text, copied back on activation.

§

Plugin

Produced by a jump plugin; activate by running the plugin’s action.

Fields

§plugin: String

Directory name of the plugin that produced this item.

§arg: String

Opaque payload handed back to the plugin on activation.

§variables: Vec<(String, String)>

Alfred-style variables, exported into the activation command’s environment. Sorted, so two equal items compare equal.

§mods: Vec<Mod>

Alternate actions on modifier+Enter, Alfred’s mods.

§

System

A built-in command provided by the frontend — toggling dark mode, opening a settings page. Carries only an identifier so the engine stays free of desktop specifics; the frontend maps it to an action.

Fields

§id: String

Stable command identifier, e.g. dark-mode.

§

Process

A running process; activating it sends SIGTERM.

Fields

§pid: u32

Process id, valid only for the listing that produced it.

§

Emoji

An emoji. Activating it copies the character.

Distinct from Source::Clipboard even though both copy, because the row is drawn differently: the glyph is the icon, and reusing Clipboard left every emoji row showing a generic placeholder in the icon slot — caught by looking at it, not by any test.

Fields

§emoji: String

The character itself.

§

Calc

A calculator answer. Activating it copies the value, which is what the result is for — the answer is already on screen.

Fields

§answer: String

The value as Qalculate rendered it.

§

Url

A web link — a quicklink or a fallback search; activating it opens the URL with the user’s default handler.

Fields

§url: String

Fully-expanded URL, query already encoded in.

Trait Implementations§

Source§

impl Clone for Source

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Source

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Source

Source§

impl PartialEq for Source

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Source

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more