Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: script to change icon size in unity-2d

  1. #1
    Join Date
    Jan 2006
    Beans
    19

    script to change icon size in unity-2d

    Update: This script only works on current beta "Precise Pangolin". The changes will persist until some unity update overwrites those qml files again. Re-running the script will help then.

    As we all know unity 2D currently lacks an option to configure the size of those launcher icons.

    It is possible though to achieve this by manually editing some qml files. This is quite annoying, so I put a script together that takes care of it. It doesn't rely on line numbers but has some very simple "logic" to be able to handle possible line shifts in the future.

    Coding style is of course horrible, and not many possible fail cases (e.g unity 2d is not even installed...) are taken care of.
    Only thing it really does is backup those qml files before overwriting them.
    Maybe somebody considers this useful...

    Usage:

    1) Save script somewhere you like
    2) make it executable (chmod +x script.py)
    3) run as: script.py iconSize (e.g. script.py 32)

    Don't forget to restart your launcher. Killing it might be sufficient, logging out and in again works for sure.

    I don't have any clue whether such a script already exists, but here is mine

    Having such a script polished and then integrated into one of those fancy unity configuration programs may be an interesting option as long as Unity 2D lacks this feature.

    Greetings
    ppd
    Attached Files Attached Files
    Last edited by ppd; April 10th, 2012 at 01:24 PM.

  2. #2
    Join Date
    Feb 2007
    Location
    Cameron Park CA USA
    Beans
    4,434
    Distro
    Ubuntu Development Release

    Re: script to change icon size in unity-2d

    Wow, very effective!

    Thank you, ppd, for solving an issue with Unity 2D. I've not seen this issue fixed before.
    Regards, frank, at http://yantrayoga.typepad.com/noname/
    Homebuilt Lian-Li PC-Q30X Intel i5-4670K 4.0GHz, SSDs, 16G RAM | Dell laptop E1505n, netbook 10n
    Oracle VBox w/ WinXP Pro running Xara Designer, PaintShopPro, and InDesign CS.

  3. #3
    Join Date
    Jun 2007
    Beans
    13,333

    Re: script to change icon size in unity-2d

    Seems to work well here -
    There was a commit proposed last year to allow a per user configuration of the launcher size in unity-2d. It worked well but was rejected I believe because of some minor 'not right's' when it wasn't used, ie. at the default size.

    I believe there is some hope to have a user config option available in 2d in 12.10

  4. #4
    Join Date
    Aug 2007
    Location
    Leighton Buzzard England
    Beans
    55
    Distro
    Ubuntu Karmic Koala (testing)

    Re: script to change icon size in unity-2d

    Thanks it works a treat for me as well )
    Not a shred of evidence exists in favor of the idea that life is serious.

  5. #5
    Join Date
    Jan 2006
    Beans
    19

    Re: script to change icon size in unity-2d

    Glad you find it useful. There are some minor problems with this method as far as I can see: The spread and the workspace switcher still think the launcher is as big as before. So one would need to find these settings in the qml and fix this.

  6. #6
    Join Date
    Jan 2007
    Beans
    207
    Distro
    Ubuntu Development Release

    Re: script to change icon size in unity-2d

    I'm running 11.10. I don't have /usr/share/unity-2d/shell/Shell.qml. In fact, I don't have the entire /usr/share/unity-2d/shell directory. Any thoughts?
    Think.

  7. #7
    Join Date
    Jun 2010
    Beans
    18

    Re: script to change icon size in unity-2d

    I have exactly the same problem, using also Oneiric on my netbook.
    In unity-2D directory, I have only these directories :
    Launcher
    Places
    Spread
    No Shell directory.

    So, I got this error message :
    HTML Code:
    Traceback (most recent call last):
      File "./script.py", line 49, in <module>
        content = load_file (shell_qml)
      File "./script.py", line 23, in load_file
        file = open (filename, "r")
    IOError: [Errno 2] No such file or directory: '/usr/share/unity-2d/shell/Shell.qml'

  8. #8
    Join Date
    Jan 2007
    Beans
    207
    Distro
    Ubuntu Development Release

    Re: script to change icon size in unity-2d

    Quote Originally Posted by Phyllinux View Post
    I have exactly the same problem, using also Oneiric on my netbook.
    In unity-2D directory, I have only these directories :
    Launcher
    Places
    Spread
    No Shell directory.

    So, I got this error message :
    HTML Code:
    Traceback (most recent call last):
      File "./script.py", line 49, in <module>
        content = load_file (shell_qml)
      File "./script.py", line 23, in load_file
        file = open (filename, "r")
    IOError: [Errno 2] No such file or directory: '/usr/share/unity-2d/shell/Shell.qml'
    I thought it's worth adding that unity-2d runs just fine, albeit without the Shell.qml file, but that makes the script inoperable.
    Think.

  9. #9
    Join Date
    Jul 2008
    Location
    Swe
    Beans
    25

    Re: script to change icon size in unity-2d

    I have the same issue. Ubuntu 11.10 and no shell folder under unity-2d. Is this only for 12.04 then please update first post with this useful information.

  10. #10
    Join Date
    Apr 2006
    Location
    New Hampshire, U.S.A.
    Beans
    2,528
    Distro
    Ubuntu Development Release

    Talking Re: script to change icon size in unity-2d

    Thanks! Worked fine! Do I have to run it on every boot?

    Jerry

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •