Yep, after getting the error and reinstalling, it works as expected, thanks
Search Criteria
Package Details: code-icons 1.55.1-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/code-icons.git (read-only, click to copy) |
---|---|
Package Base: | code-icons |
Description: | Change Code - OSS icons to VS Code ones |
Upstream URL: | None |
Keywords: | code icons |
Licenses: | unknown |
Submitter: | coxackie |
Maintainer: | coxackie |
Last Packager: | coxackie |
Votes: | 3 |
Popularity: | 0.000001 |
First Submitted: | 2021-04-06 09:49 (UTC) |
Last Updated: | 2021-04-08 08:42 (UTC) |
Dependencies (1)
Required by (0)
Sources (7)
Latest Comments
kivans commented on 2022-12-16 16:41 (UTC)
coxackie commented on 2022-12-09 16:25 (UTC)
@ewout code-icons
patches the desktop file to point to the icon com.visualstudio.code.svg
- it does not matter what the original icon is. See the contants of "do.sh". At any rate, I am not using this any further, and will most probably disown it. Do you have interest in becoming maintainer?
ewout commented on 2022-12-09 16:16 (UTC)
The code
package now defaults to com.visualstudio.code.oss
for the icon. Please add a symlink in the package to support both cases.
coxackie commented on 2022-12-07 11:25 (UTC) (edited on 2022-12-07 11:25 (UTC) by coxackie)
If you get the error:
mv: cannot stat '/usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg': No such file or directory
mv: cannot stat '/usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg': No such file or directory
try uninstalling and re-installing code-icons
. Second time around should be fine.
coxackie commented on 2021-04-08 08:44 (UTC)
The main icon (com.visualstudio.code.svg
) comes from the Yaru++ icon set (GNU licence), and is close to the actual stock icon.
coxackie commented on 2021-04-06 12:51 (UTC)
@sainnhe, I am now not entirely convinced that patching the desktop files is necessary (or even a good thing) to do. If you look at what the original patch does, it backs up the old icon with mv /usr/share/pixmaps/com.visualstudio.code.oss.png /usr/share/pixmaps/com.visualstudio.code.oss.png.bak
and then copies the new one cp /usr/share/code-icons/visual-studio-code.png /usr/share/pixmaps/com.visualstudio.code.oss.png
, keeping the file name com.visualstudio.code.oss.png
intact. I would then just leave the desktop files as are - we want to make the minimal amount of change... as I mentioned, it was working for me. Did it not work for you initially?
sainnhe commented on 2021-04-06 12:21 (UTC)
Thank you, please add me as a maintainer.Btw, would you like to be a maintainer of code-features and code-features-insiders? The proposed api section is frequently changed so I may not be able to keep them always up to date by myself.
sainnhe commented on 2021-04-06 12:19 (UTC)
Oh, I used the absolute path to the icon file in this patch, but maybe using relative path is better, because users by doing so the icon is controlled by your icon theme.
Maybe something like this:
Icon=com.visualstudio.code
coxackie commented on 2021-04-06 12:18 (UTC)
@sainnhe On GNOME, with the old desktop file, it was actually showing the correct icon. Anyway, I am away from the computer, but I made you co-maintainer. Feel free to apply the patch.
sainnhe commented on 2021-04-06 12:01 (UTC)
Hello, I slightly modified your package to patch .desktop files, here is the patch:
diff --git a/.SRCINFO b/.SRCINFO
index bcea6ef..c0f84db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,28 @@
pkgbase = code-icons
pkgdesc = Change Code OSS icons to VSCode ones
pkgver = 1.54.3
- pkgrel = 1
+ pkgrel = 2
install = code-icons.install
arch = any
license = unknown
depends = code
+ depends = patch
source = code-icons.hook
source = patch.sh
source = visual-studio-code.png
source = letterpress.svg
source = letterpress-dark.svg
source = letterpress-hc.svg
- md5sums = 4daa6413b80f92c531fd769515475b5c
- md5sums = 3bcb7eee753afe0261d246a4323cda42
+ source = code-oss.desktop.diff
+ source = code-oss-url-handler.desktop.diff
+ md5sums = db22ba0eaa2e6388054bde382ac8a392
+ md5sums = d5e4161d61932d262c6327e30bf77527
md5sums = 04c4c453a76effa2d794fd6037fb1412
md5sums = fcae93243f3d0c408707711b833e408f
md5sums = 0c284b5816605c2c3fb9d24b88b759b9
md5sums = 0fb6c6b3251e012cee655ee300402029
+ md5sums = 09db16c8d321af104aee89907775288c
+ md5sums = 64bf60593ccf0521a77dbb46868f1bcb
pkgname = code-icons
diff --git a/PKGBUILD b/PKGBUILD
index f4af569..98ae0d5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,37 @@
# Maintainer: coxackie
pkgname=code-icons
pkgver=1.54.3
-pkgrel=1
+pkgrel=2
pkgdesc='Change Code OSS icons to VSCode ones'
arch=('any')
license=('unknown')
-depends=('code')
+depends=('code' 'patch')
install="${pkgname}.install"
source=("${pkgname}.hook"
'patch.sh'
'visual-studio-code.png'
'letterpress.svg'
'letterpress-dark.svg'
- 'letterpress-hc.svg')
-md5sums=('4daa6413b80f92c531fd769515475b5c'
- '3bcb7eee753afe0261d246a4323cda42'
+ 'letterpress-hc.svg'
+ 'code-oss.desktop.diff'
+ 'code-oss-url-handler.desktop.diff')
+md5sums=('db22ba0eaa2e6388054bde382ac8a392'
+ 'd5e4161d61932d262c6327e30bf77527'
'04c4c453a76effa2d794fd6037fb1412'
'fcae93243f3d0c408707711b833e408f'
'0c284b5816605c2c3fb9d24b88b759b9'
- '0fb6c6b3251e012cee655ee300402029')
+ '0fb6c6b3251e012cee655ee300402029'
+ '09db16c8d321af104aee89907775288c'
+ '64bf60593ccf0521a77dbb46868f1bcb')
package() {
install -Dm 644 "${srcdir}/${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook"
install -Dm 755 "${srcdir}/patch.sh" "${pkgdir}/usr/share/${pkgname}/patch.sh"
- install -Dm 755 "${srcdir}"/visual-studio-code.png "${pkgdir}"/usr/share/${pkgname}/visual-studio-code.png
- install -Dm 755 "${srcdir}"/letterpress.svg "${pkgdir}"/usr/share/${pkgname}/letterpress.svg
- install -Dm 755 "${srcdir}"/letterpress-dark.svg "${pkgdir}"/usr/share/${pkgname}/letterpress-dark.svg
- install -Dm 755 "${srcdir}"/letterpress-hc.svg "${pkgdir}"/usr/share/${pkgname}/letterpress-hc.svg
+ install -Dm 644 "${srcdir}/visual-studio-code.png" "${pkgdir}/usr/share/${pkgname}/visual-studio-code.png"
+ install -Dm 644 "${srcdir}/letterpress.svg" "${pkgdir}/usr/share/${pkgname}/letterpress.svg"
+ install -Dm 644 "${srcdir}/letterpress-dark.svg" "${pkgdir}/usr/share/${pkgname}/letterpress-dark.svg"
+ install -Dm 644 "${srcdir}/letterpress-hc.svg" "${pkgdir}/usr/share/${pkgname}/letterpress-hc.svg"
+ install -Dm 644 "${srcdir}/code-oss.desktop.diff" "${pkgdir}/usr/share/${pkgname}/code-oss.desktop.diff"
+ install -Dm 644 "${srcdir}/code-oss-url-handler.desktop.diff" "${pkgdir}/usr/share/${pkgname}/code-oss-url-handler.desktop.diff"
}
diff --git a/code-icons.hook b/code-icons.hook
index 59d2373..a747cdd 100644
--- a/code-icons.hook
+++ b/code-icons.hook
@@ -2,11 +2,7 @@
Operation = Install
Operation = Upgrade
Type = Path
-Target = usr/share/pixmaps/com.visualstudio.code.oss.png
Target = usr/lib/code/resources/linux/code.png
-Target = usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg
-Target = usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg
-Target = usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg
[Action]
Description = [code-icons] Changing to VS Code icons...
diff --git a/code-oss-url-handler.desktop.diff b/code-oss-url-handler.desktop.diff
new file mode 100644
index 0000000..8765cd9
--- /dev/null
+++ b/code-oss-url-handler.desktop.diff
@@ -0,0 +1,11 @@
+--- code-oss-url-handler.desktop.old 2021-04-01 21:39:16.000000000 +0800
++++ code-oss-url-handler.desktop.new 2021-04-06 19:42:21.257125168 +0800
+@@ -3,7 +3,7 @@
+ Comment=Code Editing. Redefined.
+ GenericName=Text Editor
+ Exec=/usr/bin/code-oss --no-sandbox --open-url %U
+-Icon=com.visualstudio.code.oss
++Icon=/usr/share/code-icons/visual-studio-code.png
+ Type=Application
+ NoDisplay=true
+ StartupNotify=true
diff --git a/code-oss.desktop.diff b/code-oss.desktop.diff
new file mode 100644
index 0000000..e7e063d
--- /dev/null
+++ b/code-oss.desktop.diff
@@ -0,0 +1,17 @@
+--- code-oss.desktop.old 2021-04-06 19:39:45.153785672 +0800
++++ code-oss.desktop.new 2021-04-06 19:39:08.807117588 +0800
+@@ -3,7 +3,7 @@
+ Comment=Code Editing. Redefined.
+ GenericName=Text Editor
+ Exec=/usr/bin/code-oss --no-sandbox --unity-launch %F
+-Icon=com.visualstudio.code.oss
++Icon=/usr/share/code-icons/visual-studio-code.png
+ Type=Application
+ StartupNotify=false
+ StartupWMClass=Code
+@@ -15,4 +15,4 @@
+ [Desktop Action new-empty-window]
+ Name=New Empty Window
+ Exec=/usr/bin/code-oss --no-sandbox --new-window %F
+-Icon=com.visualstudio.code.oss
++Icon=/usr/share/code-icons/visual-studio-code.png
diff --git a/letterpress-dark.svg b/letterpress-dark.svg
old mode 100755
new mode 100644
diff --git a/letterpress-hc.svg b/letterpress-hc.svg
old mode 100755
new mode 100644
diff --git a/letterpress.svg b/letterpress.svg
old mode 100755
new mode 100644
diff --git a/patch.sh b/patch.sh
old mode 100644
new mode 100755
index 088331c..17647fc
--- a/patch.sh
+++ b/patch.sh
@@ -2,6 +2,10 @@
if [ "${1}" = "-u" ]; then
mv /usr/share/pixmaps/com.visualstudio.code.oss.png.bak /usr/share/pixmaps/com.visualstudio.code.oss.png && mv /usr/lib/code/resources/linux/code.png.bak /usr/lib/code/resources/linux/code.png && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg.bak /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg.bak /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg.bak /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg
+ patch -R /usr/share/applications/code-oss.desktop </usr/share/code-icons/code-oss.desktop.diff
+ patch -R /usr/share/applications/code-oss-url-handler.desktop </usr/share/code-icons/code-oss-url-handler.desktop.diff
else
mv /usr/share/pixmaps/com.visualstudio.code.oss.png /usr/share/pixmaps/com.visualstudio.code.oss.png.bak && cp /usr/share/code-icons/visual-studio-code.png /usr/share/pixmaps/com.visualstudio.code.oss.png && mv /usr/lib/code/resources/linux/code.png /usr/lib/code/resources/linux/code.png.bak && cp /usr/share/code-icons/visual-studio-code.png /usr/lib/code/resources/linux/code.png && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg.bak && cp /usr/share/code-icons/letterpress.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress.svg && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg.bak && cp /usr/share/code-icons/letterpress-dark.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-dark.svg && mv /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg.bak && cp /usr/share/code-icons/letterpress-hc.svg /usr/lib/code/out/vs/workbench/browser/parts/editor/media/letterpress-hc.svg
+ patch /usr/share/applications/code-oss.desktop </usr/share/code-icons/code-oss.desktop.diff
+ patch /usr/share/applications/code-oss-url-handler.desktop </usr/share/code-icons/code-oss-url-handler.desktop.diff
fi
Pinned Comments
coxackie commented on 2022-12-07 11:25 (UTC) (edited on 2022-12-07 11:25 (UTC) by coxackie)
If you get the error:
try uninstalling and re-installing
code-icons
. Second time around should be fine.coxackie commented on 2021-04-08 08:44 (UTC)
The main icon (
com.visualstudio.code.svg
) comes from the Yaru++ icon set (GNU licence), and is close to the actual stock icon.