GithubHelp home page GithubHelp logo

hardcode-fixer's People

Contributors

abouvier avatar bilelmoussaoui avatar btd1337 avatar dvdmuckle avatar foggalong avatar heyhippari avatar hlechner avatar ismaelgv avatar kufii avatar leoheck avatar marekag avatar nathaneltitane avatar nooop3 avatar palob avatar somasis avatar tomvanderlee avatar varlesh avatar vs0uz4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hardcode-fixer's Issues

Does not checks users local launchers.

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?

Icons broken on being fixed

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.

Unfix Mode

Currently there's no way to undo the changes made by the program. Iterating through the fixed list should be enough to do this.

Gens/GS

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 πŸ˜„

Rewrite in bash?

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.

--help?

Before v1.0 is released the flags need to be properly set up, with a clear explanation of options provided.

Location code always fails

# 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.

Code Tidy up

I'm going to go through the code and have a bit if a tidy before I release again.

Google-Chrome hardcoded icon

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! :)

Can't run on Ubuntu 32bit

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?

Some Apps Not Unfixed Properly

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.

Local Mode

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.

Dwarfs!? isn't being fixed

My guess is that it's to do with the !? in the name. I reckon adding escape code for them should fix the problem.

Problems with python-IDLE icon harcoding

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 :)

Complete Fix List

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.

Latest hardcoded additions to Numix Circle

The latest additions of hardcoded icons to Numix Circle:

  • Aard Dictionary (aarddict.svg), Numix Circle issue #1626
  • AstroMenace (astromenace.svg), #1367
  • Electrum (electrum.svg), #1455
  • Fceux (fceux.svg), #1075 - fceux.desktop
  • FlightGear Launcher (flightgear.svg), fgrun.desktop
    Icon=/usr/share/pixmaps/flightgear.ico
  • FreeCAD (freecad.svg), #939
  • GanttProject (ganttproject.svg), ganttproject.desktop
    Icon=/opt/ganttproject/plugins/net.sourceforge.ganttproject/data/resources/logos/icon64.png
  • HardInfo (hardinfo.svg), hardinfo.desktop
    Icon=/usr/share/hardinfo/pixmaps/logo.png
  • HTTraQt (httrack.svg), #1518
  • I-Nex (i-nex-128.svg), i-nex.desktop
    Icon=/usr/share/pixmaps/i-nex-128.png
  • Linphone (linphone.svg), linphone.desktop
    Icon=/usr/share/pixmaps/linphone/linphone.png
  • Ltris (ltris.svg), #1390 - ltris.desktop
    (There is another hardcoded path Icon=/usr/share/icons/ltris48.gif)
  • SQLiteBrowser (sqlitebrowser.svg), #1430
  • Trelby (trelby.svg), #1410
  • xjump (xjump-icon.svg), #1415

SmartGitHG and Terra Terminal Emulator aren't getting fixed

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

0.9.2 - automatic list updating

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.

Problem With ~~Permissions~~ Unfixing

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.

A few reports

Here are a few hardcoded icons not handled by the script currently:

  • GTick (in Numix-Circle as gtick.svg), Numix-Circle Issue #1015
  • Fritzing (fritzing_icon.svg), #1097
  • YATE (yate.svg), #1087
  • OpenSCAD (openscad.svg), #1095
  • Telegram Desktop (telegram.svg), #1126 and #1044
  • QGifer (qgifer.svg), #1042
  • efax-gtk (efax-gtk.svg), #1033

New bunch of hardcoded apps

I'd appreciate it if the following could be included:

  • Bygfoot Football Manager (Numix Circle icon: bygfoot.svg), Numix Circle Issue #1017
  • Codelite (codelite.svg), codelite.desktop
    Icon=/usr/share/codelite/images/cubes.png
  • Docear (docear.svg), #1121
  • FreeCol (freecol.svg), #1305
  • GdMap (gdmap_icon.svg), gdmap.desktop
    Icon=gdmap_icon.png
  • git-cola pre 2.0.8 (git-cola.svg), #1281
  • Gmsh (gmsh.svg), #1231
  • Gnome Wave Cleaner (gwc.svg), #993
  • GPixPod (GPixPod_icon.svg), #1142
  • Hardinfo (hardinfo.svg), hardinfo.desktop
    Icon=/usr/share/hardinfo/pixmaps/logo.png
  • Lingot (lingot-icon.svg), #948 and #1050
  • MultiBootUSB (multibootusb.svg), multibootusb.desktop
    Icon=multibootusb.png
  • PDFsam (pdfsam.svg), pdfsam.desktop
    Icon=/usr/share/pdfsam/pdf.png
  • qpdfview (qpdfview.svg), qpdfview.desktop
    Icon=/usr/share/qpdfview/qpdfview.svg
  • Reditr (reditr.svg), reditr.dektop?, #1567
    Icon=/opt/reditr/128x128.png
  • Scilab some versions (scilab.svg), #1012
  • Supertuxkart (supertuxkart.svg, supertuxkart_128.svg)
    Icon=/usr/share/pixmaps/supertuxkart_128.png, supertuxkart.desktop
  • Tor Browser (tor-browser-en.svg), #867
  • Ubuntu Web Browser (webbrowser-app.svg), webbrowser-app.desktop
    Icon=/usr/share/webbrowser-app/webbrowser-app.png
  • Unison-GTK (unison-gtk.svg), unison-gtk.desktop
    Icon=/usr/share/pixmaps/unison-gtk.svg
  • Xmind (xmind.svg), #1132, xmind.desktop
    [version 3.5 seems to be not hardcoded anymore]
  • YATE - a further hardcoded icon path is Icon=null_team-48.png

Error: command not found & unary operator expected

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!

Sigram

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

icon

Do you remember this icon? well it is now hardcoded on Arch

No internet connection available

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

local apps not being fixed on root mode

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

SmartgitHG support

Also SmartgitHG should be added to the list of supported apps.

The .desktop entry should be modified to use Icon=smartgithg

Thanks!

Suddendly doesn't work

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.

Verify Launchers

Not all of the launcher names are known to be correct. This needs rectifying before final release

MediaElch hardcoded icon

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

Hardcoded: Nvidia Settings

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;

0.9.x

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.

  • An update system. This means that rather than having to direct the user back to the GitHub page and have them unfix, download, and refix, it would just download the newest version along with an update.sh which would make any changes needed to the file which couldn't be done just with replacement.
  • Switch to using CSV for tofix.txt
  • Implement searching of list (via above)
  • Automate icon list updating
  • [ ] Implement proper scoring system
  • Added another icon theme (probably Isis, Uniform or Mint-X)

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

Hardcode-fixer and Teamviewer 10

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;

Categories=Network;RemoteAccess;

I've found it on /opt/teamviewer/tv_bin/script/teamviewer.

Thank you very much for your work!! πŸ˜„

Don't copy icon to hicolor

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.

Ardour 3 DAW Hardcoded Icon

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;

Icon :
ardour_icon_48px

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.