mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-22 08:04:20 +01:00
Attempt to fix wallpaper application on multimonitor
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
bd9c1faee1
commit
558a6e4168
|
@ -6,15 +6,15 @@ let
|
||||||
makeBinPath;
|
makeBinPath;
|
||||||
|
|
||||||
locker = pkgs.writeShellScript "i3lock-dynamic-image" ''
|
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"
|
WALLPAPER_CACHE="$HOME/.local/tmp/wallpaper_cache"
|
||||||
|
|
||||||
mkdir -p $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"
|
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" ]]
|
if ! [[ -e "$IMAGEFILE" ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue