aboutsummaryrefslogtreecommitdiff
path: root/bin/memezoom
diff options
context:
space:
mode:
Diffstat (limited to 'bin/memezoom')
-rwxr-xr-xbin/memezoom21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/memezoom b/bin/memezoom
new file mode 100755
index 0000000..f7dbb44
--- /dev/null
+++ b/bin/memezoom
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+set -o errexit
+set -o nounset
+set -o pipefail
+if [[ "${TRACE-0}" == "1" ]]; then
+ set -o xtrace
+fi
+
+FOCUSED=$(swaymsg -t get_outputs | jq '.[] | select(.focused) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')
+TMP=""
+
+main() {
+ TMP=$(mktemp)
+ grim -g "$(eval echo "$FOCUSED")" "$TMP"
+ imv -u nearest_neighbour "$TMP" -f
+ #swaymsg '[app_id="imv"] fullscreen enable'
+}
+
+main "$@"
+rm "$TMP"