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

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

Hybrid View

  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,420
    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
    12,925

    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
    Nov 2011
    Beans
    1

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

    Thank you so much! I have been testing many different linux distros and DEs. I had avoided Ubuntu and Unity, mainly because it did not seem possible to configure the Launcher, and the large icons destroyed the symmetry and aesthetics of the screen. Thanks to your script, my desktop now looks balanced and elegant. I am going to give Ubuntu Unity another try. Your script ought to be incorporated into Ubuntu's mainstream product as part of the System Settings.

  8. #8
    Join Date
    Apr 2012
    Beans
    10

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

    For do some changes in oneric look here http://www.ubunturoot.com/2011/10/cu...d-in-1110.html

    In precise You can also delete background and remove unused icons simply run in terminal:
    Code:
    sudo nautilus
    go to and edit /usr/share/unity-2d/shell/launcher/Launcher.qml
    and make simple change code in lines 224, 225 for example:
    Code:
    items.appendModel(workspaces);
    items.appendModel(devices);
    to
    Code:
    /*items.appendModel(workspaces);*/
     /*items.appendModel(devices);*/
    this hide devices and workspaces

    You can also edit: /usr/share/unity-2d/shell/common/IconTile.qml
    and change line 60 from:
    Code:
    .arg(actualColor.toString().replace("#", ""))
    to
    Code:
    /*.arg(actualColor.toString().replace("#", ""))*/
    this will remove background color from launcher icons.

    If You have Precise and yours Unity 3d crashes as hell You can change Unity 2d and forget about it.
    cheers

    PS: for scrollbars look here -> http://www.webupd8.org/2011/04/how-t...llbars-in.html
    for "Show Desktop" make some file with simple script:
    Code:
    #!/bin/sh
    if wmctrl -m | grep "mode: ON"; then
    exec wmctrl -k off
    else
    exec wmctrl -k on
    fi
    And make some launcher/icon to run after that You can drag launcher to Unity 2d
    Last edited by mihoo; April 13th, 2012 at 11:20 PM. Reason: just more info about "show desktop" icon in unity 2d

  9. #9
    Join Date
    Apr 2012
    Beans
    1

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

    Thanks a lot! That's something really needed. I can't understand why is not yet in main development for unity... Works like a charm!

  10. #10
    Join Date
    Aug 2006
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

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

    Quote Originally Posted by nachordez View Post
    Thanks a lot! That's something really needed. I can't understand why is not yet in main development for unity... Works like a charm!
    Resizing the Launcher was supposed to be a feature of Unity2d in Precise, but it wasn't ready. Hopefully it will get into Precise +1, and perhaps even get backported.

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
  •