I'm using XMonad as my window manager, and want to use trayer as a icon panel for things like nm-applet.

The problem was that the panel wouldn't appear on the top of the screen. If I set it to the bottom it just appeared.

After a lot of trying, I found out it is because my xorg.conf is setup for dualscreens, and probably the trayer panel is spawned outside my view (I currently have only a single screen, but I switch a lot).

After manualy tweaking the xorg.conf file to allow for just one screen, the panel appears on the right spot.

These are the things I had to modify:

Section "Monitor"
        Identifier   "0-LVDS"
        Option      "VendorName" "ATI Proprietary Driver"
        Option      "ModelName" "Generic Autodetecting Monitor"
        Option      "DPMS" "true"
        Option      "PreferredMode" "1366x768"
        Option      "TargetRefresh" "60"
        Option      "Position" "0 0" # Was 1280 256
        Option      "Rotate" "normal"
        Option      "Disable" "false"

SubSection "Display"
        Viewport   0 0
        Virtual   1366 768 # Was 2646 2646
        Depth     24

The problem is ofcourse that I can't use my dual screen setup anymore. Is there a way to force trayer on the right position even with the dualscreen setup?


Yes, I think you are right when you say "the trayer panel is spawned outside my view". I just posted this answer in another forum (https://bbs.archlinux.org/viewtopic.php?pid=878706#p878706)

I think the problem is the interaction between where you place trayer and the virtual screen size and layout. I had a similar problem where the trayer (bottom right) disappeared with my dual screen set up. In my case, I got into trouble doing this:

xrandr --output LVDS1 --auto --primary --rotate normal --pos 0x0 --output VGA1 --rotate normal --left-of LVSD1

trayer --edge bottom --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --transparent true --tint 0x191970 --height 12 --distance 20 --distancefrom right

(LVSD1 is my laptop)

The problem is that the left monitor is 1280x1024 whereas the laptop is 1600x900. That means that the trayer (--edge bottom) is located below the lower part of the laptop's screen. An easy fix is to align the bottom of the two screens, for instance doing (with my setup)

xrandr --output LVDS1 --auto --primary --rotate normal --pos 1280x124 --output VGA1 --rotate normal --auto --pos 0x0

Maybe in your case its just a matter of specifying the position of your primary monitor AND the trayer edge option so that they play nicely with each other.

P.S.1. I think in most recent distros with recent xorg, you do not really need to specify an xorg.conf file.

  • My graphic cards driver automatically generates a xorg.conf. If I enable my second screen with screen expanding, it automatically sets the virtual display size, and I have to reboot for it to take place. – Ikke Jan 25 '11 at 9:10

Another approach you can take is to use a fork of trayer that has multi-monitor support: https://github.com/sargon/trayer-srg

  • Thanks for the tip, but it's no longer needed. – Ikke Jan 16 '12 at 9:23

I'm using stalonetray right now. This application allows you to absolutely place the traybar, which solves the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.