Compare commits
4 commits
077da0dad0
...
6444dc65c1
Author | SHA1 | Date | |
---|---|---|---|
6444dc65c1 | |||
973af06df4 | |||
73fe92e0c3 | |||
208f1d6a4b |
4 changed files with 42 additions and 16 deletions
|
@ -3,4 +3,4 @@
|
|||
NC_DIR="$HOME/Nextcloud"
|
||||
NC_URL="https://cloud.criminallycute.fi"
|
||||
|
||||
nextcloudcmd -u $NC_USER -p $NC_PASS $NC_DIR $NC_URL
|
||||
nextcloudcmd -s -u $NC_USER -p $NC_PASS $NC_DIR $NC_URL
|
||||
|
|
|
@ -1,23 +1,55 @@
|
|||
#!/bin/sh
|
||||
arRPCdir="$HOME/.local/share/vesktop/arrpc"
|
||||
# check if arRPC is installed and autoinstall if necessary
|
||||
arRPCdir="$HOME/src/arRPC"
|
||||
Vesktopdir="$HOME/src/Vesktop"
|
||||
|
||||
install_arRPC () {
|
||||
echo "Installing arRPC"
|
||||
git clone https://github.com/OpenAsar/arRPC "$arRPCdir"
|
||||
cd "$arRPCdir" && npm install
|
||||
echo "arRPC installed"
|
||||
}
|
||||
|
||||
install_vesktop () {
|
||||
echo "Installing Vesktop"
|
||||
export COREPACK_ENABLE_STRICT=0
|
||||
git clone https://github.com/Vencord/Vesktop $Vesktopdir
|
||||
cd $Vesktopdir
|
||||
pnpm i
|
||||
echo "Vesktop installed"
|
||||
}
|
||||
|
||||
run_arRPC () {
|
||||
# skip if already running
|
||||
if [ $(pgrep -f 'node src') ]; then return; fi
|
||||
echo "Starting arRPC"
|
||||
cd "$arRPCdir"
|
||||
node src &
|
||||
}
|
||||
|
||||
run_vesktop () {
|
||||
echo "Starting Vesktop"
|
||||
if [ ! -d $HOME/src/Vesktop ]; then install_vesktop; fi
|
||||
cd $HOME/src/Vesktop/dist/linux-unpacked
|
||||
./vesktop \
|
||||
--enable-features=UseOzonePlatform,WaylandWindowDecorations \
|
||||
--ozone-platform-hint=auto
|
||||
}
|
||||
|
||||
if [ ! -d "$arRPCdir" ]; then
|
||||
install_arRPC
|
||||
fi
|
||||
|
||||
# start arRPC
|
||||
cd "$arRPCdir" && node src &
|
||||
run_arRPC
|
||||
arRPCPID=$(pgrep -f 'node src')
|
||||
|
||||
# start Vesktop
|
||||
$HOME/.local/share/vesktop/vesktop --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto
|
||||
run_vesktop
|
||||
|
||||
echo "Killing arRPC"
|
||||
# exit arRPC when Vesktop closes
|
||||
pkill -9 $arRPCPID
|
||||
|
||||
echo "Trying to kill $arRPCPID"
|
||||
killall node -n $arRPCPID
|
||||
if [ ! $(pgrep -f 'node src' ) ]; then
|
||||
echo "arRPC killed"
|
||||
else
|
||||
echo "arRPC could not be killed"
|
||||
fi
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
emerge --search "$1" --fuzzy-search n \
|
||||
| grep "Description" \
|
||||
| head -1 \
|
||||
| cut -d":" -f2 \
|
||||
| awk '{$1=$1;print}'
|
|
@ -12,7 +12,7 @@ artist=$(echo "$data" | jq '.artist_name' | tr -d '"')
|
|||
track=$(echo "$data" | jq '.track_name' | tr -d '"')
|
||||
|
||||
if [[ "$artist" != "null" ]]; then
|
||||
echo "$artist" - "$track"
|
||||
echo "Currently playing: $artist" - "$track"
|
||||
else
|
||||
echo "Not listening to anything right now."
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue