Skip to content

Commit

Permalink
fix format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MalpenZibo committed Sep 13, 2024
1 parent 3420929 commit 7c69417
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl Application for App {
MenuType::Privacy => crate::menu::MenuPosition::Right,
MenuType::Settings => crate::menu::MenuPosition::Right,
},
self.config.position
self.config.position,
)
} else {
row!().into()
Expand Down
1 change: 0 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ pub struct SettingsModuleConfig {
pub bluetooth_more_cmd: Option<String>,
}


#[derive(Deserialize, Clone, Debug)]
#[serde(untagged)]
#[serde(rename_all = "camelCase")]
Expand Down
4 changes: 2 additions & 2 deletions src/menu.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use iced::window::Id;
use iced::Border;
use iced::{self, widget::container, Command, Element, Theme};
use iced_sctk::command::platform_specific::wayland::layer_surface::SctkLayerSurfaceSettings;
use iced_sctk::commands::layer_surface::{
self, get_layer_surface, Anchor, KeyboardInteractivity, Layer,
};
use iced::{self, widget::container, Command, Element, Theme};

use crate::config::Position;

Expand Down Expand Up @@ -166,7 +166,7 @@ pub enum MenuPosition {
pub fn menu_wrapper(
content: Element<crate::app::Message>,
position: MenuPosition,
bar_position: Position
bar_position: Position,
) -> Element<crate::app::Message> {
iced::widget::mouse_area(
container(
Expand Down
2 changes: 1 addition & 1 deletion src/modules/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pub mod clock;
pub mod launcher;
pub mod privacy;
pub mod settings;
pub mod system_info;
pub mod title;
pub mod updates;
pub mod workspaces;
pub mod privacy;
3 changes: 2 additions & 1 deletion src/modules/settings/battery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use crate::{
},
};
use iced::{
widget::{container, row, text, Container}, Alignment, Background, Border, Element, Theme
widget::{container, row, text, Container},
Alignment, Background, Border, Element, Theme,
};

pub fn battery_indicator<'a, Message: 'static>(data: BatteryData) -> Element<'a, Message> {
Expand Down
7 changes: 5 additions & 2 deletions src/modules/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ use crate::{
use bluetooth::Bluetooth;
use brightness::{Brightness, BrightnessMessage};
use iced::{
alignment::{Horizontal, Vertical}, theme::Button, widget::{
alignment::{Horizontal, Vertical},
theme::Button,
widget::{
button, column, container, horizontal_space, row, text, vertical_rule, Column, Row, Space,
}, Alignment, Background, Border, Command, Element, Length, Subscription, Theme
},
Alignment, Background, Border, Command, Element, Length, Subscription, Theme,
};
use net::Net;

Expand Down
6 changes: 5 additions & 1 deletion src/modules/updates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ use crate::{
style::{GhostButtonStyle, HeaderButtonStyle},
};
use iced::{
alignment::Horizontal, subscription, theme::{self, Button}, widget::{button, column, container, horizontal_rule, row, scrollable, text, Column}, Alignment, Command, Element, Length, Subscription
alignment::Horizontal,
subscription,
theme::{self, Button},
widget::{button, column, container, horizontal_rule, row, scrollable, text, Column},
Alignment, Command, Element, Length, Subscription,
};
use log::error;
use serde::Deserialize;
Expand Down
5 changes: 2 additions & 3 deletions src/utils/battery.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use crate::{components::icons::Icons, modules::settings::BatteryMessage};
use iced::{
futures::{
self, stream, FutureExt, SinkExt, StreamExt
}, subscription, Subscription
futures::{self, stream, FutureExt, SinkExt, StreamExt},
subscription, Subscription,
};
use log::error;
use std::time::Duration;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/idle_inhibitor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::error::Error;
use log::{debug, info, warn};
use std::error::Error;
use wayland_client::{
protocol::{
wl_compositor::WlCompositor,
Expand Down
4 changes: 2 additions & 2 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use std::{cell::RefCell, ops::Deref, time::Duration};

pub mod audio;
pub mod battery;
pub mod bluetooth;
pub mod brightness;
pub mod idle_inhibitor;
pub mod launcher;
pub mod net;
pub mod bluetooth;
pub mod powerprofiles;
pub mod privacy;
pub mod idle_inhibitor;

pub struct Commander<T> {
sender: tokio::sync::mpsc::UnboundedSender<T>,
Expand Down

0 comments on commit 7c69417

Please sign in to comment.