mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
Added installation script for materialyoucolor-python
This commit is contained in:
@@ -199,11 +199,9 @@ const CoverArt = ({ player, ...rest }) => {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`${lightDark}`);
|
||||
console.log(`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}`);
|
||||
// Generate colors
|
||||
execAsync(['bash', '-c',
|
||||
`source /home/avi/virtualenvs/my_project_venv/bin/activate; ${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode '${colorMode}' > ${App.configDir}/scss/_musicmaterial.scss`])
|
||||
`${App.configDir}/scripts/color_generation/generate_colors_material.py --path '${coverPath}' --mode '${colorMode}' > ${App.configDir}/scss/_musicmaterial.scss`])
|
||||
.then(() => {
|
||||
exec(`wal -i "${player.coverPath}" -n -t -s -e -q ${lightDark}`)
|
||||
exec(`cp ${GLib.get_user_cache_dir()}/wal/colors.scss ${App.configDir}/scss/_musicwal.scss`);
|
||||
|
||||
@@ -27,17 +27,13 @@ fi
|
||||
|
||||
cd "$HOME/.config/ags/scripts/" || exit
|
||||
if [[ "$1" = "#"* ]]; then # this is a color
|
||||
source ${HOME}/virtualenvs/my_project_venv/bin/activate
|
||||
color_generation/generate_colors_material.py --color "$1" --mode "$lightdark" --scheme "$materialscheme" --transparency "$transparency" > "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
deactivate
|
||||
if [ "$2" = "--apply" ]; then
|
||||
cp "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME/.config/ags/scss/_material.scss"
|
||||
color_generation/applycolor.sh
|
||||
fi
|
||||
elif [ "$backend" = "material" ]; then
|
||||
source ${HOME}/virtualenvs/my_project_venv/bin/activate
|
||||
color_generation/generate_colors_material.py --path "$1" --mode "$lightdark" --scheme "$materialscheme" --transparency "$transparency" > "$HOME"/.cache/ags/user/generated/material_colors.scss
|
||||
deactivate
|
||||
if [ "$2" = "--apply" ]; then
|
||||
cp "$HOME"/.cache/ags/user/generated/material_colors.scss "$HOME/.config/ags/scss/_material.scss"
|
||||
color_generation/applycolor.sh
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/opt/materialyoucolor/bin/python3
|
||||
from material_color_utilities_python import *
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
@@ -137,6 +137,13 @@ else ask_MicroTeX=true
|
||||
fi
|
||||
if $ask_MicroTeX;then showfun install-MicroTeX;v install-MicroTeX;fi
|
||||
|
||||
if $(test -d /opt/materialyoucolor); then
|
||||
echo -e "\e[33m[$0]: Program \"MatertialYouColor-python\" already exists, no need to install.\e[0m"
|
||||
echo -e "\e[34mYou can reinstall it in order to update to the latest version anyway.\e[0m"
|
||||
ask_MaterialYouColor=$ask
|
||||
else ask_MaterialYouColor=true
|
||||
fi
|
||||
showfun install-materialyoucolors;v install-materialyoucolors;
|
||||
#####################################################################################
|
||||
printf "\e[36m[$0]: 3. Copying\e[97m\n"
|
||||
|
||||
|
||||
@@ -101,3 +101,10 @@ install-MicroTeX (){
|
||||
x sudo cp ./LaTeX /usr/local/bin/
|
||||
x cd $base
|
||||
}
|
||||
|
||||
install-materialyoucolors () {
|
||||
x sudo python -m venv /opt/materialyoucolor
|
||||
x source /opt/materialyoucolor/bin/activate
|
||||
x sudo pip install material-color-utilities-python materialyoucolor
|
||||
x deactivate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user