Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Map these to keyboard shortcuts to hide and show windows with the commands. hidewindow.sh hides the currently focused window, and showwindow.sh unhides the most recently hidden windows in reverse order.
- #Requires xdotool
- #hidewindow.sh
- #! /bin/sh
- xdotool windowunmap `xdotool getwindowfocus | tee -a $HOME/hidden`
- #showwindow.sh
- #! /bin/bash
- 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