From 3336783a20f71c04909634be30a23f9062c7fa24 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Mon, 9 Mar 2020 19:30:53 +0100 Subject: [PATCH] Edit .zprofile and dotman. * dotman - change interpreter from zsh to sh - rebuild structure of script - add logs saved in files - disable logs in CLI * .zprofile - set EDITOR environment variable --- botfiles/.config/zsh/history | 28 ++++++ botfiles/.zprofile | 3 + dotman | 189 ++++++++++++++++++++++++++--------- 3 files changed, 173 insertions(+), 47 deletions(-) diff --git a/botfiles/.config/zsh/history b/botfiles/.config/zsh/history index ddeaec4..c0dd0d1 100644 --- a/botfiles/.config/zsh/history +++ b/botfiles/.config/zsh/history @@ -564,3 +564,31 @@ ls botfiles/.config ga . gc gpom +xdpyinfo | grep 'dimensions:' +xrandr | grep '*' +xrandr +xrandr | grep '*' | grep -o '?[0-9]\x?[0-9]' +xrandr | grep '*' | grep -o '?*[0-9]\x?*[0-9]' +xrandr | grep '*' | grep -o '*[0-9]\x*[0-9]' +xrandr | grep '*' | grep -o '*?[0-9]\x*?[0-9]' +xrandr | grep '*' | grep -o '*?[0-9]\x????[0-9]' +xrandr | grep '*' | grep -o '?[0-9]\x????[0-9]' +xrandr | grep '*' | grep -o '????[0-9]\x????[0-9]' +xrandr | grep '*' | grep -o '?**[0-9]\x?**[0-9]' +xrandr | grep '*' | grep -o '?**[0-9]{3}\x?**[0-9]' +xrandr | grep '*' | grep -o '?**[0-9]{4}\x?**[0-9]' +xrandr | grep '*' | grep -o '[0-9]{4}\x?**[0-9]' +xrandr | grep '*' | grep -o '[0-9]*{4}\x?**[0-9]' +cat ~/.scripts/get-local-wificard-ip.sh +xrandr | grep '*' | grep -o '([0-9]){4}\x' +xrandr | grep '*' | grep -o '([0-9]){4}' +xrandr | grep '*' | grep -o '?*([0-9]){4}' +xrandr | grep '*' | grep -o '?*([0-9]*){4}' +xrandr | grep '*' | grep -o '?*([0-9]*){3}' +xrandr | grep '*' | grep -o '?*([0-9]*){1}' +xrandr | grep '*' | grep -o '?*([0-9]*)' +xrandr | grep '*' | grep -o '?*[0-9]*' +xrandr | grep '*' | grep -o '?*[0-9]*x' +xrandr | grep '*' | grep -o '?*[0-9]*x?*[0-9]' +xrandr | grep '*' | grep -o '?*[0-9]*x?*[0-9]*' +pass diff --git a/botfiles/.zprofile b/botfiles/.zprofile index e69de29..dda9afd 100644 --- a/botfiles/.zprofile +++ b/botfiles/.zprofile @@ -0,0 +1,3 @@ +#!/usr/bin/zsh + +export EDITOR=nvim diff --git a/dotman b/dotman index 8c64691..5317f69 100755 --- a/dotman +++ b/dotman @@ -1,4 +1,4 @@ -#!/usr/bin/zsh +#!/usr/bin/bash greeter() { cat < $LOG_DIR/packages_installation.log -mkdir ~/.log + pip3 install --user -U pynvim msgpack +} -# install all dependencies and packages -yay -S --noconfirm --needed neovim qutebrowser telegram-desktop minecraft-launcher dunst bspwm sxhkd htop mpd ncmpcpp picom ranger rofi transmission-cli vlc zsh youtube-dl grc curl wget dmenu xclip figlet w3m xorg-server xorg-xinit ttf-font-awesome ttf-dejavu vifm feh xorg-xsetroot lxappearance python-pip alsa-utils tmux networkmanager maim fzf exfat-utils fuse2 udiskie udisks2 imagemagick i3lock-color man checkupdates+aur pacman-contrib polybar ccls clang eslint flake8 shellcheck clang-format-linter-git prettier python-black github-cli &> ~/.log/yay.log +install_st() { + cd ~/.cache/dotfiles/ + git clone https://gitlab.com/samedamci/st + cd st + sudo make clean install +} -pip3 install --user -U pynvim msgpack +config_pacman() { + su root -c "cat >/etc/pacman.conf < /etc/udev/rules.d/99-udisks2.rules && echo 'D /media 0755 root root 0 -' > /etc/tmpfiles.d/media.conf" + #[community-testing] + #Include = /etc/pacman.d/mirrorlist -# manual configuration + [community] + Include = /etc/pacman.d/mirrorlist + + #[multilib-testing] + #Include = /etc/pacman.d/mirrorlist + + #[multilib] + #Include = /etc/pacman.d/mirrorlist + +EOF" +} + +copy_configs() { + cd ~/Dotfiles/botfiles/.config + + cp -r * ~/.config/ + + if [ "$HOST" = "pc" ]; then + echo "Use pc config" + mv ~/.config/polybar/config.pc ~/.config/polybar/config + elif [ "$HOST" = "laptop" ]; then + echo "Use laptop config..." + mv ~/.config/polybar/config.laptop ~/.config/polybar/config + fi + + cd ~/Dotfiles/botfiles + mkdir -p ~/.local/share/TelegramDesktop/tdata/ + cp shortcuts-custom.json ~/.local/share/TelegramDesktop/tdata + + cp .zshrc .aliases .zprofile .Xresources .xinitrc ~/ + cp -r .scripts ~/ + chmod +x ~/.scripts/* + + + cd ~/.config/zsh + rm -rf plugins + mkdir plugins + cd plugins + + git clone https://github.com/zsh-users/zsh-syntax-highlighting + git clone https://github.com/zsh-users/zsh-autosuggestions + + sudo mkdir /media +} + +sudo -v clear -echo "Please edit /etc/pacman.conf and uncomment 'Colors' and write 'ILoveCandy'." +greeter +printf "\nDo you want to install yay? (Y/n): "; read CHOICE +if [ "$CHOICE" = "Y" ]; then echo "Installing yay..." && install_yay &>$LOG_DIR/install_yay.log; fi +clear +greeter +printf "\nDo you want to install packages? (Y/n): "; read CHOICE +if [ "$CHOICE" = "Y" ]; then echo "Installing packages..." && install_packages &>$LOG_DIR/install_packages.log; fi +clear +greeter +printf "\nDo you want to compile nad install st? (Y/n): "; read CHOICE +if [ "$CHOICE" = "Y" ]; then echo "Compiling and nstalling st..." && install_st &>$LOG_DIR/install_st.log; fi +clear +greeter +printf "\nDo you want to copy configs? (Y/n): "; read CHOICE +if [ "$CHOICE" = "Y" ]; then + printf "Moving configs...\n" + copy_configs &>$LOG_DIR/copy_configs.log + printf "\n" + chsh -s /usr/bin/zsh + printf "\nConfiguring udiskie.\n" + su root -c "echo 'ENV{ID_FS_USAGE}==\"filesystem|other|crypto\", ENV{UDISKS_FILESYSTEM_SHARED}=\"1\"' > /etc/udev/rules.d/99-udisks2.rules && echo 'D /media 0755 root root 0 -' > /etc/tmpfiles.d/media.conf" + printf "\nConfiguring pacman.\n" + config_pacman +fi +clear +greeter