Skip to content

Commit

Permalink
v0.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
VHSgunzo committed Mar 16, 2024
1 parent 6306a0e commit 502e7bc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build]
target = "x86_64-unknown-linux-gnu"
rustflags = ["-C", "strip=symbols"]
rustflags = ["-C", "strip=symbols", "-Z", "remap-cwd-prefix="]

[unstable]
build-std = ["std", "panic_abort"]
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lw-tray"
version = "0.0.5"
version = "0.0.6"
readme = "README.md"
license-file = "LICENSE"
repository = "https://github.com/VHSgunzo/lw-tray"
Expand All @@ -12,6 +12,7 @@ lto = true
panic = "abort"
opt-level = "z"
strip = "symbols"
debug = false
codegen-units = 1

[profile.dev]
Expand All @@ -22,4 +23,4 @@ opt-level = 0
ksni = "0.2.1"
execute = "0.2.12"
rust-embed = "5.9.0"
translation = "1.0.2"
translation = "1.0.2"
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 VHSgunzo
Copyright (c) 2024 VHSgunzo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: VHSgunzo <vhsgunzo.github.io>

pkgname='lw-tray'
pkgver='0.0.5'
pkgver='0.0.6'
pkgrel='1'
pkgdesc='Lux Wine tray'
arch=('x86_64')
Expand Down
22 changes: 20 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ impl ksni::Tray for LwTray {
}
}

let mut appcfg_submenu = Vec::new();
if ! self.lw_apps.is_empty() {
for app in self.lw_apps.lines() {
let app_split = to_vec_string(app.split(" ##&## ").collect());
let name = app_split[0].clone();
let icon = app_split[1].clone();
appcfg_submenu.push(
StandardItem {
label: name.clone().into(),
icon_name: icon.clone().into(),
activate: lw_activate(format!("-appcfg \"{}\"", name.clone())),
..Default::default()
}.into()
);
}
}

vec![
SubMenu {
label: tr!("Apps").into(),
Expand Down Expand Up @@ -238,10 +255,11 @@ impl ksni::Tray for LwTray {
activate: lw_activate("-config".to_string()),
..Default::default()
}.into(),
StandardItem {
SubMenu {
label: tr!("Apps settings").into(),
icon_name: self.icon.clone().into(),
activate: lw_activate("-appcfg".to_string()),
submenu: appcfg_submenu,
visible: if self.lw_apps.is_empty() { false } else { true },
..Default::default()
}.into(),
StandardItem {
Expand Down

0 comments on commit 502e7bc

Please sign in to comment.