Improve autostart-manage script
This commit is contained in:
parent
e45acae5b4
commit
cf6ef78b67
4 changed files with 24 additions and 6 deletions
|
@ -18,13 +18,14 @@ _list () {
|
||||||
}
|
}
|
||||||
|
|
||||||
_echo_table () {
|
_echo_table () {
|
||||||
printf "Unit\tFilename\tStatus\n"
|
printf "Unit\tFilename\tEnabled\tActive\n"
|
||||||
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" \
|
||||||
"$(_filename "$unit")" \
|
"$(_filename "$unit")" \
|
||||||
"$(_systemctl "$unit" is-enabled)"
|
"$(_systemctl "$unit" is-enabled)" \
|
||||||
|
"$(_systemctl "$unit" is-active)"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +80,10 @@ case $1 in
|
||||||
edit) _systemctl "$2" edit --full ;;
|
edit) _systemctl "$2" edit --full ;;
|
||||||
enable) _systemctl "$2" add-wants autostart.target ;;
|
enable) _systemctl "$2" add-wants autostart.target ;;
|
||||||
disable) _systemctl "$2" disable ;;
|
disable) _systemctl "$2" disable ;;
|
||||||
|
restart) _systemctl "${2:-*}" restart;;
|
||||||
|
start) _systemctl "${2:-*}" start;;
|
||||||
status) _systemctl "${2:-*}" status ;;
|
status) _systemctl "${2:-*}" status ;;
|
||||||
start) systemctl --user start autostart.target ;;
|
stop) _systemctl "${2:-*}" stop ;;
|
||||||
|
run) systemctl --user start autostart.target ;;
|
||||||
*) echo "'$1' is not valid" ;;
|
*) echo "'$1' is not valid" ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -6,5 +6,5 @@ case "$action" in
|
||||||
shutdown) systemctl poweroff -i ;;
|
shutdown) systemctl poweroff -i ;;
|
||||||
reboot) systemctl reboot ;;
|
reboot) systemctl reboot ;;
|
||||||
logout) systemctl --user exit ;;
|
logout) systemctl --user exit ;;
|
||||||
autostart) autostart-manage start ;;
|
autostart) autostart-manage run ;;
|
||||||
*) ;; esac
|
*) ;; esac
|
||||||
|
|
14
.config/spotifyd/spotifyd.conf
Normal file
14
.config/spotifyd/spotifyd.conf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[global]
|
||||||
|
# Your Spotify account name.
|
||||||
|
username = "serguzim"
|
||||||
|
password_cmd = "pass spotifyd"
|
||||||
|
|
||||||
|
use_mpris = true
|
||||||
|
|
||||||
|
backend = "pulseaudio"
|
||||||
|
|
||||||
|
volume_controller = "softvol"
|
||||||
|
|
||||||
|
device_name = "portalo"
|
||||||
|
#device_type = "computer" # correct but no shared sessions
|
||||||
|
device_type = "speaker" # allows shared sessions
|
|
@ -21,7 +21,7 @@ _autostart()
|
||||||
pass x && sleep 5
|
pass x && sleep 5
|
||||||
|
|
||||||
autoinstall graphical
|
autoinstall graphical
|
||||||
autostart-manage start
|
autostart-manage run
|
||||||
}
|
}
|
||||||
|
|
||||||
_autostart &
|
_autostart &
|
||||||
|
|
Loading…
Reference in a new issue