Compare commits

..

No commits in common. "d8ab048b10653b993106f7436c1262ebb91acc9b" and "09dca236b70202b283ebe6b69ea8ae49d9d9a5f5" have entirely different histories.

6 changed files with 27 additions and 112 deletions

View File

@ -34,15 +34,36 @@
Partition > Guided - use entire disk and set up encrypted LVM. Partition > Guided - use entire disk and set up encrypted LVM.
## How to get this distribution ## Preparatory steps
### 1. Give sudo permissions to your user
Give sudo permissions to your user:
``` ```
wget ... su - --command "adduser $(whoami) sudo"
chmod +x bootstrap.sh newgrp sudo
bash bootstrap.sh sudo echo "Hello world!"
``` ```
### 2. Install git and download the rest of this distribution
``` ```
sudo apt install neovim sudo apt install git
git config --global core.editor "vim"
git config --global user.email "nuno.semperelh@protonmail.com" # to do: add part of a script that asks you for this, or lets you configure it
git config --global user.name "NunoSempere"
git config --global credential.helper 'store --file ~/.^C
git config --global init.defaultBranch master
cd ~/Documents
git clone https://git.nunosempere.com/open.source/nunOS.git
```
N.B.: Could also just provide a bash script to fetch with wget. The script could then fetch other scripts? Yeah, that's probably the way to go in the end. But for now I'll be writting the individual scripts that that future script will orchestrate.
### Install a few essentials.
```
sudo apt install neovim tmux
``` ```

View File

@ -1,17 +0,0 @@
#!/bin/bash
# Give sudo permissions to this user
su - --command "adduser $(whoami) sudo"
newgrp sudo
sudo echo "Hello world!"
# Install git
sudo apt install git
# git config --global user.email "nuno.semperelh@protonmail.com" # to do: add part of a script that asks you for this, or lets you configure it
# git config --global user.name "NunoSempere"
# git config --global init.defaultBranch master
cd ~/Documents
git clone https://git.nunosempere.com/open.source/nunOS.git
cd nunOS

View File

@ -1,17 +0,0 @@
function tmux(){
/usr/bin/tmux -f ~/.config/tmux/tmux.conf
}
function lf() {
tmp="$(mktemp)"
lf0 -last-dir-path="$tmp" "$@" --command "set hidden"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
if [ -d "$dir" ]; then
if [ "$dir" != "$(pwd)" ]; then
cd "$dir"
fi
fi
fi
}

View File

@ -1,70 +0,0 @@
# Shortcuts
## See: https://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# No delay for escape key press
set -sg escape-time 0
## vim mode
setw -g mode-keys vi
# selection
## https://www.rockyourcode.com/copy-and-paste-in-tmux/
set-option -g mouse on
set-option -s set-clipboard off
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
## a long, long history
set-option -g history-limit 5000
# don't rename windows automatically
set-option -g allow-rename off
setw -g automatic-rename off
# split panes using / and -, into the same directory
bind / split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# open new window into Documents directory with Ctrl+A+c
bind c new-window -c "~/Documents" # "bash -i -c 'lf && exec bash'"
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Use Alt-vim keys without prefix key to switch panes
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
## Get HOME and END keys to work in nvim.
## <https://github.com/neovim/neovim/issues/6134>
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
# Reload config
bind r source-file ~/config/.tmux.conf
## Disable status bar
bind-key b set -g status off
# Terminal config
set -g default-terminal "xterm-256color"

View File

@ -1 +0,0 @@
echo "source ~/.config/bash/.bashrc" >> "~/.bashrc"

View File

@ -1 +0,0 @@
sudo apt install tmux