Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- #REQUIRES XDOTOOL
- #hidewindow - an X11 window-hiding shellscript
- #hides current window, writes it's ID to a file at ~/hidden so showwindow can unhide it
- #for best results, assign to a keyboard shortcut.
- xdotool windowunmap `xdotool getwindowfocus | tee -a $HOME/hidden`
- #! /bin/bash
- #showwindow - an X11 window-unhiding shellscript
- #requires bash and xdotool
- #shows most recently hidden window first, run again to unhide the window hidden before that.
- #only works if ~/hidden has the window ID's, hidewindow should write window ID's.
- #for best results, assign to a keyboard shortcut.
- export WINDOWID=`awk '/./{line=$0} END{print line}' $HOME/hidden`
- if [[ -n "$WINDOWID" ]]; then
- xdotool windowmap $WINDOWID
- sed -i '/'${WINDOWID}'/d' $HOME/hidden
- export WINDOWID=
- else
- echo "No hidden (unmapped) windows found in '$HOME/hidden'."
- fi
Advertisement
Add Comment
Please, Sign In to add comment