Fix issues in autostart

This commit is contained in:
Tobias Reisinger 2023-07-15 15:21:33 +02:00
parent 0d82914d42
commit f03e4b12a1
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 8 additions and 7 deletions

View file

@ -12,7 +12,7 @@ _query_autostart_toml() {
(.value.hosts | contains([$host])) or
([.value.group] | inside($groups))
) | '"$1" \
"$HOME/.config/autostart.toml"
"$XDG_CONFIG_HOME/autostart.toml"
}
_list () {
@ -22,10 +22,11 @@ _list () {
_echo_table () {
for unit in "$@"
do
printf "%s\t%s\t%s\n" \
printf "%s\t%s\t%s\t%s\n" \
"$unit" \
"$(_systemctl "$unit" is-enabled)" \
"$(_systemctl "$unit" is-active)"
"$(_systemctl "$unit" is-active)" \
"$(_get_autostart_cmd "$unit")"
done
}
@ -40,7 +41,7 @@ _autostart_manage_info () {
autostart_units+=("$line")
done < <(_list)
_echo_table "${autostart_units[@]}" | column -t -s$'\t' --table-columns 'Unit,Enabled?,Active?'
_echo_table "${autostart_units[@]}" | column -t -s$'\t' --table-columns 'Unit,Enabled?,Active?,Command'
}
_autostart_manage_log () {