foggalong / hardcode-fixer Goto Github PK
View Code? Open in Web Editor NEWFixes Hardcoded Icons
License: GNU General Public License v3.0
Fixes Hardcoded Icons
License: GNU General Public License v3.0
The script does not check the users local launchers. It checks for the root-user local launchers. This is because it has to be executed with sudo, but only the global part needs it.
To do this you can use
sudo -s <<ENDROOT
...code here...
ENDROOT
I can write a quick fix if you want?
The icons in JetBrains' software are hardcoded
Running the unfixer doesn't delete any created icons
Can we add support for CrashPlan?
I reference the following discussion:
https://github.com/numixproject/numix-icon-theme-circle/issues/965
Thanks!
python icons stored locally, Little Inferno and Prison Architect all break upon being fixed. Not sure why.
EDIT: seems to be something to do with the Numix Circle icon theme.
Currently there's no way to undo the changes made by the program. Iterating through the fixed list should be enough to do this.
Hello can you add Gens/GS to the Hardcode fixer?
Launcher: gens.desktop
Icons:
/usr/share/gens/gensgs_48x48.png
/usr/share/gens/gensgs_32x32.png
/usr/share/gens/gens_small.png
I have changed the name of the icon line π
It's possible that a bash version of the program would be more efficient so this will be experimented with by me and others.
Update: this was supposed to take a long time, coming some time after v1.0 was released. In messing about it came a lot quicker and the bash rewrite is currently located in the testing
folder found here. The script has no undo button and is largely untested so is to be used with upmost caution.
Before v1.0 is released the flags need to be properly set up, with a clear explanation of options provided.
# Data directory
data_dir="$HOME/.local/share/data/hcf"
# Creates data directory & file
if [ -f ${data_dir} ]
then
echo "DIR EXISTS"
else
echo "DIR NO EXIST"
fi
The above method is how we check if the data directory exists. I'm not sure what's happening but this always returns a fail. I'm looking into it now but if anyone finds a solution feel free to merge.
I'm going to go through the code and have a bit if a tidy before I release again.
Please add Google Chrome support for its standard tray icon and for the notification tray icon (the bell-shaped one). They are hardcoded in /opt/google/chrome/chrome_100_percent.pak.
Thanks for your work! :)
Pretty much the issue is in the title, here is the screenshot with hardcode fixer being executed and netbeans icon staying the same (I did setsid unity and rebooted even to no avail).
Would you mind writing an ebuild for the Gentoo users?
When I try to run this script, I get the following error:
./fix.sh: line 132: syntax error near unexpected token `;;'
./fix.sh: line 132: ` mode="local"; break;;'
Anyone else having this problem?
This is only a suspicion but I get the feeling that icons arenβt getting created correctly.
Currently on the list are python, guvcview and octave. Common trend seems to be application that have the icon name appearing multiple times in the hardcoded path. This issue then unspills over into changing other parts of the launcher that feature the application name.
It would be nice to have a way through which the script can operate without root. Whether this comes about through a if root
thing or a --local
flag is undecided.
Generally though, the permissions system isn't great right now. It's responsible for all three of the remaining issues and could do with a good going over.
gnome-split has a hardcoded icon
My guess is that it's to do with the !?
in the name. I reckon adding escape code for them should fix the problem.
A desktop shortcut (idle.desktop) uses the normal low-res icon, as well as the python shell which uses an old icon while open (on docky \ task bar, this does not have a .desktop file). Could this be fixed?
Thanks :)
Not all the applications listed are actually in the fixing program because of unknown desktop files. I'll probably need some help from other people for this.
Running sudo ./fix.sh
followed by ./fix.sh
returns issues about the permissions of the data files and folders.
@nathaneltitane, is this something wrong with chmod -R 777 "$data_directory"
?
The latest additions of hardcoded icons to Numix Circle:
ClipGrab's icon is hardcoded to Icon=/usr/share/pixmaps/clipgrab.png but the fixer script doesn't fix it yet. (Numix Circle icon exists.)
I saw an entry in the tofix.csv for SmartGitHG but that one doesn't work for me. So I added the following two lines for it to fix Terra and SmartGitHG for me.
SmartGitHG,smartgithg,/opt/smartgithg/bin/smartgithg-256.png,smartgithg
Terra Terminal Emulator,terra,/usr/share/terra/image/terra.svg,terra
To ensure the program is always getting the latest fixes it should fetch the information from GH rather than storing locally.
0.9.0 is basically how I want the main script to function for 1.0.0 release. The only thing left to implement is automated list updating. Updating all the lists every time an icon theme is updated or a new application is requested is very tiresome so having this done automatically would be much appreciated.
When the icon is copied within ~/.local permission should be switched to the user. Currently permission problems are negating the positive effects of the script for local launchers.
Timeshift misses desktopfile
https://github.com/Foggalong/hardcode-fixer/blob/master/data/tofix.txt#L75
Here are a few hardcoded icons not handled by the script currently:
I'd appreciate it if the following could be included:
Hi there,
I receive the following error when running hardcode-fixer:
~ sudo hardcode-fixer
/usr/bin/hardcode-fixer: line 20: git_locate: command not found
/usr/bin/hardcode-fixer: line 21: steam_icon: command not found
/usr/bin/hardcode-fixer: line 86: [: 201407280: unary operator expected
/usr/bin/hardcode-fixer: line 116: [: 201406200: unary operator expected
Fixing hardcoded icons...
Can you shed light on this issue?
Thanks!
Hello @Foggalong I have another issue here for the hardcode fixer, on the last AUR build of Sigram it's packager have changed the icon's path to /opt/sigram/icons/icon.png, desktop file telegram.desktop
Do you remember this icon? well it is now hardcoded on Arch
sudo ./fix.sh
output:
No internet connection available. This script
requires internet access to connect to GitHub
to check for updates and download 'to-fix' info.
but I connected internet
running it as sudo bash fix.sh works on /usr/share/applications but doesn't work on .local/share/applications ones.
running it without sudo fixes it.
OS: Arch Linux
Apps on .local used on testing: Dota 2 and Left 4 Dead 2
Variety is a wallpaper changer. I like it, but I noticed that the icons are hardcoded. I've reported the the issue here: https://bugs.launchpad.net/variety/+bug/1388382
However it would be good to have it supported in this script.
Also SmartgitHG should be added to the list of supported apps.
The .desktop
entry should be modified to use Icon=smartgithg
Thanks!
At all :( Issue originally brought to my attention on IRC by Madark.
I've used hardcode-fixer before and used to fixed hardcoded icons of Synergy and Tomate. I had to reinstall my OS a few days ago (ElementaryOS Luna). I downloaded the hardcode-fixer and runned it, but now it doesn't work anymore: it doesn't output anything and It appears that it does not fix anything either.
Not all of the launcher names are known to be correct. This needs rectifying before final release
Which icons does the script change? Only the one in your dock/panel, or also those in toolbars of the applications?
Hello, I've found another hardcoded-icon app: MediaElch. Their launcher (/usr/share/applications/MediaElch.desktop) says:
[Desktop Entry]
Encoding=UTF-8
Version=2.1
Type=Application
Terminal=false
Exec=/usr/bin/MediaElch
Name=MediaElch
Icon=/usr/share/pixmaps/MediaElch.png
Categories=Video;
I'm using the latest version (2.2) even if it says 2.1. I've also opened a bug report on their site to request a proper change in the .desktop file: http://community.kvibes.de/topic/show/mediaelch-icon-launcher
cat /usr/share/applications/nvidia-settings.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=NVIDIA X Server Settings
Comment=Configure NVIDIA X Server Settings
Exec=/usr/bin/nvidia-settings
Icon=/usr/share/pixmaps/nvidia-settings.png
Categories=Application;Settings;
I wasn't planning on there being a 0.9.x but I'm thinking it's probably worth it for this. I just wanted to layout the rough plans here so that people can implement anything they want to.
As a side note, fix.py will probably cease to function after these features are implemented. The script is currently developed under the eyes of @phantom94 and I won't be looking into improving it or bringing it's functionality in line with the bash version until 1.0.x
The program output states it's reverting Steam icons, even when it doesn't actually do anything
Hi!!
First of all, I apologize if here it's not the correct place or correct way to report, I'm not a designer or developer but I would like to help as Numix is a great thing. Today I've installed Teamviewer 10 (the last version launched recently) and ran hardcode-fixer, logout and log in to my session but it didn't worked.
This is the code for teamviewer-teamviewer10.desktop:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=TeamViewer 10
Comment=TeamViewer Remote Control Application
Exec=/opt/teamviewer/tv_bin/script/teamviewer
Icon=/opt/teamviewer/tv_bin/desktop/teamviewer.png
Type=Application
Categories=Network;
I've found it on /opt/teamviewer/tv_bin/script/teamviewer.
Thank you very much for your work!! π
Crucial feature for operation.
Update: this was originally supposed to come from another developer but with the bash rewrite being a lot quicker than expected it made sense to throw it in there as a simple cp
command.
Based on numix issues : https://github.com/numixproject/numix-icon-theme-circle/issues/1538
as palob recommendation so i post it here, the desktop.application file :
[Desktop Entry]
Version=1.0
Name=Ardour Digital Audio Workstation 3
Comment=Record, mix and master multi-track audio
Exec=/usr/bin/ardour3
Terminal=false
Type=Application
Icon=/opt/ardour3/share/icons/ardour_icon_48px.png
Categories=AudioVideo;Audio;
MimeType=application/x-ardour;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.