Display the stats of your AMD GPU
+Key | Values | Default |
---|---|---|
device | The device in /sys/class/drm/ to read from. | Any AMD card |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $utilization " |
format_alt | If set, block will switch between format and format_alt on every click | None |
interval | Update interval in seconds | 5 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
utilization | GPU utilization | Number | % |
vram_total | Total VRAM | Number | Bytes |
vram_used | Used VRAM | Number | Bytes |
vram_used_percents | Used VRAM / Total VRAM | Number | % |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
[[block]]
+block = "amd_gpu"
+format = " $icon $utilization "
+format_alt = " $icon MEM: $vram_used_percents ($vram_used/$vram_total) "
+interval = 1
gpu
pub struct Config {
+ pub device: Option<String>,
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub interval: Seconds,
+}
device: Option<String>
§format: FormatConfig
§format_alt: Option<FormatConfig>
§interval: Seconds
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Device { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe brightness of a backlight device
+This block reads brightness information directly from the filesystem, so it works under both
+X11 and Wayland. The block uses inotify
to listen for changes in the device’s brightness
+directly, so there is no need to set an update interval. This block uses DBus to set brightness
+level using the mouse wheel, but will fallback to sysfs if systemd-logind
is not used.
Some devices expose raw values that are best handled with nonlinear scaling. The human perception of lightness is close to the cube root of relative luminance, so settings for root_scaling
between 2.4 and 3.0 are worth trying. For devices with few discrete steps this should be 1.0 (linear). More information: https://en.wikipedia.org/wiki/Lightness
Key | Values | Default |
---|---|---|
device | A regex to match against /sys/class/backlight devices to read brightness information from (can match 1 or more devices). When there is no device specified, this block will display information for all devices found in the /sys/class/backlight directory. | Default device |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $brightness " |
missing_format | A string to customise the output of this block. No placeholders available | " no backlight devices " |
step_width | The brightness increment to use when scrolling, in percent | 5 |
minimum | The minimum brightness that can be scrolled down to | 5 |
maximum | The maximum brightness that can be scrolled up to | 100 |
cycle | The brightnesses to cycle through on each click | [minimum, maximum] |
root_scaling | Scaling exponent reciprocal (ie. root) | 1.0 |
invert_icons | Invert icons’ ordering, useful if you have colorful emoji | false |
ddcci_sleep_multiplier | See ddcutil documentation | 1.0 |
ddcci_max_tries_write_read | The maximum number of times to attempt writing to or reading from a ddcci monitor | 10 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on backlight’s state | Icon | - |
brightness | Current brightness | Number | % |
Action | Default button |
---|---|
cycle | Left |
brightness_up | Wheel Up |
brightness_down | Wheel Down |
[[block]]
+block = "backlight"
+device = "intel_backlight"
Hide missing backlight:
+[[block]]
+block = "backlight"
+missing_format = ""
Additional display brightness calibration can be set in $XDG_CONFIG_HOME/calibright/config.toml
+See https://github.com/bim9262/calibright for more details.
+This block will override any global config set in $XDG_CONFIG_HOME/calibright/config.toml
If you don’t use systemd-logind
i3status-rust will attempt to set the brightness
+using sysfs. In order to do this you’ll need to have write permission.
+You can do this by writing a udev
rule for your system.
First, check that your user is a member of the “video” group using the
+groups
command. Then add a rule in the /etc/udev/rules.d/
directory
+containing the following, for example in backlight.rules
:
ACTION=="add", SUBSYSTEM=="backlight", GROUP="video", MODE="0664"
This will allow the video group to modify all backlight devices. You will +also need to restart for this rule to take effect.
+backlight
(as a progression)pub struct Config {
+ pub device: Option<String>,
+ pub format: FormatConfig,
+ pub missing_format: FormatConfig,
+ pub step_width: f64,
+ pub minimum: f64,
+ pub maximum: f64,
+ pub cycle: Option<Vec<f64>>,
+ pub invert_icons: bool,
+ pub root_scaling: Option<f64>,
+ pub ddcci_sleep_multiplier: Option<f64>,
+ pub ddcci_max_tries_write_read: Option<u8>,
+}
device: Option<String>
§format: FormatConfig
§missing_format: FormatConfig
§step_width: f64
§minimum: f64
§maximum: f64
§cycle: Option<Vec<f64>>
§invert_icons: bool
§root_scaling: Option<f64>
§ddcci_sleep_multiplier: Option<f64>
§ddcci_max_tries_write_read: Option<u8>
Return Config { device: Default::default(), format: Default::default(), missing_format: Default::default(), step_width: 5.0, minimum: 5.0, maximum: 100.0, cycle: Default::default(), invert_icons: Default::default(), root_scaling: Default::default(), ddcci_sleep_multiplier: Default::default(), ddcci_max_tries_write_read: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum BatteryDriver {
+ Sysfs,
+ ApcUps,
+ Upower,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreInformation about the internal power supply
+This block can display the current battery state (Full, Charging or Discharging), percentage +charged and estimate time until (dis)charged for an internal power supply.
+Key | Values | Default |
---|---|---|
device | sysfs/UPower: The device in /sys/class/power_supply/ to read from (can also be “DisplayDevice” for UPower, which is a single logical power source representing all physical power sources. This is for example useful if your system has multiple batteries, in which case the DisplayDevice behaves as if you had a single larger battery.). apc_ups: IPv4Address:port or hostname:port | sysfs: the first battery device found in /sys/class/power_supply, with “BATx” or “CMBx” entries taking precedence. apc_ups: “localhost:3551”. upower: DisplayDevice |
driver | One of "sysfs" , "apc_ups" , or "upower" | "sysfs" |
model | If present, the contents of /sys/class/power_supply/.../model_name must match this value. Typical use is to select by model name on devices that change their path. | N/A |
interval | Update interval, in seconds. Only relevant for driver = “sysfs” or “apc_ups”. | 10 |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $percentage " |
full_format | Same as format but for when the battery is full | " $icon " |
charging_format | Same as format but for when the battery is charging | Links to format |
empty_format | Same as format but for when the battery is empty | " $icon " |
not_charging_format | Same as format but for when the battery is not charging. Defaults to the full battery icon as many batteries report this status when they are full. | " $icon " |
missing_format | Same as format if the battery cannot be found. | " $icon " |
info | Minimum battery level, where state is set to info | 60 |
good | Minimum battery level, where state is set to good | 60 |
warning | Minimum battery level, where state is set to warning | 30 |
critical | Minimum battery level, where state is set to critical | 15 |
full_threshold | Percentage above which the battery is considered full (full_format shown) | 95 |
empty_threshold | Percentage below which the battery is considered empty | 7.5 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on battery’s state | Icon | - |
percentage | Battery level, in percent | Number | Percents |
time_remaining | Time remaining until (dis)charge is complete. Presented only if battery’s status is (dis)charging. | Duration | - |
time | Time remaining until (dis)charge is complete. Presented only if battery’s status is (dis)charging. | String DEPRECATED | - |
power | Power consumption by the battery or from the power supply when charging | String or Float | Watts |
time
has been deprecated in favor of time_remaining
.
Basic usage:
+[[block]]
+block = "battery"
+format = " $icon $percentage "
[[block]]
+block = "battery"
+format = " $percentage {$time_remaining.dur(hms:true, min_unit:m) |}"
+device = "DisplayDevice"
+driver = "upower"
Hide missing battery:
+[[block]]
+block = "battery"
+missing_format = ""
bat
(as a progression)bat_charging
(as a progression)bat_not_available
pub struct Config {Show 16 fields
+ pub device: Option<String>,
+ pub driver: BatteryDriver,
+ pub model: Option<String>,
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub full_format: FormatConfig,
+ pub charging_format: FormatConfig,
+ pub empty_format: FormatConfig,
+ pub not_charging_format: FormatConfig,
+ pub missing_format: FormatConfig,
+ pub info: f64,
+ pub good: f64,
+ pub warning: f64,
+ pub critical: f64,
+ pub full_threshold: f64,
+ pub empty_threshold: f64,
+}
device: Option<String>
§driver: BatteryDriver
§model: Option<String>
§interval: Seconds
§format: FormatConfig
§full_format: FormatConfig
§charging_format: FormatConfig
§empty_format: FormatConfig
§not_charging_format: FormatConfig
§missing_format: FormatConfig
§info: f64
§good: f64
§warning: f64
§critical: f64
§full_threshold: f64
§empty_threshold: f64
Return Config { device: Default::default(), driver: Default::default(), model: Default::default(), interval: 10.into(), format: Default::default(), full_format: Default::default(), charging_format: Default::default(), empty_format: Default::default(), not_charging_format: Default::default(), missing_format: Default::default(), info: 60.0, good: 60.0, warning: 30.0, critical: 15.0, full_threshold: 95.0, empty_threshold: 7.5 }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreMonitor Bluetooth device
+This block displays the connectivity of a given Bluetooth device and the battery level if this +is supported. Relies on the Bluez D-Bus API.
+When the device can be identified as an audio headset, a keyboard, joystick, or mouse, use the +relevant icon. Otherwise, fall back on the generic Bluetooth symbol.
+Right-clicking the block will attempt to connect (or disconnect) the device.
+Note: battery level information is not reported for some devices. Enabling experimental
+features of bluez
+may fix it.
Key | Values | Default |
---|---|---|
mac | MAC address of the Bluetooth device | Required |
adapter_mac | MAC Address of the Bluetooth adapter (in case your device was connected to multiple currently available adapters) | None |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $name{ $percentage|} " |
disconnected_format | A string to customise the output of this block. See below for available placeholders. | " $icon{ $name|} " |
battery_state | A mapping from battery percentage to block’s state (color). See example below. | 0..15 -> critical, 16..30 -> warning, 31..60 -> info, 61..100 -> good |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on what type of device is connected | Icon | - |
name | Device’s name | Text | - |
percentage | Device’s battery level (may be absent if the device is not supported) | Number | % |
battery_icon | Battery icon (may be absent if the device is not supported) | Icon | - |
available | Present if the device is available | Flag | - |
Action | Default button |
---|---|
toggle | Right |
This example just shows the icon when device is connected.
+[[block]]
+block = "bluetooth"
+mac = "00:18:09:92:1B:BA"
+disconnected_format = ""
+format = " $icon "
+[block.battery_state]
+"0..20" = "critical"
+"21..70" = "warning"
+"71..100" = "good"
headphones
for bluetooth devices identifying as “audio-card”, “audio-headset” or “audio-headphones”joystick
for bluetooth devices identifying as “input-gaming”keyboard
for bluetooth devices identifying as “input-keyboard”mouse
for bluetooth devices identifying as “input-mouse”bluetooth
for all other devicespub struct Config {
+ pub mac: String,
+ pub adapter_mac: Option<String>,
+ pub format: FormatConfig,
+ pub disconnected_format: FormatConfig,
+ pub battery_state: Option<RangeMap<u8, State>>,
+}
mac: String
§adapter_mac: Option<String>
§format: FormatConfig
§disconnected_format: FormatConfig
§battery_state: Option<RangeMap<u8, State>>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum AuthConfig {
+ Unauthenticated,
+ Basic(BasicAuthConfig),
+ OAuth2(OAuth2Config),
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum CalendarError {
+ Http(Error),
+ Deserialize(DeError),
+ Parsing(String),
+ AuthRequired,
+ Io(Error),
+ Serialize(Error),
+ RequestToken(String),
+ StoreToken(TokenStoreError),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreCalendar
+This block displays upcoming calendar events retrieved from a CalDav ICalendar server.
+Key | Values | Default |
---|---|---|
next_event_format | A string to customize the output of this block when there is a next event in the calendar. See below for available placeholders. | " $icon $start.datetime(f:‘%a %H:%M’) $summary " |
ongoing_event_format | A string to customize the output of this block when an event is ongoing. | " $icon $summary (ends at $end.datetime(f:‘%H:%M’)) " |
no_events_format | A string to customize the output of this block when there are no events | " $icon " |
redirect_format | A string to customize the output of this block when the authorization is asked | " $icon Check your web browser " |
fetch_interval | Fetch events interval in seconds | 60 |
alternate_events_interval | Alternate overlapping events interval in seconds | 10 |
events_within_hours | Number of hours to look for events in the future | 48 |
source | Array of sources to pull calendars from | [] |
warning_threshold | Warning threshold in seconds for the upcoming event | 300 |
browser_cmd | Command to open event details in a browser. The block passes the HTML link as an argument | "xdg-open" |
Key | Values | Default |
---|---|---|
url | CalDav calendar server URL | N/A |
auth | Authentication configuration (unauthenticated, basic, or oauth2) | unauthenticated |
calendars | List of calendar names to monitor. If empty, all calendars will be fetched. | [] |
Note: Currently only one source is supported
+Action | Description | Default button |
---|---|---|
open_link | Opens the HTML link of the event | Left |
[[block]]
+block = "calendar"
+next_event_format = " $icon $start.datetime(f:'%a %H:%M') $summary "
+ongoing_event_format = " $icon $summary (ends at $end.datetime(f:'%H:%M')) "
+no_events_format = " $icon no events "
+fetch_interval = 30
+alternate_events_interval = 10
+events_within_hours = 48
+warning_threshold = 600
+browser_cmd = "firefox"
+[[block.source]]
+url = "https://caldav.example.com/calendar/"
+calendars = ["user/calendar"]
+[block.source.auth]
+type = "unauthenticated"
[[block]]
+block = "calendar"
+next_event_format = " $icon $start.datetime(f:'%a %H:%M') $summary "
+ongoing_event_format = " $icon $summary (ends at $end.datetime(f:'%H:%M')) "
+no_events_format = " $icon no events "
+fetch_interval = 30
+alternate_events_interval = 10
+events_within_hours = 48
+warning_threshold = 600
+browser_cmd = "firefox"
+[[block.source]]
+url = "https://caldav.example.com/calendar/"
+calendars = [ "Holidays" ]
+[block.source.auth]
+type = "basic"
+username = "your_username"
+password = "your_password"
Note: You can also configure the username
and password
in a separate TOML file.
~/.config/i3status-rust/example_credentials.toml
username = "my-username"
+password = "my-password"
Source auth configuration with credentials_path
:
[block.source.auth]
+type = "basic"
+credentials_path = "~/.config/i3status-rust/example_credentials.toml"
To access the CalDav API of Google, follow these steps to enable the API and obtain the client_id
and client_secret
:
http://localhost:8080
.client_id
and client_secret
.[[block]]
+block = "calendar"
+next_event_format = " $icon $start.datetime(f:'%a %H:%M') $summary "
+ongoing_event_format = " $icon $summary (ends at $end.datetime(f:'%H:%M')) "
+no_events_format = " $icon no events "
+fetch_interval = 30
+alternate_events_interval = 10
+events_within_hours = 48
+warning_threshold = 600
+browser_cmd = "firefox"
+[[block.source]]
+url = "https://apidata.googleusercontent.com/caldav/v2/"
+calendars = ["primary"]
+[block.source.auth]
+type = "oauth2"
+client_id = "your_client_id"
+client_secret = "your_client_secret"
+auth_url = "https://accounts.google.com/o/oauth2/auth"
+token_url = "https://oauth2.googleapis.com/token"
+auth_token = "~/.config/i3status-rust/calendar.auth_token"
+redirect_port = 8080
+scopes = ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.events"]
Note: You can also configure the client_id
and client_secret
in a separate TOML file.
~/.config/i3status-rust/google_credentials.toml
client_id = "my-client_id"
+client_secret = "my-client_secret"
Source auth configuration with credentials_path
:
[block.source.auth]
+type = "oauth2"
+credentials_path = "~/.config/i3status-rust/google_credentials.toml"
+auth_url = "https://accounts.google.com/o/oauth2/auth"
+token_url = "https://oauth2.googleapis.com/token"
+auth_token = "~/.config/i3status-rust/calendar.auth_token"
+redirect_port = 8080
+scopes = ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.events"]
The format configuration is a string that can include placeholders to be replaced with dynamic content. +Placeholders can be:
+$summary
: Summary of the event$description
: Description of the event$url
: Url of the event$location
: Location of the event$start
: Start time of the event$end
: End time of the eventcalendar
pub struct BasicAuthConfig {
+ pub credentials: BasicCredentials,
+ pub credentials_path: Option<ShellString>,
+}
credentials: BasicCredentials
§credentials_path: Option<ShellString>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct BasicCredentials {
+ pub username: Option<String>,
+ pub password: Option<String>,
+}
username: Option<String>
§password: Option<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Config {
+ pub next_event_format: FormatConfig,
+ pub ongoing_event_format: FormatConfig,
+ pub no_events_format: FormatConfig,
+ pub redirect_format: FormatConfig,
+ pub fetch_interval: Seconds,
+ pub alternate_events_interval: Seconds,
+ pub events_within_hours: u32,
+ pub source: Vec<SourceConfig>,
+ pub warning_threshold: u32,
+ pub browser_cmd: ShellString,
+}
next_event_format: FormatConfig
§ongoing_event_format: FormatConfig
§no_events_format: FormatConfig
§redirect_format: FormatConfig
§fetch_interval: Seconds
§alternate_events_interval: Seconds
§events_within_hours: u32
§source: Vec<SourceConfig>
§warning_threshold: u32
§browser_cmd: ShellString
Return Config { next_event_format: Default::default(), ongoing_event_format: Default::default(), no_events_format: Default::default(), redirect_format: Default::default(), fetch_interval: 60.into(), alternate_events_interval: 10.into(), events_within_hours: 48, source: Default::default(), warning_threshold: 300, browser_cmd: "xdg-open".into() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct OAuth2Config {
+ pub credentials: OAuth2Credentials,
+ pub credentials_path: Option<ShellString>,
+ pub auth_url: String,
+ pub token_url: String,
+ pub auth_token: ShellString,
+ pub redirect_port: u16,
+ pub scopes: Vec<Scope>,
+}
credentials: OAuth2Credentials
§credentials_path: Option<ShellString>
§auth_url: String
§token_url: String
§auth_token: ShellString
§redirect_port: u16
§scopes: Vec<Scope>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct OAuth2Credentials {
+ pub client_id: Option<String>,
+ pub client_secret: Option<String>,
+}
client_id: Option<String>
§client_secret: Option<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct SourceConfig {
+ pub url: String,
+ pub auth: AuthConfig,
+ pub calendars: Vec<String>,
+}
url: String
§auth: AuthConfig
§calendars: Vec<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreCPU statistics
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $utilization " |
format_alt | If set, block will switch between format and format_alt on every click | None |
interval | Update interval in seconds | 5 |
info_cpu | Percentage of CPU usage, where state is set to info | 30.0 |
warning_cpu | Percentage of CPU usage, where state is set to warning | 60.0 |
critical_cpu | Percentage of CPU usage, where state is set to critical | 90.0 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | An icon | Icon | - |
utilization | Average CPU utilization | Number | % |
utilization<N> | Utilization of Nth logical CPU | Number | % |
barchart | Utilization of all logical CPUs presented as a barchart | Text | - |
frequency | Average CPU frequency (may be absent if CPU is not supported) | Number | Hz |
frequency<N> | Frequency of Nth logical CPU (may be absent if CPU is not supported) | Number | Hz |
max_frequency | Max frequency of all logical CPUs | Number | Hz |
boost | CPU turbo boost status (may be absent if CPU is not supported) | Text | - |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
[[block]]
+block = "cpu"
+interval = 1
+format = " $icon $barchart $utilization "
+format_alt = " $icon $frequency{ $boost|} "
+info_cpu = 20
+warning_cpu = 50
+critical_cpu = 90
cpu
(as a progression)cpu_boost_on
cpu_boost_off
pub struct Config {
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub interval: Seconds,
+ pub info_cpu: f64,
+ pub warning_cpu: f64,
+ pub critical_cpu: f64,
+}
format: FormatConfig
§format_alt: Option<FormatConfig>
§interval: Seconds
§info_cpu: f64
§warning_cpu: f64
§critical_cpu: f64
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe output of a custom shell command
+For further customisation, use the json
option and have the shell command output valid JSON in the schema below:
{"icon": "...", "state": "...", "text": "...", "short_text": "..."}
icon
is optional (default “”)
+state
is optional, it may be Idle, Info, Good, Warning, Critical (default Idle)
+short_text
is optional.
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | "{ $icon|} $text.pango-str() " |
command | Shell command to execute & display | None |
persistent | Run command in the background; update display for each output line of the command | false |
cycle | Commands to execute and change when the button is clicked | None |
interval | Update interval in seconds (or “once” to update only once) | 10 |
json | Use JSON from command output to format the block. If the JSON is not valid, the block will error out. | false |
watch_files | Watch files to trigger update on file modification. Supports path expansions e.g. ~ . | None |
hide_when_empty | Hides the block when the command output (or json text field) is empty | false |
shell | Specify the shell to use when running commands | $SHELL if set, otherwise fallback to sh |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Value of icon field from JSON output when it’s non-empty | Icon | - |
text | Output of the script or text field from JSON output | Text | |
short_text | short_text field from JSON output | Text |
Action | Default button |
---|---|
cycle | Left |
Display temperature, update every 10 seconds:
+[[block]]
+block = "custom"
+command = ''' cat /sys/class/thermal/thermal_zone0/temp | awk '{printf("%.1f\n",$1/1000)}' '''
Cycle between “ON” and “OFF”, update every 1 second, run next cycle command when block is clicked:
+[[block]]
+block = "custom"
+cycle = ["echo ON", "echo OFF"]
+interval = 1
+[[block.click]]
+button = "left"
+action = "cycle"
Use JSON output:
+[[block]]
+block = "custom"
+command = "echo '{\"icon\":\"weather_thunder\",\"state\":\"Critical\", \"text\": \"Danger!\"}'"
+json = true
Display kernel, update the block only once:
+[[block]]
+block = "custom"
+command = "uname -r"
+interval = "once"
Display the screen brightness on an intel machine and update this only when pkill -SIGRTMIN+4 i3status-rs
is called:
[[block]]
+block = "custom"
+command = ''' cat /sys/class/backlight/intel_backlight/brightness | awk '{print $1}' '''
+signal = 4
+interval = "once"
Update block when one or more specified files are modified:
+[[block]]
+block = "custom"
+command = "cat custom_status"
+watch_files = ["custom_status"]
+interval = "once"
shellexpand
pub struct Config {
+ pub format: FormatConfig,
+ pub command: Option<String>,
+ pub persistent: bool,
+ pub cycle: Option<Vec<String>>,
+ pub interval: Seconds,
+ pub json: bool,
+ pub hide_when_empty: bool,
+ pub shell: Option<String>,
+ pub watch_files: Vec<ShellString>,
+}
format: FormatConfig
§command: Option<String>
§persistent: bool
§cycle: Option<Vec<String>>
§interval: Seconds
§json: bool
§hide_when_empty: bool
§shell: Option<String>
§watch_files: Vec<ShellString>
Return Config { format: Default::default(), command: Default::default(), persistent: Default::default(), cycle: Default::default(), interval: 10.into(), json: Default::default(), hide_when_empty: Default::default(), shell: Default::default(), watch_files: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreA block controlled by the DBus
+This block creates a new DBus object in rs.i3status
service. This object implements
+rs.i3status.custom
interface which allows you to set block’s icon, text and state.
Output of busctl --user introspect rs.i3status /<path> rs.i3status.custom
:
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
+rs.i3status.custom interface - - -
+.SetIcon method s s -
+.SetState method s s -
+.SetText method ss s -
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. | "{ $icon|}{ $text.pango-str()|} " |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Value of icon set via SetIcon if the value is non-empty string. | Icon | - |
text | Value of the first string from SetText | Text | - |
short_text | Value of the second string from SetText | Text | - |
Config:
+[[block]]
+block = "custom_dbus"
+path = "/my_path"
Usage:
+# set full text to 'hello' and short text to 'hi'
+busctl --user call rs.i3status /my_path rs.i3status.custom SetText ss hello hi
+# set icon to 'music'
+busctl --user call rs.i3status /my_path rs.i3status.custom SetIcon s music
+# set state to 'good'
+busctl --user call rs.i3status /my_path rs.i3status.custom SetState s good
Because it’s impossible to publish objects to the same name from different
+processes, having multiple dbus blocks in different bars won’t work. As a workaround,
+you can set the env var I3RS_DBUS_NAME
to set the interface a bar works on to
+differentiate between different processes. For example, setting this to ‘top’, will allow you
+to use rs.i3status.top
.
pub struct Config {
+ pub format: FormatConfig,
+ pub path: String,
+}
format: FormatConfig
§path: String
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreDisk I/O statistics
+Key | Values | Default |
---|---|---|
device | Block device name to monitor (as specified in /dev/ ) | If not set, device will be automatically selected every interval |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $speed_read.eng(prefix:K) $speed_write.eng(prefix:K) " |
interval | Update interval in seconds | 2 |
missing_format | Same as format but for when the device is missing | " × " |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
device | The name of device | Text | - |
speed_read | Read speed | Number | Bytes per second |
speed_write | Write speed | Number | Bytes per second |
[[block]]
+block = "disk_iostats"
+device = "sda"
+format = " $icon $speed_write.eng(prefix:K) "
disk_drive
pub struct Config {
+ pub device: Option<String>,
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub missing_format: FormatConfig,
+}
device: Option<String>
§interval: Seconds
§format: FormatConfig
§missing_format: FormatConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum InfoType {
+ Available,
+ Free,
+ Used,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreDisk usage statistics
+Key | Values | Default |
---|---|---|
path | Path to collect information from. Supports path expansions e.g. ~ . | "/" |
interval | Update time in seconds | 20 |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $available " |
format_alt | If set, block will switch between format and format_alt on every click | None |
warning | A value which will trigger warning block state | 20.0 |
alert | A value which will trigger critical block state | 10.0 |
info_type | Determines which information will affect the block state. Possible values are "available" , "free" and "used" | "available" |
alert_unit | The unit of alert and warning options. If not set, percents are used. Possible values are "B" , "KB" , "KiB" , "MB" , "MiB" , "GB" , "Gib" , "TB" and "TiB" | None |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
path | The value of path option | Text | - |
percentage | Free or used percentage. Depends on info_type | Number | % |
total | Total disk space | Number | Bytes |
used | Used disk space | Number | Bytes |
free | Free disk space | Number | Bytes |
available | Available disk space (free disk space minus reserved system space) | Number | Bytes |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
[[block]]
+block = "disk_space"
+info_type = "available"
+alert_unit = "GB"
+alert = 10.0
+warning = 15.0
+format = " $icon $available "
+format_alt = " $icon $available / $total "
Update block on right click:
+[[block]]
+block = "disk_space"
+[[block.click]]
+button = "right"
+update = true
Show the block only if less than 10GB is available:
+[[block]]
+block = "disk_space"
+format = " $free.eng(range:..10e9) |"
disk_drive
pub struct Config {
+ pub path: ShellString,
+ pub info_type: InfoType,
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub alert_unit: Option<String>,
+ pub interval: Seconds,
+ pub warning: f64,
+ pub alert: f64,
+}
path: ShellString
§info_type: InfoType
§format: FormatConfig
§format_alt: Option<FormatConfig>
§alert_unit: Option<String>
§interval: Seconds
§warning: f64
§alert: f64
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreLocal docker daemon status
+Key | Values | Default |
---|---|---|
interval | Update interval, in seconds. | 5 |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $running.eng(w:1) " |
socket_path | The path to the docker socket. Supports path expansions e.g. ~ . | "/var/run/docker.sock" |
Key | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
total | Total containers on the host | Number | - |
running | Containers running on the host | Number | - |
stopped | Containers stopped on the host | Number | - |
paused | Containers paused on the host | Number | - |
images | Total images on the host | Number | - |
[[block]]
+block = "docker"
+interval = 2
+format = " $icon $running/$total "
docker
pub struct Config {
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub socket_path: ShellString,
+}
interval: Seconds
§format: FormatConfig
§socket_path: ShellString
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum BlockConfig {
+Show 45 variants
amd_gpu(Config),
+ backlight(Config),
+ battery(Config),
+ bluetooth(Config),
+ calendar(Config),
+ cpu(Config),
+ custom(Config),
+ custom_dbus(Config),
+ disk_iostats(Config),
+ disk_space(Config),
+ docker(Config),
+ external_ip(Config),
+ focused_window(Config),
+ github(Config),
+ hueshift(Config),
+ kdeconnect(Config),
+ load(Config),
+ maildir(Config),
+ menu(Config),
+ memory(Config),
+ music(Config),
+ net(Config),
+ notify(Config),
+ notmuch(Config),
+ nvidia_gpu(Config),
+ packages(Config),
+ pomodoro(Config),
+ privacy(Config),
+ rofication(Config),
+ service_status(Config),
+ scratchpad(Config),
+ sound(Config),
+ speedtest(Config),
+ keyboard_layout(Config),
+ taskwarrior(Config),
+ temperature(Config),
+ time(Config),
+ tea_timer(Config),
+ toggle(Config),
+ uptime(Config),
+ vpn(Config),
+ watson(Config),
+ weather(Config),
+ xrandr(Config),
+ Err(&'static str, Error),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreExternal IP address and various information about it
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $ip $country_flag " |
interval | Interval in seconds for automatic updates | 300 |
with_network_manager | If ‘true’, listen for NetworkManager events and update the IP immediately if there was a change | true |
use_ipv4 | If ‘true’, use IPv4 for obtaining all info | false |
Key | Value | Type | Unit |
---|---|---|---|
ip | The external IP address, as seen from a remote server | Text | - |
version | IPv4 or IPv6 | Text | - |
city | City name, such as “San Francisco” | Text | - |
region | Region name, such as “California” | Text | - |
region_code | Region code, such as “CA” for California | Text | - |
country | Country code (2 letter, ISO 3166-1 alpha-2) | Text | - |
country_name | Short country name | Text | - |
country_code | Country code (2 letter, ISO 3166-1 alpha-2) | Text | - |
country_code_iso3 | Country code (3 letter, ISO 3166-1 alpha-3) | Text | - |
country_capital | Capital of the country | Text | - |
country_tld | Country specific TLD (top-level domain) | Text | - |
continent_code | Continent code | Text | - |
in_eu | Region code, such as “CA” | Flag | - |
postal | ZIP / Postal code | Text | - |
latitude | Latitude | Number | - (TODO: make degrees?) |
longitude | Longitude | Number | - (TODO: make degrees?) |
timezone | City | Text | - |
utc_offset | UTC offset (with daylight saving time) as +HHMM or -HHMM (HH is hours, MM is minutes) | Text | - |
country_calling_code | Country calling code (dial in code, comma separated) | Text | - |
currency | Currency code (ISO 4217) | Text | - |
currency_name | Currency name | Text | - |
languages | Languages spoken (comma separated 2 or 3 letter ISO 639 code with optional hyphen separated country suffix) | Text | - |
country_area | Area of the country (in sq km) | Number | - |
country_population | Population of the country | Number | - |
timezone | Time zone | Text | - |
org | Organization | Text | - |
asn | Autonomous system (AS) | Text | - |
country_flag | Flag of the country | Text (glyph) | - |
[[block]]
+block = "external_ip"
+format = " $ip $country_code "
All the information comes from https://ipapi.co/json/ +Check their documentation here: https://ipapi.co/api/#complete-location5
+The IP is queried, 1) When i3status-rs starts, 2) When a signal is received +on D-Bus about a network configuration change, 3) Every 5 minutes. This +periodic refresh exists to catch IP updates that don’t trigger a notification, +for example due to a IP refresh at the router.
+Flags: They are not icons but unicode glyphs. You will need a font that +includes them. Tested with: https://www.babelstone.co.uk/Fonts/Flags.html
+pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub with_network_manager: bool,
+ pub use_ipv4: bool,
+}
format: FormatConfig
§interval: Seconds
§with_network_manager: bool
§use_ipv4: bool
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Driver {
+ Auto,
+ SwayIpc,
+ WlrToplevelManagement,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreCurrently focused window
+This block displays the title and/or the active marks (when used with sway
/i3
) of the currently
+focused window. Supported WMs are: sway
, i3
and most wlroots-based compositors. See driver
+option for more info.
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $title.str(max_w:21) |" |
driver | Which driver to use. Available values: sway_ipc - for i3 and sway , wlr_toplevel_management - for Wayland compositors that implement wlr-foreign-toplevel-management-unstable-v1, auto - try to automatically guess which driver to use. | "auto" |
Placeholder | Value | Type | Unit |
---|---|---|---|
title | Window’s title (may be absent) | Text | - |
marks | Window’s marks (present only with sway/i3) | Text | - |
visible_marks | Window’s marks that do not start with _ (present only with sway/i3) | Text | - |
[[block]]
+block = "focused_window"
+[block.format]
+full = " $title.str(max_w:15) |"
+short = " $title.str(max_w:10) |"
This example instead of hiding block when the window’s title is empty displays “Missing”
+[[block]]
+block = "focused_window"
+format = " $title.str(0,21) | Missing "
pub struct Config {
+ pub format: FormatConfig,
+ pub driver: Driver,
+}
format: FormatConfig
§driver: Driver
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe number of GitHub notifications
+This block shows the unread notification count for a GitHub account. A GitHub personal access token with the “notifications” scope is required, and must be passed using the I3RS_GITHUB_TOKEN
environment variable or token
configuration option. Optionally the colour of the block is determined by the highest notification in the following lists from highest to lowest: critical
,warning
,info
,good
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $total.eng(w:1) " |
interval | Update interval in seconds | 30 |
token | A GitHub personal access token with the “notifications” scope | None |
hide_if_total_is_zero | Hide this block if the total count of notifications is zero | false |
critical | List of notification types that change the block to the critical colour | None |
warning | List of notification types that change the block to the warning colour | None |
info | List of notification types that change the block to the info colour | None |
good | List of notification types that change the block to the good colour | None |
All the placeholders are numbers without a unit.
+Placeholder | Value |
---|---|
icon | A static icon |
total | The total number of notifications |
assign | You were assigned to the issue |
author | You created the thread |
comment | You commented on the thread |
ci_activity | A GitHub Actions workflow run that you triggered was completed |
invitation | You accepted an invitation to contribute to the repository |
manual | You subscribed to the thread (via an issue or pull request) |
mention | You were specifically @mentioned in the content |
review_requested | You, or a team you’re a member of, were requested to review a pull request |
security_alert | GitHub discovered a security vulnerability in your repository |
state_change | You changed the thread state (for example, closing an issue or merging a pull request) |
subscribed | You’re watching the repository |
team_mention | You were on a team that was mentioned |
[[block]]
+block = "github"
+format = " $icon $total.eng(w:1)|$mention.eng(w:1) "
+interval = 60
+token = "..."
[[block]]
+block = "github"
+token = "..."
+format = " $icon $total.eng(w:1) "
+info = ["total"]
+warning = ["mention","review_requested"]
+hide_if_total_is_zero = true
github
pub struct Config {
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub token: Option<String>,
+ pub hide_if_total_is_zero: bool,
+ pub good: Option<Vec<String>>,
+ pub info: Option<Vec<String>>,
+ pub warning: Option<Vec<String>>,
+ pub critical: Option<Vec<String>>,
+}
interval: Seconds
§format: FormatConfig
§token: Option<String>
§hide_if_total_is_zero: bool
§good: Option<Vec<String>>
§info: Option<Vec<String>>
§warning: Option<Vec<String>>
§critical: Option<Vec<String>>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum HueShifter {
+ Redshift,
+ Sct,
+ Gammastep,
+ Wlsunset,
+ WlGammarelay,
+ WlGammarelayRs,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreManage display temperature
+This block displays the current color temperature in Kelvin. When scrolling upon the block the color temperature is changed.
+A left click on the block sets the color temperature to click_temp
that is by default to 6500K
.
+A right click completely resets the color temperature to its default value (6500K
).
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $temperature " |
step | The step color temperature is in/decreased in Kelvin. | 100 |
hue_shifter | Program used to control screen color. | Detect automatically |
max_temp | Max color temperature in Kelvin. | 10000 |
min_temp | Min color temperature in Kelvin. | 1000 |
click_temp | Left click color temperature in Kelvin. | 6500 |
Placeholder | Value | Type | Unit |
---|---|---|---|
temperature | Current temperature | Number | - |
Action | Default button |
---|---|
set_click_temp | Left |
reset | Right |
temperature_up | Wheel Up |
temperature_down | Wheel Down |
Name | Supports |
---|---|
"redshift" | X11 |
"sct" | X11 |
"gammastep" | X11 and Wayland |
"wl_gammarelay" | Wayland |
"wl_gammarelay_rs" | Wayland |
"wlsunset" | Wayland |
Note that at the moment, only wl_gammarelay
and
+wl_gammarelay_rs
+subscribe to the events and update the bar when the temperature is modified externally. Also,
+these are the only drivers at the moment that work under Wayland without flickering.
[[block]]
+block = "hueshift"
+hue_shifter = "redshift"
+step = 50
+click_temp = 3500
A hard limit is set for the max_temp
to 10000K
and the same for the min_temp
which is 1000K
.
+The step
has a hard limit as well, defined to 500K
to avoid too brutal changes.
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub max_temp: u16,
+ pub min_temp: u16,
+ pub current_temp: u16,
+ pub hue_shifter: Option<HueShifter>,
+ pub step: u16,
+ pub click_temp: u16,
+}
format: FormatConfig
§interval: Seconds
§max_temp: u16
§min_temp: u16
§current_temp: u16
§hue_shifter: Option<HueShifter>
§step: u16
§click_temp: u16
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe collection of blocks
+Blocks are defined as a TOML array of tables: [[block]]
Key | Description | Default |
---|---|---|
block | Name of the i3status-rs block you want to use. See modules below for valid block names. | - |
signal | Signal value that causes an update for this block with 0 corresponding to -SIGRTMIN+0 and the largest value being -SIGRTMAX | None |
if_command | Only display the block if the supplied command returns 0 on startup. | None |
merge_with_next | If true this will group the block with the next one, so rendering such as alternating_tint will apply to the whole group | false |
icons_format | Overrides global icons_format | None |
error_format | Overrides global error_format | None |
error_fullscreen_format | Overrides global error_fullscreen_format | None |
error_interval | How long to wait until restarting the block after an error occurred. | 5 |
[block.theme_overrides] | Same as the top-level config option, but for this block only. Refer to Themes and Icons below. | None |
[block.icons_overrides] | Same as the top-level config option, but for this block only. Refer to Themes and Icons below. | None |
[[block.click]] | Set or override click action for the block. See below for details. | Block default / None |
Per block click configuration [[block.click]]
:
Key | Description | Default |
---|---|---|
button | left , middle , right , up /wheel_up , down /wheel_down , wheel_left , wheel_right , forward , back or double_left . | - |
widget | To which part of the block this entry applies (accepts regex) | "block" |
cmd | Command to run when the mouse button event is detected. | None |
action | Which block action to trigger | None |
sync | Whether to wait for command to exit or not. | false |
update | Whether to update the block on click. | false |
KDEConnect indicator
+Display info from the currently connected device in KDEConnect, updated asynchronously.
+Block colours are updated based on the battery level, unless all bat_* thresholds are set to 0, +in which case the block colours will depend on the notification count instead.
+Key | Values | Default |
---|---|---|
device_id | Device ID as per the output of kdeconnect --list-devices . | Chooses the first found device, if any. |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $name{ $bat_icon $bat_charge|}{ $notif_icon|} " |
format_disconnected | Same as format but when device is disconnected | " $icon " |
format_missing | Same as format but when device does not exist | " $icon x " |
bat_info | Min battery level below which state is set to info. | 60 |
bat_good | Min battery level below which state is set to good. | 60 |
bat_warning | Min battery level below which state is set to warning. | 30 |
bat_critical | Min battery level below which state is set to critical. | 15 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on connection’s status | Icon | - |
bat_icon | Battery level indicator (only when connected and if supported) | Icon | - |
bat_charge | Battery charge level (only when connected and if supported) | Number | % |
network_icon | Cell Network indicator (only when connected and if supported) | Icon | - |
network_type | Cell Network type (only when connected and if supported) | Text | - |
network_strength | Cell Network level (only when connected and if supported) | Number | % |
notif_icon | Only when connected and there are notifications | Icon | - |
notif_count | Number of notifications on your phone (only when connected and non-zero) | Number | - |
name | Name of your device as reported by KDEConnect (if available) | Text | - |
Do not show the name, do not set the “good” state.
+[[block]]
+block = "kdeconnect"
+format = " $icon {$bat_icon $bat_charge |}{$notif_icon |}{$network_icon$network_strength $network_type |}"
+bat_good = 101
bat
(as a progression)bat_charging
(as a progression)net_cellular
(as a progression)notification
phone
phone_disconnected
pub struct Config {
+ pub device_id: Option<String>,
+ pub format: FormatConfig,
+ pub disconnected_format: FormatConfig,
+ pub missing_format: FormatConfig,
+ pub bat_good: u8,
+ pub bat_info: u8,
+ pub bat_warning: u8,
+ pub bat_critical: u8,
+}
device_id: Option<String>
§format: FormatConfig
§disconnected_format: FormatConfig
§missing_format: FormatConfig
§bat_good: u8
§bat_info: u8
§bat_warning: u8
§bat_critical: u8
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum KeyboardLayoutDriver {
+ XkbEvent,
+ SetXkbMap,
+ XkbSwitch,
+ LocaleBus,
+ KbddBus,
+ Sway,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreKeyboard layout indicator
+Six drivers are available:
+xkbevent
which can read asynchronous updates from the x11 eventssetxkbmap
(alias for xkbevent
) DEPRECATEDxkbswitch
(alias for xkbevent
) DEPRECATEDlocalebus
which can read asynchronous updates from the systemd org.freedesktop.locale1
D-Bus pathkbddbus
which uses kbdd to monitor per-window layout changes via DBussway
which can read asynchronous updates from the sway IPCsetxkbmap
and xkbswitch
are deprecated and will be removed in v0.35.0.
Which of these methods is appropriate will depend on your system setup.
+Key | Values | Default |
---|---|---|
driver | One of "xkbevent" , "setxkbmap" , "xkbswitch" , "localebus" , "kbddbus" or "sway" , depending on your system. | "xkbevent" |
interval DEPRECATED | Update interval, in seconds. Only used by the "setxkbmap" driver. | 60 |
format | A string to customise the output of this block. See below for available placeholders. | " $layout " |
sway_kb_identifier | Identifier of the device you want to monitor, as found in the output of swaymsg -t get_inputs . | Defaults to first input found |
mappings | Map layout (variant) to custom short name. | None |
interval
is deprecated and will be removed in v0.35.0.
Key | Value | Type |
---|---|---|
layout | Keyboard layout name | String |
variant | Keyboard variant name or N/A if not applicable | String |
Listen to D-Bus for changes:
+[[block]]
+block = "keyboard_layout"
+driver = "localebus"
Listen to kbdd for changes, the text is in the following format: +“English (US)” - {$layout ($variant)} +use block.mappings to override with shorter names as shown below. +Also use format = “ $layout ($variant) “ to see the full text to map, +or you can use: +dbus-monitor interface=ru.gentoo.kbdd +to see the exact variant spelling
+[[block]]
+block = "keyboard_layout"
+driver = "kbddbus"
+[block.mappings]
+"English (US)" = "us"
+"Bulgarian (new phonetic)" = "bg"
Listen to sway for changes:
+[[block]]
+block = "keyboard_layout"
+driver = "sway"
+sway_kb_identifier = "1133:49706:Gaming_Keyboard_G110"
Listen to sway for changes and override mappings:
+[[block]]
+block = "keyboard_layout"
+driver = "sway"
+format = " $layout "
+[block.mappings]
+"English (Workman)" = "EN"
+"Russian (N/A)" = "RU"
Listen to xkb events for changes:
+[[block]]
+block = "keyboard_layout"
+driver = "xkbevent"
pub struct Config {
+ pub format: FormatConfig,
+ pub driver: KeyboardLayoutDriver,
+ pub interval: Seconds,
+ pub sway_kb_identifier: Option<String>,
+ pub mappings: Option<HashMap<String, String>>,
+}
format: FormatConfig
§driver: KeyboardLayoutDriver
§interval: Seconds
§sway_kb_identifier: Option<String>
§mappings: Option<HashMap<String, String>>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreSystem load average
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $1m.eng(w:4) " |
interval | Update interval in seconds | 3 |
info | Minimum load, where state is set to info | 0.3 |
warning | Minimum load, where state is set to warning | 0.6 |
critical | Minimum load, where state is set to critical | 0.9 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
1m | 1 minute load average | Number | - |
5m | 5 minute load average | Number | - |
15m | 15 minute load average | Number | - |
[[block]]
+block = "load"
+format = " $icon 1min avg: $1m.eng(w:4) "
+interval = 1
cogs
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub info: f64,
+ pub warning: f64,
+ pub critical: f64,
+}
format: FormatConfig
§interval: Seconds
§info: f64
§warning: f64
§critical: f64
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum MailType {
+ New,
+ Cur,
+ All,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreUnread mail. Only supports maildir format.
+Note that you need to enable maildir
feature to use this block:
cargo build --release --features maildir
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $status " |
inboxes | List of maildir inboxes to look for mails in. Supports path/glob expansions (e.g. ~ and * ). | Required |
threshold_warning | Number of unread mails where state is set to warning. | 1 |
threshold_critical | Number of unread mails where state is set to critical. | 10 |
interval | Update interval, in seconds. | 5 |
display_type | Which part of the maildir to count: "new" , "cur" , or "all" . | "new" |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
status | Number of emails | Number | - |
[[block]]
+block = "maildir"
+interval = 60
+inboxes = ["~/mail/local", "~/maildir/account1/*"]
+threshold_warning = 1
+threshold_critical = 10
+display_type = "new"
mail
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub inboxes: Vec<String>,
+ pub threshold_warning: usize,
+ pub threshold_critical: usize,
+ pub display_type: MailType,
+}
format: FormatConfig
§interval: Seconds
§inboxes: Vec<String>
§threshold_warning: usize
§threshold_critical: usize
§display_type: MailType
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreMemory and swap usage
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block when in “Memory” view. See below for available placeholders. | " $icon $mem_used.eng(prefix:Mi)/$mem_total.eng(prefix:Mi)($mem_used_percents.eng(w:2)) " |
format_alt | If set, block will switch between format and format_alt on every click | None |
interval | Update interval in seconds | 5 |
warning_mem | Percentage of memory usage, where state is set to warning | 80.0 |
warning_swap | Percentage of swap usage, where state is set to warning | 80.0 |
critical_mem | Percentage of memory usage, where state is set to critical | 95.0 |
critical_swap | Percentage of swap usage, where state is set to critical | 95.0 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Memory icon | Icon | - |
icon_swap | Swap icon | Icon | - |
mem_total | Total physical ram available | Number | Bytes |
mem_free | Free memory not yet used by the kernel or userspace (in general you should use mem_avail) | Number | Bytes |
mem_free_percents | as above but as a percentage of total memory | Number | Percents |
mem_avail | Kernel estimate of usable free memory which includes cached memory and buffers | Number | Bytes |
mem_avail_percents | as above but as a percentage of total memory | Number | Percents |
mem_total_used | mem_total - mem_free | Number | Bytes |
mem_total_used_percents | as above but as a percentage of total memory | Number | Percents |
mem_used | Memory used, excluding cached memory and buffers; same as htop’s green bar | Number | Bytes |
mem_used_percents | as above but as a percentage of total memory | Number | Percents |
buffers | Buffers, similar to htop’s blue bar | Number | Bytes |
buffers_percent | as above but as a percentage of total memory | Number | Percents |
cached | Cached memory (taking into account ZFS ARC cache), similar to htop’s yellow bar | Number | Bytes |
cached_percent | as above but as a percentage of total memory | Number | Percents |
swap_total | Swap total | Number | Bytes |
swap_free | Swap free | Number | Bytes |
swap_free_percents | as above but as a percentage of total memory | Number | Percents |
swap_used | Swap used | Number | Bytes |
swap_used_percents | as above but as a percentage of total memory | Number | Percents |
zram_compressed | Compressed zram memory usage | Number | Bytes |
zram_decompressed | Decompressed zram memory usage | Number | Bytes |
‘zram_comp_ratio’ | Ratio of the decompressed/compressed zram memory | Number | - |
zswap_compressed | Compressed zswap memory usage (>=Linux 5.19) | Number | Bytes |
zswap_decompressed | Decompressed zswap memory usage (>=Linux 5.19) | Number | Bytes |
zswap_decompressed_percents | as above but as a percentage of total zswap memory (>=Linux 5.19) | Number | Percents |
‘zswap_comp_ratio’ | Ratio of the decompressed/compressed zswap memory (>=Linux 5.19) | Number | - |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
[[block]]
+block = "memory"
+format = " $icon $mem_used_percents.eng(w:1) "
+format_alt = " $icon_swap $swap_free.eng(w:3,u:B,p:Mi)/$swap_total.eng(w:3,u:B,p:Mi)($swap_used_percents.eng(w:2)) "
+interval = 30
+warning_mem = 70
+critical_mem = 90
Show swap and hide if it is zero:
+[[block]]
+block = "memory"
+format = " $icon $swap_used.eng(range:1..) |"
memory_mem
memory_swap
pub struct Config {
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub interval: Seconds,
+ pub warning_mem: f64,
+ pub warning_swap: f64,
+ pub critical_mem: f64,
+ pub critical_swap: f64,
+}
format: FormatConfig
§format_alt: Option<FormatConfig>
§interval: Seconds
§warning_mem: f64
§warning_swap: f64
§critical_mem: f64
§critical_swap: f64
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreA custom menu
+This block allows you to quickly run a custom shell command. Left-click on this block to +activate it, then scroll through configured items. Left-click on the item to run it and +optionally confirm your action by left-clicking again. Right-click any time to deactivate this +block.
+Key | Values | Default |
---|---|---|
text | Text that will be displayed when the block is inactive. | Required |
items | A list of “items”. See examples below. | Required |
[[block]]
+block = "menu"
+text = "\uf011"
+[[block.items]]
+display = " -> Sleep <-"
+cmd = "systemctl suspend"
+[[block.items]]
+display = " -> Power Off <-"
+cmd = "poweroff"
+confirm_msg = "Are you sure you want to power off?"
+[[block.items]]
+display = " -> Reboot <-"
+cmd = "reboot"
+confirm_msg = "Are you sure you want to reboot?"
pub struct Config {
+ pub text: String,
+ pub items: Vec<Item>,
+}
text: String
§items: Vec<Item>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Item {
+ pub display: String,
+ pub cmd: String,
+ pub confirm_msg: Option<String>,
+}
display: String
§cmd: String
§confirm_msg: Option<String>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum PlayerName {
+ Single(String),
+ Multiple(Vec<String>),
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe current song title and artist
+Also provides buttons for play/pause, previous and next.
+Supports all music players that implement the MediaPlayer2 Interface. This includes:
+and many others.
+By default the block tracks all players available on the MPRIS bus. Right clicking on the block +will cycle it to the next player. You can pin the widget to a given player via the “player” +setting.
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon {$combo.str(max_w:25,rot_interval:0.5) $play |}" |
format_alt | If set, block will switch between format and format_alt on every click | None |
player | Name(s) of the music player(s) MPRIS interface. This can be either a music player name or an array of music player names. Run busctl --user list | grep "org.mpris.MediaPlayer2." | cut -d' ' -f1 and the name is the part after “org.mpris.MediaPlayer2.”. | None |
interface_name_exclude | A list of regex patterns for player MPRIS interface names to ignore. | ["playerctld"] |
separator | String to insert between artist and title. | " - " |
seek_step_secs | Positive number of seconds to seek forward/backward when scrolling on the bar. Does not need to be an integer. | 1 |
seek_forward_step_secs | Positive number of seconds to seek forward when scrolling on the bar. Does not need to be an integer. | seek_step_secs |
seek_backward_step_secs | Positive number of seconds to seek backward when scrolling on the bar. Does not need to be an integer. | seek_step_secs |
volume_step | The percent volume level is increased/decreased for the selected audio device when scrolling. Capped automatically at 50. | 5 |
Note: All placeholders except icon
can be absent. See the examples below to learn how to handle this.
Placeholder | Value | Type |
---|---|---|
icon | A static icon | Icon |
artist | Current artist | Text |
title | Current title | Text |
url | Current song url | Text |
combo | Resolves to “$artist[sep]$title" , "$artist" , "$title" , or "$url" depending on what information is available. [sep] is set by separator option. | Text |
player | Name of the current player (taken from the last part of its MPRIS bus name) | Text |
avail | Total number of players available to switch between | Number |
cur | The current player index of the available players | Number |
play | Play/Pause button | Clickable icon |
next | Next button | Clickable icon |
prev | Previous button | Clickable icon |
volume_icon | Icon based on volume. Missing if unsupported. | Icon |
volume | Current volume. Missing if muted or unsupported. | Number |
Widget | Placeholder |
---|---|
play_pause_btn | $play |
next_btn | $next |
prev_btn | $prev |
Action | Default button |
---|---|
play_pause | Left on play_pause_btn |
next | Left on next_btn |
prev | Left on prev_btn |
next_player | Right |
seek_forward | Wheel Up |
seek_backward | Wheel Down |
volume_up | - |
volume_down | - |
toggle_format | Left |
Show the currently playing song on Spotify only, with play & next buttons and limit the width +to 20 characters:
+[[block]]
+block = "music"
+format = " $icon {$combo.str(max_w:20) $play $next |}"
+player = "spotify"
Same thing for any compatible player, takes the first active on the bus, but ignores “mpd” or anything with “kdeconnect” in the name:
+[[block]]
+block = "music"
+format = " $icon {$combo.str(max_w:20) $play $next |}"
+interface_name_exclude = [".*kdeconnect.*", "mpd"]
Same as above, but displays with rotating text
+[[block]]
+block = "music"
+format = " $icon {$combo.str(max_w:20,rot_interval:0.5) $play $next |}"
+interface_name_exclude = [".*kdeconnect.*", "mpd"]
Click anywhere to play/pause, middle click to toggle format:
+[[block]]
+block = "music"
+format = " format 1 "
+format_alt = " format 2 "
+[[block.click]]
+button = "left"
+action = "play_pause"
+[[block.click]]
+button = "middle"
+widget = "."
+action = "toggle_format"
Scroll to change the player volume, use the forward and back buttons to seek:
+[[block]]
+block = "music"
+format = " $icon $volume_icon $combo $play $next| "
+seek_step_secs = 10
+[[block.click]]
+button = "up"
+action = "volume_up"
+[[block.click]]
+button = "down"
+action = "volume_down"
+[[block.click]]
+button = "forward"
+action = "seek_forward"
+[[block.click]]
+button = "back"
+action = "seek_backward"
music
music_next
music_play
music_prev
volume_muted
volume
(as a progression)pub struct Config {
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub player: PlayerName,
+ pub interface_name_exclude: Vec<String>,
+ pub separator: String,
+ pub seek_step_secs: Seconds<false>,
+ pub seek_forward_step_secs: Option<Seconds<false>>,
+ pub seek_backward_step_secs: Option<Seconds<false>>,
+ pub volume_step: f64,
+}
format: FormatConfig
§format_alt: Option<FormatConfig>
§player: PlayerName
§interface_name_exclude: Vec<String>
§separator: String
§seek_step_secs: Seconds<false>
§seek_forward_step_secs: Option<Seconds<false>>
§seek_backward_step_secs: Option<Seconds<false>>
§volume_step: f64
Return Config { format: Default::default(), format_alt: Default::default(), player: Default::default(), interface_name_exclude: vec!["playerctld".into()], separator: " - ".into(), seek_step_secs: 1.into(), seek_forward_step_secs: Default::default(), seek_backward_step_secs: Default::default(), volume_step: 5.0 }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreNetwork information
+This block uses sysfs
and netlink
and thus does not require any external dependencies.
Key | Values | Default |
---|---|---|
device | Network interface to monitor (as specified in /sys/class/net/ ). Supports regex. | If not set, device will be automatically selected every interval |
interval | Update interval in seconds | 2 |
format | A string to customise the output of this block. See below for available placeholders. | " $icon ^icon_net_down $speed_down.eng(prefix:K) ^icon_net_up $speed_up.eng(prefix:K) " |
format_alt | If set, block will switch between format and format_alt on every click | None |
inactive_format | Same as format but for when the interface is inactive | " $icon Down " |
missing_format | Same as format but for when the device is missing | " × " |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on device’s type | Icon | - |
speed_down | Download speed | Number | Bytes per second |
speed_up | Upload speed | Number | Bytes per second |
graph_down | Download speed graph | Text | - |
graph_up | Upload speed graph | Text | - |
device | The name of device | Text | - |
ssid | Netfork SSID (WiFi only) | Text | - |
frequency | WiFi frequency | Number | Hz |
signal_strength | WiFi signal | Number | % |
bitrate | WiFi connection bitrate | Number | Bits per second |
ip | IPv4 address of the iface | Text | - |
ipv6 | IPv6 address of the iface | Text | - |
nameserver | Nameserver | Text | - |
Display WiFi info if available
+[[block]]
+block = "net"
+format = " $icon {$signal_strength $ssid $frequency|Wired connection} via $device "
Display exact device
+[[block]]
+block = "net"
+device = "^wlo0$"
net_loopback
net_vpn
net_wired
net_wireless
(as a progression)net_up
net_down
pub struct Config {
+ pub device: Option<String>,
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub inactive_format: FormatConfig,
+ pub missing_format: FormatConfig,
+}
device: Option<String>
§interval: Seconds
§format: FormatConfig
§format_alt: Option<FormatConfig>
§inactive_format: FormatConfig
§missing_format: FormatConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum DriverType {
+ Dunst,
+ SwayNC,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreDisplay and toggle the state of notifications daemon
+Left-clicking on this block will enable/disable notifications.
+Key | Values | Default |
---|---|---|
driver | Which notifications daemon is running. Available drivers are: "dunst" and "swaync" | "dunst" |
format | A string to customise the output of this block. See below for available placeholders. | " $icon " |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on notification’s state | Icon | - |
notification_count 1 | The number of notification (omitted if 0) | Number | - |
paused | Present only if notifications are disabled | Flag | - |
Action | Default button |
---|---|
toggle_paused | Left |
show | - |
How to use paused
flag
[[block]]
+block = "notify"
+format = " $icon {$paused{Off}|On} "
How to use notification_count
[[block]]
+block = "notify"
+format = " $icon {($notification_count.eng(w:1)) |}"
How to remap actions
+[[block]]
+block = "notify"
+driver = "swaync"
+[[block.click]]
+button = "left"
+action = "show"
+[[block.click]]
+button = "right"
+action = "toggle_paused"
bell
bell-slash
when using notification_count
with the dunst
driver use dunst > 1.9.0 ↩
pub struct Config {
+ pub driver: DriverType,
+ pub format: FormatConfig,
+}
driver: DriverType
§format: FormatConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreCount of notmuch messages
+This block queries a notmuch database and displays the count of messages.
+The simplest configuration will return the total count of messages in the notmuch database stored at $HOME/.mail
+Note that you need to enable notmuch
feature to use this block:
cargo build --release --features notmuch
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $count " |
maildir | Path to the directory containing the notmuch database. Supports path expansions e.g. ~ . | ~/.mail |
query | Query to run on the database. | "" |
threshold_critical | Mail count that triggers critical state. | 99999 |
threshold_warning | Mail count that triggers warning state. | 99999 |
threshold_good | Mail count that triggers good state. | 99999 |
threshold_info | Mail count that triggers info state. | 99999 |
interval | Update interval in seconds. | 10 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
count | Number of messages for the query | Number | - |
[[block]]
+block = "notmuch"
+query = "tag:alert and not tag:trash"
+threshold_warning = 1
+threshold_critical = 10
+[[block.click]]
+button = "left"
+update = true
mail
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub maildir: ShellString,
+ pub query: String,
+ pub threshold_warning: u32,
+ pub threshold_critical: u32,
+ pub threshold_info: u32,
+ pub threshold_good: u32,
+}
format: FormatConfig
§interval: Seconds
§maildir: ShellString
§query: String
§threshold_warning: u32
§threshold_critical: u32
§threshold_info: u32
§threshold_good: u32
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreDisplay the stats of your NVidia GPU
+By default show_temperature
shows the used memory. Clicking the left mouse on the
+“temperature” part of the block will alternate it between showing used or total available
+memory.
Clicking the left mouse button on the “fan speed” part of the block will cause it to enter into +a fan speed setting mode. In this mode you can scroll the mouse wheel over the block to change +the fan speeds, and left click to exit the mode.
+Requires nvidia-smi
for displaying info and nvidia_settings
for setting fan speed.
Key | Values | Default |
---|---|---|
gpu_id | GPU id in system. | 0 |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $utilization $memory $temperature " |
interval | Update interval in seconds. | 1 |
idle | Maximum temperature, below which state is set to idle | 50 |
good | Maximum temperature, below which state is set to good | 70 |
info | Maximum temperature, below which state is set to info | 75 |
warning | Maximum temperature, below which state is set to warning | 80 |
Placeholder | Type | Unit |
---|---|---|
icon | Icon | - |
name | Text | - |
utilization | Number | Percents |
memory | Number | Bytes |
temperature | Number | Degrees |
fan_speed | Number | Percents |
clocks | Number | Hertz |
power | Number | Watts |
Widget | Placeholder |
---|---|
mem_btn | $memory |
fan_btn | $fan_speed |
Action | Default button |
---|---|
toggle_mem_total | Left on mem_btn |
toggle_fan_controlled | Left on fan_btn |
fan_speed_up | Wheel Up on fan_btn |
fan_speed_down | Wheel Down on fan_btn |
[[block]]
+block = "nvidia_gpu"
+interval = 1
+format = " $icon GT 1030 $utilization $temperature $clocks "
gpu
mappings
option similar to keyboard_layout
’s to map GPU names to labels?pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub gpu_id: u64,
+ pub idle: u32,
+ pub good: u32,
+ pub info: u32,
+ pub warning: u32,
+}
format: FormatConfig
§interval: Seconds
§gpu_id: u64
§idle: u32
§good: u32
§info: u32
§warning: u32
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Apt { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Dnf;
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum PackageManager {
+ Apt,
+ Pacman,
+ Aur,
+ Dnf,
+ Xbps,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morePending updates for different package manager like apt, pacman, etc.
+Currently these package managers are available:
+apt
for Debian/Ubuntu based systempacman
for Arch based systemaur
for Arch based systemdnf
for Fedora based systemxbps
for Void LinuxKey | Values | Default |
---|---|---|
interval | Update interval in seconds. | 600 |
package_manager | Package manager to check for updates | Automatically derived from format templates, but can be used to influence the $total value |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $total.eng(w:1) " |
format_singular | Same as format , but for when exactly one update is available. | " $icon $total.eng(w:1) " |
format_up_to_date | Same as format , but for when no updates are available. | " $icon $total.eng(w:1) " |
warning_updates_regex | Display block as warning if updates matching regex are available. | None |
critical_updates_regex | Display block as critical if updates matching regex are available. | None |
ignore_updates_regex | Doesn’t include updates matching regex in the count. | None |
ignore_phased_updates | Doesn’t include potentially held back phased updates in the count. (For Debian/Ubuntu based system) | false |
aur_command | AUR command to check available updates, which outputs in the same format as pacman. e.g. yay -Qua (For Arch based system) | Required if $aur are used |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
apt | Number of updates available in Debian/Ubuntu based system | Number | - |
pacman | Number of updates available in Arch based system | Number | - |
aur | Number of updates available in Arch based system | Number | - |
dnf | Number of updates available in Fedora based system | Number | - |
xbps | Number of updates available in Void Linux | Number | - |
total | Number of updates available in all package manager listed | Number | - |
Behind the scenes this uses apt
, and in order to run it without root privileges i3status-rust will create its own package database in /tmp/i3rs-apt/
which may take up several MB or more. If you have a custom apt config then this block may not work as expected - in that case please open an issue.
Tip: You can grab the list of available updates using APT_CONFIG=/tmp/i3rs-apt/apt.conf apt list --upgradable
Requires fakeroot to be installed (only required for pacman).
+Tip: You can grab the list of available updates using fakeroot pacman -Qu --dbpath /tmp/checkup-db-i3statusrs-$USER/
.
+If you have the CHECKUPDATES_DB
env var set on your system then substitute that dir instead.
Note: pikaur
may hang the whole block if there is no internet connectivity reference. In that case, try a different AUR helper.
Tip: On Arch Linux you can setup a pacman
hook to signal i3status-rs to update after packages
+have been upgraded, so you won’t have stale info in your pacman block.
In the block configuration, set signal = 1
(or other number if 1
is being used by some
+other block):
[[block]]
+block = "packages"
+signal = 1
Create /etc/pacman.d/hooks/i3status-rust.hook
with the below contents:
[Trigger]
+Operation = Upgrade
+Type = Package
+Target = *
+
+[Action]
+When = PostTransaction
+Exec = /usr/bin/pkill -SIGRTMIN+1 i3status-rs
Apt only config
+[[block]]
+block = "packages"
+interval = 1800
+package_manager = ["apt"]
+format = " $icon $apt updates available"
+format_singular = " $icon One update available "
+format_up_to_date = " $icon system up to date "
+[[block.click]]
+# shows dmenu with cached available updates. Any dmenu alternative should also work.
+button = "left"
+cmd = "APT_CONFIG=/tmp/i3rs-apt/apt.conf apt list --upgradable | tail -n +2 | rofi -dmenu"
+[[block.click]]
+# Updates the block on right click
+button = "right"
+update = true
Pacman only config:
+[[block]]
+block = "packages"
+package_manager = ["pacman"]
+interval = 600
+format = " $icon $pacman updates available "
+format_singular = " $icon $pacman update available "
+format_up_to_date = " $icon system up to date "
+[[block.click]]
+# pop-up a menu showing the available updates. Replace wofi with your favourite menu command.
+button = "left"
+cmd = "fakeroot pacman -Qu --dbpath /tmp/checkup-db-i3statusrs-$USER/ | wofi --show dmenu"
+[[block.click]]
+# Updates the block on right click
+button = "right"
+update = true
Pacman and AUR helper config:
+[[block]]
+block = "packages"
+package_manager = ["pacman", "aur"]
+interval = 600
+error_interval = 300
+format = " $icon $pacman + $aur = $total updates available "
+format_singular = " $icon $total update available "
+format_up_to_date = " $icon system up to date "
+# aur_command should output available updates to stdout (ie behave as echo -ne "update\n")
+aur_command = "yay -Qua"
Dnf only config:
+[[block]]
+block = "packages"
+package_manager = ["dnf"]
+interval = 1800
+format = " $icon $dnf.eng(w:1) updates available "
+format_singular = " $icon One update available "
+format_up_to_date = " $icon system up to date "
+[[block.click]]
+# shows dmenu with cached available updates. Any dmenu alternative should also work.
+button = "left"
+cmd = "dnf list -q --upgrades | tail -n +2 | rofi -dmenu"
Xbps only config:
+[[block]]
+block = "packages"
+package_manager = ["xbps"]
+interval = 1800
+format = " $icon $xbps.eng(w:1) updates available "
+format_singular = " $icon One update available "
+format_up_to_date = " $icon system up to date "
+[[block.click]]
+# shows dmenu with available updates. Any dmenu alternative should also work.
+button = "left"
+cmd = "xbps-install -Mun | dmenu -l 10"
Multiple package managers config:
+Update the list of pending updates every thirty minutes (1800 seconds):
+[[block]]
+block = "packages"
+package_manager = ["apt", "pacman", "aur", "dnf", "xbps"]
+interval = 1800
+format = " $icon $apt + $pacman + $aur + $dnf + $xbps = $total updates available "
+format_singular = " $icon One update available "
+format_up_to_date = " $icon system up to date "
+# If a linux update is available, but no ZFS package, it won't be possible to
+# actually perform a system upgrade, so we show a warning.
+warning_updates_regex = "(linux|linux-lts|linux-zen)"
+# If ZFS is available, we know that we can and should do an upgrade, so we show
+# the status as critical.
+critical_updates_regex = "(zfs|zfs-lts)"
update
pub struct Aur { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Pacman;
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Config {
+ pub interval: Seconds,
+ pub package_manager: Vec<PackageManager>,
+ pub format: FormatConfig,
+ pub format_singular: FormatConfig,
+ pub format_up_to_date: FormatConfig,
+ pub warning_updates_regex: Option<String>,
+ pub critical_updates_regex: Option<String>,
+ pub ignore_updates_regex: Option<String>,
+ pub ignore_phased_updates: bool,
+ pub aur_command: Option<String>,
+}
interval: Seconds
§package_manager: Vec<PackageManager>
§format: FormatConfig
§format_singular: FormatConfig
§format_up_to_date: FormatConfig
§warning_updates_regex: Option<String>
§critical_updates_regex: Option<String>
§ignore_updates_regex: Option<String>
§ignore_phased_updates: bool
§aur_command: Option<String>
Return Config { interval: 600.into(), package_manager: Default::default(), format: Default::default(), format_singular: Default::default(), format_up_to_date: Default::default(), warning_updates_regex: Default::default(), critical_updates_regex: Default::default(), ignore_updates_regex: Default::default(), ignore_phased_updates: Default::default(), aur_command: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub trait Backend {
+ // Required methods
+ fn name(&self) -> Cow<'static, str>;
+ fn get_updates_list<'life0, 'async_trait>(
+ &'life0 self,
+ ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
+ where Self: 'async_trait,
+ 'life0: 'async_trait;
+}
pub struct Xbps;
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThere are six steps in the original technique:
+Key | Values | Default |
---|---|---|
format | The format used when in idle, prompt, or notify states | " $icon{ $message|} " |
pomodoro_format | The format used when the pomodoro is running or paused | " $icon $status_icon{ $completed_pomodoros.tally()|} $time_remaining.duration(hms:true) " |
break_format | The format used when the pomodoro is during the break | " $icon $status_icon Break: $time_remaining.duration(hms:true) " |
message | Message when timer expires | "Pomodoro over! Take a break!" |
break_message | Message when break is over | "Break over! Time to work!" |
notify_cmd | A shell command to run as a notifier. {msg} will be substituted with either message or break_message . | None |
blocking_cmd | Is notify_cmd blocking? If it is, then pomodoro block will wait until the command finishes before proceeding. Otherwise, you will have to click on the block in order to proceed. | false |
Placeholder | Value | Type | Supported by |
---|---|---|---|
icon | A static icon | Icon | All formats |
status_icon | An icon that reflects the pomodoro state | Icon | pomodoro_format , break_format |
message | Current message | Text | format |
time_remaining | How much time is left (minutes) | Duration | pomodoro_format , break_format |
completed_pomodoros | The number of completed pomodoros | Number | pomodoro_format |
Use swaynag
as a notifier:
[[block]]
+block = "pomodoro"
+notify_cmd = "swaynag -m '{msg}'"
+blocking_cmd = true
Use notify-send
as a notifier:
[[block]]
+block = "pomodoro"
+notify_cmd = "notify-send '{msg}'"
+blocking_cmd = false
pomodoro
pomodoro_started
pomodoro_stopped
pomodoro_paused
pomodoro_break
pub struct Config {
+ pub format: FormatConfig,
+ pub pomodoro_format: FormatConfig,
+ pub break_format: FormatConfig,
+ pub message: String,
+ pub break_message: String,
+ pub notify_cmd: Option<String>,
+ pub blocking_cmd: bool,
+}
format: FormatConfig
§pomodoro_format: FormatConfig
§break_format: FormatConfig
§message: String
§break_message: String
§notify_cmd: Option<String>
§blocking_cmd: bool
Return Config { format: Default::default(), pomodoro_format: Default::default(), break_format: Default::default(), message: "Pomodoro over! Take a break!".into(), break_message: "Break over! Time to work!".into(), notify_cmd: Default::default(), blocking_cmd: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum PrivacyDriver {
+ Pipewire(Config),
+ V4l(Config),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morePrivacy Monitor
+Key | Values | Default |
---|---|---|
driver | The configuration of a driver (see below). | Required |
format | Format string. | "{ $icon_audio |}{ $icon_audio_sink |}{ $icon_video |}{ $icon_webcam |}{ $icon_unknown |}" |
format_alt | Format string. | "{ $icon_audio $info_audio |}{ $icon_audio_sink $info_audio_sink |}{ $icon_video $info_video |}{ $icon_webcam $info_webcam |}{ $icon_unknown $info_unknown |}" |
Key | Values | Required | Default |
---|---|---|---|
name | pipewire | Yes | None |
exclude_output | An output node to ignore, example: ["HD Pro Webcam C920"] | No | [] |
exclude_input | An input node to ignore, example: ["openrgb"] | No | [] |
display | Which node field should be used as a display name, options: name , description , nickname | No | name |
Key | Values | Required | Default |
---|---|---|---|
name | vl4 | Yes | None |
exclude_device | A device to ignore, example: ["/dev/video5"] | No | [] |
exclude_consumer | Processes to ignore | No | ["pipewire", "wireplumber"] |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon_{audio,audio_sink,video,webcam,unknown} | A static icon | Icon | - |
info_{audio,audio_sink,video,webcam,unknown} | The mapping of which source are being consumed | Text | - |
You can use the suffixes noted above to get the following:
+Suffix | Description |
---|---|
audio | Captured audio (ex. Mic) |
audio_sink | Audio captured from a sink (ex. openrgb) |
video | Video capture (ex. screen capture) |
webcam | Webcam capture |
unknown | Anything else |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
[[block]]
+block = "privacy"
+[[block.driver]]
+name = "v4l"
+[[block.driver]]
+name = "pipewire"
+exclude_input = ["openrgb"]
+display = "nickname"
microphone
volume
xrandr
webcam
unknown
pub struct Config {
+ pub format: FormatConfig,
+ pub format_alt: FormatConfig,
+ pub driver: Vec<PrivacyDriver>,
+}
format: FormatConfig
§format_alt: FormatConfig
§driver: Vec<PrivacyDriver>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe number of pending notifications in rofication-daemon
+A different color is used if there are critical notifications.
+Key | Values | Default |
---|---|---|
interval | Refresh rate in seconds. | 1 |
format | A string to customise the output of this block. See below for placeholders. | " $icon $num.eng(w:1) " |
socket_path | Socket path for the rofication daemon. Supports path expansions e.g. ~ . | "/tmp/rofi_notification_daemon" |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
num | Number of pending notifications | Number | - |
[[block]]
+block = "rofication"
+interval = 1
+socket_path = "/tmp/rofi_notification_daemon"
+[[block.click]]
+button = "left"
+cmd = "rofication-gui"
bell
pub struct Config {
+ pub interval: Seconds,
+ pub socket_path: ShellString,
+ pub format: FormatConfig,
+}
interval: Seconds
§socket_path: ShellString
§format: FormatConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreScratchpad indicator
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block | ` $icon $count.eng(range:1..) |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
count | Number of windows in scratchpad | Number | - |
[[block]]
+block = "scratchpad"
scratchpad
pub struct Config {
+ pub format: FormatConfig,
+}
format: FormatConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum DriverType {
+ Systemd,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreDisplay the status of a service
+Right now only systemd
is supported.
Key | Values | Default |
---|---|---|
driver | Which init system is running the service. Available drivers are: "systemd" | "systemd" |
service | The name of the service | Required |
user | If true, monitor the status of a user service instead of a system service. | false |
active_format | A string to customise the output of this block. See below for available placeholders. | " $service active " |
inactive_format | A string to customise the output of this block. See below for available placeholders. | " $service inactive " |
active_state | A valid State | State::Idle |
inactive_state | A valid State | State::Critical |
Placeholder | Value | Type | Unit |
---|---|---|---|
service | The name of the service | Text | - |
Example using an icon:
+[[block]]
+block = "service_status"
+service = "cups"
+active_format = " ^icon_tea "
+inactive_format = " no ^icon_tea "
Example overriding the default inactive_state
:
[[block]]
+block = "service_status"
+service = "shadow"
+active_format = ""
+inactive_format = " Integrity of password and group files failed "
+inactive_state = "Warning"
pub struct Config {
+ pub driver: DriverType,
+ pub service: String,
+ pub user: bool,
+ pub active_format: FormatConfig,
+ pub inactive_format: FormatConfig,
+ pub active_state: Option<State>,
+ pub inactive_state: Option<State>,
+}
driver: DriverType
§service: String
§user: bool
§active_format: FormatConfig
§inactive_format: FormatConfig
§active_state: Option<State>
§inactive_state: Option<State>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum DeviceKind {
+ Sink,
+ Source,
+}
source
. Read morekey
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum SoundDriver {
+ Auto,
+ Alsa,
+ PulseAudio,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreVolume level
+This block displays the volume level (according to PulseAudio or ALSA). Right click to toggle mute, scroll to adjust volume.
+Requires a PulseAudio installation or alsa-utils
for ALSA.
Note that if you are using PulseAudio commands (such as pactl
) to control your volume, you should select the "pulseaudio"
(or "auto"
) driver to see volume changes that exceed 100%.
Key | Values | Default |
---|---|---|
driver | "auto" , "pulseaudio" , "alsa" . | "auto" (Pulseaudio with ALSA fallback) |
format | A string to customise the output of this block. See below for available placeholders. | " $icon {$volume.eng(w:2) |}" |
format_alt | If set, block will switch between format and format_alt on every click. | None |
name | PulseAudio device name, or the ALSA control name as found in the output of amixer -D yourdevice scontrols . | PulseAudio: @DEFAULT_SINK@ / ALSA: Master |
device | ALSA device name, usually in the form “hw:X” or “hw:X,Y” where X is the card number and Y is the device number as found in the output of aplay -l . | default |
device_kind | PulseAudio device kind: source or sink . | "sink" |
natural_mapping | When using the ALSA driver, display the “mapped volume” as given by alsamixer /amixer -M , which represents the volume level more naturally with respect for the human ear. | false |
step_width | The percent volume level is increased/decreased for the selected audio device when scrolling. Capped automatically at 50. | 5 |
max_vol | Max volume in percent that can be set via scrolling. Note it can still be set above this value if changed by another application. | None |
show_volume_when_muted | Show the volume even if it is currently muted. | false |
headphones_indicator | Change icon when headphones are plugged in (pulseaudio only) | false |
mappings | Map output_name to a custom name. | None |
mappings_use_regex | Let mappings match using regex instead of string equality. The replacement will be regex aware and can contain capture groups. | true |
active_port_mappings | Map active_port to a custom name. The replacement will be regex aware and can contain capture groups. | None |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on volume | Icon | - |
volume | Current volume. Missing if muted. | Number | % |
output_name | PulseAudio or ALSA device name | Text | - |
output_description | PulseAudio device description, will fallback to output_name if no description is available and will be overwritten by mappings (mappings will still use output_name ) | Text | - |
active_port | Active port (same as information in Ports section of pactl list cards ). Will be absent if not supported by driver or if mapped to "" in active_port_mappings . | Text | - |
Action | Default button |
---|---|
toggle_format | Left |
toggle_mute | Right |
volume_down | Wheel Down |
volume_up | Wheel Up |
Change the default scrolling step width to 3 percent:
+[[block]]
+block = "sound"
+step_width = 3
Change the output name shown:
+[[block]]
+block = "sound"
+format = " $icon $output_name{ $volume|} "
+[block.mappings]
+"alsa_output.usb-Harman_Multimedia_JBL_Pebbles_1.0.0-00.analog-stereo" = "Speakers"
+"alsa_output.pci-0000_00_1b.0.analog-stereo" = "Headset"
Since the default value for the device_kind
key is sink
,
+to display microphone block you have to use the source
value:
[[block]]
+block = "sound"
+driver = "pulseaudio"
+device_kind = "source"
Display warning in block if microphone if using the wrong port:
+[[block]]
+block = "sound"
+driver = "pulseaudio"
+device_kind = "source"
+format = " $icon { $volume|} {$active_port |}"
+[block.active_port_mappings]
+"analog-input-rear-mic" = "" # Mapping to an empty string makes `$active_port` absent
+"analog-input-front-mic" = "ERR!"
microphone_muted
(as a progression)microphone
(as a progression)volume_muted
(as a progression)volume
(as a progression)headphones
pub struct Config {Show 14 fields
+ pub driver: SoundDriver,
+ pub name: Option<String>,
+ pub device: Option<String>,
+ pub device_kind: DeviceKind,
+ pub natural_mapping: bool,
+ pub step_width: u32,
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub headphones_indicator: bool,
+ pub show_volume_when_muted: bool,
+ pub mappings: Option<IndexMap<String, String>>,
+ pub mappings_use_regex: bool,
+ pub max_vol: Option<u32>,
+ pub active_port_mappings: IndexMap<SerdeRegex, String>,
+}
driver: SoundDriver
§name: Option<String>
§device: Option<String>
§device_kind: DeviceKind
§natural_mapping: bool
§step_width: u32
§format: FormatConfig
§format_alt: Option<FormatConfig>
§headphones_indicator: bool
§show_volume_when_muted: bool
§mappings: Option<IndexMap<String, String>>
§mappings_use_regex: bool
§max_vol: Option<u32>
§active_port_mappings: IndexMap<SerdeRegex, String>
Return Config { driver: Default::default(), name: Default::default(), device: Default::default(), device_kind: Default::default(), natural_mapping: Default::default(), step_width: 5, format: Default::default(), format_alt: Default::default(), headphones_indicator: Default::default(), show_volume_when_muted: Default::default(), mappings: Default::default(), mappings_use_regex: true, max_vol: Default::default(), active_port_mappings: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morePing, download, and upload speeds
+This block which requires speedtest-cli
.
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " ^icon_ping $ping ^icon_net_down $speed_down ^icon_net_up $speed_up " |
interval | Update interval in seconds | 1800 |
Placeholder | Value | Type | Unit |
---|---|---|---|
ping | Ping delay | Number | Seconds |
speed_down | Download speed | Number | Bits per second |
speed_up | Upload speed | Number | Bits per second |
Show only ping (with an icon)
+[[block]]
+block = "speedtest"
+interval = 1800
+format = " ^icon_ping $ping "
Hide ping and display speed in bytes per second each using 4 characters (without icons)
+[[block]]
+block = "speedtest"
+interval = 1800
+format = " $speed_down.eng(w:4,u:B) $speed_up(w:4,u:B) "
ping
net_down
net_up
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+}
format: FormatConfig
§interval: Seconds
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct BlockError {
+ pub block_id: usize,
+ pub block_name: &'static str,
+ pub error: Error,
+}
An error which originates from a block
+block_id: usize
§block_name: &'static str
§error: Error
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct CommonApi { /* private fields */ }
Sends the widget to be displayed.
+No-op if last API call was made in the last interval
seconds.
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe number of tasks from the taskwarrior list
+Clicking the right mouse button on the icon cycles the view of the block through the user’s filters.
+Key | Values | Default |
---|---|---|
interval | Update interval in seconds | 600 (10min) |
warning_threshold | The threshold of pending (or started) tasks when the block turns into a warning state | 10 |
critical_threshold | The threshold of pending (or started) tasks when the block turns into a critical state | 20 |
filters | A list of tables describing filters (see bellow) | [{name = "pending", filter = "-COMPLETED -DELETED"}] |
format | A string to customise the output of this block. See below for available placeholders. | " $icon $count.eng(w:1) " |
format_singular | Same as format but for when exactly one task is pending. | " $icon $count.eng(w:1) " |
format_everything_done | Same as format but for when all tasks are completed. | " $icon $count.eng(w:1) " |
data_location | Directory in which taskwarrior stores its data files. Supports path expansions e.g. ~ . | "~/.task" |
Key | Values | Default |
---|---|---|
name | The name of the filter | |
filter | Specifies the criteria that must be met for a task to be counted towards this filter | |
config_override | An array containing configuration overrides, useful for explicitly setting context or other configuration variables | [] |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
count | The number of tasks matching current filter | Number | - |
filter_name | The name of current filter | Text | - |
Action | Default button |
---|---|
next_filter | Right |
In this example, block will be hidden if count
is zero.
[[block]]
+block = "taskwarrior"
+interval = 60
+format = " $icon count.eng(w:1) tasks "
+format_singular = " $icon 1 task "
+format_everything_done = ""
+warning_threshold = 10
+critical_threshold = 20
+[[block.filters]]
+name = "today"
+filter = "+PENDING +OVERDUE or +DUETODAY"
+[[block.filters]]
+name = "some-project"
+filter = "project:some-project +PENDING"
+config_override = ["rc.context:none"]
tasks
pub struct Config {
+ pub interval: Seconds,
+ pub warning_threshold: u32,
+ pub critical_threshold: u32,
+ pub filters: Vec<Filter>,
+ pub format: FormatConfig,
+ pub format_singular: FormatConfig,
+ pub format_everything_done: FormatConfig,
+ pub data_location: ShellString,
+}
interval: Seconds
§warning_threshold: u32
§critical_threshold: u32
§filters: Vec<Filter>
§format: FormatConfig
§format_singular: FormatConfig
§format_everything_done: FormatConfig
§data_location: ShellString
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Filter {
+ pub name: String,
+ pub filter: String,
+ pub config_override: Vec<String>,
+}
name: String
§filter: String
§config_override: Vec<String>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreTimer
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon {$time.duration(hms:true) |}" |
increment | The numbers of seconds to add each time the block is clicked. | 30 |
done_cmd | A command to run in sh when timer finishes. | None |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
time | The time remaining on the timer | Duration | - |
hours DEPRECATED | The hours remaining on the timer | Text | h |
minutes DEPRECATED | The minutes remaining on the timer | Text | mn |
seconds DEPRECATED | The seconds remaining on the timer | Text | s |
time
, hours
, minutes
, and seconds
are unset when the timer is inactive.
hours
, minutes
, and seconds
have been deprecated in favor of time
.
Action | Default button |
---|---|
increment | Left / Wheel Up |
decrement | Wheel Down |
reset | Right |
[[block]]
+block = "tea_timer"
+format = " $icon {$minutes:$seconds |}"
+done_cmd = "notify-send 'Timer Finished'"
tea
pub struct Config {
+ pub format: FormatConfig,
+ pub increment: Option<u64>,
+ pub done_cmd: Option<String>,
+}
format: FormatConfig
§increment: Option<u64>
§done_cmd: Option<String>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum TemperatureScale {
+ Celsius,
+ Fahrenheit,
+}
source
. Read morekey
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe system temperature
+This block displays the system temperature, based on libsensors
library.
This block has two modes: “collapsed”, which uses only color as an indicator, and “expanded”,
+which shows the content of a format
string. The average, minimum, and maximum temperatures
+are computed using all sensors displayed by sensors
, or optionally filtered by chip
and
+inputs
.
Requires libsensors
and appropriate kernel modules for your hardware.
Run sensors
command to list available chips and inputs.
Note that the colour of the block is always determined by the maximum temperature across all +sensors, not the average. You may need to keep this in mind if you have a misbehaving sensor.
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders | " $icon $average avg, $max max " |
format_alt | If set, block will switch between format and format_alt on every click | None |
interval | Update interval in seconds | 5 |
scale | Either "celsius" or "fahrenheit" | "celsius" |
good | Maximum temperature to set state to good | 20 °C (68 °F) |
idle | Maximum temperature to set state to idle | 45 °C (113 °F) |
info | Maximum temperature to set state to info | 60 °C (140 °F) |
warning | Maximum temperature to set state to warning. Beyond this temperature, state is set to critical | 80 °C (176 °F) |
chip | Narrows the results to a given chip name. * may be used as a wildcard. | None |
inputs | Narrows the results to individual inputs reported by each chip. | None |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
Placeholder | Value | Type | Unit |
---|---|---|---|
min | Minimum temperature among all inputs | Number | Degrees |
average | Average temperature among all inputs | Number | Degrees |
max | Maximum temperature among all inputs | Number | Degrees |
Note that when block is collapsed, no placeholders are provided.
+[[block]]
+block = "temperature"
+format = " $icon $max max "
+format_alt = " $icon $min min, $max max, $average avg "
+interval = 10
+chip = "*-isa-*"
thermometer
pub struct Config {
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub interval: Seconds,
+ pub scale: TemperatureScale,
+ pub good: Option<f64>,
+ pub idle: Option<f64>,
+ pub info: Option<f64>,
+ pub warning: Option<f64>,
+ pub chip: Option<String>,
+ pub inputs: Option<Vec<String>>,
+}
format: FormatConfig
§format_alt: Option<FormatConfig>
§interval: Seconds
§scale: TemperatureScale
§good: Option<f64>
§idle: Option<f64>
§info: Option<f64>
§warning: Option<f64>
§chip: Option<String>
§inputs: Option<Vec<String>>
Return Config { format: Default::default(), format_alt: Default::default(), interval: 5.into(), scale: Default::default(), good: Default::default(), idle: Default::default(), info: Default::default(), warning: Default::default(), chip: Default::default(), inputs: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Timezone {
+ Timezone(Tz),
+ Timezones(Vec<Tz>),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreThe current time.
+Key | Values | Default |
---|---|---|
format | Format string. See chrono docs for all options. | " $icon $timestamp.datetime() " |
interval | Update interval in seconds | 10 |
timezone | A timezone specifier (e.g. “Europe/Lisbon”) | Local timezone |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
timestamp | The current time | Datetime | - |
Action | Default button |
---|---|
next_timezone | Left |
prev_timezone | Right |
[[block]]
+block = "time"
+interval = 60
+[block.format]
+full = " $icon $timestamp.datetime(f:'%a %Y-%m-%d %R %Z', l:fr_BE) "
+short = " $icon $timestamp.datetime(f:%R) "
You can use calendars other than the Gregorian calendar by adding the calendar specifier in the locale string. When using
+this feature you can’t use chrono style format string, and you should use one of the options provided by
+the icu4x
crate: short
, medium
, long
, full
.
** Only available using feature icu_calendar
. **
[[block]]
+block = "time"
+interval = 60
+format = "$timestamp.datetime(locale:'fa_IR-u-ca-persian', f:'full')"
time
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+ pub timezone: Option<Timezone>,
+}
format: FormatConfig
§interval: Seconds
§timezone: Option<Timezone>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreA Toggle block
+You can add commands to be executed to disable the toggle (command_off
), and to enable it
+(command_on
). If these command exit with a non-zero status, the block will not be toggled and
+the block state will be changed to critical
to give a visual warning of the failure. You also need to
+specify a command to determine the state of the toggle (command_state
). When the command outputs
+nothing, the toggle is disabled, otherwise enabled. By specifying the interval property you can
+let the command_state be executed continuously.
To run those commands, the shell form $SHELL
environment variable is used. If such variable
+is not presented, sh
is used.
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders | " $icon " |
command_on | Shell command to enable the toggle | Required |
command_off | Shell command to disable the toggle | Required |
command_state | Shell command to determine the state. Empty output => No, otherwise => Yes. | Required |
icon_on | Icon override for the toggle button while on | "toggle_on" |
icon_off | Icon override for the toggle button while off | "toggle_off" |
interval | Update interval in seconds. If not set, command_state will run only on click. | None |
state_on | State (color) of this block while on | idle |
state_off | State (color) of this block while off | idle |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | Icon based on toggle’s state | Icon | - |
Action | Default button |
---|---|
toggle | Left |
This is what can be used to toggle an external monitor configuration:
+[[block]]
+block = "toggle"
+format = " $icon 4k "
+command_state = "xrandr | grep 'DP1 connected 38' | grep -v eDP1"
+command_on = "~/.screenlayout/4kmon_default.sh"
+command_off = "~/.screenlayout/builtin.sh"
+interval = 5
+state_on = "good"
+state_off = "warning"
toggle_off
toggle_on
pub struct Config {
+ pub format: FormatConfig,
+ pub command_on: String,
+ pub command_off: String,
+ pub command_state: String,
+ pub icon_on: Option<String>,
+ pub icon_off: Option<String>,
+ pub interval: Option<u64>,
+ pub state_on: Option<State>,
+ pub state_off: Option<State>,
+}
format: FormatConfig
§command_on: String
§command_off: String
§command_state: String
§icon_on: Option<String>
§icon_off: Option<String>
§interval: Option<u64>
§state_on: Option<State>
§state_off: Option<State>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreSystem’s uptime
+This block displays system uptime in terms of two biggest units, so minutes and seconds, or +hours and minutes or days and hours or weeks and days.
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders | " $icon $uptime " |
interval | Update interval in seconds | 60 |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
text DEPRECATED | Current uptime | Text | - |
uptime | Current uptime | Duration | - |
text
has been deprecated in favor of uptime
.
[[block]]
+block = "uptime"
+interval = 3600 # update every hour
uptime
pub struct Config {
+ pub format: FormatConfig,
+ pub interval: Seconds,
+}
format: FormatConfig
§interval: Seconds
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum DriverType {
+ Nordvpn,
+ Mullvad,
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreShows the current connection status for VPN networks
+This widget toggles the connection on left click.
+Key | Values | Default |
---|---|---|
driver | Which vpn should be used . Available drivers are: "nordvpn" and "mullvad" | "nordvpn" |
interval | Update interval in seconds. | 10 |
format_connected | A string to customise the output in case the network is connected. See below for available placeholders. | " VPN: $icon " |
format_disconnected | A string to customise the output in case the network is disconnected. See below for available placeholders. | " VPN: $icon " |
state_connected | The widgets state if the vpn network is connected. | info |
state_disconnected | The widgets state if the vpn network is disconnected | idle |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
country | Country currently connected to | Text | - |
flag | Country specific flag (depends on a font supporting them) | Text | - |
Action | Default button | Description |
---|---|---|
toggle | Left | toggles the vpn network connection |
Behind the scenes the nordvpn driver uses the nordvpn
command line binary. In order for this to work
+properly the binary should be executable without root privileges.
Behind the scenes the mullvad driver uses the mullvad
command line binary. In order for this to work properly the binary should be executable and mullvad daemon should be running.
Shows the current vpn network state:
+[[block]]
+block = "vpn"
+driver = "nordvpn"
+interval = 10
+format_connected = "VPN: $icon "
+format_disconnected = "VPN: $icon "
+state_connected = "good"
+state_disconnected = "warning"
Possible values for state_connected
and state_disconnected
:
warning
+critical
+good
+info
+idle
net_vpn
net_wired
net_down
Flags: They are not icons but unicode glyphs. You will need a font that +includes them. Tested with: https://www.babelstone.co.uk/Fonts/Flags.html
+pub struct Config {
+ pub driver: DriverType,
+ pub interval: Seconds,
+ pub format_connected: FormatConfig,
+ pub format_disconnected: FormatConfig,
+ pub state_connected: State,
+ pub state_disconnected: State,
+}
driver: DriverType
§interval: Seconds
§format_connected: FormatConfig
§format_disconnected: FormatConfig
§state_connected: State
§state_disconnected: State
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreWatson statistics
+Watson is a simple CLI time tracking application. This block will show the name of your current active project, tags and optionally recorded time. Clicking the widget will toggle the show_time
variable dynamically.
Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders | `“ $text |
show_time | Whether to show recorded time. | false |
state_path | Path to the Watson state file. Supports path expansions e.g. ~ . | $XDG_CONFIG_HOME/watson/state |
interval | Update interval, in seconds. | 60 |
Placeholder | Value | Type | Unit |
---|---|---|---|
text | Current activity | Text | - |
Action | Description | Default button |
---|---|---|
toggle_show_time | Toggle the value of show_time | Left |
[[block]]
+block = "watson"
+show_time = true
+state_path = "~/.config/watson/state"
pub struct Config {
+ pub format: FormatConfig,
+ pub state_path: Option<ShellString>,
+ pub interval: Seconds,
+ pub show_time: bool,
+}
format: FormatConfig
§state_path: Option<ShellString>
§interval: Seconds
§show_time: bool
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum WeatherService {
+ OpenWeatherMap(Config),
+ MetNo(Config),
+ Nws(Config),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreCurrent weather
+This block displays local weather and temperature information. In order to use this block, you +will need access to a supported weather API service. At the time of writing, OpenWeatherMap, +met.no, and the US National Weather Service are supported.
+Configuring this block requires configuring a weather service, which may require API keys and +other parameters.
+If using the autolocate
feature, set the autolocate update interval such that you do not exceed ipapi.co’s free daily limit of 1000 hits. Or use autolocate_interval = "once"
to only run on initialization.
Key | Values | Default |
---|---|---|
service | The configuration of a weather service (see below). | Required |
format | A string to customise the output of this block. See below for available placeholders. Text may need to be escaped, refer to Escaping Text. | " $icon $weather $temp " |
format_alt | If set, block will switch between format and format_alt on every click | None |
interval | Update interval, in seconds. | 600 |
autolocate | Gets your location using the ipapi.co IP location service (no API key required). If the API call fails then the block will fallback to service specific location config. | false |
autolocate_interval | Update interval for autolocate in seconds or “once” | interval |
To use the service you will need a (free) API key.
+Key | Values | Required | Default |
---|---|---|---|
name | openweathermap . | Yes | None |
api_key | Your OpenWeatherMap API key. | Yes | None |
coordinates | GPS latitude longitude coordinates as a tuple, example: ["39.2362","9.3317"] | Yes* | None |
city_id | OpenWeatherMap’s ID for the city. (Deprecated) | Yes* | None |
place | OpenWeatherMap ‘By {city name},{state code},{country code}’ search query. See here. Consumes an additional API call | Yes* | None |
zip | OpenWeatherMap ‘By {zip code},{country code}’ search query. See here. Consumes an additional API call | Yes* | None |
units | Either "metric" or "imperial" . | No | "metric" |
lang | Language code. See here. Currently only affects weather_verbose key. | No | "en" |
forecast_hours | How many hours should be forecast (must be increments of 3 hours, max 120 hours) | No | 12 |
One of coordinates
, city_id
, place
, or zip
is required. If more than one are supplied, coordinates
takes precedence over city_id
which takes precedence over place
which takes precedence over zip
.
The options api_key
, city_id
, place
, zip
, can be omitted from configuration,
+in which case they must be provided in the environment variables
+OPENWEATHERMAP_API_KEY
, OPENWEATHERMAP_CITY_ID
, OPENWEATHERMAP_PLACE
, OPENWEATHERMAP_ZIP
.
Forecasts are only fetched if forecast_hours > 0 and the format has keys related to forecast.
+Key | Values | Required | Default |
---|---|---|---|
name | metno . | Yes | None |
coordinates | GPS latitude longitude coordinates as a tuple, example: ["39.2362","9.3317"] | Required if autolocate = false | None |
lang | Language code: en , nn or nb | No | en |
altitude | Meters above sea level of the ground | No | Approximated by server |
forecast_hours | How many hours should be forecast | No | 12 |
Met.no does not support location name, but if autolocate is enabled then autolocate’s city value is used.
+Key | Values | Required | Default |
---|---|---|---|
name | nws . | Yes | None |
coordinates | GPS latitude longitude coordinates as a tuple, example: ["39.2362","9.3317"] | Required if autolocate = false | None |
forecast_hours | How many hours should be forecast | No | 12 |
units | Either "metric" or "imperial" . | No | "metric" |
Forecasts gather statistics from each hour between now and the forecast_hours
value, and
+provide predicted weather at the set number of hours into the future.
Key | Value | Type | Unit |
---|---|---|---|
location | Location name (exact format depends on the service) | Text | - |
icon{,_ffin} | Icon representing the weather | Icon | - |
weather{,_ffin} | Textual brief description of the weather, e.g. “Raining” | Text | - |
weather_verbose{,_ffin} | Textual verbose description of the weather, e.g. “overcast clouds” | Text | - |
temp{,_{favg,fmin,fmax,ffin}} | Temperature | Number | degrees |
apparent{,_{favg,fmin,fmax,ffin}} | Australian Apparent Temperature | Number | degrees |
humidity{,_{favg,fmin,fmax,ffin}} | Humidity | Number | % |
wind{,_{favg,fmin,fmax,ffin}} | Wind speed | Number | - |
wind_kmh{,_{favg,fmin,fmax,ffin}} | Wind speed. The wind speed in km/h | Number | - |
direction{,_{favg,fmin,fmax,ffin}} | Wind direction, e.g. “NE” | Text | - |
sunrise | Time of sunrise | DateTime | - |
sunset | Time of sunset | DateTime | - |
You can use the suffixes noted above to get the following:
+Suffix | Description |
---|---|
None | Current weather |
_favg | Average forecast value |
_fmin | Minimum forecast value |
_fmax | Maximum forecast value |
_ffin | Final forecast value |
Action | Description | Default button |
---|---|---|
toggle_format | Toggles between format and format_alt | Left |
Show detailed weather in San Francisco through the OpenWeatherMap service:
+[[block]]
+block = "weather"
+format = " $icon $weather ($location) $temp, $wind m/s $direction "
+format_alt = " $icon_ffin Forecast (9 hour avg) {$temp_favg ({$temp_fmin}-{$temp_fmax})|Unavailable} "
+[block.service]
+name = "openweathermap"
+api_key = "XXX"
+city_id = "5398563"
+units = "metric"
+forecast_hours = 9
Show sunrise and sunset times in null island
+[[block]]
+block = "weather"
+format = "up $sunrise.datetime(f:'%R') down $sunset.datetime(f:'%R')"
+[block.service]
+name = "metno"
+coordinates = ["0", "0"]
weather_sun
(when weather is reported as “Clear” during the day)weather_moon
(when weather is reported as “Clear” at night)weather_clouds
(when weather is reported as “Clouds” during the day)weather_clouds_night
(when weather is reported as “Clouds” at night)weather_fog
(when weather is reported as “Fog” or “Mist” during the day)weather_fog_night
(when weather is reported as “Fog” or “Mist” at night)weather_rain
(when weather is reported as “Rain” or “Drizzle” during the day)weather_rain_night
(when weather is reported as “Rain” or “Drizzle” at night)weather_snow
(when weather is reported as “Snow”)weather_thunder
(when weather is reported as “Thunderstorm” during the day)weather_thunder_night
(when weather is reported as “Thunderstorm” at night)pub struct Config { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreSupport for using the US National Weather Service API.
+The API is documented here.
+There is a corresponding OpenAPI document. The forecast
+descriptions are translated into the set of supported icons as best as possible, and a more
+complete summary forecast is available in the weather_verbose
format key. The full NWS list
+of icons and corresponding descriptions can be found here,
+though these are slated for deprecation.
All data is gathered using the hourly weather forecast service, after resolving from latitude & +longitude coordinates to a specific forecast office and grid point.
+pub struct Config { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub fn deserialize_forecast_hours<'de, D>(
+ deserializer: D,
+) -> Result<usize, D::Error>where
+ D: Deserializer<'de>,
pub struct Config { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Config {
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub format_alt: Option<FormatConfig>,
+ pub service: WeatherService,
+ pub autolocate: bool,
+ pub autolocate_interval: Option<Seconds>,
+}
interval: Seconds
§format: FormatConfig
§format_alt: Option<FormatConfig>
§service: WeatherService
§autolocate: bool
§autolocate_interval: Option<Seconds>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreX11 screen information
+X11 screen information (name, brightness, resolution). With a click you can toggle through your active screens and with wheel up and down you can adjust the selected screens brightness. Regarding brightness control, xrandr changes the brightness of the display using gamma rather than changing the brightness in hardware, so if that is not desirable then consider using the backlight
block instead.
NOTE: Some users report issues (e.g. here and here when using this block. The cause is currently unknown, however setting a higher update interval may help.
+Key | Values | Default |
---|---|---|
format | A string to customise the output of this block. See below for available placeholders. | " $icon $display $brightness_icon $brightness " |
step_width | The steps brightness is in/decreased for the selected screen (When greater than 50 it gets limited to 50). | 5 |
interval | Update interval in seconds. | 5 |
invert_icons | Invert icons’ ordering, useful if you have colorful emoji | false |
Placeholder | Value | Type | Unit |
---|---|---|---|
icon | A static icon | Icon | - |
display | The name of a monitor | Text | - |
brightness | The brightness of a monitor | Number | % |
brightness_icon | A static icon | Icon | - |
resolution | The resolution of a monitor | Text | - |
res_icon | A static icon | Icon | - |
Action | Default button |
---|---|
cycle_outputs | Left |
brightness_up | Wheel Up |
brightness_down | Wheel Down |
[[block]]
+block = "xrandr"
+format = " $icon $brightness $resolution "
xrandr
backlight
resolution
pub struct Config {
+ pub interval: Seconds,
+ pub format: FormatConfig,
+ pub step_width: u32,
+ pub invert_icons: bool,
+}
interval: Seconds
§format: FormatConfig
§step_width: u32
§invert_icons: bool
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum MouseButton {
+ Left,
+ Middle,
+ Right,
+ WheelUp,
+ WheelDown,
+ WheelLeft,
+ WheelRight,
+ Forward,
+ Back,
+ DoubleLeft,
+}
Can be one of left
, middle
, right
, up
/wheel_up
, down
/wheel_down
, wheel_left
, wheel_right
, forward
, back
or double_left
.
Note that in order for double clicks to be registered, you have to set double_click_delay
to a
+non-zero value. 200
might be a good choice. Note that enabling this functionality will
+make left clicks less responsive and feel a bit laggy.
source
. Read morekey
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreleft
, middle
, right
, up
/wheel_up
, down
/wheel_down
, wheel_left
, wheel_right
, forward
, back
or double_left
.pub struct ClickConfigEntry { /* private fields */ }
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct ClickHandler(/* private fields */);
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct PostActions {
+ pub action: Option<String>,
+ pub update: bool,
+}
action: Option<String>
§update: bool
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct BlockConfigEntry {
+ pub common: CommonBlockConfig,
+ pub config: BlockConfig,
+}
common: CommonBlockConfig
§config: BlockConfig
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct CommonBlockConfig {
+ pub click: ClickHandler,
+ pub signal: Option<i32>,
+ pub icons_format: Option<String>,
+ pub theme_overrides: Option<ThemeOverrides>,
+ pub icons_overrides: Option<HashMap<String, Icon>>,
+ pub merge_with_next: bool,
+ pub error_interval: u64,
+ pub error_format: Config,
+ pub error_fullscreen_format: Config,
+ pub if_command: Option<String>,
+}
click: ClickHandler
§signal: Option<i32>
§icons_format: Option<String>
§theme_overrides: Option<ThemeOverrides>
§icons_overrides: Option<HashMap<String, Icon>>
§merge_with_next: bool
§error_interval: u64
§error_format: Config
§error_fullscreen_format: Config
§if_command: Option<String>
Return CommonBlockConfig { click: Default::default(), signal: Default::default(), icons_format: Default::default(), theme_overrides: Default::default(), icons_overrides: Default::default(), merge_with_next: Default::default(), error_interval: 5, error_format: Default::default(), error_fullscreen_format: Default::default(), if_command: Default::default() }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Config {
+ pub shared: SharedConfig,
+ pub invert_scrolling: bool,
+ pub geolocator: Arc<Geolocator>,
+ pub double_click_delay: u64,
+ pub error_format: Config,
+ pub error_fullscreen_format: Config,
+ pub blocks: Vec<BlockConfigEntry>,
+}
invert_scrolling: bool
Set to true
to invert mouse wheel direction
geolocator: Arc<Geolocator>
§double_click_delay: u64
The maximum delay (ms) between two clicks that are considered as double click
+error_format: Config
§error_fullscreen_format: Config
§blocks: Vec<BlockConfigEntry>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct SharedConfig {
+ pub theme: Arc<Theme>,
+ pub icons: Arc<Icons>,
+ pub icons_format: Arc<String>,
+}
theme: Arc<Theme>
§icons: Arc<Icons>
§icons_format: Arc<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreError
is a trait representing the basic expectations for error values,
+i.e., values of type E
in Result<T, E>
.Error
s.pub struct BoxErrorWrapper(pub Box<dyn StdError + Send + Sync + 'static>);
0: Box<dyn StdError + Send + Sync + 'static>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Error {
+ pub message: Option<Cow<'static, str>>,
+ pub cause: Option<Arc<dyn StdError + Send + Sync + 'static>>,
+}
Error type
+message: Option<Cow<'static, str>>
§cause: Option<Arc<dyn StdError + Send + Sync + 'static>>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub trait ErrorContext<T> {
+ // Required methods
+ fn error<M: Into<Cow<'static, str>>>(self, message: M) -> Result<T>;
+ fn or_error<M: Into<Cow<'static, str>>, F: FnOnce() -> M>(
+ self,
+ f: F,
+ ) -> Result<T>;
+}
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
pub trait StdError: Debug + Display {
+ // Provided methods
+ fn source(&self) -> Option<&(dyn Error + 'static)> { ... }
+ fn description(&self) -> &str { ... }
+ fn cause(&self) -> Option<&dyn Error> { ... }
+ fn provide<'a>(&'a self, request: &mut Request<'a>) { ... }
+}
Error
is a trait representing the basic expectations for error values,
+i.e., values of type E
in Result<T, E>
.
Errors must describe themselves through the Display
and Debug
+traits. Error messages are typically concise lowercase sentences without
+trailing punctuation:
let err = "NaN".parse::<u32>().unwrap_err();
+assert_eq!(err.to_string(), "invalid digit found in string");
Errors may provide cause information. Error::source()
is generally
+used when errors cross “abstraction boundaries”. If one module must report
+an error that is caused by an error from a lower-level module, it can allow
+accessing that error via Error::source()
. This makes it possible for the
+high-level module to provide its own errors while also revealing some of the
+implementation for debugging.
Implementing the Error
trait only requires that Debug
and Display
are implemented too.
use std::error::Error;
+use std::fmt;
+use std::path::PathBuf;
+
+#[derive(Debug)]
+struct ReadConfigError {
+ path: PathBuf
+}
+
+impl fmt::Display for ReadConfigError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ let path = self.path.display();
+ write!(f, "unable to read configuration at {path}")
+ }
+}
+
+impl Error for ReadConfigError {}
Returns the lower-level source of this error, if any.
+use std::error::Error;
+use std::fmt;
+
+#[derive(Debug)]
+struct SuperError {
+ source: SuperErrorSideKick,
+}
+
+impl fmt::Display for SuperError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "SuperError is here!")
+ }
+}
+
+impl Error for SuperError {
+ fn source(&self) -> Option<&(dyn Error + 'static)> {
+ Some(&self.source)
+ }
+}
+
+#[derive(Debug)]
+struct SuperErrorSideKick;
+
+impl fmt::Display for SuperErrorSideKick {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "SuperErrorSideKick is here!")
+ }
+}
+
+impl Error for SuperErrorSideKick {}
+
+fn get_super_error() -> Result<(), SuperError> {
+ Err(SuperError { source: SuperErrorSideKick })
+}
+
+fn main() {
+ match get_super_error() {
+ Err(e) => {
+ println!("Error: {e}");
+ println!("Caused by: {}", e.source().unwrap());
+ }
+ _ => println!("No error"),
+ }
+}
if let Err(e) = "xc".parse::<u32>() {
+ // Print `e` itself, no need for description().
+ eprintln!("Error: {e}");
+}
error_generic_member_access
)Provides type-based access to context intended for error reports.
+Used in conjunction with Request::provide_value
and Request::provide_ref
to extract
+references to member variables from dyn Error
trait objects.
#![feature(error_generic_member_access)]
+use core::fmt;
+use core::error::{request_ref, Request};
+
+#[derive(Debug)]
+enum MyLittleTeaPot {
+ Empty,
+}
+
+#[derive(Debug)]
+struct MyBacktrace {
+ // ...
+}
+
+impl MyBacktrace {
+ fn new() -> MyBacktrace {
+ // ...
+ }
+}
+
+#[derive(Debug)]
+struct Error {
+ backtrace: MyBacktrace,
+}
+
+impl fmt::Display for Error {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "Example Error")
+ }
+}
+
+impl std::error::Error for Error {
+ fn provide<'a>(&'a self, request: &mut Request<'a>) {
+ request
+ .provide_ref::<MyBacktrace>(&self.backtrace);
+ }
+}
+
+fn main() {
+ let backtrace = MyBacktrace::new();
+ let error = Error { backtrace };
+ let dyn_error = &error as &dyn std::error::Error;
+ let backtrace_ref = request_ref::<MyBacktrace>(dyn_error).unwrap();
+
+ assert!(core::ptr::eq(&error.backtrace, backtrace_ref));
+ assert!(request_ref::<MyLittleTeaPot>(dyn_error).is_none());
+}
Returns true
if the inner type is the same as T
.
Returns some reference to the inner value if it is of type T
, or
+None
if it isn’t.
Returns some mutable reference to the inner value if it is of type T
, or
+None
if it isn’t.
Forwards to the method defined on the type dyn Error
.
Forwards to the method defined on the type dyn Error
.
Forwards to the method defined on the type dyn Error
.
Forwards to the method defined on the type dyn Error
.
Forwards to the method defined on the type dyn Error
.
Forwards to the method defined on the type dyn Error
.
error_iter
)Returns an iterator starting with the current error and continuing with
+recursively calling Error::source
.
If you want to omit the current error and only use its sources,
+use skip(1)
.
#![feature(error_iter)]
+use std::error::Error;
+use std::fmt;
+
+#[derive(Debug)]
+struct A;
+
+#[derive(Debug)]
+struct B(Option<Box<dyn Error + 'static>>);
+
+impl fmt::Display for A {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "A")
+ }
+}
+
+impl fmt::Display for B {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "B")
+ }
+}
+
+impl Error for A {}
+
+impl Error for B {
+ fn source(&self) -> Option<&(dyn Error + 'static)> {
+ self.0.as_ref().map(|e| e.as_ref())
+ }
+}
+
+let b = B(Some(Box::new(A)));
+
+// let err : Box<Error> = b.into(); // or
+let err = &b as &dyn Error;
+
+let mut iter = err.sources();
+
+assert_eq!("B".to_string(), iter.next().unwrap().to_string());
+assert_eq!("A".to_string(), iter.next().unwrap().to_string());
+assert!(iter.next().is_none());
+assert!(iter.next().is_none());
Converts a Cow
into a box of dyn Error
+ Send
+ Sync
.
use std::error::Error;
+use std::borrow::Cow;
+
+let a_cow_str_error = Cow::from("a str error");
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_cow_str_error);
+assert!(
+ size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
Converts a type of Error
into a box of dyn Error
.
use std::error::Error;
+use std::fmt;
+
+#[derive(Debug)]
+struct AnError;
+
+impl fmt::Display for AnError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "An error")
+ }
+}
+
+impl Error for AnError {}
+
+let an_error = AnError;
+assert!(0 == size_of_val(&an_error));
+let a_boxed_error = Box::<dyn Error>::from(an_error);
+assert!(size_of::<Box<dyn Error>>() == size_of_val(&a_boxed_error))
Converts a type of Error
+ Send
+ Sync
into a box of
+dyn Error
+ Send
+ Sync
.
use std::error::Error;
+use std::fmt;
+
+#[derive(Debug)]
+struct AnError;
+
+impl fmt::Display for AnError {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ write!(f, "An error")
+ }
+}
+
+impl Error for AnError {}
+
+unsafe impl Send for AnError {}
+
+unsafe impl Sync for AnError {}
+
+let an_error = AnError;
+assert!(0 == size_of_val(&an_error));
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(an_error);
+assert!(
+ size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
Converts a String
into a box of dyn Error
+ Send
+ Sync
.
use std::error::Error;
+
+let a_string_error = "a string error".to_string();
+let a_boxed_error = Box::<dyn Error + Send + Sync>::from(a_string_error);
+assert!(
+ size_of::<Box<dyn Error + Send + Sync>>() == size_of_val(&a_boxed_error))
Either
implements Error
if both L
and R
implement it.
Requires crate feature "use_std"
pub trait ToSerdeError<T> {
+ // Required method
+ fn serde_error<E: Error>(self) -> Result<T, E>;
+}
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
pub type Result<T, E = Error> = Result<T, E>;
Result type returned from functions that can have our Error
s.
pub enum Result<T, E = Error> {
+ Ok(T),
+ Err(E),
+}
Simple json escaping
+pub trait CollectEscaped {
+ // Required method
+ fn collect_pango_escaped_into<T: Write>(self, out: &mut T);
+
+ // Provided method
+ fn collect_pango_escaped<T: Write + Default>(self) -> T
+ where Self: Sized { ... }
+}
Write escaped version of self
to out
Write escaped version of self
to a new buffer
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
pub trait Escaped {
+ // Required method
+ fn pango_escaped_into<T: Write>(self, out: &mut T);
+
+ // Provided method
+ fn pango_escaped<T: Write + Default>(self) -> T
+ where Self: Sized { ... }
+}
Write escaped version of self
to out
Write escaped version of self
to a new buffer
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
pub struct Config {
+ pub full: Option<FormatTemplate>,
+ pub short: Option<FormatTemplate>,
+}
full: Option<FormatTemplate>
§short: Option<FormatTemplate>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum FormatError {
+ PlaceholderNotFound(String),
+ IncompatibleFormatter {
+ ty: &'static str,
+ fmt: &'static str,
+ },
+ NumberOutOfRange(f64),
+ Other(Error),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreRedirecting to ../../../../i3status_rs/formatting/formatter/struct.BarFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/constant.DEFAULT_DURATION_FORMATTER.html b/i3status_rs/formatting/formatter/constant.DEFAULT_DURATION_FORMATTER.html new file mode 100644 index 0000000000..3c6c45521e --- /dev/null +++ b/i3status_rs/formatting/formatter/constant.DEFAULT_DURATION_FORMATTER.html @@ -0,0 +1 @@ +pub const DEFAULT_DURATION_FORMATTER: DurationFormatter;
pub const DEFAULT_FLAG_FORMATTER: FlagFormatter;
pub const DEFAULT_NUMBER_FORMATTER: EngFormatter;
pub const DEFAULT_STRING_FORMATTER: StrFormatter;
Redirecting to ../../../../i3status_rs/formatting/formatter/enum.DatetimeFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/datetime/static.DEFAULT_DATETIME_FORMATTER.html b/i3status_rs/formatting/formatter/datetime/static.DEFAULT_DATETIME_FORMATTER.html new file mode 100644 index 0000000000..6b266012df --- /dev/null +++ b/i3status_rs/formatting/formatter/datetime/static.DEFAULT_DATETIME_FORMATTER.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/static.DEFAULT_DATETIME_FORMATTER.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/duration/constant.DEFAULT_DURATION_FORMATTER.html b/i3status_rs/formatting/formatter/duration/constant.DEFAULT_DURATION_FORMATTER.html new file mode 100644 index 0000000000..b43e0b1a72 --- /dev/null +++ b/i3status_rs/formatting/formatter/duration/constant.DEFAULT_DURATION_FORMATTER.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/constant.DEFAULT_DURATION_FORMATTER.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/duration/struct.DurationFormatter.html b/i3status_rs/formatting/formatter/duration/struct.DurationFormatter.html new file mode 100644 index 0000000000..c02a298253 --- /dev/null +++ b/i3status_rs/formatting/formatter/duration/struct.DurationFormatter.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/struct.DurationFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/eng/constant.DEFAULT_NUMBER_FORMATTER.html b/i3status_rs/formatting/formatter/eng/constant.DEFAULT_NUMBER_FORMATTER.html new file mode 100644 index 0000000000..d43e06efb1 --- /dev/null +++ b/i3status_rs/formatting/formatter/eng/constant.DEFAULT_NUMBER_FORMATTER.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/constant.DEFAULT_NUMBER_FORMATTER.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/eng/struct.EngFormatter.html b/i3status_rs/formatting/formatter/eng/struct.EngFormatter.html new file mode 100644 index 0000000000..003e63290d --- /dev/null +++ b/i3status_rs/formatting/formatter/eng/struct.EngFormatter.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/struct.EngFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/enum.DatetimeFormatter.html b/i3status_rs/formatting/formatter/enum.DatetimeFormatter.html new file mode 100644 index 0000000000..186a8f1b87 --- /dev/null +++ b/i3status_rs/formatting/formatter/enum.DatetimeFormatter.html @@ -0,0 +1,45 @@ +pub enum DatetimeFormatter {
+ Chrono {
+ items: Vec<Item<'static>>,
+ locale: Option<Locale>,
+ },
+ Icu {
+ length: Date,
+ locale: Locale,
+ },
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreRedirecting to ../../../../i3status_rs/formatting/formatter/constant.DEFAULT_FLAG_FORMATTER.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/flag/struct.FlagFormatter.html b/i3status_rs/formatting/formatter/flag/struct.FlagFormatter.html new file mode 100644 index 0000000000..f18d715915 --- /dev/null +++ b/i3status_rs/formatting/formatter/flag/struct.FlagFormatter.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/struct.FlagFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/fn.new_formatter.html b/i3status_rs/formatting/formatter/fn.new_formatter.html new file mode 100644 index 0000000000..9f3dd831dc --- /dev/null +++ b/i3status_rs/formatting/formatter/fn.new_formatter.html @@ -0,0 +1 @@ +Redirecting to ../../../../i3status_rs/formatting/formatter/struct.PangoStrFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/sidebar-items.js b/i3status_rs/formatting/formatter/sidebar-items.js new file mode 100644 index 0000000000..33885bcc80 --- /dev/null +++ b/i3status_rs/formatting/formatter/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"constant":["DEFAULT_DURATION_FORMATTER","DEFAULT_FLAG_FORMATTER","DEFAULT_NUMBER_FORMATTER","DEFAULT_STRING_FORMATTER"],"enum":["DatetimeFormatter"],"fn":["new_formatter"],"static":["DEFAULT_DATETIME_FORMATTER"],"struct":["BarFormatter","DurationFormatter","EngFormatter","FlagFormatter","PangoStrFormatter","StrFormatter","TallyFormatter"],"trait":["Formatter"]}; \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/static.DEFAULT_DATETIME_FORMATTER.html b/i3status_rs/formatting/formatter/static.DEFAULT_DATETIME_FORMATTER.html new file mode 100644 index 0000000000..dc1c7d0941 --- /dev/null +++ b/i3status_rs/formatting/formatter/static.DEFAULT_DATETIME_FORMATTER.html @@ -0,0 +1 @@ +pub static DEFAULT_DATETIME_FORMATTER: LazyLock<DatetimeFormatter>
Redirecting to ../../../../i3status_rs/formatting/formatter/constant.DEFAULT_STRING_FORMATTER.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/str/struct.StrFormatter.html b/i3status_rs/formatting/formatter/str/struct.StrFormatter.html new file mode 100644 index 0000000000..c9f63a0656 --- /dev/null +++ b/i3status_rs/formatting/formatter/str/struct.StrFormatter.html @@ -0,0 +1,11 @@ + + + + +Redirecting to ../../../../i3status_rs/formatting/formatter/struct.StrFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/struct.BarFormatter.html b/i3status_rs/formatting/formatter/struct.BarFormatter.html new file mode 100644 index 0000000000..2cb9bd8590 --- /dev/null +++ b/i3status_rs/formatting/formatter/struct.BarFormatter.html @@ -0,0 +1,36 @@ +pub struct BarFormatter { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct DurationFormatter { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct EngFormatter { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct FlagFormatter;
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct PangoStrFormatter;
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct StrFormatter { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct TallyFormatter { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreRedirecting to ../../../../i3status_rs/formatting/formatter/struct.TallyFormatter.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/formatting/formatter/trait.Formatter.html b/i3status_rs/formatting/formatter/trait.Formatter.html new file mode 100644 index 0000000000..144625ebdd --- /dev/null +++ b/i3status_rs/formatting/formatter/trait.Formatter.html @@ -0,0 +1,18 @@ +pub trait Formatter:
+ Debug
+ + Send
+ + Sync {
+ // Required method
+ fn format(
+ &self,
+ val: &Value,
+ config: &SharedConfig,
+ ) -> Result<String, FormatError>;
+
+ // Provided method
+ fn interval(&self) -> Option<Duration> { ... }
+}
Many blocks have a format
configuration option, which allows to heavily customize the block’s
+appearance. In short, each block with format
option provides a set of values, which are
+displayed according to format
. format
’s value is just a text with embedded variables.
+Similarly to PHP and shell, variable name must start with a $
:
+this is a variable: -> $var <-
.
Also, format strings can embed icons. For example, ^icon_ping
in " ^icon_ping $ping "
gets
+substituted with a “ping” icon from your icon set. For a complete list of icons, see
+this.
The allowed types of variables are:
+Type | Default formatter |
---|---|
Text | str |
Number | eng |
Datetime | datetime |
Duration | duration |
Flag | N/A |
A formatter is something that converts a value into a text. Because there are many ways to do
+this, a number of formatters is available. Formatter can be specified using the syntax similar
+to method calls in many programming languages: <variable>.<formatter>(<args>)
. For example:
+$title.str(min_w:10, max_w:20)
.
Note: for arguments that accept a boolean value, just specifying the argument will be treated as arg:true
.
str
- Format textArgument | Description | Default value |
---|---|---|
min_width or min_w | if text is shorter it will be padded using spaces | 0 |
max_width or max_w | if text is longer it will be truncated | Infinity |
width or w | Text will be exactly this length by padding or truncating as needed | N/A |
rot_interval | if text is longer than max_width it will be rotated every rot_interval seconds, if set | None |
rot_separator | if text is longer than max_width it will be rotated with this seporator | "|" |
Note: width just changes the values of both min_width and max_width to be the same. Use width +if you want the values to be the same, or the other two otherwise. Don’t mix width with +min_width or max_width.
+eng
- Format numbers using engineering notationArgument | Description | Default value |
---|---|---|
width or w | the resulting text will be at least width characters long | 2 |
unit or u | some values have a unit, and it is possible to convert them by setting this option | N/A |
hide_unit | hide the unit symbol | false |
unit_space | have a whitespace before unit symbol | false |
prefix or p | specify this argument if you want to set the minimal SI prefix | N/A |
hide_prefix | hide the prefix symbol | false |
prefix_space | have a whitespace before prefix symbol | false |
force_prefix | force the prefix value instead of setting a “minimal prefix” | false |
pad_with | the character that is used to pad the number to be width long | (a space) |
range | a range of allowed values, in the format <start>..<end> , inclusive. Both start and end are optional. Can be used to, for example, hide the block when the value is not in a given range. | .. |
show | show this value. Can be used with range for conditional formatting | true |
bar
- Display numbers as progress barsArgument | Description | Default value |
---|---|---|
width or w | the width of the bar (in characters) | 5 (1 for vertical ) |
max_value | which value is treated as “full”. For example, for battery level 100 is full. | 100 |
vertical or v | whether to render the bar vertically or not | false |
tally
- Display numbers as tally marksArgument | Description | Default value |
---|---|---|
style or s | One of chinese_counting_rods /ccr , chinese_tally /ct , western_tally /wt , western_tally_ungrouped /wtu | western_tally |
pango-str
- Just display the text without pango markup escapingNo arguments.
+datetime
- Display datetimeArgument | Description | Default value |
---|---|---|
format or f | chrono docs for all options. | '%a %d/%m %R' |
locale or l | Locale to apply when formatting the time | System locale |
duration
/dur
- Format durationsArgument | Description | Default value |
---|---|---|
hms | Should the format be hours:minutes:seconds.milliseconds | false |
max_unit | The largest unit to display the duration with (see below for the list of all possible units) | hms ? h : y |
min_unit | The smallest unit to display the duration with (see below for the list of all possible units) | s |
units | The number of units to display | min(# of units between max_unit and `min_unit``, 2) |
round_up | Round up to the nearest minimum displayed unit | true |
unit_space | Should there be a space between the value and unit symbol (not allowed when hms:true ) | false |
pad_with | The character that is used to pad the numbers | hms ? 0 : (a space) |
leading_zeroes | If fewer than units are non-zero should leading numbers that have a value of zero be shown | true |
Unit | Description |
---|---|
y | years |
w | weeks |
d | days |
h | hours |
m | minutes |
s | seconds |
ms | milliseconds |
Some blocks allow missing placeholders, for example bluetooth’s
+“percentage” may be absent if the device is not supported. To handle such cases it is possible
+to queue multiple formats together by using |
symbol: <something that can fail>|<otherwise try this>|<or this>
.
In addition, formats can be recursive. To set a format inside of another format, place it
+inside of {}
. For example, in Percentage: {$percentage|N/A}
the text “Percentage: “ will be
+always displayed, followed by the actual percentage or “N/A” in case percentage is not
+available. This example does exactly the same thing as Percentage: $percentage|Percentage: N/A
Some blocks provide flags, which can be used to change the format based on some criteria. For
+example, taskwarrior defines done
if the count is zero. In
+general, flags are used in this way:
$a{a is set}|$b$c{b and c are set}|${b|c}{b or c is set}|neither flag is set
pub enum Token<'a> {
+ Text(String),
+ Placeholder(Placeholder<'a>),
+ Icon(&'a str),
+ Recursive(FormatTemplate<'a>),
+}
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub fn parse_full(i: &str) -> Result<FormatTemplate<'_>>
pub struct Arg<'a> {
+ pub key: &'a str,
+ pub val: Option<&'a str>,
+}
key: &'a str
§val: Option<&'a str>
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct FormatTemplate<'a>(pub Vec<TokenList<'a>>);
0: Vec<TokenList<'a>>
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Formatter<'a> {
+ pub name: &'a str,
+ pub args: Vec<Arg<'a>>,
+}
name: &'a str
§args: Vec<Arg<'a>>
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Placeholder<'a> {
+ pub name: &'a str,
+ pub formatter: Option<Formatter<'a>>,
+}
name: &'a str
§formatter: Option<Formatter<'a>>
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct TokenList<'a>(pub Vec<Token<'a>>);
0: Vec<Token<'a>>
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Prefix {
+Show 13 variants
Nano,
+ Micro,
+ Milli,
+ One,
+ OneButBinary,
+ Kilo,
+ Kibi,
+ Mega,
+ Mebi,
+ Giga,
+ Gibi,
+ Tera,
+ Tebi,
+}
SI prefix
+n
u
m
1
1i
+1i
is a special prefix which means “one but binary”. 1i
is to 1
as Ki
is to K
.
K
Ki
M
Mi
G
Gi
T
Ti
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Format { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Fragment {
+ pub text: String,
+ pub metadata: Metadata,
+}
text: String
§metadata: Metadata
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Metadata {
+ pub instance: Option<&'static str>,
+ pub underline: bool,
+ pub italic: bool,
+}
instance: Option<&'static str>
§underline: bool
§italic: bool
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Token {
+ Text(String),
+ Recursive(FormatTemplate),
+ Placeholder {
+ name: String,
+ formatter: Option<Box<dyn Formatter>>,
+ },
+ Icon {
+ name: String,
+ },
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct FormatTemplate(/* private fields */);
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct TokenList(pub Vec<Token>);
0: Vec<Token>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Unit {
+ Bytes,
+ Bits,
+ Percents,
+ Degrees,
+ Seconds,
+ Watts,
+ Hertz,
+ None,
+}
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreToString::to_string
, but without panic on OOM.
Subscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum ValueInner {
+ Text(String),
+ Icon(Cow<'static, str>, Option<f64>),
+ Number {
+ val: f64,
+ unit: Unit,
+ },
+ Datetime(DateTime<Utc>, Option<Tz>),
+ Duration(Duration),
+ Flag,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Value {
+ pub inner: ValueInner,
+ pub metadata: Metadata,
+}
inner: ValueInner
§metadata: Metadata
Constructors
+self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum GeolocatorBackend {
+ Ipapi(Config),
+ Ip2Location(Config),
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreGeolocation service
+This global module can be used to provide geolocation information +to blocks that support it.
+ipapi.co is the default geolocator service.
+Key | Values | Required | Default |
---|---|---|---|
geolocator | ipapi | Yes | None |
Key | Values | Required | Default |
---|---|---|---|
geolocator | ip2location | Yes | None |
api_key | Your Ip2Location.io API key. | No | None |
An api key is not required to get back basic information from ip2location.io. +However, to get more additional information, an api key is required. +See pricing for more information.
+The api_key
option can be omitted from configuration, in which case it
+can be provided in the environment variable IP2LOCATION_API_KEY
Use the default geolocator service:
+[geolocator]
+geolocator = "ipapi"
Use Ip2Location.io
+[geolocator]
+geolocator = "ip2location"
+api_key = "XXX"
pub struct Geolocator { /* private fields */ }
No-op if last API call was made in the last interval
seconds.
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct IPAddressInfo {Show 26 fields
+ pub ip: String,
+ pub latitude: f64,
+ pub longitude: f64,
+ pub city: String,
+ pub version: Option<String>,
+ pub region: Option<String>,
+ pub region_code: Option<String>,
+ pub country: Option<String>,
+ pub country_name: Option<String>,
+ pub country_code: Option<String>,
+ pub country_code_iso3: Option<String>,
+ pub country_capital: Option<String>,
+ pub country_tld: Option<String>,
+ pub continent_code: Option<String>,
+ pub in_eu: Option<bool>,
+ pub postal: Option<String>,
+ pub timezone: Option<String>,
+ pub utc_offset: Option<String>,
+ pub country_calling_code: Option<String>,
+ pub currency: Option<String>,
+ pub currency_name: Option<String>,
+ pub languages: Option<String>,
+ pub country_area: Option<f64>,
+ pub country_population: Option<f64>,
+ pub asn: Option<String>,
+ pub org: Option<String>,
+}
ip: String
§latitude: f64
§longitude: f64
§city: String
§version: Option<String>
§region: Option<String>
§region_code: Option<String>
§country: Option<String>
§country_name: Option<String>
§country_code: Option<String>
§country_code_iso3: Option<String>
§country_capital: Option<String>
§country_tld: Option<String>
§continent_code: Option<String>
§in_eu: Option<bool>
§postal: Option<String>
§timezone: Option<String>
§utc_offset: Option<String>
§country_calling_code: Option<String>
§currency: Option<String>
§currency_name: Option<String>
§languages: Option<String>
§country_area: Option<f64>
§country_population: Option<f64>
§asn: Option<String>
§org: Option<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Icon {
+ Single(String),
+ Progression(Vec<String>),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Icons(pub HashMap<String, Icon>);
0: HashMap<String, Icon>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub use env_logger;
pub use serde_json;
pub use tokio;
Redirecting to macro.map.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/macro.map.html b/i3status_rs/macro.map.html new file mode 100644 index 0000000000..49b0434422 --- /dev/null +++ b/i3status_rs/macro.map.html @@ -0,0 +1,19 @@ +macro_rules! map {
+ (@extend $map:ident $( $([$($cond_tokens:tt)*])? $key:literal => $value:expr ),* $(,)?) => { ... };
+ (@extend $map:ident $( $key:expr => $value:expr ),* $(,)?) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr, if $cond:expr) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr, if let $pat:pat = $match_on:expr) => { ... };
+ ($($tt:tt)*) => { ... };
+}
pub enum I3BarBlockAlign {
+ Center,
+ Right,
+ Left,
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum I3BarBlockMinWidth {
+ Pixels(usize),
+ Text(String),
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct I3BarBlock {Show 17 fields
+ pub full_text: String,
+ pub short_text: String,
+ pub color: Color,
+ pub background: Color,
+ pub border: Option<String>,
+ pub border_top: Option<usize>,
+ pub border_right: Option<usize>,
+ pub border_bottom: Option<usize>,
+ pub border_left: Option<usize>,
+ pub min_width: Option<I3BarBlockMinWidth>,
+ pub align: Option<I3BarBlockAlign>,
+ pub name: Option<String>,
+ pub instance: String,
+ pub urgent: Option<bool>,
+ pub separator: Option<bool>,
+ pub separator_block_width: Option<usize>,
+ pub markup: Option<String>,
+}
Represent block as described in https://i3wm.org/docs/i3bar-protocol.html
+full_text: String
§short_text: String
§color: Color
§background: Color
§border: Option<String>
§border_top: Option<usize>
§border_right: Option<usize>
§border_bottom: Option<usize>
§border_left: Option<usize>
§min_width: Option<I3BarBlockMinWidth>
§align: Option<I3BarBlockAlign>
§name: Option<String>
This project uses name
field to uniquely identify each “logical block”. For example two
+“config blocks” merged using merge_with_next
will have the same name
. This information
+could be used by some bar frontends (such as i3bar-river
) and will be ignored by i3bar
+and swaybar
.
instance: String
This project uses instance
field to uniquely identify each block and optionally a part
+of the block, e.g. a “button”. The format is {block_id}:{optional_widget_name}
. This info
+is used when dispatching click events.
urgent: Option<bool>
§separator: Option<bool>
§separator_block_width: Option<usize>
§markup: Option<String>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct I3BarEvent {
+ pub id: usize,
+ pub instance: Option<String>,
+ pub button: MouseButton,
+}
id: usize
§instance: Option<String>
source
. Read morekey
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct BarState { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Block { /* private fields */ }
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct CliArgs {
+ pub config: String,
+ pub never_pause: bool,
+ pub no_init: bool,
+ pub blocking_threads: usize,
+}
A feature-rich and resource-friendly replacement for i3status(1), written in Rust. The +i3status-rs program writes a stream of configurable “blocks” of system information (time, +battery status, volume, etc.) to standard output in the JSON format understood by i3bar(1) and +sway-bar(5).
+config: String
Sets a TOML config file
+If full absolute path given, then use it as is: /home/foo/i3rs-config.toml
If filename given, e.g. “custom_theme.toml”, then first look in $XDG_CONFIG_HOME/i3status-rust
Then look for it in $XDG_DATA_HOME/i3status-rust
Otherwise look for it in /usr/share/i3status-rust
never_pause: bool
Ignore any attempts by i3 to pause the bar when hidden/fullscreen
+no_init: bool
Do not send the init sequence
+blocking_threads: usize
The maximum number of blocking threads spawned by tokio
+ArgGroup::id
][crate::ArgGroup::id] for this set of argumentsCommand
] so it can instantiate Self
via
+[FromArgMatches::from_arg_matches_mut
] Read moreCommand
] so it can instantiate self
via
+[FromArgMatches::update_from_arg_matches_mut
] Read moreArgMatches
to self
.ArgMatches
to self
.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Color {
+ None,
+ Auto,
+ Rgba(Rgba),
+ Hsva(Hsva),
+}
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Hsva {
+ pub h: f64,
+ pub s: f64,
+ pub v: f64,
+ pub a: u8,
+}
An HSVA color (hue, saturation, value, alpha).
+h: f64
§s: f64
§v: f64
§a: u8
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Rgba {
+ pub r: u8,
+ pub g: u8,
+ pub b: u8,
+ pub a: u8,
+}
An RGBA color (red, green, blue, alpha).
+r: u8
§g: u8
§b: u8
§a: u8
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum ColorOrLink {
+ Color(Color),
+ Link {
+ link: String,
+ },
+}
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub enum Separator {
+ Native,
+ Custom(String),
+}
key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Theme(pub ThemeInner);
0: ThemeInner
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct ThemeInner {Show 17 fields
+ pub idle_bg: Color,
+ pub idle_fg: Color,
+ pub info_bg: Color,
+ pub info_fg: Color,
+ pub good_bg: Color,
+ pub good_fg: Color,
+ pub warning_bg: Color,
+ pub warning_fg: Color,
+ pub critical_bg: Color,
+ pub critical_fg: Color,
+ pub separator: Separator,
+ pub separator_bg: Color,
+ pub separator_fg: Color,
+ pub alternating_tint_bg: Color,
+ pub alternating_tint_fg: Color,
+ pub end_separator: Separator,
+ pub start_separator: Separator,
+}
idle_bg: Color
§idle_fg: Color
§info_bg: Color
§info_fg: Color
§good_bg: Color
§good_fg: Color
§warning_bg: Color
§warning_fg: Color
§critical_bg: Color
§critical_fg: Color
§separator: Separator
§separator_bg: Color
§separator_fg: Color
§alternating_tint_bg: Color
§alternating_tint_fg: Color
§end_separator: Separator
§start_separator: Separator
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct ThemeOverrides {Show 17 fields
+ pub idle_bg: Option<ColorOrLink>,
+ pub idle_fg: Option<ColorOrLink>,
+ pub info_bg: Option<ColorOrLink>,
+ pub info_fg: Option<ColorOrLink>,
+ pub good_bg: Option<ColorOrLink>,
+ pub good_fg: Option<ColorOrLink>,
+ pub warning_bg: Option<ColorOrLink>,
+ pub warning_fg: Option<ColorOrLink>,
+ pub critical_bg: Option<ColorOrLink>,
+ pub critical_fg: Option<ColorOrLink>,
+ pub separator: Option<Separator>,
+ pub separator_bg: Option<ColorOrLink>,
+ pub separator_fg: Option<ColorOrLink>,
+ pub alternating_tint_bg: Option<ColorOrLink>,
+ pub alternating_tint_fg: Option<ColorOrLink>,
+ pub end_separator: Option<Separator>,
+ pub start_separator: Option<Separator>,
+}
idle_bg: Option<ColorOrLink>
§idle_fg: Option<ColorOrLink>
§info_bg: Option<ColorOrLink>
§info_fg: Option<ColorOrLink>
§good_bg: Option<ColorOrLink>
§good_fg: Option<ColorOrLink>
§warning_bg: Option<ColorOrLink>
§warning_fg: Option<ColorOrLink>
§critical_bg: Option<ColorOrLink>
§critical_fg: Option<ColorOrLink>
§separator: Option<Separator>
§separator_bg: Option<ColorOrLink>
§separator_fg: Option<ColorOrLink>
§alternating_tint_bg: Option<ColorOrLink>
§alternating_tint_fg: Option<ColorOrLink>
§end_separator: Option<Separator>
§start_separator: Option<Separator>
source
. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct ThemeUserConfig {
+ pub theme: Option<String>,
+ pub overrides: Option<ThemeOverrides>,
+}
theme: Option<String>
§overrides: Option<ThemeOverrides>
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub fn default<T: Default>() -> T
A shortcut for Default::default()
+See https://github.com/rust-lang/rust/issues/73014
pub fn deserialize_toml_file<T, P>(path: P) -> Result<T>
pub fn find_file(
+ file: &str,
+ subdir: Option<&str>,
+ extension: Option<&str>,
+) -> Option<PathBuf>
Tries to find a file in standard locations:
+~/.config
)~/.local/share/
)/usr/share/
Automatically append an extension if not presented.
+Default::default()
+See https://github.com/rust-lang/rust/issues/73014Redirecting to macro.map.html...
+ + + \ No newline at end of file diff --git a/i3status_rs/util/macro.map.html b/i3status_rs/util/macro.map.html new file mode 100644 index 0000000000..81fef1b773 --- /dev/null +++ b/i3status_rs/util/macro.map.html @@ -0,0 +1,19 @@ +macro_rules! map {
+ (@extend $map:ident $( $([$($cond_tokens:tt)*])? $key:literal => $value:expr ),* $(,)?) => { ... };
+ (@extend $map:ident $( $key:expr => $value:expr ),* $(,)?) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr, if $cond:expr) => { ... };
+ (@insert $map:ident, $key:expr, $value:expr, if let $pat:pat = $match_on:expr) => { ... };
+ ($($tt:tt)*) => { ... };
+}
pub trait StreamExtDebounced: StreamExt {
+ // Required method
+ fn next_debounced(&mut self) -> impl Future<Output = Option<Self::Item>>;
+}
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
pub enum State {
+ Idle,
+ Info,
+ Good,
+ Warning,
+ Critical,
+}
State of the widget. Affects the theming.
+key
and return true
if they are equal.self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read morepub struct Widget {
+ pub state: State,
+ /* private fields */
+}
state: State
Construct I3BarBlock
from this widget
self
into a Left
variant of Either<Self, Self>
+if into_left
is true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreself
into a Left
variant of Either<Self, Self>
+if into_left(&self)
returns true
.
+Converts self
into a Right
variant of Either<Self, Self>
+otherwise. Read moreSubscriber
to this type, returning a
+[WithDispatch
] wrapper. Read moreU::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nExample\nIgnore any attempts by i3 to pause the bar when …\nDo not send the init sequence\nAn error which originates from a block\nBorrowed data.\nOwned data.\nDisplay the stats of your AMD GPU\nThe brightness of a backlight device\nInformation about the internal power supply\nMonitor Bluetooth device\nCalendar\nCPU statistics\nThe output of a custom shell command\nA block controlled by the DBus\nDisk I/O statistics\nDisk usage statistics\nLocal docker daemon status\nExternal IP address and various information about it\nNo-op if last API call was made in the last interval
…\nCurrently focused window\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nThe number of GitHub notifications\nHides the block. Send new widget to make it visible again.\nManage display temperature\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nKDEConnect indicator\nKeyboard layout indicator\nSystem load average\nUnread mail. Only supports maildir format.\nMemory and swap usage\nA custom menu\nThe current song title and artist\nNetwork information\nDisplay and toggle the state of notifications daemon\nCount of notmuch messages\nDisplay the stats of your NVidia GPU\nPending updates for different package manager like apt, …\nA pomodoro timer\nPrivacy Monitor\nThe number of pending notifications in rofication-daemon\nScratchpad indicator\nDisplay the status of a service\nSends the error to be displayed.\nSends the widget to be displayed.\nVolume level\nPing, download, and upload speeds\nThe number of tasks from the taskwarrior list\nTimer\nThe system temperature\nThe current time.\nA Toggle block\nToString::to_string
, but without panic on OOM.\nSystem’s uptime\nShows the current connection status for VPN networks\nWatson statistics\nCurrent weather\nX11 screen information\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn BatteryDriver::Sysfs
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturn …\nReturn …\nReturn …\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nToString::to_string
, but without panic on OOM.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturn InfoType::Available
\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn Driver::Auto
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn KeyboardLayoutDriver::XkbEvent
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn PlayerName::Multiple(Default::default())
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn DriverType::Dunst
\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn Config { format: Default::default() }
\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn DriverType::Systemd
\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn DeviceKind::Sink
\nReturn SoundDriver::Auto
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn TemperatureScale::Celsius
\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturn DriverType::Nordvpn
\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nSupport for using the US National Weather Service API.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturn …\nReturns the argument unchanged.\nCalls U::from(self)
.\nCan be one of left
, middle
, right
, up
/wheel_up
, down
/…\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn …\nThe maximum delay (ms) between two clicks that are …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nSet to true
to invert mouse wheel direction\nContains the error value\nError type\nContains the success value\nResult type returned from functions that can have our Error
…\nError
is a trait representing the basic expectations for …\nAttempts to downcast the box to a concrete type.\nAttempts to downcast the box to a concrete type.\nAttempts to downcast the box to a concrete type.\nReturns some mutable reference to the inner value if it is …\nForwards to the method defined on the type dyn Error
.\nForwards to the method defined on the type dyn Error
.\nReturns some reference to the inner value if it is of type …\nForwards to the method defined on the type dyn Error
.\nForwards to the method defined on the type dyn Error
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nForwards to the method defined on the type dyn Error
.\nForwards to the method defined on the type dyn Error
.\nReturns true
if the inner type is the same as T
.\nProvides type-based access to context intended for error …\nReturns the lower-level source of this error, if any.\nReturns an iterator starting with the current error and …\nToString::to_string
, but without panic on OOM.\nToString::to_string
, but without panic on OOM.\nWrite escaped version of self
to a new buffer\nWrite escaped version of self
to out
\nWrite escaped version of self
to a new buffer\nWrite escaped version of self
to out
\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nToString::to_string
, but without panic on OOM.\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nGi
\nG
\nKi
\nK
\nMi
\nM
\nu
\nm
\nn
\n1
\n1i
1i
is a special prefix which means “one but binary”…\nSI prefix\nTi
\nT
\nReturns the argument unchanged.\nCalls U::from(self)
.\nToString::to_string
, but without panic on OOM.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nb
\nB
\ndeg
\nHz
\n``\n%
\ns
\nW
\nReturns the argument unchanged.\nCalls U::from(self)
.\nToString::to_string
, but without panic on OOM.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturn GeolocatorBackend::Ipapi(Default::default())
\nNo-op if last API call was made in the last interval
…\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nRepresent block as described in …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nThis project uses instance
field to uniquely identify each …\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nThis project uses name
field to uniquely identify each “…\nReturns the argument unchanged.\nCalls U::from(self)
.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nAn HSVA color (hue, saturation, value, alpha).\nAn RGBA color (red, green, blue, alpha).\nReturn Color::None
\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreate a new RGBA color from the hex
value.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCalls U::from(self)
.\nCreate a new RGBA color.\nCreate a new HSVA color.\nReturn Separator::Native
\nReturns the argument unchanged.\nCalls U::from(self)
.\nConvert 2 letter country code to Unicode\nA shortcut for Default::default()
See …\nTries to find a file in standard locations:\nExample\nState of the widget. Affects the theming.\nReturn State::Idle
\nReturns the argument unchanged.\nReturns the argument unchanged.\nConstruct I3BarBlock
from this widget\nCalls U::from(self)
.\nCalls U::from(self)
.")
\ No newline at end of file
diff --git a/settings.html b/settings.html
new file mode 100644
index 0000000000..807472f0c0
--- /dev/null
+++ b/settings.html
@@ -0,0 +1 @@
+