simplelocker
1.0.0
أداة صغيرة لتشغيل أمر على بعض الأحداث (قبل التعليق ، بعد فترة من الخمول وما إلى ذلك). تم تصميمه في الأصل لإطلاق خزانة شاشة مثل i3lock ، ولكن يمكن تشغيل أي شيء.
يمكن إطلاق SimpleLocker على النحو التالي:
simplelocker -i <x> -c <cmd>
لتشغيل بعد الجلسة كان الخمول لمدة <x> ثانية.
للحصول على مثال أكثر تعقيدًا ،
simplelocker -i 60 -s -l -c i3lock
سيتم إطلاق i3lock:
-i 60 بعد 60 ثانية في الخمول-s أن يعلق/ينام النظام مباشرة-l استجابةً لاستدعاء طريقة DBUS (انظر التحكم في مثيل تشغيل) إذا تم إطلاق SimplElocker باستخدام -l (على سبيل المثال ، في ملف Config I3) ، يمكن التحكم فيه باستخدام simplelocker -r .
# daemon
simplelocker -l -s -i 60 -c i3lock
...
# remote control
simplelocker -r Lock # launches i3lock
simplelocker -r Disable # disables lock-on-idle BUT will still
# lock on sleep, `-r Lock` etc.
simplelocker -r Enable # (re)enables lock-on-idle. Still
# requires the daemon was launched with -i
خيارات:
Allowed options:
-s [ --sleep ] Run on sleep
-S [ --shutdown ] Run on shutdown
-i [ --idle ] arg Run on idle
-d [ --dbus ] arg Run on dbus method call
-b [ --dbus-disable ] arg Disable run-on-idle on this dbus method call
-e [ --dbus-enable ] arg Enable run-on-idle on this dbus method call
-c [ --cmd ] arg Command to run
-h [ --help ] produce help message
DBus options:
-l [ --listen ] Register a dbus service to receive method calls
for control
-D [ --dbus-name ] arg Dbus service name to bind
-P [ --dbus-path ] arg Dbus object path to register
-I [ --dbus-interface ] arg Dbus interface to register
Remote call options:
-r [ --remote ] arg Call dbus method (i.e., `-r Lock` to lock a
running instance)
TBC
لا يتم تعبئة SimpleLocker لأي توزيعات (حتى الآن) ، ولكن من السهل بناء.
git clone --recurse-submodules https://github.com/jameseh96/simplelocker.git simplelocker
cd ./simplelocker
mkdir ./build
cd !$
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install