summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-09-06 19:12:28 -0400
committerGitHub <noreply@github.com>2023-09-06 19:12:28 -0400
commitf38fbf0d8b5d6453ad099b547e22d19ff4358f87 (patch)
tree495dabbbb159883561ce4d6e3cfd46ee177203c5
parent1f41ff3ae638c071219d8059fdd867defa3b9d37 (diff)
ci: add .desktop file (#1296)
* ci: add .desktop file * move to a separate desktop folder * also skip one more file
-rw-r--r--.github/workflows/build_releases.yml22
-rw-r--r--Cargo.toml8
-rw-r--r--desktop/bottom.desktop10
3 files changed, 35 insertions, 5 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml
index e1acbd74..f7dfb4bd 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 ./desktop/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 3f9377cf..280bafcb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -16,11 +16,13 @@ exclude = [
".cargo-husky/",
".github/",
"assets/",
+ "desktop/",
"docs/",
"sample_configs/",
"scripts/",
".all-contributorsrc",
".cirrus.yml",
+ ".gitignore",
".markdownlint.json",
"CHANGELOG.md",
"clippy.toml",
@@ -174,6 +176,11 @@ assets = [
"usr/share/zsh/vendor-completions/",
"644",
],
+ [
+ "desktop/bottom.desktop",
+ "usr/share/applications/bottom.desktop",
+ "644",
+ ],
]
extended-description = """
@@ -199,4 +206,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 = "desktop/bottom.desktop", dest = "/usr/share/applications/bottom.desktop", mode = "644" },
]
diff --git a/desktop/bottom.desktop b/desktop/bottom.desktop
new file mode 100644
index 00000000..acc97b4c
--- /dev/null
+++ b/desktop/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