Show white bar on both monitors
This commit is contained in:
parent
4687c2ce05
commit
70ad7e9b65
10 changed files with 5993 additions and 20 deletions
59
src/main.rs
59
src/main.rs
|
|
@ -1,3 +1,58 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
use iced::Element;
|
||||
use iced::Subscription;
|
||||
use iced::Task;
|
||||
use iced::widget::Row;
|
||||
use iced::widget::container;
|
||||
use iced_layershell::daemon;
|
||||
use iced_layershell::reexport::Anchor;
|
||||
use iced_layershell::settings::LayerShellSettings;
|
||||
use iced_layershell::settings::Settings;
|
||||
use iced_layershell::to_layer_message;
|
||||
|
||||
pub fn main() -> Result<(), iced_layershell::Error> {
|
||||
daemon(App::default, || "rbaw".into(), App::update, App::view)
|
||||
.subscription(App::subscription)
|
||||
.settings(Settings {
|
||||
layer_settings: LayerShellSettings {
|
||||
size: Some((0, 32)),
|
||||
exclusive_zone: 32,
|
||||
anchor: Anchor::Top | Anchor::Left | Anchor::Right,
|
||||
start_mode: iced_layershell::settings::StartMode::AllScreens, // valid here in daemon
|
||||
..Default::default()
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
.run()
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
struct App {}
|
||||
|
||||
impl App {
|
||||
fn view(&self, _id: iced::window::Id) -> Element<'_, Message> {
|
||||
let content = Row::new();
|
||||
|
||||
container(content)
|
||||
.width(iced::Length::Fill)
|
||||
.height(iced::Length::Fill)
|
||||
.into()
|
||||
}
|
||||
fn update(&mut self, _message: Message) -> Task<Message> {
|
||||
Task::none()
|
||||
}
|
||||
fn style(&self, _theme: &iced::Theme) -> iced::theme::Style {
|
||||
todo!()
|
||||
}
|
||||
fn theme(&self) -> iced::Theme {
|
||||
todo!()
|
||||
}
|
||||
fn subscription(&self) -> iced::Subscription<Message> {
|
||||
Subscription::none()
|
||||
}
|
||||
}
|
||||
|
||||
#[to_layer_message]
|
||||
#[derive(Debug)]
|
||||
enum Message {
|
||||
IcedEvent(iced::Event),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue