Created
July 21, 2018 15:41
-
-
Save LeReverandNox/8ad897dccc836de5ebaaa29ece046e1a to your computer and use it in GitHub Desktop.
Poor's man quicklook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| function quick-look() { | |
| SCREEN_WIDTH=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1) | |
| SCREEN_HEIGHT=$(xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2) | |
| WIDTH=$(echo $(( ${SCREEN_WIDTH} * 0.75)) | cut -f1 -d".") | |
| HEIGHT=$(echo $(( ${SCREEN_HEIGHT} * 0.75)) | cut -f1 -d".") | |
| feh --title="feh_quicklook" --scale-down --geometry "${WIDTH}"x"${HEIGHT}" $1 $(pwd) >/dev/null 2>&1 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment