Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh: added DEBUGMODE "auto" which installs and applies the KDE theme without user interaction #68

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
1. `git clone --depth=1 https://github.com/catppuccin/kde catppuccin-kde && cd catppuccin-kde`
2. Run the install script using `./install.sh` and follow the instructions.

#### Automated Installation
You can install the KDE theme without interactions by calling the script with the following arguments:

`./install.sh flavour accent window_decoration_mode auto`

Example:
`./install.sh Mocha Blue Classic auto`

### For Krita:
1. Download the colour-scheme zip file for your preffered flavour from the [release](https://github.com/catppuccin/kde/releases/) tab.
2. Extract the file and move the theme(s) you wish to install into the following folders for your platform:
Expand Down
40 changes: 30 additions & 10 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ ACCENT="$2"
WINDECSTYLE="$3"
DEBUGMODE="$4"

clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi

if [ -z "$1" ]; then
cat <<EOF
Expand All @@ -45,7 +47,9 @@ Choose flavor out of -
(Type the number corresponding to said palette)
EOF
read -r FLAVOUR
clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
fi

case "$FLAVOUR" in
Expand Down Expand Up @@ -80,7 +84,9 @@ Choose an accent -
14. Lavender
EOF
read -r ACCENT
clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
fi

# Sets accent based on the palette selected (Best to fold this in your respective editor)
Expand Down Expand Up @@ -229,7 +235,9 @@ Choose window decoration style -
2. Classic (MacOS like)
EOF
read -r WINDECSTYLE
clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
fi

WINDECSTYLENAME=""
Expand Down Expand Up @@ -399,8 +407,16 @@ case "$DEBUGMODE" in
echo
echo "Install $FLAVOURNAME $ACCENTNAME? with the $WINDECSTYLENAME window Decorations? [y/N]:"
read -r CONFIRMATION
clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
;;
-y)
CONFIRMATION=Y
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
;;
aurorae)
InstallAuroraeTheme
exit
Expand Down Expand Up @@ -443,14 +459,18 @@ if [ "$CONFIRMATION" = "Y" ] || [ "$CONFIRMATION" = "y" ]; then
echo "Cleaning up.."
rm -r ./dist

# Apply theme
echo
echo "Do you want to apply theme? [y/N]:"
read -r CONFIRMATION
if [ "$DEBUGMODE" != "-y" ]; then
# Apply theme
echo
echo "Do you want to apply theme? [y/N]:"
read -r CONFIRMATION
fi

if [ "$CONFIRMATION" = "Y" ] || [ "$CONFIRMATION" = "y" ]; then
lookandfeeltool -a "$GLOBALTHEMENAME"
clear
if [ "$DEBUGMODE" != "-y" ]; then
clear
fi
# Some legacy apps still look in ~/.icons
cat <<EOF
The cursors will fully apply once you log out
Expand Down