From 8a157ec7a7fa4e9e9c29b02697c9aefa5ed4904e Mon Sep 17 00:00:00 2001 From: Andrey Zimin Date: Wed, 21 Feb 2024 12:55:18 +0300 Subject: [PATCH] initial commit --- PKGBUILD | 27 +++++ makepkg.sh | 59 ++++++++++ misc/.Xresources | 3 + misc/.Xresources.d/colors | 93 +++++++++++++++ misc/.Xresources.d/fonts | 4 + misc/.Xresources.d/rxvt-unicode | 40 +++++++ misc/.dmrc | 3 + misc/.face | Bin 0 -> 8416 bytes misc/.gtkrc-2.0 | 19 ++++ misc/.hushlogin | 0 misc/.p10k.zsh | 193 ++++++++++++++++++++++++++++++++ misc/.zshrc | 121 ++++++++++++++++++++ tarch-misc.install | 92 +++++++++++++++ 13 files changed, 654 insertions(+) create mode 100755 PKGBUILD create mode 100755 makepkg.sh create mode 100644 misc/.Xresources create mode 100644 misc/.Xresources.d/colors create mode 100644 misc/.Xresources.d/fonts create mode 100644 misc/.Xresources.d/rxvt-unicode create mode 100644 misc/.dmrc create mode 100644 misc/.face create mode 100644 misc/.gtkrc-2.0 create mode 100644 misc/.hushlogin create mode 100644 misc/.p10k.zsh create mode 100644 misc/.zshrc create mode 100644 tarch-misc.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 0000000..00f4128 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,27 @@ +pkgname=tarch-misc +pkgver=1.0 +pkgrel=1 +pkgdesc="Home config file for Tarch OS" +arch=('any') +url="https://gitcast.ru/tarch_os/tarch-misc.git" +license=('GPL3') +install=${pkgname}.install + +prepare() { + cp -af ../misc/. ${srcdir} +} + +package() { + local SKEL_DIR=${pkgdir}/etc/skel + mkdir -p ${SKEL_DIR} + + cp -r ${srcdir}/.Xresources.d ${SKEL_DIR} + + install -Dm 644 ${srcdir}/.dmrc ${SKEL_DIR}/.dmrc + install -Dm 644 ${srcdir}/.face ${SKEL_DIR}/.face + install -Dm 644 ${srcdir}/.gtkrc-2.0 ${SKEL_DIR}/.gtkrc-2.0 + install -Dm 644 ${srcdir}/.hushlogin ${SKEL_DIR}/.hushlogin + install -Dm 644 ${srcdir}/.p10k.zsh ${SKEL_DIR}/.p10k.zsh + install -Dm 644 ${srcdir}/.Xresources ${SKEL_DIR}/.Xresources + install -Dm 644 ${srcdir}/.zshrc ${SKEL_DIR}/.zshrc +} diff --git a/makepkg.sh b/makepkg.sh new file mode 100755 index 0000000..4c0b4e4 --- /dev/null +++ b/makepkg.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +source "$HOME/bin/scripts/system/style" + +BUILDING_DIR="build" + +# Script Termination # +exit_on_signal_SIGINT () { + { printf "\n\n%s\n" "Script interrupted." 2>&1; echo; } + exit 0 +} + +exit_on_signal_SIGTERM () { + { printf "\n\n%s\n" "Script terminated." 2>&1; echo; } + exit 0 +} + +# Этот скрипт устанавливает ловушку (trap) для сигнала SIGINT и SIGTERM. +# Когда скрипт получает сигнал SIGINT (например, когда пользователь нажимает Ctrl+C), он будет вызывать функцию +trap exit_on_signal_SIGINT SIGINT +trap exit_on_signal_SIGTERM SIGTERM + +CLEANINH_BUILDING_DIR (){ + cd .. + rm -rf ${BUILDING_DIR} + sleep 0.5 +} + +BUILD_PKG () { + echo -e "\n ${BOLD}${GREEN}[+] создаем дирректорию сборки... ${RESET_COLOR}" + mkdir -p ${BUILDING_DIR} + sleep 0.5 + + echo -e "\n ${CYAN} ==> копируем файлы в дирректорию сборки... ${RESET_COLOR}" + cp -r `ls | grep -v '^build$'` ${BUILDING_DIR} + sleep 0.5 + + echo -e "\n ${CYAN} ==> копируем файлы в дирректорию сборки... ${RESET_COLOR}" + cd ${BUILDING_DIR} + sleep 0.5 + + # Building # + echo -e "\n ${CYAN}[+] собираем пакет... ${RESET_COLOR}" + makepkg -s -f + sleep 0.5 + + if ls *.pkg.tar.zst 1> /dev/null 2>&1; then + echo -e "\n ${CYAN}[+] переносим пакеты и очищаем дирректорию... ${RESET_COLOR}" + mv ./*.pkg.tar.zst ../../tarch-bin/x86_64/ + sleep 0.5 + CLEANINH_BUILDING_DIR + echo -e "\n ${BOLD}${GREEN}[✔] завершено... ${RESET_COLOR}" + else + echo -e "\n ${BOLD}${RED}[✘] сборка не удалась... ${RESET_COLOR}" + fi + echo -e "\n" +} + +BUILD_PKG diff --git a/misc/.Xresources b/misc/.Xresources new file mode 100644 index 0000000..8f1c028 --- /dev/null +++ b/misc/.Xresources @@ -0,0 +1,3 @@ +#include ".Xresources.d/colors" +#include ".Xresources.d/fonts" +#include ".Xresources.d/rxvt-unicode" diff --git a/misc/.Xresources.d/colors b/misc/.Xresources.d/colors new file mode 100644 index 0000000..12bed99 --- /dev/null +++ b/misc/.Xresources.d/colors @@ -0,0 +1,93 @@ + +*background: #1E222A +*foreground: #ABB2BF + +*color0: #4d5361 +*color8: #4d5361 + +*color1: #E06C75 +*color9: #E06C75 + +*color2: #98C379 +*color10: #98C379 + +*color3: #E5C07B +*color11: #E5C07B + +*color4: #61AFEF +*color12: #61AFEF + +*color5: #C678DD +*color13: #C678DD + +*color6: #56B6C2 +*color14: #56B6C2 + +*color7: #ABB2BF +*color15: #ABB2BF + + +/* + +*background: #101419 +*foreground: #b6beca + +*color0: #384148 +*color8: #1c252c + +*color1: #fc7b81 +*color9: #e05f65 + +*color2: #94f7c5 +*color10: #78dba9 + +*color3: #ffeba6 +*color11: #f1cf8a + +*color4: #8cc1ff +*color12: #70a5eb + +*color5: #e2a6ff +*color13: #c68aee + +*color6: #90daff +*color14: #74bee9 + +*color7: #fafdff +*color15: #dee1e6 + +*/ + + +/* EFO */ + +/* + +*background: #1E222A +*foreground: #ABB2BF + +*color0: #282C34 +*color8: #16181c + +*color1: #E06C75 +*color9: #853a40 + +*color2: #98C379 +*color10: #3f592d + +*color3: #E5C07B +*color11: #78643e + +*color4: #61AFEF +*color12: #3b6c94 + +*color5: #C678DD +*color13: #5f376b + +*color6: #56B6C2 +*color14: #2d646b + +*color7: #ABB2BF +*color15: #70757d + +*/ diff --git a/misc/.Xresources.d/fonts b/misc/.Xresources.d/fonts new file mode 100644 index 0000000..e5ad017 --- /dev/null +++ b/misc/.Xresources.d/fonts @@ -0,0 +1,4 @@ +URxvt.font: xft:Terminus:regular:size=8 +URxvt.boldFont: xft:Terminus:bold:size=8 +URxvt.italicFont: xft:Terminus:italic:size=8 +URxvt.boldItalicfont: xft:Terminus:boldItalic:size=8 diff --git a/misc/.Xresources.d/rxvt-unicode b/misc/.Xresources.d/rxvt-unicode new file mode 100644 index 0000000..2ed5c06 --- /dev/null +++ b/misc/.Xresources.d/rxvt-unicode @@ -0,0 +1,40 @@ +! font spacing +URxvt*letterSpace: 1 +URxvt.lineSpace: 1 + +! general settings +URxvt*saveline: 15000 +URxvt*termName: rxvt-256color +URxvt*iso14755: false +URxvt*urgentOnBell: true + +! appearance +URxvt*depth: 24 +URxvt*scrollBar: false +URxvt*scrollBar_right: false +URxvt*internalBorder: 16 +URxvt*externalBorder: 0 +URxvt.geometry: 85x25 + +! scroll one line +URxvt.keysym.Shift-Up: command:\033]720;1\007 +URxvt.keysym.Shift-Down: command:\033]721;1\007 + +! control arrow +URxvt.keysym.Control-Up: \033[1;5A +URxvt.keysym.Control-Down: \033[1;5B +URxvt.keysym.Control-Right: \033[1;5C +URxvt.keysym.Control-Left: \033[1;5D + +! ------------------------------------------------------------------------------ +! Xft Font Configuration +! ------------------------------------------------------------------------------ + +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintslight +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +Xcursor.size: 10 diff --git a/misc/.dmrc b/misc/.dmrc new file mode 100644 index 0000000..2b64b74 --- /dev/null +++ b/misc/.dmrc @@ -0,0 +1,3 @@ +# Set Default Session # +[Desktop] +Session=bspwm diff --git a/misc/.face b/misc/.face new file mode 100644 index 0000000000000000000000000000000000000000..e4dc6a8f97c5a0c43c531c0ad428504285893c44 GIT binary patch literal 8416 zcmX9^2Q*yY*NqxI$QYydGWr-q7sKd89YKg*gUE;|L86W^IzjX{h~7oC=s}1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N2C zu= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + # Prompt colors. + local grey='242' + local red='#FF5C57' + local yellow='#F3F99D' + local blue='#57C7FF' + local magenta='#FF6AC1' + local cyan='#9AEDFE' + local white='#F1F1F0' + + # Left prompt segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # context # user@host + dir # current directory + vcs # git status + # command_execution_time # previous command duration + # virtualenv # python virtual environment + prompt_char # prompt symbol + ) + + # Right prompt segments. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + command_execution_time # previous command duration + virtualenv # python virtual environment + context # user@host + # time # current time + ) + + # Basic style options that define the overall prompt look. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons + + # Add an empty line before each prompt except the first. This doesn't emulate the bug + # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Magenta prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=$red + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮' + # Prompt symbol in overwrite vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false + + # Grey Python Virtual Environment. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey + # Don't show Python version. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + + # Blue current directory. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue + + # Context format when root: user@host. The first part white, the rest grey. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f" + # Context format when not root: user@host. The whole thing grey. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f" + # Don't show context unless root or in SSH. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION= + + # Show previous command duration only if it's >= 5s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5 + # Don't show fractional seconds. Thus, 7s rather than 7.3s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Yellow previous command duration. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow + + # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones. + typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey + + # Disable async loading indicator to make directories that aren't Git repositories + # indistinguishable from large Git repositories without known state. + typeset -g POWERLEVEL9K_VCS_LOADING_TEXT= + + # Don't wait for Git status even for a millisecond, so that prompt always updates + # asynchronously when Git state changes. + typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0 + + # Cyan ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan + # Don't show remote branch, current tag or stashes. + typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind) + # Don't show the branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + # When in detached HEAD state, show @commit where branch normally goes. + typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@' + # Don't show staged, unstaged, untracked indicators. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON= + # Show '*' when there are staged, unstaged or untracked files. + typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*' + # Show '⇣' if local branch is behind remote. + typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣' + # Show '⇡' if local branch is ahead of remote. + typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡' + # Don't show the number of commits next to the ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1 + # Remove space between '⇣' and '⇡' and all trailing spaces. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }' + + # Grey current time. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands rather than the end times of + # their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=off + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/misc/.zshrc b/misc/.zshrc new file mode 100644 index 0000000..d9edf5a --- /dev/null +++ b/misc/.zshrc @@ -0,0 +1,121 @@ + # # # # # # + # EDITORS # +# # # # # # + +# for ranger +export VISUAL=nvim; +# for default editor +export EDITOR=nvim; + + # # # # + # ZSH # +# # # # +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +export ZSH="$HOME/.oh-my-zsh" +#ZSH_THEME="af-magic" +ZSH_THEME="powerlevel10k/powerlevel10k" +plugins=(git zsh-autosuggestions) +# disable bi-weekly auto-update checks +DISABLE_AUTO_UPDATE="true" + +# Path to your oh-my-zsh installation +source $ZSH/oh-my-zsh.sh + + + # # # # # # + # ALIASES # +# # # # # # + +# delete package +alias delete_pkg="yay -R" + +# question before delete +alias rm="\rm -i" + +# cpp projects +alias rrr="/mnt/raid/projects/cpp/rrr/rrr.v2/build/bin/rrr.v2" +alias diskinfo="/mnt/raid/projects/cpp/disk-info/build/bin/disk-info" + +# ./run for develp +alias run="./run" +alias deploy="./deploy" +alias update="./update" + +# goto +alias srv=". srv" + +# show image in kitty (use: image ./patch_to_img) +alias image="kitty +kitten icat" + +# cat aliase +alias cat="bat --style=plain --color=always" + +# goto to dir +alias ..="cd .." +alias ...="cd ../../" +alias ....="cd ../../../" + +# previous command +alias pr="fc -s" + +# bpytop +alias bp="bpytop" + +# z.lua +alias goto="z -I" + +alias nv="nvim" + +alias ls="lst" + + # # # # # # # + # SETTINGS # +# # # # # # + +# убираем цветовой окрас папок в терминале +export LS_COLORS="$LS_COLORS:ow=1;34:tw=1;34:" + +# text to speech +# export GOOGLE_APPLICATION_CREDENTIALS=/mnt/raid/application/Golang/TextToSpeach/TextToSpeech-862311f87938.json + +# chatlanin +export CHATLANIN_PATH=$HOME/bin/scripts/system +export PROJECT_CPP_PATH=/mnt/raid/projects/cpp +export PATH=$PATH:$CHATLANIN_PATH:$PROJECT_CPP_PATH:/usr/include:/usr:$HOME/.local/bin:/mnt/raid/projects/cpp/rrr/rrr.v2/build/bin + +# нужно добавить переменную окружения $VAMPY_PATH для работы анотатора +# export PATH=$PATH:$CHATLANIN_PATH:$PROJECT_CPP_PATH:/usr/include:$VAMPY_PATH + +# устанавливаем кэширование пароля от git. после этого можно делать обновление месона +# и скачивание репозиториев без ввода пароля по https +git config --global credential.helper 'cache --timeout=108000' + +# set history size in the file +HISTFILESIZE=12000 + +# set no write file data if exist +set -o noclobber + +# автоподсказки для перемещения goto +# this is https://github.com/skywind3000/z.lua +eval "$(lua $HOME/bin/z.lua/z.lua --init zsh)" + +neofetch + +# для применения настроек fzf по умолчанию +export FZF_DEFAULT_OPTS='--height=40% --layout=reverse --info=inline --border --margin=1 --padding=1 -e' + +# для переопределения стилей qt приложений на gtk +export QT_STYLE_OVERRIDE=kvantum +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# change sudo prompt # +export sudo_PROMPT="[] Enter sudo Password, Mr.${USER}: " diff --git a/tarch-misc.install b/tarch-misc.install new file mode 100644 index 0000000..5d0be18 --- /dev/null +++ b/tarch-misc.install @@ -0,0 +1,92 @@ +#!/bin/bash + +source "$HOME/bin/scripts/system/style" + +USER=`echo ${SUDO_USER:-$(whoami)}` +GID=`echo ${SUDO_GID}` +GROUB=`cat /etc/group | grep ${GID} | cut -d: -f1 | head -1` +HOME_DIR="home/${USER}" +BACKUP_DIR="/home/${HOME_DIR}/.tarch-backups" +CONFIG_DIR_SKEL="/etc/skel" +PKG_NAME="tarch-misc" + +BACKUP (){ + local FILES_NAME="tarch-misc-backup" + echo -e ${BOLD}${GREEN}"\n[*] создаем backup текущего конфига для: ${CYAN}${PKG_NAME}${GREEN} ..." ${RESET_COLOR} + BACKUP_NAME=`date +%m-%d` + BACKUP_RANDOM="`echo $RANDOM`" + mkdir -p ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + + echo -e ${CYAN}" ==> перемещаем текущий конфиг в backup дирректорию." ${RESET_COLOR} + mv ${HOME_DIR}/.mplayer ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.Xresources.d ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.dmrc ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.face ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.gtkrc-2.0 ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.hushlogin ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.p10k.zsh ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.Xresources ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + mv ${HOME_DIR}/.zshrc ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + + echo -e ${CYAN}" ==> предоставление разрешений для пользователя: ${PURPLE}${USER}" ${RESET_COLOR} + chown -R ${USER}:${GROUB} ${BACKUP_DIR}/${FILES_NAME}-${BACKUP_NAME}-${BACKUP_RANDOM} + echo -e ${BOLD}${GREEN}"[✔] backup завершен ..." ${RESET_COLOR} +} + +INSTALL (){ + echo -e ${BOLD}${GREEN}"\n[*] устанавливаем пакет: ${CYAN}${PKG_NAME}${GREEN} ..." ${RESET_COLOR} + + mkdir -p ${HOME_DIR} + + cp -rf ${HOME_DIR_SKEL}/.mplayer ${HOME_DIR} + cp -rf ${HOME_DIR_SKEL}/.Xresources.d ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.dmrc ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.face ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.gtkrc-2.0 ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.hushlogin ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.p10k.zsh ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.Xresources ${HOME_DIR} + cp ${HOME_DIR_SKEL}/.zshrc ${HOME_DIR} + + echo -e ${CYAN}" ==> предоставление разрешений для пользователя: ${PURPLE}${USER}" ${RESET_COLOR} + chown -R ${USER}:${GROUB} ${HOME_DIR}/.mplayer + chown -R ${USER}:${GROUB} ${HOME_DIR}/.Xresources.d + chown -R ${USER}:${GROUB} ${HOME_DIR}/.dmrc + chown -R ${USER}:${GROUB} ${HOME_DIR}/.face + chown -R ${USER}:${GROUB} ${HOME_DIR}/.gtkrc-2.0 + chown -R ${USER}:${GROUB} ${HOME_DIR}/.hushlogin + chown -R ${USER}:${GROUB} ${HOME_DIR}/.p10k.zsh + chown -R ${USER}:${GROUB} ${HOME_DIR}/.Xresources + chown -R ${USER}:${GROUB} ${HOME_DIR}/.zshrc + + if [[ -d "${HOME_DIR}/.mplayer" && -d "${HOME_DIR}/.Xresources.d" && -f "${HOME_DIR}/.dmrc" && -f "${HOME_DIR}/.face" && -f "${HOME_DIR}/.fehbg" && -f "${HOME_DIR}/.gtkrc-2.0" && -f "${HOME_DIR}/.hushlogin" && -f "${HOME_DIR}/.p10k.zsh" && -f "${HOME_DIR}/.Xresources" && -f "${HOME_DIR}/.xsettingsd" && -f "${HOME_DIR}/.zshrc" ]]; then + echo -e ${BOLD}${GREEN}"[✔] конфигурационные файлы установлены..." ${RESET_COLOR} + echo -e "\n" + else + echo -e ${BOLD}${RED}"[✘] ошибка установки..." ${RESET_COLOR} + fi + + echo -e "\n" +} + +RUN_MAIN (){ + if [[ "${GROUB}" == 'liveuser' ]]; then + exit + else + if [[ ! -d "${CONFIG_DIR}/${FILES_NAME}" ]]; then + INSTALL + else + BACKUP + INSTALL + fi + fi +} + + +post_install() { + RUN_MAIN +} + +post_upgrade() { + RUN_MAIN +}