LXDE: how to make active window in lxpanel distinguishable from inactive one?

There is no option to change the appearance for the active window in lxpanel's Task Bar (Window List) plugin. You can patch the lxpanel source file launchtaskbar.c in the most recent version, LX Panel 0.7.1. - LXDE - Lightweight X Desktop Environment - Browse /LXPanel (desktop panel) at SourceForge.net

For example, you could make the active window use bold font while using the flat button style:

Find line 1589 of launchtaskbar.c which reads:
gboolean bold_style = (((tk->entered_state) || (tk->flash_state)) && (tk->tb->flat_button));

Replace with:
gboolean bold_style = (((tk->entered_state) || (tk->flash_state) || (tk->focused)) && (tk->tb->flat_button));

The only change is that tk->focused was added to bold_style to check if the window for that item is focused.

Ultimately, it require some knowledge of coding in C to add custom functionality to the appearance. If you're not familiar with patching, research the topics HowTo Apply a Patch File To My Linux / UNIX Source Code and How to Compile and Install Software from Source Code on Linux.


The above example is from the following patch which appears to be outdated since it targets the file name taskbar.c instead of launchtaskbar.c. - LXDE - Lightweight X Desktop Environment / Feature Requests / #213 [lxpanel][taskbar] highlight active task with flat buttons

Update: I compiled a patched source with the above code on lxpanel-0.6.1 and it was glitchy. It kept reloading lxpanel. You might try an SE network that's more oriented toward coding to figure out how to customize it this way.


I had similar issue in LXDE. After some investigation, I found out that this setting comes from gtk theme.

Go to your gtk theme, ie

/usr/share/themes/<your_theme_name>/gtk-2.0/gtkrc

And find the "button" section. Add the following bg[ACTIVE] line:

style "button" {
....
bg[ACTIVE]        = shade (0.55, "#804c44")
...
}

adjust the color code #804c44 as appropriate.


This may help to edit the current used gtk theme under /usr/share/themes/USED-THEME/gtk-2.0/gtkrc

Here is an example with qtcurve theme (PNGs token from Breeze-Dark theme):

style "qtcurve-h2" = "qtcurve-default"
{
  xthickness = 1
  ythickness = 2

  engine "pixmap" {
    image {
      function = BOX
      state    = NORMAL
      file     = "../assets/button.png"
      border   = {4, 4, 4, 4}
      stretch  = TRUE
    }
    image {
      function = BOX
      state    = ACTIVE
      file     = "../assets/button-active.png"
      border   = {4, 4, 4, 4}
      stretch  = TRUE
    }
    image {
      function = BOX
      state    = PRELIGHT
      file     = "../assets/button-hover.png"
      border   = { 1, 1, 1, 1 }
      stretch  = TRUE
    }
  }
}

class "*Button" style "qtcurve-h2"

Tags:

Lxde

Openbox