✨ scripts(install, utils): update scripts for colorshell + remove personal dots
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
Config (
|
|
||||||
max_entries: 8,
|
|
||||||
desktop_actions: false,
|
|
||||||
terminal: Some(Terminal(
|
|
||||||
command: "kitty",
|
|
||||||
args: "-c {}"
|
|
||||||
))
|
|
||||||
)
|
|
||||||
@@ -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"
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Config (
|
|
||||||
prefix: "!",
|
|
||||||
shell: "/usr/bin/env bash",
|
|
||||||
)
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Config (
|
|
||||||
allow_invalid: false,
|
|
||||||
max_entries: 8
|
|
||||||
)
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
Config (
|
|
||||||
prefix: ":",
|
|
||||||
language_delimeter: ">",
|
|
||||||
max_entries: 3
|
|
||||||
)
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
Config (
|
|
||||||
prefix: "?",
|
|
||||||
engines: [
|
|
||||||
Google,
|
|
||||||
DuckDuckGo
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@@ -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!!"
|
|
||||||
@@ -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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+16
-29
@@ -4,22 +4,9 @@ source ./utils.sh
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
trap "printf \"\nOk, quitting beacuse you entered an exit signal. (SIGINT).\n\"; exit 1" SIGINT
|
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
|
trap "printf \"\nOh noo!! Some application just killed the script!\"; 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 {
|
|
||||||
|
|
||||||
|
function Apply_wallpapers() {
|
||||||
echo -n "Would you also like to apply the wallpapers folder? :3 [y/n] "
|
echo -n "Would you also like to apply the wallpapers folder? :3 [y/n] "
|
||||||
read answer
|
read answer
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@@ -44,24 +31,24 @@ for dir in ${config_dirs[@]}; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
#########
|
||||||
|
# Start #
|
||||||
|
#########
|
||||||
|
|
||||||
# Start of actual script
|
|
||||||
Print_header
|
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
|
# 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
|
read input
|
||||||
|
|
||||||
if [[ $input =~ "y" ]]; then
|
if [[ $input =~ "y" ]]; then
|
||||||
printf "\n"
|
Send_log "Starting installation...\n"
|
||||||
Backup_previous_dotfiles
|
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
Send_log "Starting installation\n"
|
|
||||||
|
|
||||||
for dir in ${config_dirs[@]}; do
|
for dir in ${config_dirs[@]}; do
|
||||||
dest=$XDG_CONFIG_HOME/$dir
|
dest=$XDG_CONFIG_HOME/$dir
|
||||||
@@ -71,13 +58,13 @@ if [[ $input =~ "y" ]]; then
|
|||||||
cp -rf ./$dir/* $dest
|
cp -rf ./$dir/* $dest
|
||||||
done
|
done
|
||||||
|
|
||||||
# Ask if user wants to apply repo's wallpapers dir
|
# Ask if user also wants to install default wallpapers
|
||||||
Apply_wallpapers
|
Apply_wallpapers
|
||||||
|
|
||||||
echo "Ah yes! Looks like it's ready to use, yay :3"
|
echo "Ah yes! Looks like it's installed, yay :3"
|
||||||
echo -e "If you find any issue, please report it in:
|
echo -e "If you find any issue, please report it in: https://github.com/retrozinndev/Hyprland-Dots/issues"
|
||||||
https://github.com/retrozinndev/Hyprland-Dots/issues"
|
echo "Thanks for using colorshell! I'm really appreciate that :D"
|
||||||
echo "Thanks for using my Hyprland-Dots! I'm really happy about that :3"
|
|
||||||
printf "\n"
|
printf "\n"
|
||||||
else
|
else
|
||||||
printf "Ok, doing as you said! Bye bye!\n"
|
printf "Ok, doing as you said! Bye bye!\n"
|
||||||
-122
@@ -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
|
|
||||||
@@ -17,9 +17,7 @@ config_dirs=(
|
|||||||
"hypr"
|
"hypr"
|
||||||
"ags"
|
"ags"
|
||||||
"kitty"
|
"kitty"
|
||||||
"anyrun"
|
|
||||||
"wal"
|
"wal"
|
||||||
"fastfetch"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# -------------
|
# -------------
|
||||||
@@ -61,8 +59,8 @@ function Send_log() {
|
|||||||
# -------------
|
# -------------
|
||||||
function Print_header() {
|
function Print_header() {
|
||||||
printf "\n"
|
printf "\n"
|
||||||
echo "######################################"
|
echo "#############################"
|
||||||
echo "## Retrozinndev's Hyprland Dotfiles ##"
|
echo "## Colorshell Installation ##"
|
||||||
echo "######################################"
|
echo "#############################"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user