Merge pull request #329 from yonatan8070/main

Add desktop entry and icons
This commit is contained in:
Jakob P. Liljenberg 2022-05-08 14:03:20 +02:00 committed by GitHub
commit 6233d42ebe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 138 additions and 0 deletions

BIN
Img/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

111
Img/icon.svg Normal file
View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="90"
height="90"
version="1.1"
id="svg70"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs26">
<pattern
xlink:href="#gray-stripes"
id="pattern1888" />
<pattern
xlink:href="#red-stripes"
id="pattern1870" />
<pattern
id="red-stripes"
width="341"
height="90"
patternUnits="userSpaceOnUse">
<rect
width="341"
height="16"
fill="#f00"
id="rect2" />
<rect
y="16"
width="341"
height="16"
fill="#d70000"
id="rect4" />
<rect
y="32"
width="341"
height="16"
fill="#af0000"
id="rect6" />
<rect
y="48"
width="341"
height="16"
fill="#870000"
id="rect8" />
<rect
y="64"
width="341"
height="16"
fill="#5f0000"
id="rect10" />
</pattern>
<pattern
id="gray-stripes"
width="341"
height="90"
patternUnits="userSpaceOnUse">
<rect
width="341"
height="16"
fill="#585858"
id="rect13" />
<rect
y="16"
width="341"
height="16"
fill="#4e4e4e"
id="rect15" />
<rect
y="32"
width="341"
height="16"
fill="#444"
id="rect17" />
<rect
y="48"
width="341"
height="16"
fill="#3a3a3a"
id="rect19" />
<rect
y="64"
width="341"
height="16"
fill="#303030"
id="rect21" />
<rect
y="80"
width="341"
height="10"
fill="#262626"
id="rect23" />
</pattern>
</defs>
<g
id="g2074"
transform="translate(18)">
<path
d="M 2,7 V 90 H 47 V 74 h 7 V 55 H 47 V 42 h 7 V 23 H 47 V 7 Z M 19,26 H 37 V 39 H 19 Z m 0,32 H 37 V 71 H 19 Z"
id="path28"
style="fill:#080808" />
<path
d="M 2,7 V 90 H 47 V 74 h 7 V 55 H 47 V 42 h 7 V 23 H 47 V 7 Z m 1,1 h 43 v 16 h 7 v 17 h -7 v 15 h 7 V 73 H 46 V 89 H 3 Z M 18,25 H 38 V 40 H 18 Z m 1,1 V 39 H 37 V 26 Z M 18,57 H 38 V 72 H 18 Z m 1,1 V 71 H 37 V 58 Z M 4,9 V 88 H 45 V 72 h 7 V 57 H 45 V 40 h 7 V 25 H 45 V 9 Z m 1,1 h 39 v 16 h 7 v 13 h -7 v 19 h 7 V 71 H 44 V 87 H 5 Z M 16,23 H 40 V 42 H 16 Z m 1,1 V 41 H 39 V 24 Z M 16,55 H 40 V 74 H 16 Z m 1,1 V 73 H 39 V 56 Z"
id="path42"
style="fill:url(#pattern1888)" />
<path
d="M 0,0 V 80 H 42 V 64 h 7 V 48 H 42 V 32 h 7 V 16 H 42 V 0 Z M 14,16 H 35 V 32 H 14 Z m 0,32 H 35 V 64 H 14 Z"
id="path56"
style="fill:url(#pattern1870)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -212,6 +212,15 @@ install:
@cp -p README.md $(DESTDIR)$(PREFIX)/share/btop
@printf "\033[1;92mInstalling themes to: \033[1;97m$(DESTDIR)$(PREFIX)/share/btop/themes\033[0m\n"
@cp -pr themes $(DESTDIR)$(PREFIX)/share/btop
@printf "\033[1;92mInstalling desktop entry to: \033[1;97m$(DESTDIR)$(PREFIX)/share/applications/btop.desktop\n"
@mkdir -p $(DESTDIR)$(PREFIX)/share/applications/
@cp -p btop.desktop $(DESTDIR)$(PREFIX)/share/applications/btop.desktop
@printf "\033[1;92mInstalling PNG icon to: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png\n"
@mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps
@cp -p Img/icon.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png
@printf "\033[1;92mInstalling SVG icon to: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg\n"
@mkdir -p $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps
@cp -p Img/icon.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg
#? Set SUID bit for btop as $SU_USER in $SU_GROUP
@ -227,6 +236,12 @@ uninstall:
@rm -rf $(DESTDIR)$(PREFIX)/bin/btop
@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/btop\033[0m\n"
@rm -rf $(DESTDIR)$(PREFIX)/share/btop
@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/applications/btop.desktop\033[0m\n"
@rm -rf $(DESTDIR)$(PREFIX)/share/applications/btop.desktop
@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png\033[0m\n"
@rm -rf $(DESTDIR)$(PREFIX)/share/icons/hicolor/48x48/apps/btop.png
@printf "\033[1;91mRemoving: \033[1;97m$(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg\033[0m\n"
@rm -rf $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/btop.svg
#? Pull in dependency info for *existing* .o files
-include $(OBJECTS:.$(OBJEXT)=.$(DEPEXT))

12
btop.desktop Normal file
View File

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=btop
GenericName=System Monitor
Comment=Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
Icon=btop
Exec=btop
Terminal=true
Categories=System;Monitor;ConsoleOnly;
Keywords=system;process;task