Skip to content

Commit

Permalink
fix: parse action from config file
Browse files Browse the repository at this point in the history
this should fix #25
  • Loading branch information
ayushnix committed Apr 1, 2022
1 parent 0aa1d17 commit 55e71b5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tessen
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ parse_config() {
elif [[ $key == "dmenu_backend" ]] && [[ -z $dmenu_backend ]]; then
validate_dmenu_backend "$val"
readonly dmenu_backend
elif [[ $key == "action" ]] && [[ -z $tsn_action ]]; then
elif [[ $key == "action" ]] && unset -v tsn_action 2> /dev/null; then
validate_action "$val"
readonly tsn_action
elif [[ $key == "rofi_config_file" ]] && [[ -f ${val@P} ]]; then
Expand Down Expand Up @@ -838,8 +838,9 @@ main() {
validate_dmenu_backend "$dmenu_backend"
readonly dmenu_backend
fi
if [[ -z $tsn_action ]]; then
validate_action default
if unset -v tsn_action 2> /dev/null; then
validate_action "default"
readonly tsn_action
fi

trap '_clear' EXIT TERM INT
Expand Down

0 comments on commit 55e71b5

Please sign in to comment.