simplelocker
1.0.0
Alat kecil untuk menjalankan perintah pada peristiwa tertentu (sebelum ditangguhkan, setelah beberapa periode pemalasan dll.). Awalnya dirancang untuk meluncurkan loker layar seperti i3lock, tetapi apa pun dapat dijalankan.
SimpleLocker dapat diluncurkan sebagai:
simplelocker -i <x> -c <cmd>
Untuk berlari setelah sesi menganggur untuk <x> detik.
Untuk contoh yang lebih rumit,
simplelocker -i 60 -s -l -c i3lock
Akan meluncurkan i3lock:
-i 60 setelah 60 detik pemal-s segera sebelum sistem menangguhkan/tidur-l Menanggapi panggilan metode DBUS (lihat Mengontrol instance berjalan) Jika SimpleLocker telah diluncurkan dengan -l (katakanlah, dalam file konfigurasi i3), itu dapat dikontrol dengan 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
Opsi:
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 tidak dikemas untuk distro apa pun (belum), tetapi mudah dibangun.
git clone --recurse-submodules https://github.com/jameseh96/simplelocker.git simplelocker
cd ./simplelocker
mkdir ./build
cd !$
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install