Results 1 to 8 of 8

Thread: HOWTO use Workrave inside Unity

  1. #1
    Join Date
    Dec 2009
    Location
    Netherland
    Beans
    16
    Distro
    Ubuntu 11.04 Natty Narwhal

    HOWTO use Workrave inside Unity

    This is a HOWTO to use programs like Workrave that require a good system tray to work in Unity. I was very annoyed by Unity's lack of a good system tray that I found a different solution.

    Note: Workrave 1.10 will include a Unity indicator, but I wasn't able to compile that version. See it's NEWS file.

    See the attached screenshot for what it will become.

    1. Install packages
    Code:
    sudo apt-get install xfce4-panel wmctrl
    You might need to install additional packages with

    2. Set up panel
    1. Start xfce4-panel inside a console (or via alt+f2).
    2. Select 'one empty panel' (or something like that) in the popup.
    3. Set the panel in a good location, for example, at the top.
    4. Set the height (in the panel preferences) to 24 pixels.
    5. Set the background to solid color and then the alpha to zero (fully transparent).
    6. Add the panel applet 'notification area' to the panel.

    Warning: don't use the Dash: it will overlay the panel. This will be fixed later.

    3. Make the panel start at system start
    Create a file somewhere in your home directory with this contents:
    Code:
    #!/bin/bash
    xfce4-panel &
    sleep 3;
    wmctrl -l -G | /bin/egrep "your-hostname xfce4-panel$" | cut -d " " -f 1 | xargs -n 1 wmctrl -b add,above -i -r
    
    workrave &
    The line starting with 'wmctrl' does a bit of magic: it finds the window ID of the applet and makes it the topmost window. This way it won't disappear when you use the Dash (Windows/Super-key). Remember to replace the hostname in the egrep command. Run
    Code:
    wmctrl -l -G
    to see what you have to grep for.

    Make it executable:
    Code:
    sudo chmod +x your-panel-applet-script-filename.sh
    And add it to the list of startup applications.

    4. Bonus: hide letters under it (Firefox page titles etc.)
    Set the background to the attached 'top bar.png' file. This is a screenshot of a part of the top bar. This hides long page titles of web pages etc.

    5. Bonus: add analog Xfce clock
    You can also use other panel applets, but the analog Xfce panel applet won't work (the clock is black with a dark-grey background). Use this solution to make it visible again. It makes the clock white.
    Attached Images Attached Images
    Last edited by avl555; June 10th, 2012 at 11:29 AM. Reason: Improved selector for wmctrl; fixex link to Workrave's NEWS file (oops!)

  2. #2
    Join Date
    Aug 2007
    Beans
    1

    Re: HOWTO use Workrave inside Unity

    Seeing as there's no reply yet, I wanted to say thank you for this post! It makes workrave usable on Ubuntu 12.04

    A small issue for me, I can't get my script to run as a startup application, I get the following error on login:
    The notification area lost selection
    Most likely another widget took over the function of a notification area. This area will be unused.

  3. #3
    Join Date
    Dec 2009
    Location
    Netherland
    Beans
    16
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO use Workrave inside Unity

    Superpico, I get that same error sometimes, but it keeps working (icons that are normally in the Unity tray have then moved to the Xfce panel tray.)
    Maybe it helps putting a line
    Code:
    sleep 10
    before
    Code:
    xfce4-panel &
    as I have done.
    (Actually, I start a lot of programs this way, by putting them in the bin/startup file and inserting sleeps between them, this way preventing that the computer becomes very slow after logging in.)

  4. #4
    Join Date
    Jun 2007
    Beans
    23
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOWTO use Workrave inside Unity

    Hi,

    https://launchpad.net/~rob-caelers/+archive/workrave

    the ppa claims to fix this (also in 12.04) but if I enable the applet i dont see anything changing in the applet area

  5. #5
    Join Date
    Aug 2006
    Beans
    28

    Re: HOWTO use Workrave inside Unity

    karlrt, you need to enable it in dconf editor, add to desktop -> unity -> panel

  6. #6
    Join Date
    Feb 2014
    Beans
    1

    Re: HOWTO use Workrave inside Unity

    On ubuntu 13.10 the path com.canonical.unity.panel has disapeared. Is there some other path to use?

    In the flip side. The settings of workrave can be acceced directly from dconf through org.workrave.timers

  7. #7
    Join Date
    Nov 2007
    Beans
    51

    Re: HOWTO use Workrave inside Unity

    I uploaded your attached Image here:



    I managed to compile workrave from source:
    http://askubuntu.com/questions/55472...ve-from-source

    But still no Unity indicator
    I guess this solution won't work since 13.10 so Is there a solution for Ubuntu 14.10 also?

    As a workaround, I can access the settings by rightclicking on the indicator Window:


  8. #8
    Join Date
    Apr 2015
    Beans
    1

    Smile Re: HOWTO use Workrave inside Unity

    Quote Originally Posted by rubo77 View Post
    As a workaround, I can access the settings by rightclicking on the indicator Window:

    Also, if you accidentally closed the small indicator window, you would lost last option to access Workrave settings.
    To restore the indicator window do following:
    1. Code:
      dconf write /org/workrave/gui/main-window/enabled true
    2. Code:
      sudo killall workrave
    3. Run workrave. The small indicator window (as pictured above) will appear.

Tags for this Thread

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
  •