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

View file

@ -27,7 +27,7 @@ hosts = []
group = 'conky' group = 'conky'
[apps.discord] [apps.discord]
command = 'flatpak run com.discordapp.discord' command = 'flatpak run com.discordapp.Discord'
hosts = [] hosts = []
group = 'chat' group = 'chat'
@ -37,12 +37,12 @@ hosts = []
group = 'common' group = 'common'
[apps.element] [apps.element]
command = 'flatpak run im.riot.riot' command = 'flatpak run im.riot.Riot'
hosts = [] hosts = []
group = 'chat' group = 'chat'
[apps.hyprland-handler] [apps.hyprland-handler]
command = 'hyprland-handler' command = '$XDG_CONFIG_HOME/hypr/handler'
hosts = [] hosts = []
group = 'wayland' group = 'wayland'