✨ allow running custom commands
This commit is contained in:
parent
afcd8a8567
commit
6d1dad2558
10
workplace
10
workplace
@ -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'"
|
||||
|
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user