From 20f8081b21851e801ab57fe4f3416b83997f5f74 Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 6 Sep 2023 18:20:36 -0400 Subject: [PATCH 1/3] ci: add .desktop file --- .github/workflows/build_releases.yml | 22 +++++++++++++++++----- Cargo.toml | 7 +++++++ bottom.desktop | 10 ++++++++++ 3 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 bottom.desktop diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index e1acbd742..32f33f9d6 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -44,6 +44,7 @@ jobs: os: "ubuntu-20.04", target: "x86_64-unknown-linux-gnu", cross: false, + generate-other-artifacts: true, } - { os: "ubuntu-20.04", @@ -182,21 +183,27 @@ jobs: mkdir release mv ${{ env.ASSET }} release/ - - name: Compress completion files (Linux x86-64 GNU) - if: matrix.info.target == 'x86_64-unknown-linux-gnu' && matrix.info.container == '' + - name: Compress completion files + if: matrix.info.generate-other-artifacts == true shell: bash run: | tar -C ./completion -czvf completion.tar.gz . mv completion.tar.gz release/ - - name: Compress manpage files (Linux x86-64 GNU) - if: matrix.info.target == 'x86_64-unknown-linux-gnu' && matrix.info.container == '' + - name: Compress manpage files + if: matrix.info.generate-other-artifacts == true shell: bash run: | gzip ./manpage/btm.1 tar -C ./manpage -czvf manpage.tar.gz . mv manpage.tar.gz release/ + - name: Copy over .desktop file + if: matrix.info.generate-other-artifacts == true + shell: bash + run: | + cp ./bottom.desktop release/ + - name: Save release as artifact uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: @@ -290,7 +297,12 @@ jobs: matrix: info: - { target: "x86_64-unknown-linux-gnu", cross: false, dpkg: amd64 } - - { target: "x86_64-unknown-linux-musl", cross: false, dpkg: amd64, rust: "1.71.0" } + - { + target: "x86_64-unknown-linux-musl", + cross: false, + dpkg: amd64, + rust: "1.71.0", + } - { target: "aarch64-unknown-linux-gnu", cross: true, diff --git a/Cargo.toml b/Cargo.toml index 3f9377cf1..3910391f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ exclude = [ ".all-contributorsrc", ".cirrus.yml", ".markdownlint.json", + "bottom.desktop", "CHANGELOG.md", "clippy.toml", "codecov.yml", @@ -174,6 +175,11 @@ assets = [ "usr/share/zsh/vendor-completions/", "644", ], + [ + "bottom.desktop", + "usr/share/applications/bottom.desktop", + "644", + ], ] extended-description = """ @@ -199,4 +205,5 @@ assets = [ { source = "completion/btm.bash", dest = "/usr/share/bash-completion/completions/btm", mode = "644" }, { source = "completion/btm.fish", dest = "/usr/share/fish/vendor_completions.d/btm.fish", mode = "644" }, { source = "completion/_btm", dest = "/usr/share/zsh/vendor-completions/", mode = "644" }, + { source = "bottom.desktop", dest = "/usr/share/applications/bottom.desktop", mode = "644" }, ] diff --git a/bottom.desktop b/bottom.desktop new file mode 100644 index 000000000..a7855ef10 --- /dev/null +++ b/bottom.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=bottom +Version=0.9.6 +GenericName=System Monitor +Comment=A customizable cross-platform graphical process/system monitor for the terminal. +Exec=btm +Terminal=true +Type=Application +Categories=Utility;System;ConsoleOnly;Monitor; +StartupNotify=false \ No newline at end of file From 9999c40eb0f6803ffaae489ee9439a19adcdb8e5 Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 6 Sep 2023 18:27:51 -0400 Subject: [PATCH 2/3] move to a separate desktop folder --- .github/workflows/build_releases.yml | 2 +- Cargo.toml | 6 +++--- bottom.desktop => desktop/bottom.desktop | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename bottom.desktop => desktop/bottom.desktop (92%) diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml index 32f33f9d6..f7dfb4bd5 100644 --- a/.github/workflows/build_releases.yml +++ b/.github/workflows/build_releases.yml @@ -202,7 +202,7 @@ jobs: if: matrix.info.generate-other-artifacts == true shell: bash run: | - cp ./bottom.desktop release/ + cp ./desktop/bottom.desktop release/ - name: Save release as artifact uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 diff --git a/Cargo.toml b/Cargo.toml index 3910391f9..5d720f181 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,13 +16,13 @@ exclude = [ ".cargo-husky/", ".github/", "assets/", + "desktop/", "docs/", "sample_configs/", "scripts/", ".all-contributorsrc", ".cirrus.yml", ".markdownlint.json", - "bottom.desktop", "CHANGELOG.md", "clippy.toml", "codecov.yml", @@ -176,7 +176,7 @@ assets = [ "644", ], [ - "bottom.desktop", + "desktop/bottom.desktop", "usr/share/applications/bottom.desktop", "644", ], @@ -205,5 +205,5 @@ assets = [ { source = "completion/btm.bash", dest = "/usr/share/bash-completion/completions/btm", mode = "644" }, { source = "completion/btm.fish", dest = "/usr/share/fish/vendor_completions.d/btm.fish", mode = "644" }, { source = "completion/_btm", dest = "/usr/share/zsh/vendor-completions/", mode = "644" }, - { source = "bottom.desktop", dest = "/usr/share/applications/bottom.desktop", mode = "644" }, + { source = "desktop/bottom.desktop", dest = "/usr/share/applications/bottom.desktop", mode = "644" }, ] diff --git a/bottom.desktop b/desktop/bottom.desktop similarity index 92% rename from bottom.desktop rename to desktop/bottom.desktop index a7855ef10..acc97b4c8 100644 --- a/bottom.desktop +++ b/desktop/bottom.desktop @@ -7,4 +7,4 @@ Exec=btm Terminal=true Type=Application Categories=Utility;System;ConsoleOnly;Monitor; -StartupNotify=false \ No newline at end of file +StartupNotify=false From 00ef1b1205b7d3f099b11896f0c2aaf292a56823 Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Wed, 6 Sep 2023 18:41:23 -0400 Subject: [PATCH 3/3] also skip one more file --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 5d720f181..280bafcbb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ exclude = [ "scripts/", ".all-contributorsrc", ".cirrus.yml", + ".gitignore", ".markdownlint.json", "CHANGELOG.md", "clippy.toml",