Window manager independent script to hide/unhide windows
I recently tried awesome wm and it has this neat feature of when click on window's title it will hide the window. Really good feature and I wanted this on my bspwm setup too (To make work flow across WMs consistent). So I thought of writing a script which is WM agnostic
# For debian based distro
sudo apt install xdo xdotool rofi
# For arch based distro
sudo pacman -S --needed xdo xdotool rofi
# For void linux based distro
sudo xbps-install -S xdo xdotool rofi
curl https://raw.githubusercontent.com/shubham-cpp/lapav/main/lapav.sh > ~/.local/bin/lapav
# Make sure ~/.local/bin is in your $PATH
chmod +x ~/.local/bin/lapav
lapav hide # if nothing is passed then it will hide the focused window
lapav show # if nothing is passed then it will show the last hidden window
lapav hide select # this will lauch rofi and let you select a window to hide
lapav show select # this will lauch rofi and let you select a window to be shown
super + {_,shift + } h
lapav {hide,hide select}
super + {_,shift + } s
lapav {show,show select}
You know better than me
- Make this posix compliant
- Remove shellcheck warnings
- Maybe rewrite in a programming lang like C or Go to eliminate xdo and xdotool dependency
- xdotool man page has an option of selectwindow which provide a functionality to select a window via mouse click. Interesting
- Add A video example
- Add option to list windows from all workspaces
Hide in marathi(my native language) is called lapav
Yes. If you have the Requirements then this will work.
My exams start from Friday(16th Apr '21) so really cant say anything concrete