summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2022-11-18 17:47:14 +0100
committerRobert Günzler <r@gnzler.io>2022-11-18 18:38:21 +0100
commit7a7ef68421ceb67642560ee00d0c51301934f3c0 (patch)
tree9f03a6e75ed60327d570a992d6799c9f741a55c0 /bin
parent605831ecb159ded47c7c56fc51fcb0ed685de143 (diff)
bin/fs: refactor
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fs16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/fs b/bin/fs
index 5bf75f6..0586ab5 100755
--- a/bin/fs
+++ b/bin/fs
@@ -1,10 +1,14 @@
 #!/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")
+dir=$(readlink -f -- "$1" || pwd)
 
-exec swx -t -g "${x},${y} ${w}x${h}" fzfez fd -a -p
+# _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) + .x")
+# y=$(echo "${_rect}" | jq -r "((.height - ${h}) / 2) + .y")
+
+echo "$dir"
+# exec swx -t -g "${x},${y} ${w}x${h}" fzfez fd -a -p "${dir}"
+exec swx -t -F 0.6 fzfez fd -a -p "${dir}"