From 22fcf60a2caa14584730dcd3f5ef991a758c02ac Mon Sep 17 00:00:00 2001 From: retrozinndev Date: Tue, 13 May 2025 21:40:25 -0300 Subject: [PATCH] :sparkles: scripts(install, utils): update scripts for colorshell + remove personal dots --- anyrun/applications.ron | 8 --- anyrun/config.ron | 21 ------- anyrun/shell.ron | 4 -- anyrun/stdin.ron | 4 -- anyrun/style.css | 73 ------------------------ anyrun/translate.ron | 5 -- anyrun/websearch.ron | 7 --- backup-dots.sh | 44 --------------- fastfetch/config.jsonc | 67 ---------------------- apply.sh => install.sh | 45 ++++++--------- update-repo.sh | 122 ---------------------------------------- utils.sh | 8 +-- 12 files changed, 19 insertions(+), 389 deletions(-) delete mode 100644 anyrun/applications.ron delete mode 100644 anyrun/config.ron delete mode 100644 anyrun/shell.ron delete mode 100644 anyrun/stdin.ron delete mode 100644 anyrun/style.css delete mode 100644 anyrun/translate.ron delete mode 100644 anyrun/websearch.ron delete mode 100644 backup-dots.sh delete mode 100644 fastfetch/config.jsonc rename apply.sh => install.sh (54%) delete mode 100644 update-repo.sh diff --git a/anyrun/applications.ron b/anyrun/applications.ron deleted file mode 100644 index b5f8e75..0000000 --- a/anyrun/applications.ron +++ /dev/null @@ -1,8 +0,0 @@ -Config ( - max_entries: 8, - desktop_actions: false, - terminal: Some(Terminal( - command: "kitty", - args: "-c {}" - )) -) diff --git a/anyrun/config.ron b/anyrun/config.ron deleted file mode 100644 index d260782..0000000 --- a/anyrun/config.ron +++ /dev/null @@ -1,21 +0,0 @@ -Config ( - x: Fraction(0.5), - y: Fraction(0.2), - width: Fraction(0.4), - height: Absolute(100), - hide_icons: false, - ignore_exclusive_zones: false, - layer: Overlay, - show_results_immediately: true, - max_entries: Some(100), - close_on_click: true, - hide_plugin_info: true, - - plugins: [ - "libapplications.so", - "libshell.so", - "libwebsearch.so", - "libtranslate.so", - "librink.so" - ] -) diff --git a/anyrun/shell.ron b/anyrun/shell.ron deleted file mode 100644 index e6dfbc8..0000000 --- a/anyrun/shell.ron +++ /dev/null @@ -1,4 +0,0 @@ -Config ( - prefix: "!", - shell: "/usr/bin/env bash", -) diff --git a/anyrun/stdin.ron b/anyrun/stdin.ron deleted file mode 100644 index 6855c75..0000000 --- a/anyrun/stdin.ron +++ /dev/null @@ -1,4 +0,0 @@ -Config ( - allow_invalid: false, - max_entries: 8 -) diff --git a/anyrun/style.css b/anyrun/style.css deleted file mode 100644 index c11b1e7..0000000 --- a/anyrun/style.css +++ /dev/null @@ -1,73 +0,0 @@ - -@import "../../.cache/wal/colors-anyrun.css"; - -* { - border: none; - box-shadow: none; - outline: none; - color: @foreground; -} - -*:hover { - background: none; -} - -window { - background: transparent; -} - -box#main { - background: @background; - border-radius: 16px; - box-shadow: 0 16px 22px 2px black; - padding: 0; - border: .5px solid @color1; -} - -entry { - padding: 6px; - background: @background; - border-radius: 16px; - margin: 8px; -} - -entry:focus, entry:active { - box-shadow: inset 0 0 0 2px @color2, - 0 4px 4px 1px alpha(@color2, 0.2); -} - -entry:hover { - background: lightgray; -} - -list { - border-bottom-right-radius: 16px; - border-bottom-left-radius: 16px; - background: @background; -} - -list > #match { - font-weight: 600; - border-radius: 14px; - padding: 7px; - margin: 0 6px; - color: @foreground; -} - -list > #match:hover { - transition: 120ms linear; - background: shade(@color2, .8); -} - -list > #match:selected, -list > #match:active { - background: @color1; -} - -list > #match { - margin-bottom: 1px; -} - -list > #match:last-child { - margin-bottom: 6px; -} diff --git a/anyrun/translate.ron b/anyrun/translate.ron deleted file mode 100644 index 0384ab8..0000000 --- a/anyrun/translate.ron +++ /dev/null @@ -1,5 +0,0 @@ -Config ( - prefix: ":", - language_delimeter: ">", - max_entries: 3 -) diff --git a/anyrun/websearch.ron b/anyrun/websearch.ron deleted file mode 100644 index 34604da..0000000 --- a/anyrun/websearch.ron +++ /dev/null @@ -1,7 +0,0 @@ -Config ( - prefix: "?", - engines: [ - Google, - DuckDuckGo - ] -) diff --git a/backup-dots.sh b/backup-dots.sh deleted file mode 100644 index fe13e01..0000000 --- a/backup-dots.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# This script backups current configuration dirs -# listed in utils.sh script. -# -------- -# Made by retrozinndev (João Dias) -# Licensed under the MIT License -# From: https://github.com/retrozinndev/Hyprland-Dots - -source ./utils.sh - - -bkp_dir="$HOME/hyprland-dots-bkp" - -Send_log "Creating backup in $bkp_dir" - -if [[ -d $bkp_dir ]] -then - Send_log "Found existing backup in $bkp_dir!" - echo "Looks like the backup directory already exists!" - echo -n "Would you like to move it to trash/override it? [y/n] " - read answer - - if [[ $answer =~ "y" ]]; then - echo "Fine! Previous backup is goning to be moved to trash" - trash-put $bkp_dir - else - echo "Ok! Quitting doing backup because it already exists" - exit 1 - fi -fi - -# Make backup of existing configurations -for dir in ${config_dirs[@]}; do - if [[ -d "$CONFIG_DIR/$dir" ]] - then - echo "-> backuping $dir" - cp -r "$CONFIG_DIR/$dir" $DOTFILES_BACKUP_DIR - else - echo "[info] $dir backup was skipped, because it wasn't found." - fi -done - -echo "Finished backup!!" diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc deleted file mode 100644 index 8dc29b1..0000000 --- a/fastfetch/config.jsonc +++ /dev/null @@ -1,67 +0,0 @@ -{ - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "padding": { - "top": 3, - "bottom": 3, - "left": 1 - }, - "type": "small", - "width": 32 - }, - "display": { - "separator": " " - }, - "general": {}, - "modules": [ - "title", - "separator", - { - "type": "command", - "key": "󰌽 ", - "shell": "/bin/sh", - "param": "-c", - "text": "sh -c '. /etc/os-release; echo \"$PRETTY_NAME $(uname -r)\"'", - "format": "{1}" - }, - { - "type": "uptime", - "key": " " - }, - { - "type": "packages", - "key": " " - }, - { - "type": "shell", - "key": " " - }, - { - "type": "wm", - "key": " " - }, - { - "type": "terminal", - "key": " " - }, - { - "type": "cpu", - "key": " " - }, - { - "type": "gpu", - "key": "󰹑 " - }, - { - "type": "memory", - "key": " " - }, - { - "type": "disk", - "key": " " - }, - "battery", - "break", - "colors" - ] -} diff --git a/apply.sh b/install.sh similarity index 54% rename from apply.sh rename to install.sh index dddd2c1..f4ef98b 100755 --- a/apply.sh +++ b/install.sh @@ -4,22 +4,9 @@ source ./utils.sh set -e trap "printf \"\nOk, quitting beacuse you entered an exit signal. (SIGINT).\n\"; exit 1" SIGINT -trap "printf \"\nOh noo!! Some application just told the script to end!\"; exit 2" SIGTERM - -function Backup_previous_dotfiles { - echo -n "Would you like to make a backup of the current dotfiles? [y/n] " - read answer - printf "\n" - if [[ $answer =~ "y" ]] - then - . ./backup-dots.sh - else - echo "Ok! Directories will be overwritten, skipping backup :3" - fi -} - -function Apply_wallpapers { +trap "printf \"\nOh noo!! Some application just killed the script!\"; exit 2" SIGTERM +function Apply_wallpapers() { echo -n "Would you also like to apply the wallpapers folder? :3 [y/n] " read answer printf "\n" @@ -44,24 +31,24 @@ for dir in ${config_dirs[@]}; do fi done +######### +# Start # +######### -# Start of actual script Print_header +echo -e "colorshell is a project made by retrozinndev. source: https://github.com/retrozinndev/colorshell\n" +sleep .5 -echo "Welcome to my dotfiles installation script!" +echo "Welcome to the colorshell installation script!" # Warn user of possible problems that can happen -echo "!!!WARNING!!! Running this may cause issues to your system if you don't know what you're doing! When continuing, you agree that any problem that may happen with the system is of your responsability!" +echo "!!!WARNING!!! By running this script, you assume total responsability for any issues that may occur" -echo -n "Do you want to run the retrozinndev/Hyprland-Dots installer? [y/n] " +echo -n "Do you want to start the shell installation? [y/n] " read input if [[ $input =~ "y" ]]; then - printf "\n" - Backup_previous_dotfiles - printf "\n" - - Send_log "Starting installation\n" + Send_log "Starting installation...\n" for dir in ${config_dirs[@]}; do dest=$XDG_CONFIG_HOME/$dir @@ -71,13 +58,13 @@ if [[ $input =~ "y" ]]; then cp -rf ./$dir/* $dest done - # Ask if user wants to apply repo's wallpapers dir + # Ask if user also wants to install default wallpapers Apply_wallpapers - echo "Ah yes! Looks like it's ready to use, yay :3" - echo -e "If you find any issue, please report it in: - https://github.com/retrozinndev/Hyprland-Dots/issues" - echo "Thanks for using my Hyprland-Dots! I'm really happy about that :3" + echo "Ah yes! Looks like it's installed, yay :3" + echo -e "If you find any issue, please report it in: https://github.com/retrozinndev/Hyprland-Dots/issues" + echo "Thanks for using colorshell! I'm really appreciate that :D" + printf "\n" else printf "Ok, doing as you said! Bye bye!\n" diff --git a/update-repo.sh b/update-repo.sh deleted file mode 100644 index a3a4baa..0000000 --- a/update-repo.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/bash - -source ./utils.sh - -Check_current_dir() { - if ! [[ -f ./utils.sh ]]; then - Send_log warn "Looks like you're not in the repository directory!\nPlease run this script from the repo to avoid problems." - Send_log "Exiting" - sleep .5 - exit 1 - fi -} - -Clean_local() { - Send_log "info" "Cleaning current repo dotfiles..." - for dir in ${config_dirs[@]}; do - if [[ -d "./$dir" ]]; then - rm -rf ./$dir - fi - done - - Send_log "info" "Cleaning wallpapers..." - rm -rf ./wallpapers - - echo "Done cleaning." -} - -Update_local() { - for dir in ${config_dirs[@]}; do - if [[ -d "$XDG_CONFIG_HOME/$dir" ]]; then - Send_log "Copying ${dir^}" - cp -r $XDG_CONFIG_HOME/$dir ./$dir - else - Send_log "warn" "Looks like the ~/.config/$dir dir is in fault! Skipping it..." - fi - done - - if [[ -d "$HOME/wallpapers" ]]; then - Send_log "Copying wallpapers" - mkdir -p ./wallpapers - cp -rf $HOME/wallpapers/* ./wallpapers - else - Send_log warn "Wallpapers dir could not be found in $HOME, skipping..." - fi - - printf "\nDone updating local repo!\n" -} - -Update_remote() { - echo "Git status:" - git status - echo "Please type one of the dotfiles you want to push now(only one dir):" - ls --color=auto -d -- */ - printf "Directory: " - read chosen_dir - if [[ -d $chosen_dir ]]; then - git add $chosen_dir - echo -n "Would you like to add more dirs to queue? [y/n] " - read add_more_dirs - if [[ $add_more_dirs =~ y ]]; then - Update_remote - else - echo "Fine then! What will be the commit message? (You can use emojis by typing its name between colons, e.g.: ´:tada:´)" - read commit_message - echo "Committing your changes..." - git commit -m "$commit_message" - echo -n "Done! Do you want to push changes now? If not, you'll be redirected to pre-commit process. [y/n] " - read push_changes - if [[ $push_changes =~ y ]]; then - git push - echo "Done pushing!!" - else - Update_remote - fi - fi - else - echo "Looks like this directory does not exist! Try taking a look at the dir list." - Update_remote - fi - - -} - -Check_current_dir - -Print_header - -printf "\n" -echo "!!WARNING!! Running this script may override all data in current repo with host configurations." -echo "This script is intended to be used only by retrozinndev/Hyprland-Dots repo owner" -printf "\n" - -echo "Please run this script in it's current directory to avoid problems." -echo "Tip: Press Ctrl + C to stop script at any time" - -printf "\n" - -echo -n "Do you want to update local repository with host configurations? [y/n] " -read answer -if ! [[ $answer =~ y ]]; then - Send_log "Exiting" - exit 1 -fi - -printf "\n" - -Clean_local -Update_local - -echo -n "Would you like to commit to remote? (You will be prompted for each directory and commit messages) [y/n] " -read answer - -if [[ $answer =~ y ]]; then - Update_remote - echo "Looks like it's done! Have a great day!" -else - echo "Ok, work's finished here! Have a great day!" -fi - -env git status - -exit 0 diff --git a/utils.sh b/utils.sh index 3652389..f77a7c8 100644 --- a/utils.sh +++ b/utils.sh @@ -17,9 +17,7 @@ config_dirs=( "hypr" "ags" "kitty" - "anyrun" "wal" - "fastfetch" ) # ------------- @@ -61,8 +59,8 @@ function Send_log() { # ------------- function Print_header() { printf "\n" - echo "######################################" - echo "## Retrozinndev's Hyprland Dotfiles ##" - echo "######################################" + echo "#############################" + echo "## Colorshell Installation ##" + echo "#############################" printf "\n" }