mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-07 12:05:49 +00:00
Add .desktop for deb
This commit is contained in:
parent
1a3022b0df
commit
9f89fdb7dd
25
.github/workflows/release.yml
vendored
25
.github/workflows/release.yml
vendored
@ -1,10 +1,10 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]*.*.*'
|
- 'v[0-9]*.*.*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
jobs:
|
jobs:
|
||||||
@ -18,12 +18,12 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@nightly
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
apt-get install -y curl
|
sudo apt-get install -y curl
|
||||||
apt-get install build-essential -y
|
sudo apt-get install build-essential -y
|
||||||
apt-get install libdbus-1-dev -y
|
sudo apt-get install libdbus-1-dev -y
|
||||||
apt-get install libssl-dev -y
|
sudo apt-get install libssl-dev -y
|
||||||
apt-get install pkg-config -y
|
sudo apt-get install pkg-config -y
|
||||||
- name: install cargo-deb
|
- name: install cargo-deb
|
||||||
run: cargo install cargo-deb
|
run: cargo install cargo-deb
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
- run: zip "awatcher-bundle.zip" awatcher
|
- run: zip "awatcher-bundle.zip" awatcher
|
||||||
working-directory: target/release
|
working-directory: target/release
|
||||||
- name: Upload binaries to release
|
- name: Upload awatcher-bundle to release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -65,15 +65,14 @@ jobs:
|
|||||||
|
|
||||||
- run: zip "awatcher.zip" awatcher
|
- run: zip "awatcher.zip" awatcher
|
||||||
working-directory: target/release
|
working-directory: target/release
|
||||||
- name: Upload binaries to release
|
- name: Upload awatcher to release
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: target/release/awatcher.zip
|
file: target/release/awatcher.zip
|
||||||
|
|
||||||
- name: cargo build deb
|
- run: cargo deb
|
||||||
run: cargo deb --features=bundle
|
- name: Upload deb to release
|
||||||
- name: Upload binaries to release
|
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
4
.github/workflows/verify.yml
vendored
4
.github/workflows/verify.yml
vendored
@ -1,11 +1,11 @@
|
|||||||
|
name: Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
name: check
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
jobs:
|
jobs:
|
||||||
|
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -405,7 +405,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "awatcher"
|
name = "awatcher"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"aw-datastore",
|
"aw-datastore",
|
||||||
@ -3845,7 +3845,7 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "watchers"
|
name = "watchers"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"aw-client-rust",
|
"aw-client-rust",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "awatcher"
|
name = "awatcher"
|
||||||
|
description = "An activity and idle watcher based on ActivityWatch"
|
||||||
version = { workspace = true }
|
version = { workspace = true }
|
||||||
authors = ["Demmie <2e3s19@gmail.com>"]
|
authors = ["Demmie <2e3s19@gmail.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@ -17,7 +18,7 @@ image = { version = "0.24.6" }
|
|||||||
members = ["watchers"]
|
members = ["watchers"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
anyhow = "1.0.70"
|
anyhow = "1.0.70"
|
||||||
@ -53,3 +54,9 @@ Awatcher is a window activity and idle watcher with an optional tray and UI for
|
|||||||
The goal is to compensate the fragmentation of desktop environments on Linux by supporting all reportable environments,
|
The goal is to compensate the fragmentation of desktop environments on Linux by supporting all reportable environments,
|
||||||
to add more flexibility to reports with filters, and to have better UX with the distribution by a single executable.
|
to add more flexibility to reports with filters, and to have better UX with the distribution by a single executable.
|
||||||
"""
|
"""
|
||||||
|
assets = [
|
||||||
|
["src/bundle/awatcher.desktop", "usr/share/applications/", "644"],
|
||||||
|
["src/bundle/logo.png", "usr/share/awatcher/icons/awatcher.png", "644"],
|
||||||
|
["target/release/awatcher", "usr/bin/", "755"],
|
||||||
|
["README.md", "usr/share/doc/awatcher/README", "644"],
|
||||||
|
]
|
||||||
|
8
src/bundle/awatcher.desktop
Normal file
8
src/bundle/awatcher.desktop
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Categories=Utility;
|
||||||
|
Exec=awatcher
|
||||||
|
Name=Awatcher
|
||||||
|
GenericName=Activity watcher
|
||||||
|
Icon=/usr/share/awatcher/icons/awatcher.png
|
Binary file not shown.
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.9 KiB |
@ -17,8 +17,8 @@ pub struct Tray {
|
|||||||
impl ksni::Tray for Tray {
|
impl ksni::Tray for Tray {
|
||||||
fn icon_pixmap(&self) -> Vec<ksni::Icon> {
|
fn icon_pixmap(&self) -> Vec<ksni::Icon> {
|
||||||
vec![ksni::Icon {
|
vec![ksni::Icon {
|
||||||
width: 100,
|
width: 128,
|
||||||
height: 100,
|
height: 128,
|
||||||
data: include_bytes!("./logo.argb32").to_vec(),
|
data: include_bytes!("./logo.argb32").to_vec(),
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user