Update
This commit is contained in:
commit
ebaff29446
|
@ -0,0 +1,2 @@
|
||||||
|
target/
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
[package]
|
||||||
|
name = "melawy-arch-linux-update-tray-icon"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
# tray-item = { path = "../../", features = ["libappindicator"] }
|
||||||
|
tray-item = { git = "https://github.com/olback/tray-item-rs", features = ["libappindicator"] }
|
||||||
|
gtk = "0.18"
|
||||||
|
subprocess = "0.2"
|
|
@ -0,0 +1,9 @@
|
||||||
|
# melawy-arch-linux-update-tray-icon
|
||||||
|
Melawy Arch Linux Update Tray Icon
|
||||||
|
|
||||||
|
### Donate
|
||||||
|
[Tinkoff](https://www.tinkoff.ru/rm/fadeeva.valeriya96/9bLRi79066)
|
||||||
|
|
||||||
|
[YooMoney](https://yoomoney.ru/to/4100115921160758)
|
||||||
|
|
||||||
|
Etherium 0x981FBf878fe451BDB83BEaF68078394d4B13213f
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env xdg-open
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Melawy Arch Linux Update Tray Icon
|
||||||
|
Name[en_GB]=Melawy Arch Linux Update Tray Icon
|
||||||
|
Name[en_US]=Melawy Arch Linux Update Tray Icon
|
||||||
|
Name[ru]=Melawy Arch Linux Иконка Обновления для Системного Трея
|
||||||
|
Comment=Melawy Arch Linux Иконка Обновления для Системного Трея
|
||||||
|
Comment[en_GB]=Melawy Arch Linux Update Tray Icon
|
||||||
|
Comment[en_US]=Melawy Arch Linux Update Tray Icon
|
||||||
|
Comment[ru]=Melawy Arch Linux Иконка Обновления для Системного Трея
|
||||||
|
Icon=software-store
|
||||||
|
Categories=System;Settings;Security;
|
||||||
|
Exec=/usr/bin/melawy-arch-linux-update-tray-icon
|
||||||
|
Type=Application
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git add . && git commit -m "Update" && git push
|
||||||
|
|
||||||
|
echo "Ready"
|
|
@ -0,0 +1,22 @@
|
||||||
|
use tray_item::{TrayItem, IconSource};
|
||||||
|
use subprocess;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
gtk::init().unwrap();
|
||||||
|
|
||||||
|
let mut tray = TrayItem::new("Melawy Arch Linux Update Tray Icon", IconSource::Resource("software-store")).unwrap();
|
||||||
|
|
||||||
|
tray.add_label("Melawy Arch Linux Update Tray Icon").unwrap();
|
||||||
|
|
||||||
|
tray.add_menu_item("Update system", || {
|
||||||
|
println!("Update system");
|
||||||
|
let exit_status = subprocess::Exec::cmd("sudo").arg("arch-linux-updater").join();
|
||||||
|
println!("{:?}", exit_status);
|
||||||
|
}).unwrap();
|
||||||
|
|
||||||
|
tray.add_menu_item("Quit", || {
|
||||||
|
gtk::main_quit();
|
||||||
|
}).unwrap();
|
||||||
|
|
||||||
|
gtk::main();
|
||||||
|
}
|
Loading…
Reference in New Issue