mirror of
https://github.com/artizirk/dotfiles.git
synced 2024-11-25 17:20:58 +02:00
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
card_eventmgr {
|
|
|
|
# Run in background? Implies debug=false if set to true
|
|
daemon = false;
|
|
|
|
# show debug messages?
|
|
debug = false;
|
|
|
|
# polling time in milliseconds
|
|
timeout = 1000;
|
|
|
|
#
|
|
# list of events and actions
|
|
|
|
# Card inserted
|
|
event card_insert {
|
|
# what to do if an action fail?
|
|
# ignore : continue to next action
|
|
# return : end action sequence
|
|
# quit : end program
|
|
on_error = return ;
|
|
|
|
# You can enter several, comma-separated action entries
|
|
# they will be executed in turn
|
|
action =
|
|
"gpg-connect-agent 'SCD SERIALNO' /bye | grep -q 'S SERIALNO'",
|
|
"pacat --volume=65536 --file-format=oga /usr/share/sounds/freedesktop/stereo/device-added.oga",
|
|
"swaymsg 'output * dpms on'", "echo UNLOCK";
|
|
}
|
|
|
|
# Card has been removed
|
|
event card_remove {
|
|
on_error = return ;
|
|
action =
|
|
"if gpg-connect-agent 'SCD SERIALNO' /bye | grep -q 'S SERIALNO'; then sleep 1; if gpg-connect-agent 'SCD SERIALNO' /bye | grep -q 'S SERIALNO'; then exit 1; else exit 0; fi; fi",
|
|
"pacat --volume=65536 --file-format=oga /usr/share/sounds/freedesktop/stereo/device-removed.oga",
|
|
"loginctl lock-session", "echo LOCK";
|
|
}
|
|
|
|
# Too much time locked session
|
|
event timeout {
|
|
}
|
|
}
|