Skip to content

Commit

Permalink
chore: to 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Decodetalkers committed Feb 21, 2025
1 parent 41ed9aa commit d797da3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/rustci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ jobs:
build:
name: Build Binary
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Deps
run: sudo apt install -y libxkbcommon-dev libalsaplayer-dev libasound2-dev libglib2.0-dev
run: pacman -Syu --noconfirm build-base git sudo libxkbcommon wayland alsa-lib alsa-utils
- name: Run fmt check
run: cargo fmt --all -- --check
- name: Run clippy check
Expand All @@ -36,11 +38,13 @@ jobs:
needs:
- build
runs-on: ubuntu-latest
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install Deps
run: sudo apt install -y libxkbcommon-dev libwayland-dev libalsaplayer-dev libasound2-dev
run: pacman -Syu --noconfirm build-base git sudo libxkbcommon wayland alsa-lib alsa-utils
- name: Publish to crate
run: |
cargo publish -p iced_zbus_notification --token ${{ secrets.CRATES_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[workspace]
resolver = "2"
resolver = "3"
members = ["./lala_bar", "./iced_zbus_notification"]

[workspace.package]
version = "0.4.3"
edition = "2021"
edition = "2024"
authors = ["Decodertalkers <[email protected]>"]
license = "MIT"
repository = "https://github.com/Decodetalkers/lala-bar"
Expand Down
6 changes: 1 addition & 5 deletions iced_zbus_notification/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,7 @@ fn get_png_icon(theme: &str, icon: &str) -> Option<PathBuf> {

fn get_pixmap_icon(icon: &str) -> Option<PathBuf> {
let path = Path::new(format!("/usr/share/pixmaps/{icon}.png").as_str()).to_owned();
if path.exists() {
Some(path)
} else {
None
}
if path.exists() { Some(path) } else { None }
}

fn get_jpeg_icon(theme: &str, icon: &str) -> Option<PathBuf> {
Expand Down
4 changes: 2 additions & 2 deletions lala_bar/src/launcher.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
mod applications;

use applications::{all_apps, App};
use applications::{App, all_apps};
use iced::widget::{column, scrollable, text_input};
use iced::{Element, Event, Length, Task as Command};
use iced_runtime::window::Action as WindowAction;
use iced_runtime::Action;
use iced_runtime::window::Action as WindowAction;

use super::Message;

Expand Down
2 changes: 1 addition & 1 deletion lala_bar/src/launcher/applications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use super::LaunchMessage;
use gio::{AppLaunchContext, DesktopAppInfo};

use gio::prelude::*;
use iced::widget::{button, column, image, row, svg, text};
use iced::Pixels;
use iced::widget::{button, column, image, row, svg, text};
use iced::{Element, Length};

use super::Message;
Expand Down
22 changes: 11 additions & 11 deletions lala_bar/src/music_bar.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
use crate::Launcher;
use crate::config::*;
use crate::dbusbackend;
use crate::get_metadata;
use crate::launcher::LaunchMessage;
use crate::notify::{NotifyCommand, NotifyUnitWidgetInfo};
use crate::slider::SliderIndex;
use crate::zbus_mpirs::ServiceInfo;
use crate::Launcher;
use crate::{LaLaInfo, Message, get_metadata_initial};
use crate::{aximer, launcher};
use crate::{get_metadata_initial, LaLaInfo, Message};
use chrono::{DateTime, Local};
use futures::channel::mpsc::{channel, Sender};
use futures::future::pending;
use futures::StreamExt;
use futures::channel::mpsc::{Sender, channel};
use futures::future::pending;
use iced::widget::{
button, checkbox, column, container, image, markdown, row, scrollable, slider, svg, text,
text_input, Space,
Space, button, checkbox, column, container, image, markdown, row, scrollable, slider, svg,
text, text_input,
};
use iced::{Alignment, Element, Font, Length, Task as Command, Theme};
use iced_aw::{date_picker::Date, helpers::date_picker, time_picker, time_picker::Time};
use iced_layershell::reexport::{Anchor, KeyboardInteractivity, Layer, NewLayerShellSettings};
use iced_layershell::settings::LayerShellSettings;
use iced_layershell::settings::StartMode;
use iced_runtime::window::Action as WindowAction;
use iced_runtime::Action;
use iced_runtime::window::Action as WindowAction;
use iced_zbus_notification::MessageSenderDefault;
use iced_zbus_notification::{
start_connection, LaLaMako, NotifyMessage, VersionInfo, DEFAULT_ACTION,
NOTIFICATION_SERVICE_PATH,
DEFAULT_ACTION, LaLaMako, NOTIFICATION_SERVICE_PATH, NotifyMessage, VersionInfo,
start_connection,
};
use std::collections::HashMap;

Expand Down Expand Up @@ -621,7 +621,7 @@ impl LalaMusicBar {
match message {
Message::DBusInfoUpdate(data) => self.service_data = data,
Message::RequestDBusInfoUpdate => {
return Command::perform(get_metadata(), Message::DBusInfoUpdate)
return Command::perform(get_metadata(), Message::DBusInfoUpdate);
}
Message::ToggleCalendar => {
if let Some(calendar_id) = self.calendar_id {
Expand Down Expand Up @@ -1070,7 +1070,7 @@ impl LalaMusicBar {
}

Message::Notify(NotifyMessage::UnitRemove(removed_id)) => {
return self.remove_notify(removed_id)
return self.remove_notify(removed_id);
}

Message::CheckOutput => {
Expand Down
2 changes: 1 addition & 1 deletion lala_bar/src/notify.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{LalaMusicBar, Message};
use iced::widget::{button, column, image, markdown, row, svg, text, Space, Stack};
use iced::widget::{Space, Stack, button, column, image, markdown, row, svg, text};
use iced::{Font, Length};
use iced_zbus_notification::{ImageInfo, NotifyUnit};

Expand Down
2 changes: 1 addition & 1 deletion lala_bar/src/zbus_mpirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use std::sync::LazyLock;
use tokio::sync::Mutex;

use zbus::{
Result,
fdo::{DBusProxy, NameOwnerChangedArgs},
proxy,
zvariant::{OwnedObjectPath, OwnedValue},
Result,
};

const PLAYCTLD: &str = "org.mpris.MediaPlayer2.playerctld";
Expand Down

0 comments on commit d797da3

Please sign in to comment.