Advertisement
Guest User

Script

a guest
Feb 3rd, 2025
53
0
236 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | Source Code | 0 0
  1. #!/bin/sh
  2. # spawn a new terminal window inside a drawn rectangle
  3. # edit the part with urxvt to match your terminal
  4.  
  5. set -e
  6.  
  7. wglyph=7        # glyph width, in pixels
  8. hglyph=16       # glyph height, in pixels
  9. border=20        # border width, in pixels
  10. title=0        # titlebar height, in pixels
  11.  
  12. slop -o | tr 'x+' ' ' | {
  13.     read w h x y
  14.     w=$(( ( w - ( border / wglyph ) ) / wglyph ))
  15.     h=$(( ( ( h - ( border / hglyph ) ) / hglyph ) - ( title / hglyph ) ))
  16.     exec urxvt -uc -b 10 -geometry ${w}x${h}+${x}+${y} &
  17. }
  18.  
  19. #P.S i have no idea about actual orgin of this script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement