From eb085ccf54678e217a70a00ec634efe300ea975a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 21 Dec 2020 14:48:31 -0600 Subject: [PATCH] Making sxiv laptop aware --- rofi/launchers-git/blurry.rasi | 2 +- scripts/rifle-sxiv | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/rofi/launchers-git/blurry.rasi b/rofi/launchers-git/blurry.rasi index 675c100..1d677f3 100644 --- a/rofi/launchers-git/blurry.rasi +++ b/rofi/launchers-git/blurry.rasi @@ -51,7 +51,7 @@ window { text-color: @base05; border-radius: 0px; border: 0px; - width: 50%; + width: 60%; location: center; anchor: center; x-offset: 0; diff --git a/scripts/rifle-sxiv b/scripts/rifle-sxiv index b64da73..072c60a 100755 --- a/scripts/rifle-sxiv +++ b/scripts/rifle-sxiv @@ -19,6 +19,14 @@ # not work in dash and others), so we cannot store the result of listfiles to a # variable. +if [ $(hostname) = 'chris-linuxlaptop' ]; then + echo laptop + size=2300x1500 +else + echo desktop + size=1500x900 +fi + if [ $# -eq 0 ]; then echo "Usage: ${0##*/} PICTURES" exit @@ -42,7 +50,7 @@ target="$(abspath "$1")" count="$(listfiles | grep -m 1 -ZznF "$target" | cut -d: -f1)" if [ -n "$count" ]; then - listfiles | xargs -0 sxiv -g 1500x900 -n "$count" -- + listfiles | xargs -0 sxiv -g $size -n "$count" -- else - sxiv -g 1500x900 -- "$@" # fallback + sxiv -g $size -- "$@" # fallback fi