From 72a40564c0118f32624acba7078ba588bff8b4ab Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Sun, 24 Mar 2019 14:54:22 +0100 Subject: [PATCH] new lock script --- PKGBUILD | 6 +++--- lock | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 67a1e78..69c47c6 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -9,8 +9,8 @@ url="http://dwm.suckless.org" arch=('i686' 'x86_64') license=('MIT') options=(zipman) -depends=('libx11' 'libxinerama' 'libxft' 'freetype2' 'st' 'dmenu' 'nerd-fonts-source-code-pro' 'xautolock' 'xss-lock' 'xbindkeys' 'compton' 'feh' 'unclutter' 'redshift' 'dunst' 'slstatus-git' 'spotify' 'iceweasel' 'tmux' 'scrot' 'pulseaudio' 'xorg-xbacklight' 'yubikey-oath-dmenu' 'pass' 'menu-calc' 'xdotool') -optdepends=('i3lock' 'i3lock-fancy-multimonitor-git') +depends=('libx11' 'libxinerama' 'libxft' 'freetype2' 'st' 'dmenu' 'nerd-fonts-source-code-pro' 'xautolock' 'xss-lock' 'xbindkeys' 'compton' 'feh' 'unclutter' 'redshift' 'dunst' 'slstatus-git' 'spotify' 'iceweasel' 'tmux' 'scrot' 'pulseaudio' 'xorg-xbacklight' 'yubikey-oath-dmenu' 'pass' 'menu-calc' 'xdotool' 'i3lock') +optdepends=('corrupter') install=dwm.install _patches=( @@ -38,7 +38,7 @@ source=(http://dl.suckless.org/dwm/dwm-$pkgver.tar.gz md5sums=('9929845ccdec4d2cc191f16210dd7f3d' 'a653a6835f12bf99a2ec36f3e261c8be' '939f403a71b6e85261d09fc3412269ee' - '8b2b6c96dbb9e8968a4c52aca2985ee4' + '10bd3378b4b4aa7a2e4ed8685cea1be6' '31a7569d7f3d43846f59e854ec5d1da0' 'fbb786263f2d714b18368ff64779d669' 'c75af619c04cfae7b9740ec140d1dc6c' diff --git a/lock b/lock index fb9d672..23ee9fd 100755 --- a/lock +++ b/lock @@ -1,10 +1,11 @@ #!/bin/sh -if [ -e /usr/bin/i3lock-fancy ] -then - i3lock-fancy -p -n -elif [ -e /usr/bin/i3lock ] -then - i3lock -e -b -f -i ~/.cache/lock.png +NUMBER_OF_SCREENS="$(xrandr | grep -c '\*')" +if [ "$NUMBER_OF_SCREENS" -gt 1 ] +then + scrot "lock.png" -e 'mv $f ~/.cache/' + corrupter ~/.cache/lock.png ~/.cache/lock.png fi + +i3lock -e -b -f -i ~/.cache/lock.png