diff mbox series

gitk: Add desktop file

Message ID 20240523202838.174760-1-jadahl@gmail.com (mailing list archive)
State New, archived
Headers show
Series gitk: Add desktop file | expand

Commit Message

Jonas Ådahl May 23, 2024, 8:28 p.m. UTC
This makes it properly integrate with desktop environments, by e.g.
grouping different gitk windows, getting an app icon, ability to add
keywords for searching.

It's marked as 'NoDisplay' meaning it will not show up as a launchable
application, as that makes no sense for gitk.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
---
 gitk-git/Makefile        |   8 +++++++-
 gitk-git/gitk.desktop.in |  12 ++++++++++++
 gitk-git/gitk.png        | Bin 0 -> 4257 bytes
 3 files changed, 19 insertions(+), 1 deletion(-)
 create mode 100644 gitk-git/gitk.desktop.in
 create mode 100644 gitk-git/gitk.png

GIT binary patch
literal 4257
zcmeHKYiu0V6+Y{CHgy~lLfjO}Fh;3EGdr`hv%53X9p|yTv6pz0RlEr<3W9mu-HhUS
zcxE;`jvPpv#s$j52oywQS|VOmL?ZGK4?!Um(<I^tkxE0=hNu*wgrX+UN~EP}QqAnz
zUaJ+AfAG&|HJUs3eCNCOeD~h7y7%SQb+-nW1OcEm)05f&04u$xt{wnBXnrCK0H;uY
zrjW_p0xbX#1PC-hpo$CBwCe)(;6;r9z=A-%kMVFz0*(Ir0RZ?;wfz_XbXGBS01yt;
zK`Q`^0RSDSgKGg`KLDsdt&H^sRIJ7S^#J&c6YuU!HiyxnFcpfh05nB2JQd~X2u6o_
zD#C}O5P-l_Q#0~x`w1-u5cr9jOy)AlBxYJhK^;H<?%0k;gr2uoUjNRWeQVRV%p*Gg
zJi71xU3cWi4{h4lvgp<Wr}pnU`Rtvip1CPAIC$;mx%2K`zUhX|W2KV0sNt=)`Nih%
zr57*z;-1XD^aIVu|LvA94qlo!fA7ZU_6mb5f498j(cXJsy}ZADI1Rg6lE+>d@7)o4
za@||@@P}_7|KPRu_x{#(>D>9-f=la%@xifAN7ApaN*qx?9lLa2#|z7sjh`D|*mTF}
zKOXt)@Vmy?+Ie#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tyt)|Ipsy!4j1v?@?{Xu!j7u%8BYjgO#t!
z=YZ-TB@FWq1ux2#6l`%DQv7*Ny5udQUPOw3SNGpUi26Uag2={2sURXE7E=(xNL+#7
z<giF^tis6*C&@~jp3ZI?1*a@pXjKvEj(~Ton(6;TVV(X$Et`%mZ$aKFP&7kOQG)(2
z!N_XDq*pU0GER7BEt{>?qynfZGG6WSgEpkrbOjUSWHGF2_6=KgExuWs9b`r}E7y!{
zR<0S@tXwm)S-ECpvvSSIzD};-)O8B!ih!5#6<r@2q16B|C)b-#9|M4$aP{id`!5fB
z_x^yiwmSv)Hs0V}y62cZKePenF7%!N>>X<dfMzF?O*fx!T)eQpZO@H6B>)IzQmgXp
zyK?{TruH?Bor~{+Iz@V_p(zWyM-HyWPb_F@th-q{*6_=Z9{=dk(}7Y0`|yMBz5Ffj
Px|d0>OC4N&*N^`LBXF6q

literal 0
HcmV?d00001
diff mbox series

Patch

diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index e1f0aff4a1..e738176fd6 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -15,6 +15,7 @@  RM ?= rm -f
 
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 bindir_SQ = $(subst ','\'',$(bindir))
+sharedir_SQ = $(subst ','\'',$(sharedir))
 TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
 
 ### Detect Tck/Tk interpreter path changes
@@ -47,12 +48,14 @@  ifndef V
 	QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
 endif
 
-all:: gitk-wish $(ALL_MSGFILES)
+all:: gitk-wish $(ALL_MSGFILES) gitk.desktop
 
 install:: all
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(INSTALL) -m 755 gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
 	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(msgsdir_SQ)'
+	$(INSTALL) gitk.desktop '$(DESTDIR_SQ)$(sharedir_SQ)'/applications/gitk.desktop
+	$(INSTALL) gitk.png '$(DESTDIR_SQ)$(sharedir_SQ)'/gitk/
 	$(foreach p,$(ALL_MSGFILES), $(INSTALL) -m 644 $p '$(DESTDIR_SQ)$(msgsdir_SQ)' &&) true
 
 uninstall::
@@ -76,5 +79,8 @@  $(ALL_MSGFILES): %.msg : %.po
 	@echo Generating catalog $@
 	$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
 
+gitk.desktop: gitk.desktop.in
+	sed -e "s,@iconpath@,$(DESTDIR_SQ)$(sharedir_SQ)/gitk/gitk.png," $< > $@
+
 .PHONY: all install uninstall clean update-po
 .PHONY: FORCE
diff --git a/gitk-git/gitk.desktop.in b/gitk-git/gitk.desktop.in
new file mode 100644
index 0000000000..b18a50fe2f
--- /dev/null
+++ b/gitk-git/gitk.desktop.in
@@ -0,0 +1,12 @@ 
+[Desktop Entry]
+Name=Gitk
+GenericName=Gitk
+Comment=The Git repository browser
+Exec=gitk
+Icon=@iconpath@
+Terminal=false
+Type=Application
+Categories=Development;
+X-Desktop-File-Install-Version=0.26
+NoDisplay=true
+Keywords=git;repository
diff --git a/gitk-git/gitk.png b/gitk-git/gitk.png
new file mode 100644
index 0000000000000000000000000000000000000000..21f21b39ec44b14bb44161305b26ab4f0fc64ead