active and select resize, active send to gexec* shortcuts
Posted: Sun 17 May 2015, 03:01
here ya go: sendtoAhwAS.tar.gzPuppus Dogfellow wrote:haven't as yet made a pack of the active versions of the (now up to) 24 send-to-desktop scripts, but changing the :SELECT: to :ACTIVE: in each and renaming a copy (for example) s15a will give a terminal shortcut for send-tos for active windows. the lba, lma, laa are to layer the active window below, middle (normal, there's already a system script named lna...), and above respectively. were i to do it again, i'd rename everything with active as the default (i.e. if you want to send the thing you select to desktop 16 or the upper right quadrant, you'd have to type the final s for SELECT--the shorter titles (s15, urq, 650, la) would work on the active windows. currently only the a and b series (halves and quadrants) are set up this way).
scripts included:
Code: Select all
h1000 h1225s h1475 h1700s h325 h550s h800 s0a s4a w1100s w1350 w1575s w200 w425s w675 w900s
h1000s h1250 h1475s h1725 h325s h575 h800s s10a s5a w1125 w1350s w1600 w200s w450 w675s w925
h1025 h1250s h1500 h1725s h350 h575s h825 s11a s6a w1125s w1375 w1600s w225 w450s w700 w925s
h1025s h1275 h1500s h1750 h350s h600 h825s s12a s7a w1150 w1375s w1625 w225s w475 w700s w950
h1050 h1275s h1525 h1750s h375 h600s h850 s13a s8a w1150s w1400 w1625s w250 w475s w725 w950s
h1050s h1300 h1525s h1775 h375s h625 h850s s14a s9a w1175 w1400s w1650 w250s w500 w725s w975
h1075 h1300s h1550 h1775s h400 h625s h875 s15a shade w1175s w1425 w1650s w275 w500s w750 w975s
h1075s h1325 h1550s h1800 h400s h650 h875s s16a stk w1200 w1425s w1675 w275s w525 w750s
h1100 h1325s h1575 h1800s h425 h650s h900 s17a ushade w1200s w1450 w1675s w300 w525s w775
h1100s h1350 h1575s h200 h425s h675 h900s s18a ustk w1225 w1450s w1700 w300s w550 w775s
h1125 h1350s h1600 h200s h450 h675s h925 s19a w1000 w1225s w1475 w1700s w325 w550s w800
h1125s h1375 h1600s h225 h450s h700 h925s s1a w1000s w1250 w1475s w1725 w325s w575 w800s
h1150 h1375s h1625 h225s h475 h700s h950 s20a w1025 w1250s w1500 w1725s w350 w575s w825
h1150s h1400 h1625s h250 h475s h725 h950s s21a w1025s w1275 w1500s w1750 w350s w600 w825s
h1175 h1400s h1650 h250s h500 h725s h975 s22a w1050 w1275s w1525 w1750s w375 w600s w850
h1175s h1425 h1650s h275 h500s h750 h975s s23a w1050s w1300 w1525s w1775 w375s w625 w850s
h1200 h1425s h1675 h275s h525 h750s laa s24a w1075 w1300s w1550 w1775s w400 w625s w875
h1200s h1450 h1675s h300 h525s h775 lba s2a w1075s w1325 w1550s w1800 w400s w650 w875s
h1225 h1450s h1700 h300s h550 h775s lma s3a w1100 w1325s w1575 w1800s w425 w650s w900
from 290easybake.sendtoAhwAS.readme:
edit: pexec works as well as gexec (and also has a pull down menu you can preload)
active and select resize scripts, active send-to, stick, and layer scripts, plus the code i found that made it easier to put together and why i recommend gexec:
grep -lr --exclude-dir=".excludedsub(repeat for each subtree)" -e "SELECT" . | xargs sed -i "s/SELECT/ACTIVE/g"
i used the above to flip a directory worth of files from select scripts to active scripts. here's the reverse, in case you find yourself making your own versions and want to spare yourself from needlessly doubling the effort involved getting a set for each:
grep -lr --exclude-dir=".excludedsub" -e "ACTIVE" . | xargs sed -i "s/ACTIVE/SELECT/g"
adapted from here:
http://www.isaacsukin.com/news/2013/06/ ... -directory
(i used the built-in gnfrename to batch rename a directory of copies, then copied the new scripts back into /root/my-applications/bin. remember to check the permissions if something won't run.)
--------------------
#!/bin/sh
for file in *
do
cat negones >> $file
done#!/bin/sh
#(negones being a file in the same directory consisting of:
#!/bin/sh
wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,-1,-1,-1,-1
# --a general way to make template files/fill a directory of files with given content)
#adapted from http://www.unix.com/shell-programming-a ... files.html
--------------------
find and replace (space) with (space)/root/my-applications/bin/
touch command to make them real files. [i typed out a series of numbers (200 -1800 by 25s; echo {200..1800..25} would've produced the same sequence), replaced the space (through geany's find and replace function) with space plus path, added touch infront of the resulting list, and got a batch of files that way. used gfnrename to rename copies of the originals in separate folders for height, width, select, and active (the included active send-tos were done with the grep line that starts this readme). included the content with the little script above, placed in and activated from the same folder that held the originals (spare yourself some work and copy them after the content's been added. to do: learn the code for transposing values after commas--that'd make the process more automated still...you could also i'm sure have sed/awk/grep (tr, cut?) take the values from a list and put them in the proper place in each file. this'll do for now...)
--------------------
gfnrename
--------------------
#!/bin/sh
#name fnr
findnrun
#--------------------
#^findnrun is probably the best thing to choose when you can only remember three characters in the title of the program, but it appears to only search the desktops files and so can't launch the terminal shortcuts. it gets a launch shortcut of its own, but i recommend gexec to launch the mini-scripts, whether resize, reposition, or just in general. the lack of a zealous highlight/replace-predict action may mean you need an extra tab-press to complete something like sak into sakura compared to say, gRun, but that same thing allows shorter two and three character scripts to be run without the launcher automatically predicting some longer-titled items, apparently by default interpreting those titles as fragments of longer titles outside /root/my-applications/bin--you won't be able to access them if there's a conflict. gexec's dropdown history window (which you can preload and make into a menu of sorts) also appears to work better than gRun's. i haven't done much testing with Prun, but it seems to work very well for all the non-resize/reposition shortcuts--it fails with them in the same way the terminals do (as discussed earlier, terminals are out for launching the resize reposition scripts on active windows since they'll only be resizing/repositioning themselves).