
Code: Select all
find /proc/acpi/ -name \*lid\*Code: Select all
xwininfo -root -treeCode: Select all
xwininfo -int -name 'name_of_window'wildhorse wrote:Check if the lid switch triggers an ACPI event. There should be an entry called something like "lid" in /proc/acpi/. You can add your own event handler to /etc/acpi/, provided you have sys-power/acpid installed.Unhandled ACPI events end up entry in the system log (typically /var/log/messages).Code: Select all
find /proc/acpi/ -name \*lid\*
A little tool called x11-misc/xdotool might come in handy. Its command windowmove is able to move a window. You will probably have to find the name of the task bar window first. Try xlsclients (x11-apps/xlsclients) or xwininfo (x11-apps/xwininfo).You may need the window's identification number (ID) instead of its name for xdotool. The name should be the same for all your X11 sessions, but the ID may change. The script for the ACPI event handler would have to translate the window name into the ID every time it's called, for instance with xwininfo.Code: Select all
xwininfo -root -tree(replace name_of_window)Code: Select all
xwininfo -int -name 'name_of_window'
Eventually, cinnamon desktop should provide the missing event handler.

Code: Select all
xwininfo -intCode: Select all
xwininfo -root -treeCode: Select all
qlist -IC gnome-extra/cinnamonYes the lid switch can trigger ACPI events.wildhorse wrote:I assume that the lid switch does indeed trigger ACPI events.
TryMove the crossbar cursor over the most outer component of the task bar and press the left mouse button. That may give you some information.Code: Select all
xwininfo -int
It is possible, that the task bar window has no name and that it is just a child window of some other window. You can use the "window id" which you just got and try to locate it within the output ofThe cinnamon developers might find your request either great (I do) or too specific. What they might support is a request for calling a handler (application or script) in addition to the already existing list of handlers (suspend, shutdown etc.).Code: Select all
xwininfo -root -tree
You could look into the source code of cinnamon and try to locate the part that creates the task bar window. Start with identifying the package that provides the task bar. Start with(qlist is part of app-portage/portage-utils). Post the answer here. I might look into this matter myself next weekend.Code: Select all
qlist -IC gnome-extra/cinnamon

Code: Select all
echo $XDG_SESSION_TYPECode: Select all
ps ax|grep -v grep|grep --colour /usr/bin/XCode: Select all
xdotool mousemove --screen 0 --sync 500 600 click 3 sleep 0.1 mousemove_relative --sync 10 110 sleep 0.1 click 1mark4@MTECH ~ $ echo $XDG_SESSION_TYPEwildhorse wrote:Make sure thatshows x11 andCode: Select all
echo $XDG_SESSION_TYPElists the process of the X server.Code: Select all
ps ax|grep -v grep|grep --colour /usr/bin/X
I am not using cinnamon.
See if you can move the mouse cursor over a point of the taskbar where no button or anything like that is located.
Press the right mouse button. That should open a pop-up menu. It allows you to move the taskbar elsewhere by moving the mouse within the pop-up menu and pressing the left mouse button. The second screen should be listed in the menu as target.
If all that works, then trywhereby the first coordinate is the position of the taskbar's top left corner and the second coordinate is the relative position within the pop-up menu. The options "--sync" and "sleep 0.1" are important.Code: Select all
xdotool mousemove --screen 0 --sync 500 600 click 3 sleep 0.1 mousemove_relative --sync 10 110 sleep 0.1 click 1
You can experiment with xdotool simply by moving the mouse cursor. Also verify the screen number.
If xdotool allows you to move the taskbar and the lid switch triggers two different kinds of events for open and close, then you have the option to move the taskbar back and forth with two ACPI event handlers.