An agent, so a finger can mean something in your session
The daemon announces every matched finger on the system bus and stops there, because root has no session bus, no display and no business starting your applications. fingerprintd-agent is the other half: it runs as you, subscribes properly rather than parsing gdbus monitor output, filters by uid because the signal is visible to every local user, and maps fingers to commands from a file you own and can edit without restarting anything. It is a separate binary and a separate subpackage because it is a separate trust domain. /etc/fingerprintd/actions.conf is a root shell and is guarded like one; ~/.config/fingerprintd/fingers.conf runs your commands as you, so it is an ordinary dotfile. Demonstrated on the phone: one press of the unlock finger both unlocks it and opens plasma-camera.
This commit is contained in:
parent
fd244238d0
commit
1934822554
8 changed files with 264 additions and 2 deletions
28
packaging/fingers.conf.example
Normal file
28
packaging/fingers.conf.example
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# fingerprintd-agent — what a finger does in YOUR session.
|
||||
#
|
||||
# Install as ~/.config/fingerprintd/fingers.conf, then:
|
||||
# systemctl --user enable --now fingerprintd-agent
|
||||
#
|
||||
# One finger per line:
|
||||
#
|
||||
# <finger> <command...>
|
||||
#
|
||||
# The command runs as you, with your session's environment, so it can start
|
||||
# applications — which is exactly what the daemon cannot do, being root with
|
||||
# no session bus and no display.
|
||||
#
|
||||
# This file is yours. It is re-read whenever it changes, so editing it needs no
|
||||
# restart, and unlike /etc/fingerprintd/actions.conf it is not a root shell:
|
||||
# relative commands are fine and nothing checks its ownership.
|
||||
#
|
||||
# Fingers: left-thumb, left-index-finger, left-middle-finger, left-ring-finger,
|
||||
# left-little-finger, and the right-* equivalents. A name that is not one of
|
||||
# those is reported at startup rather than silently never firing.
|
||||
#
|
||||
# NOTE: a finger fires this every time it MATCHES, which includes the press
|
||||
# that unlocks the phone. If you map your unlock finger, the app opens on
|
||||
# every unlock.
|
||||
|
||||
#right-ring-finger kde-open camera
|
||||
#left-index-finger plasma-settings
|
||||
#left-thumb sh -c 'notify-send "hello from a finger"'
|
||||
Loading…
Reference in a new issue