allow running custom commands

This commit is contained in:
DrMaxNix 2024-05-26 21:45:25 +02:00
parent afcd8a8567
commit 6d1dad2558
2 changed files with 12 additions and 0 deletions

View File

@ -266,6 +266,16 @@ workplace_setcommand_run(){
;;
## CUSTOM COMMAND ##
"run")
eval_exit=0
eval "$2" || eval_exit=$?
if [[ "$eval_exit" -gt 0 ]]; then
log_warn "Custom command failed: '$2'"
fi
;;
## ERROR HANDLING ##
*)
log_error "Invalid setcommand '$1'"

View File

@ -6,6 +6,7 @@ set.text-scaling-factor = 1.3700000000000001
set.powerprofile = power-saver
set.volume = 0
set.pam.fprintd = true
set.run = echo laptop!
@ -17,3 +18,4 @@ set.text-scaling-factor = 1.0
set.powerprofile = balanced
set.volume = 90
set.pam.fprintd = false
set.run = echo dock!