You are not logged in.
Pages: 1
In the Window Manager there's a shortcut setting for 'hide window'. But how can I restore the window with a keyboard shortcut - and I don't mean maximise, I want to restore it to the same place and size from which it was hidden?
Offline
There is nothing built-in that can do this, but you can use an external tool like xdotool to map/unmap windows and script something to keep track of the last window unmapped. Have a look at JoeJoe's answer here for an example of such a script. You would bind this to a keyboard shortcut and the first time you shortcut it would hide the active window and the next time you use it, it would restore the window.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Thanks, I'll look into it.
Seems like a rather odd omission on behalf of the develops though...
Offline
Having a closer look at the script linked there, it doesn't really work well because it doesn't accommodate for window decorations. The end result is everytime you remap the window, it drifts to a new position. I've updated the script to account for this, but you need to specify the "xoffset" and "yoffset" values. "xoffset" is the width of the left+right borders, and "yoffset" is the height of the window titlebar+lower border. Here is the updated script:
#!/bin/bash
yoffset=56 #height of window title bar and top/bottom borders
xoffset=4 #width of left/right borders
file=/tmp/last_active_window
geo=/tmp/last_active_window_geometry
if [[ -s $file ]] ; then
xdotool windowmap `cat $file`
xpos=$(( $(cat $geo | awk -F',' '{print $1}')-$xoffset ))
ypos=$(( $(cat $geo | awk -F',' '{print $2}')-$yoffset ))
xdotool getactivewindow windowmove $xpos $ypos
cat /dev/null > $file
else
echo $(xdotool getactivewindow getwindowgeometry | grep Position | awk '{print $2}') > $geo
wid=$(xdotool getactivewindow)
xdotool windowunmap $wid
echo $wid > $file
fi
Seems like a rather odd omission on behalf of the develops though
I wouldn't say an omission. It would require extra code to keep track of the last active window and xfwm4 is designed to be a minimalist window manager. Regardless, feel free to create a bug report to see what the developer says.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
i thought it was an "omission", too. but "minimalist" is always going to "omit" things to achieve its goal. maybe you can start with XFCE, add some things, especially things that match what XFCE already has, and create a "middle-ist" DE. be sure to release it with all the XFCE credits and same licensing. i'll be looking forward to trying it.
there are, already, other DEs at each extreme. it might not be perfect, but XFCE has saved me a lot of work.
Offline
Pages: 1
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 535.67 KiB (Peak: 536.52 KiB) ]