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 (พูดในไฟล์กำหนดค่า 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 ไม่ได้บรรจุไว้สำหรับ distros (ยัง) แต่มันตรงไปตรงมาในการสร้าง
git clone --recurse-submodules https://github.com/jameseh96/simplelocker.git simplelocker
cd ./simplelocker
mkdir ./build
cd !$
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install