diff options
| author | Robert Günzler <r@gnzler.io> | 2020-06-28 23:48:05 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2020-06-28 23:58:37 +0200 |
| commit | 30f2b42d4af6bc261de6c2b19fdcb03ba744c4d5 (patch) | |
| tree | 980998b45cd17c1b5a2cb49335c6afed3826d340 /bin | |
| parent | 8695d2c91b681e1a549928d15c9729e75b73a3ab (diff) | |
bin: add files script
uses 'fzfez fd' to create a file picker
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/fs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/fs b/bin/fs new file mode 100755 index 0000000..5bf75f6 --- /dev/null +++ b/bin/fs @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +_rect=$(swq current output-full | jq -r '.rect') +w=$(echo "${_rect}" | jq -r '.width * 0.6') +h=$(echo "${_rect}" | jq -r '.height * 0.6') +x=$(echo "${_rect}" | jq -r "(.width - ${w}) / 2") +y=$(echo "${_rect}" | jq -r "(.height - ${h}) / 2") + +exec swx -t -g "${x},${y} ${w}x${h}" fzfez fd -a -p |