summaryrefslogtreecommitdiffstats
path: root/.local/bin/cbzviewer
blob: 8018f1cef748ac1acdaffb1e0cf6a751899be75a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

function rotate {
	xrandr -o "$1"
	}

function main {
	input="$1"
	temp_dir=$(mktemp -d)
	rotate left &
	# rotate input if detected
	unzip "$input" -d "$temp_dir"
	# xdotool click, pinch
	imv "$temp_dir"/* -f -r
	rotate normal &
	rm -r "$temp_dir"
	}

main "$@"