Make mpd a global service
This commit is contained in:
parent
1f54326018
commit
a64296027d
@ -44,7 +44,7 @@ bspc rule -a scratch sticky=on state=floating focus=on
|
|||||||
# Set system vars for polybar
|
# Set system vars for polybar
|
||||||
. setsysvars
|
. setsysvars
|
||||||
|
|
||||||
# Terminate already running polybar, sxhkd, dunst, and mpd instances
|
# Terminate already running polybar, sxhkd, and dunst instances
|
||||||
processes=("polybar" "sxhkd" "dunst")
|
processes=("polybar" "sxhkd" "dunst")
|
||||||
|
|
||||||
for process in "${processes[@]}"; do
|
for process in "${processes[@]}"; do
|
||||||
|
19
setup.sh
19
setup.sh
@ -40,8 +40,8 @@ dependencies=(alacritty base-devel brightnessctl bspwm dunst feh git imagemagick
|
|||||||
libnotify libwebp lsd maim mpc mpd ncmpcpp neofetch neovim \
|
libnotify libwebp lsd maim mpc mpd ncmpcpp neofetch neovim \
|
||||||
pacman-contrib pamixer papirus-icon-theme physlock picom playerctl \
|
pacman-contrib pamixer papirus-icon-theme physlock picom playerctl \
|
||||||
polkit-gnome polybar ranger rofi sxhkd \
|
polkit-gnome polybar ranger rofi sxhkd \
|
||||||
ttf-inconsolata ttf-jetbrains-mono ttf-jetbrains-mono-nerd ttf-joypixels \
|
ttf-jetbrains-mono ttf-jetbrains-mono-nerd \
|
||||||
ttf-terminus-nerd ueberzug webp-pixbuf-loader xclip xdg-user-dirs xdo xdotool \
|
ueberzug webp-pixbuf-loader xclip xdg-user-dirs xdo xdotool \
|
||||||
xorg-xdpyinfo xorg-xkill xorg-xprop xorg-xrandr xorg-xsetroot xorg-xwininfo \
|
xorg-xdpyinfo xorg-xkill xorg-xprop xorg-xrandr xorg-xsetroot xorg-xwininfo \
|
||||||
zsh zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
|
zsh zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting)
|
||||||
|
|
||||||
@ -218,6 +218,9 @@ printf '%s%sInstalling Yay%s\n\n' "${CNC}" "${CRE}" "${CNC}"
|
|||||||
git clone https://aur.archlinux.org/yay.git
|
git clone https://aur.archlinux.org/yay.git
|
||||||
cd yay || exit
|
cd yay || exit
|
||||||
makepkg -si --noconfirm
|
makepkg -si --noconfirm
|
||||||
|
} && {
|
||||||
|
cd "$HOME" || exit
|
||||||
|
rm -rf yay
|
||||||
} || {
|
} || {
|
||||||
printf "\n%s%sFailed to install Yay.%s" "${BLD}" "${CRE}" "${CNC}"
|
printf "\n%s%sFailed to install Yay.%s" "${BLD}" "${CRE}" "${CNC}"
|
||||||
}
|
}
|
||||||
@ -265,17 +268,7 @@ clear
|
|||||||
########## --------- Enabling MPD service --------- ##########
|
########## --------- Enabling MPD service --------- ##########
|
||||||
|
|
||||||
printf '%s%sEnabling mpd service%s\n\n' "${CNC}" "${CRE}" "${CNC}"
|
printf '%s%sEnabling mpd service%s\n\n' "${CNC}" "${CRE}" "${CNC}"
|
||||||
|
systemctl enable --now mpd.service
|
||||||
# Checking if the mpd service is enabled globally
|
|
||||||
if systemctl is-enabled --quiet mpd.service; then
|
|
||||||
printf "\n%s%sDisabling and stopping the global mpd service%s\n" "${BLD}" "${CBL}" "${CNC}"
|
|
||||||
sudo systemctl stop mpd.service
|
|
||||||
sudo systemctl disable mpd.service
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n%s%sEnabling and starting the user-level mpd service%s\n" "${BLD}" "${CYE}" "${CNC}"
|
|
||||||
systemctl --user enable --now mpd.service
|
|
||||||
|
|
||||||
printf "%s%sDone!!%s\n\n" "${BLD}" "${CGR}" "${CNC}"
|
printf "%s%sDone!!%s\n\n" "${BLD}" "${CGR}" "${CNC}"
|
||||||
sleep 2
|
sleep 2
|
||||||
clear
|
clear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user