simplelocker
1.0.0
Uma pequena ferramenta para executar um comando em determinados eventos (antes de suspender, após algum período de marcha lenta etc.). Originalmente projetado para iniciar um armário de tela como i3lock, mas tudo pode ser executado.
SimpleLocker pode ser lançado como:
simplelocker -i <x> -c <cmd>
Para executar após a sessão, está ocioso por segundos.
Para um exemplo mais complicado,
simplelocker -i 60 -s -l -c i3lock
Lançará I3lock:
-i 60 após 60 segundos em marcha lenta-s imediatamente antes do sistema suspender/dorme-l em resposta a uma chamada do método DBUS (consulte o controle de uma instância em execução) Se o SimpleLocker foi lançado com -l (digamos, em um arquivo de configuração i3), ele pode ser controlado com 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
Opções:
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
O SimpleLocker não está embalado para nenhuma distribuição (ainda), mas é simples de construir.
git clone --recurse-submodules https://github.com/jameseh96/simplelocker.git simplelocker
cd ./simplelocker
mkdir ./build
cd !$
cmake -DCMAKE_BUILD_TYPE=Release ..
make
make install