Skip to content

Commit

Permalink
Merge pull request #77 from lucasvazq/develop
Browse files Browse the repository at this point in the history
Update master with develop
  • Loading branch information
lucasvazq authored Aug 17, 2020
2 parents 48872ac + bb8cda8 commit 129769c
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 34 deletions.
2 changes: 2 additions & 0 deletions .config/user-dirs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled=False
filename_encoding=UTF-8
5 changes: 0 additions & 5 deletions .config/user-dirs.dirs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_DESKTOP_DIR="$HOME/$HOME"
XDG_TEMPLATES_DIR="$HOME/$HOME"
XDG_PUBLICSHARE_DIR="$HOME/$HOME"
XDG_MUSIC_DIR="$HOME/$HOME"
XDG_VIDEOS_DIR="$HOME/$HOME"
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ _I've improved it for coding in Python, Deno and NodeJS, using tmux, VSCode and

🧲 ⚡ **Requirements:** Manjaro I3

🛰 ✨ **Gallery:** [Screenshots][gallery]

[gallery]: ./docs/Gallery/

## Ready, Set, Launch 🚀

Run the following commands
Expand Down Expand Up @@ -48,7 +52,9 @@ git config --global user.email "YOUR_EMAIL"
[github_ssh_key_help]: https://help.github.com/es/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

**Add Sourcery token**
Sign In and obtain a token. [Link][token_link]

[Click here][token_link] to Sign In and obtain a token.

Then, search for sourcery in the VSCode settings and enter the token into the Sourcery Token field.

[token_link]: https://sourcery.ai/download/?editor=vscode
Expand All @@ -57,13 +63,19 @@ Then, search for sourcery in the VSCode settings and enter the token into the So

### How to drive through the meteorites

_The idea of ​​this setup is based on the fact that I consider there are two different moments in which we develop things. The first moment is when we do it for personal enjoyment, far from any responsibility that commits third parties. This moment is associated with when we do it for pleasure and develop for the simple fact of developing._
_The idea of ​​this setup is based on the fact that I consider there are two different moments in which we develop things._

_The first moment is when we do it for personal enjoyment, far from any responsibility that commits third parties._
_This moment is associated with when we do it for pleasure and develop for the simple fact of developing._
_The second situation in which we can find ourselves developing is when we do it because we have a responsibility with a third party, that is, when we are doing a job._

_This is why it seemed appropriate to me to have two separate folders where the works we carry out are kept, depending on the situation we are in when we develop them._
_The works that we do as hobbies are stored in `~/Workspaces/H`, those that we carry out under responsibilities are located in `~/Workspaces/J`._
_Everything related with the command interpreter, that are related to the **H** folder, are stored in `~/Workspaces/.hrc`. Everything related to the other folder, in `~/Workspaces/.jrc`._

_For databases there is also a special place. For each workspace there is a **DB** folder._
_The idea behind this is to store, in these folders, all the backup copies of the databases related to each of the repositories for each of the corresponding workspaces._

_Finally, I want to make a special mention of one more file._
_Some functions and variables belong to the workspace and that can be useful for both. That is why these functions and variables must be located in the `~/Workspaces/.crc` file._

Expand All @@ -74,11 +86,15 @@ Considering the words above, there are a couple of things to know to approach th

[python_100_days]: https://github.com/jackfrued/Python-100-Days

- In `~/.zshrc` there is a function called **clean** which calls two functions that are located in `.jrc` and`.hrc`. These functions are intended to clear all the virtual env and env variables related to their workspaces. In other words, the function found in `.jrc` should remove all non-default variables and virtual envs that are activated with some function that the user runs when working with a particular repository located in `~/Workspaces/J/`. In conclusion, when **clean** is called, all environment variables and virtual spaces are cleaned, and the benefit we can obtan from this is when the use of this function is automated for when we want to change the environment in which we are developing.
- In `~/.zshrc` there is a function called **clean** which calls two functions that are located in `.jrc` and`.hrc`.
<br>These functions are intended to clear all the virtual env and env variables related to their workspaces.
<br>In other words, the function found in `.jrc` should remove all non-default variables and virtual envs that are activated with some function that the user runs when working with a particular repository located in `~/Workspaces/J/`.
<br>In conclusion, when **clean** is called, all environment variables and virtual spaces are cleaned, and the benefit we can obtan from this is when the use of this function is automated for when we want to change the environment in which we are developing.

### Command center

Using this ship is difficult because the rudder has been very tunned.

I leave at hand a wiki that helps to know the customized keyboard shortcuts used for VSCode, tmux, and i3, and that also lists all the useful functions that are available for the shell.

[Command center](https://github.com/lucasvazq/dotfiles/wiki)
Binary file removed docs/Gallery/2020-08-16_23-00-25.png
Binary file not shown.
Binary file removed docs/Gallery/2020-08-16_23-08-42.png
Binary file not shown.
Binary file added docs/Gallery/2020-08-17_03-05-41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Gallery/2020-08-17_03-25-23.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Gallery/screenshots.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 25 additions & 26 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,32 @@


# Ask for password and save it to don't ask for it again in the future
local correct_password password
correct_password=false
until [ $correct_password ]; do
CORRECT_PASSWORD=false
until [ $CORRECT_PASSWORD ]; do
echo -n "Password: "
IFS= read -rs password
IFS= read -rs PASSWORD
sudo -k
if echo "$password" | sudo -Sl &> /dev/null; then
correct_password=true
if echo "$PASSWORD" | sudo -Sl &> /dev/null; then
CORRECT_PASSWORD=true
fi
done

# Config yay
yay --save --answerclean None --answerdiff None --answeredit None --noremovemake --cleanafter --noprovides

# Update and Upgrade
yay -Syu --noconfirm
yes | yay -Syu --sudoloop

# Update timezone
echo "$password" | sudo -S timedatectl set-ntp true
echo "$PASSWORD" | sudo -S timedatectl set-ntp true

# Make useful dirs
mkdir -p ~/{.Envs,Pictures/Screenshots,Workspaces/H/DB,Workspaces/J/DB}

# Clean unused apps, folders and files
yes | yay -S --noconfirm trash-cli
yes | yay -S trash-cli
trash ~/Desktop ~/Music ~/Public ~/Templates ~/Videos
yes | yay -R --noconfirm deluge hexchat
yes | yay -R deluge hexchat
trash ~/.config/hexchat
trash ~/.config/compton.conf

Expand All @@ -45,39 +44,39 @@ trash ~/.config/compton.conf


# Fonts
yes | yay -S --noconfirm noto-fonts-emoji
yes | yay -S noto-fonts-emoji
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/JetBrainsMono.zip
unzip -d ~/.local/share/fonts JetBrainsMono.zip
trash JetBrainsMono.zip
fc-cache ~/.local/share/fonts

# Launcher
yes | yay -S --noconfirm rofi rofimoji
yes | yay -S rofi rofimoji

# Status bar
yes | yay -S --noconfirm polybar
yes | yay -S polybar

# Audio
yes | yay -S lib32-jack && yes | install_pulse # run pulseaudio builtin installer
yes | yay -S --noconfirm pulseeffects
yes | yay -S pulseeffects

# Browsers
yes | yay -S --noconfirm brave google-chrome-stable
yes | yay -S brave google-chrome-stable

# Terminal
yes | yay -S --noconfirm alacritty tmux neofetch cowsay fortune-mod figlet pipes.sh lolcat shellcheck
yes | yay -S alacritty tmux neofetch cowsay fortune-mod figlet pipes.sh lolcat shellcheck
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
trash ~/.zshrc.pre-oh-my-zsh
echo "$password" | chsh -s "$(which zsh) $USER"
echo "$PASSWORD" | chsh -s "$(which zsh) $USER"
git clone https://github.com/xero/figlet-fonts ~/.local/share/figlet-fonts
git clone https://gitlab.com/dwt1/shell-color-scripts.git
echo "$password" | sudo -S mkdir /opt/shell-color-scripts
echo "$password" | sudo -S mv ./shell-color-scripts/colorscripts /opt/shell-color-scripts
echo "$password" | sudo -S mv ./shell-color-scripts/colorscript.sh /usr/bin/colorscript
echo "$PASSWORD" | sudo -S mkdir /opt/shell-color-scripts
echo "$PASSWORD" | sudo -S mv ./shell-color-scripts/colorscripts /opt/shell-color-scripts
echo "$PASSWORD" | sudo -S mv ./shell-color-scripts/colorscript.sh /usr/bin/colorscript
trash -rf ./shell-color-scripts

# Code editors
yes | yay -S --noconfirm visual-studio-code-bin neovim gedit
yes | yay -S visual-studio-code-bin neovim gedit
code --install-extension alefragnani.bookmarks
code --install-extension batisteo.vscode-django
code --install-extension be5invis.vscode-icontheme-nomo-dark
Expand Down Expand Up @@ -110,10 +109,10 @@ code --install-extension wholroyd.jinja
code --install-extension ybaumes.highlight-trailing-white-spaces

# Image editors
yes | yay -S --noconfirm inkscape pinta
yes | yay -S inkscape pinta

# Git
yes | yay -S --noconfirm github-cli diff-so-fancy
yes | yay -S github-cli diff-so-fancy
git config --global pull.rebase false
git config --global core.excludesfile ~/.config/git/.gitignore
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
Expand All @@ -133,13 +132,13 @@ git config --global color.diff.whitespace "red reverse"
pip install pipenv virtualenvwrapper ipython ipykernel pywal --user

# Deno and NodeJS
echo "$password" | sudo -S "$(curl -fsSL https://raw.githubusercontent.com/axetroy/dvm/master/install.sh | bash)"
echo "$PASSWORD" | sudo -S "$(curl -fsSL https://raw.githubusercontent.com/axetroy/dvm/master/install.sh | bash)"
dvm install v1.3.0
yes | yay -S --noconfirm nvm
yes | yay -S nvm
nvm install node

# Others
yes | yay -S --noconfirm mplayer unzip zip slop numlockx unclutter perl-anyevent-i3
yes | yay -S mplayer unzip zip slop numlockx unclutter perl-anyevent-i3


###############################################################################
Expand Down

0 comments on commit 129769c

Please sign in to comment.