0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 14:12:59 +03:00
yandex-music-linux/templates/yandex-music.sh

30 lines
742 B
Bash
Raw Permalink Normal View History

2024-03-12 22:20:14 +03:00
#!/bin/bash
set -e
CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
CONFIG_FILE="${YANDEX_MUSIC_CONFIG:-$CONFIG_HOME/yandex-music.conf}"
echo "Using config file: ${CONFIG_FILE}"
if [ ! -f "$CONFIG_FILE" ]; then
echo "Config file not found, copying default"
mkdir -p "$(dirname "$CONFIG_FILE")"
cp /usr/lib/yandex-music/default.conf "$CONFIG_FILE"
fi
source "$CONFIG_FILE"
WAYLAND_FLAGS=""
if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
2024-10-03 19:35:48 +03:00
WAYLAND_FLAGS="--ozone-platform=wayland"
2024-03-12 22:20:14 +03:00
fi
2024-03-14 14:44:52 +03:00
ELECTRON_BIN=${ELECTRON_CUSTOM_BIN:-%electron_path%}
2024-03-12 22:20:14 +03:00
2024-04-24 20:38:22 +03:00
export TRAY_ENABLED=${TRAY_ENABLED:-0}
2024-08-05 00:04:05 +03:00
export DEV_TOOLS=${DEV_TOOLS:-0}
2024-10-03 19:35:48 +03:00
export CUSTOM_TITLE_BAR=${CUSTOM_TITLE_BAR:-0}
2024-04-24 20:38:22 +03:00
exec "${ELECTRON_BIN}" "%asar_path%" $ELECTRON_ARGS $WAYLAND_FLAGS