fruitcombo

go back

resize qimgv window to image dimensions

this is a script for qimgv that finds the image dimensions in the window title (which as i'm writing this i realize is invisible on my theme, but it's there) and resizes the window to them. despite being one line, i couldn't get it to work by just putting it in the text box, so try saving it as a file. to install it, go to Settings > Scripts > Add, then to Controls and assign it to a keyboard shortcut.

the windowmove part makes them all appear in the top left. isn't really necessary, but i like an anchor because it can get chaotic. also, be prepared to realize how many images you have that are bigger than your screen :p

#! /bin/bash
xdotool getactivewindow windowsize $(xwininfo -name "$(xdotool getactivewindow getwindowname)" | awk '/Window id:/' | grep -Eo "[[:digit:]]+ x *[[:digit:]]+" | sed 's/x //g') windowmove 1% 3%

download here