From cc62e9319e8f6ce175af05566ac4bcc7505846ab Mon Sep 17 00:00:00 2001
From: Pavel Kirilin <win10@list.ru>
Date: Tue, 9 Nov 2021 00:22:29 +0400
Subject: [PATCH] Updated installation.sh.

Signed-off-by: Pavel Kirilin <win10@list.ru>
---
 dotfiles/.dunstrc |   4 +-
 dotfiles/.xinitrc |   6 +--
 dotfiles/.zshrc   |   5 +-
 install.sh        |  16 ++-----
 pacman.deps       |   2 +
 pikaur.deps       |   4 +-
 update_desktop.sh | 114 ----------------------------------------------
 7 files changed, 14 insertions(+), 137 deletions(-)
 delete mode 100644 update_desktop.sh

diff --git a/dotfiles/.dunstrc b/dotfiles/.dunstrc
index bf8e14f..72d9f2a 100644
--- a/dotfiles/.dunstrc
+++ b/dotfiles/.dunstrc
@@ -22,7 +22,7 @@ plain_text = no
 #   %I  iconname (without its path)
 #   %p  progress value if set ([  0%] to [100%]) or nothing
 # Markup is allowed
-format = "<b>%s</b>\n%b"
+format = "<b>%a</b>\n<i>%s</i>\n%b"
 
 # Sort messages by urgency.
 sort = no
@@ -148,7 +148,7 @@ dmenu = /usr/bin/dmenu -p dunst:
 browser = /usr/bin/firefox -new-tab
 
 # Align icons left/right/off
-icon_position = off
+icon_position = left
 max_icon_size = 80
 
 # Paths to default icons.
diff --git a/dotfiles/.xinitrc b/dotfiles/.xinitrc
index 126fc8c..7ba3aea 100644
--- a/dotfiles/.xinitrc
+++ b/dotfiles/.xinitrc
@@ -11,7 +11,5 @@ while true; do
  sleep 2s
 done &
 
-while true; do
-    wmname LG3D
-    dwm >/dev/null 2>&1
-done
+wmname LG3D
+dwm >/dev/null 2>&1
diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc
index f737eb5..e83b2ad 100644
--- a/dotfiles/.zshrc
+++ b/dotfiles/.zshrc
@@ -69,12 +69,13 @@ COMPLETION_WAITING_DOTS="true"
 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
 # Example format: plugins=(rails git textmate ruby lighthouse)
 # Add wisely, as too many plugins slow down shell startup.
-plugins=(git git-flow-completion sudo docker autojump minikube)
+plugins=(git git-flow-completion sudo docker autojump minikube npm)
 
 source $ZSH/oh-my-zsh.sh
 alias ls=lsd
 alias rcheck="cargo check && fd .rs -F | xargs touch && cargo clippy && cargo test"
 alias l="lsd -la"
+alias lg="lazygit"
 alias dcd="docker-compose down"
 alias dcdv="docker-compose down -v"
 alias dcu="docker-compose up"
@@ -88,7 +89,6 @@ alias dpsq="docker ps -aq"
 alias poop='git push origin "$(git branch | grep "\*" | cut -d " " -f2)"'
 alias vommit='git commit -sS'
 alias eat_shit='git pull origin "$(git branch | grep "\*" | cut -d " " -f2)"'
-alias big_poop="git push --all"
 alias cat="bat"
 # User configuration
 
@@ -134,7 +134,6 @@ compinit
 
 autoload -U +X bashcompinit && bashcompinit
 autoload -U ~/.zfunc/*
-complete -o nospace -C /usr/bin/terraform terraform
 
 eval "$(pyenv init -)"
 source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
diff --git a/install.sh b/install.sh
index 37a364a..b168d7e 100644
--- a/install.sh
+++ b/install.sh
@@ -2,7 +2,7 @@
 
 function cleanup(){
   # shellcheck disable=SC2046
-  rm -rf $(find . -name "build_*" -type d)
+  sudo rm -rf $(sudo find . -name "build_*" -type d)
 }
 
 function build_from_git(){
@@ -56,13 +56,6 @@ function copy_dotfiles(){
   git clone https://github.com/bobthecow/git-flow-completion ~/.oh-my-zsh/custom/plugins/git-flow-completion
 }
 
-# Update local branches.
-function update_repo(){
-for remote in $(git branch -r | grep -v '\->'); do
-	git branch --track "${remote#origin/}" "$remote"
-done
-}
-
 function main(){
   # shellcheck disable=SC2046
   sudo pacman -Syu --needed $(cat ./pacman.deps)
@@ -74,11 +67,10 @@ function main(){
   pikaur -Syu --needed --noconfirm --noedit $(cat ./pikaur.deps)
   install_python_deps
   copy_dotfiles
-  update_repo
+  pushd dwm || exit
+  sudo make install
+  popd || exit
   echo "######## Installation complete ########"
-  echo "Now you can build your desktop."
-  echo "To do so just run \`update_desktop -f\`"
-  update_desktop -h
 }
 
 trap cleanup EXIT
diff --git a/pacman.deps b/pacman.deps
index f03a02b..8e625dc 100644
--- a/pacman.deps
+++ b/pacman.deps
@@ -10,6 +10,8 @@ dunst
 firefox
 gnome-keyring 
 gobject-introspection
+kubectl
+lazygit
 libldac
 libsecret
 lsd
diff --git a/pikaur.deps b/pikaur.deps
index e0d67bc..ea492b1 100644
--- a/pikaur.deps
+++ b/pikaur.deps
@@ -1,8 +1,8 @@
 autojump
 avizo
-gotop
+lightdm-webkit-theme-aether
 nerd-fonts-complete
 paper-icon-theme-git
-pulseaudio-modules-bt
 ttf-symbola
 ttf-ubraille
+visual-studio-code-bin
diff --git a/update_desktop.sh b/update_desktop.sh
deleted file mode 100644
index f5061f7..0000000
--- a/update_desktop.sh
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/bash
-RED='\033[0;31m'
-NC='\033[0m' # No color
-
-function local_update(){
-  rm -fv config.h && make && sudo make clean install
-}
-
-function full_update(){
-  apply_branch="apply-$(uuidgen)"
-  git checkout master
-  git checkout -b "$apply_branch"
-  apply_conf="$(mktemp /tmp/custom_patchXXXXX)"
-  echo "# You can edit this file to manipulate ordering and patches to apply" > "$apply_conf"
-  git branch -a | grep -Ev '^master$|remotes' | grep 'patch/' | cut -c 3- >> "$apply_conf"
-  echo "$EDITOR"
-  if [ -z ${EDITOR+x} ];then
-    echo -e "${RED}\$EDITOR env is not found${NC}.\nTry this before running script: 'export EDITOR=/bin/vim'"
-    git checkout master
-    git branch -D "$apply_branch"
-    exit 1
-  fi
-  eval "$EDITOR \"$apply_conf\""
-
-  while IFS= read -r branch;do
-    echo -e "${RED}$branch${NC}"
-    if [[ $branch = \#* ]];then
-      continue
-    fi
-    git merge "$branch" --no-edit
-  done < <(cat "$apply_conf")
-  
-  rm -f "$apply_conf"
-
-  local_update || exit 1
-  
-  git checkout master
-  git branch -D "$apply_branch"
-}
-
-function apply_patch(){
-  patch_name="$(basename "$1" | cut -d '.' -f1)"
-  patch_path="$(readlink -f "$1")"
-  pushd "{{dwm_dir}}" || exit
-  git checkout -b "patch/$patch_name"
-  patch < "$patch_path"
-  git add .
-  git commit -m "Patch \"$patch_name\" applied."
-}
-
-function show_help(){
-  echo -e "Update your DWM based on your cureent config."
-  echo -e "Your local config can be found in {{dwm_dir}}\n"
-  echo "FLAGS:"
-  echo -e "\t-h, --help\tShow this message."
-  echo -e "\t-f, --full\tRun full update."
-  echo -e "\t-l, --local\tRun local update."
-  echo -e "\t-a, --apply\tApply a patch and create new git branch."
-}
-
-function main(){
-  local show_help=0
-  local full_update=0
-  local local_update=0
-  local patch_to_apply=""
-
-  while [[ "$#" -gt 0 ]]; do
-      case $1 in
-          -f|--full) full_update=1 ;;
-          -h|--help) show_help=1 ;;
-          -l|--local) local_update=1 ;;
-          -a|--apply) patch_to_apply="$2"; shift ;;
-          -al)patch_to_apply="$2"; shift; local_update=1;;
-          -af)patch_to_apply="$2"; shift; full_update=1;;
-          *) echo "Unknown parameter passed: $1"; exit 1 ;;
-      esac
-      shift
-  done
-  
-  if [[ show_help -eq 1 ]];then
-    pushd "{{dwm_dir}}" || exit
-    show_help
-    exit 0
-  fi
-
-  if [[ -n "$patch_to_apply" ]];then
-    apply_patch "$patch_to_apply"
-    popd || exit
-    if [[ $((full_update + local_update)) -eq 0 ]];then
-      exit 0
-    fi
-  fi
-
-  pushd "{{dwm_dir}}" || exit
-  if [[ full_update -eq 1 ]];then
-    full_update
-    exit 0
-  fi
-
-  if [[ local_update -eq 1 ]];then
-    local_update
-    exit 0
-  fi
-  
-  show_help
-  exit 0
-}
-
-function go_back(){
-  popd || exit
-}
-
-trap go_back EXIT
-main "$@"
-- 
GitLab