shod

mouse-based window manager that can tile windows inside floating containers
Log | Files | Refs | README | LICENSE

shodmenu (611B)


      1 #!/bin/sh
      2 
      3 IFS=
      4 
      5 run() {
      6 	set -m
      7 	while read -r line
      8 	do case "$line" in
      9 	(state:*)
     10 		state="${line#"state:"}"
     11 		shodc state "-$state" "$WINDOWID"
     12 		;;
     13 	(sendto:*)
     14 		desk="${line#"sendto:"}"
     15 		shodc sendto "$desk" "$WINDOWID"
     16 		;;
     17 	(close)
     18 		shodc close "$WINDOWID"
     19 		;;
     20 	esac done &
     21 }
     22 
     23 exec xmenu -fp "$WINDOWPOS" -t "$WINDOWID" "$@" "Window Control" <<EOF | run
     24 Stick			state:y
     25 Shade			state:s
     26 Minimize		state:m
     27 Maximize		state:M
     28 Fullscreen		state:f
     29 Above			state:a
     30 Below			state:b
     31 Send To
     32 	Desktop 1	sendto:1
     33 	Desktop 2	sendto:2
     34 	Desktop 3	sendto:3
     35 	Desktop 4	sendto:4
     36 	Desktop 5	sendto:5
     37 
     38 Close			close
     39 EOF