- Your terminal emulator of choice
- slop
termite --geometry=$(slop)
Make sure size_hints
is set to false
.
NOTE: --geometry
was removed. Unsure if something will replace it.
#!/bin/bash
set -euf
read -r X Y W H < <(slop --bordersize 3 --format "%x %y %w %h" --tolerance 0 --quiet) && return
if [[ -n $W ]] || [[ -n $H ]]
then
# Width and Height in px need to be converted to columns/rows
# To get these magic values, make a fullscreen terminal, and divide your screen width by ${tput cols}, height by ${tput lines}
(( W /= 6 ))
(( H /= 13 ))
g=${W}x${H}+${X}+${Y}
# Uncomment your terminal of choice.
xterm -geometry "$g"
# st -g "$g" -t "Simple Terminal"
fi
Script above assumes a 1080p monitor.