diff options
author | rmb122 | 2023-05-17 19:44:34 +0800 |
---|---|---|
committer | rmb122 | 2023-05-17 19:45:48 +0800 |
commit | 0fbbdb7ecb98c9f2341dc277f674ce795d881630 (patch) | |
tree | 934eab4e46582950d312a28a768924efe1613955 | |
download | aur-0fbbdb7ecb98c9f2341dc277f674ce795d881630.tar.gz |
init
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | PKGBUILD | 45 | ||||
-rw-r--r-- | disable_motion.patch | 32 | ||||
-rw-r--r-- | xsecurelock-no-mouse-motion.install | 13 |
4 files changed, 117 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ec3f562c7dde --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = xsecurelock-no-mouse-motion + pkgdesc = X11 screen lock utility with security in mind, patched with ignore mouse motion option + pkgver = 1.8.0 + pkgrel = 1 + url = https://github.com/google/xsecurelock + install = xsecurelock-no-mouse-motion.install + arch = x86_64 + license = APACHE + makedepends = xorg-xset + depends = pam + depends = libxcomposite + depends = libxmu + depends = libxft + depends = libxrandr + depends = libxss + optdepends = mplayer: for the saver_mplayer module + optdepends = mpv: for the saver_mpv module + optdepends = imagemagick: for the auth_pamtester module + optdepends = pamtester: for the auth_pamtester module + optdepends = xorg-xset: for the saver_blank module + optdepends = xscreensaver: for the saver_xscreensaver module + provides = xsecurelock + conflicts = xsecurelock + source = https://github.com/google/xsecurelock/archive/v1.8.0.tar.gz + sha512sums = c98aa9e5a5574a90a8b0cb8d41b67489c34689b489b9a079aa16493435d9dafdc090ac2e8ba5fa766d6ce2b3ee8ff12c09caa9eb851359be315f9d14563c8556 + +pkgname = xsecurelock-no-mouse-motion diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b1174bd0fda3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: rmb122 https://github.com/rmb122 + +_pkgname=xsecurelock +pkgname=xsecurelock-no-mouse-motion +pkgver=1.8.0 +pkgrel=1 +pkgdesc="X11 screen lock utility with security in mind, patched with ignore mouse motion option" +arch=('x86_64') +url="https://github.com/google/xsecurelock" +license=('APACHE') +depends=('pam' 'libxcomposite' 'libxmu' 'libxft' 'libxrandr' 'libxss') +makedepends=('xorg-xset') +optdepends=('xorg-xset: for the saver_blank module') +optdepends=('mplayer: for the saver_mplayer module'\ + 'mpv: for the saver_mpv module'\ + 'imagemagick: for the auth_pamtester module'\ + 'pamtester: for the auth_pamtester module'\ + 'xorg-xset: for the saver_blank module'\ + 'xscreensaver: for the saver_xscreensaver module') +provides=('xsecurelock') +conflicts=('xsecurelock') +source=("https://github.com/google/xsecurelock/archive/v${pkgver}.tar.gz") +sha512sums=('c98aa9e5a5574a90a8b0cb8d41b67489c34689b489b9a079aa16493435d9dafdc090ac2e8ba5fa766d6ce2b3ee8ff12c09caa9eb851359be315f9d14563c8556') +install=$pkgname.install + +prepare() { + cd "$_pkgname-$pkgver" + patch --forward --strip=1 --input="${startdir}/disable_motion.patch" +} + +build() { + cd "${_pkgname}-${pkgver}" + sh autogen.sh + ./configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --with-pam-service-name=system-auth + make GIT_VERSION="${pkgver}" +} + +package() { + cd "${_pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} + +# vim:set ts=4 sw=4 et: diff --git a/disable_motion.patch b/disable_motion.patch new file mode 100644 index 000000000000..aba28fd36e08 --- /dev/null +++ b/disable_motion.patch @@ -0,0 +1,32 @@ +diff --git a/main.c b/main.c +index 735b61c..e0f0178 100644 +--- a/main.c ++++ b/main.c +@@ -152,6 +152,8 @@ const char *blank_dpms_state = "off"; + int saver_reset_on_auth_close = 0; + //! Delay we should wait before starting mapping windows to let children run. + int saver_delay_ms = 0; ++//! Whether disable mouse motion to wake up auth ++int disable_mouse_motion = 0; + + //! The PID of a currently running notify command, or 0 if none is running. + pid_t notify_command_pid = 0; +@@ -441,6 +443,7 @@ void LoadDefaults() { + saver_reset_on_auth_close = + GetIntSetting("XSECURELOCK_SAVER_RESET_ON_AUTH_CLOSE", 0); + saver_delay_ms = GetIntSetting("XSECURELOCK_SAVER_DELAY_MS", 0); ++ disable_mouse_motion = GetIntSetting("XSECURELOCK_DISABLE_MOUSE_MOTION", 0); + } + + /*! \brief Parse the command line arguments, or exit in case of failure. +@@ -1325,6 +1328,10 @@ int main(int argc, char **argv) { + } + break; + case MotionNotify: ++ if (disable_mouse_motion) { ++ // if disable_mouse_motion = 1, ignore MotionNotify ++ break; ++ } + case ButtonPress: + // Mouse events launch the auth child. + ScreenNoLongerBlanked(display); diff --git a/xsecurelock-no-mouse-motion.install b/xsecurelock-no-mouse-motion.install new file mode 100644 index 000000000000..d75ab65b9a1c --- /dev/null +++ b/xsecurelock-no-mouse-motion.install @@ -0,0 +1,13 @@ +# Colored makepkg-like functions +note() { + printf "${_blue}==>${_yellow} NOTE:${_bold} %s${_all_off}\n" "$1" +} + +_all_off="$(tput sgr0)" +_bold="${_all_off}$(tput bold)" +_blue="${_bold}$(tput setaf 4)" +_yellow="${_bold}$(tput setaf 3)" + +post_install() { + note 'Use `export XSECURELOCK_DISABLE_MOUSE_MOTION=1` to disable mouse motion' +} |