Attempt to fix wallpaper application on multimonitor

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2023-06-12 14:30:04 +02:00
parent bd9c1faee1
commit 558a6e4168

View file

@ -6,15 +6,15 @@ let
makeBinPath;
locker = pkgs.writeShellScript "i3lock-dynamic-image" ''
export PATH=${makeBinPath (with pkgs; [ gnugrep coreutils xorg.xdpyinfo imagemagick i3lock ])}:$PATH
export PATH=${makeBinPath (with pkgs; [ xorg.xrandr gnugrep coreutils imagemagick i3lock ])}:$PATH
WALLPAPER_CACHE="$HOME/.local/tmp/wallpaper_cache"
mkdir -p $WALLPAPER_CACHE
SCREEN_RESOLUTION="$(xdpyinfo | grep dimensions | cut -d' ' -f7)"
SCREEN_RESOLUTION="$(xrandr --current | grep '*' | uniq | tr -s ' ' | cut -f2 -d' ' | sort -nr | head -n 1)"
IMAGEFILE="$WALLPAPER_CACHE/$(sha256sum $HOME/.config/wallpaper | tr -s ' ' | cut -f 1 -d' ').png"
I3LOCK="i3lock -d -c 000000 -i $IMAGEFILE"
I3LOCK="i3lock -t -d -c 000000 -i $IMAGEFILE"
if ! [[ -e "$IMAGEFILE" ]]
then