Merge branch 'main' of https://git.cmtec.se/cm/linuxbox
This commit is contained in:
commit
499f0b4167
12
bashrc_arch
12
bashrc_arch
@ -46,17 +46,9 @@ alias ls="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions"
|
||||
alias lsa="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a"
|
||||
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
|
||||
|
||||
|
||||
if [[ ! $TERM =~ linux ]]; then
|
||||
# if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.fzf.bash
|
||||
eval "$(zoxide init bash)"
|
||||
eval "$(starship init bash)"
|
||||
# else
|
||||
# if which tmux >/dev/null 2>&1; then
|
||||
# tmux new-session
|
||||
# fi
|
||||
# fi
|
||||
else
|
||||
|
||||
if [[ $TERM =~ linux ]]; then
|
||||
wrappedhl
|
||||
fi
|
||||
|
||||
@ -4,12 +4,6 @@ case $- in
|
||||
*) return ;;
|
||||
esac
|
||||
|
||||
# if [[ ! $TERM =~ linux ]]; then
|
||||
# if [[ $TERM =~ tmux ]]; then
|
||||
# source ~/.local/share/blesh/ble.sh --noattach
|
||||
# fi
|
||||
# fi
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
@ -25,6 +19,13 @@ HISTFILESIZE=2000
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Set autocomplete
|
||||
bind 'set show-all-if-ambiguous on'
|
||||
bind 'TAB:menu-complete'
|
||||
|
||||
# Set auto cd
|
||||
shopt -s autocd
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
@ -51,17 +52,6 @@ alias lsa="eza -1 -l --icons=auto --git-repos --git -h -g -o --no-permissions -a
|
||||
alias lss="eza -1 -l --icons=auto --git-repos --git -h -g --total-size -o --no-permissions -a"
|
||||
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
if [[ $TERM =~ tmux ]]; then
|
||||
source ~/.fzf.bash
|
||||
eval "$(zoxide init bash)"
|
||||
eval "$(starship init bash)"
|
||||
# [[ ! ${BLE_VERSION-} ]] || ble-attach
|
||||
fi
|
||||
|
||||
# TMUX
|
||||
if [[ ! $TERM =~ tmux ]]; then
|
||||
if which tmux >/dev/null 2>&1; then
|
||||
tmux new-session
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -21,14 +21,14 @@ cyan="#a0a0a0"
|
||||
white="#eeeeee"
|
||||
|
||||
[colors.bright]
|
||||
black="#a0a0a0"
|
||||
black="#303030"
|
||||
red="#d75400"
|
||||
green="#afd787"
|
||||
yellow="#d7af5f"
|
||||
blue="#87afd7"
|
||||
magenta="#d7d7af"
|
||||
cyan="#a0a0a0"
|
||||
white="#eeeeee"
|
||||
white="#ffffff"
|
||||
|
||||
[colors.dim]
|
||||
black="#000000"
|
||||
@ -38,7 +38,7 @@ yellow="#d7af5f"
|
||||
blue="#87afd7"
|
||||
magenta="#d7d7af"
|
||||
cyan="#a0a0a0"
|
||||
white="#eeeeee"
|
||||
white="#dddddd"
|
||||
|
||||
[selection]
|
||||
save_to_clipboard = true
|
||||
@ -50,5 +50,5 @@ padding={x=2}
|
||||
[env]
|
||||
TERM="xterm-256color"
|
||||
|
||||
# [mouse]
|
||||
# hide_when_typing = true
|
||||
[mouse]
|
||||
hide_when_typing = true
|
||||
|
||||
@ -235,6 +235,7 @@ require("lazy").setup({
|
||||
json = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
markdown = { "prettier" },
|
||||
sh = { "shfmt" },
|
||||
},
|
||||
formatters = {
|
||||
clang_format = {
|
||||
|
||||
11
start_toolbox.sh
Executable file
11
start_toolbox.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Name of the tmux session
|
||||
SESSION_NAME="toolbox"
|
||||
|
||||
# Check if the tmux session already exists
|
||||
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
|
||||
tmux attach-session -t "$SESSION_NAME"
|
||||
else
|
||||
tmux new-session -s "$SESSION_NAME" "devspectoolbox"
|
||||
fi
|
||||
57
tmux.conf
57
tmux.conf
@ -10,44 +10,12 @@ if "test ! -d ~/.tmux/plugins/tpm" \
|
||||
# Activate the plugins.
|
||||
run "~/.tmux/plugins/tpm/tpm"
|
||||
|
||||
# Options
|
||||
set -g mouse on
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
||||
|
||||
set -g @smart-splits_move_left_key 'C-h' # key-mapping for navigation.
|
||||
set -g @smart-splits_move_down_key 'C-j' # --"--
|
||||
set -g @smart-splits_move_up_key 'C-k' # --"--
|
||||
set -g @smart-splits_move_right_key 'C-l' # --"--
|
||||
|
||||
set -g @smart-splits_resize_left_key 'M-h' # key-mapping for resizing.
|
||||
set -g @smart-splits_resize_down_key 'M-j' # --"--
|
||||
set -g @smart-splits_resize_up_key 'M-k' # --"--
|
||||
set -g @smart-splits_resize_right_key 'M-l' # --"--
|
||||
|
||||
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
||||
|
||||
bind -n C-M-h if -F "#{@pane-is-vim}" 'split-window -h -b -c "#{pane_current_path}" "nvim"' 'split-window -h -b'
|
||||
bind -n C-M-l if -F "#{@pane-is-vim}" 'split-window -h -c "#{pane_current_path}" "nvim"' 'split-window -h'
|
||||
bind -n C-M-j split-window -v -p 10 -c "#{pane_current_path}"
|
||||
bind -n C-M-k split-window -v -b -c "#{pane_current_path}"
|
||||
|
||||
bind -n M-1 select-window -t 1
|
||||
bind -n M-2 select-window -t 2
|
||||
bind -n M-3 select-window -t 3
|
||||
bind -n M-4 select-window -t 4
|
||||
bind -n M-5 select-window -t 5
|
||||
bind -n M-n select-window -n
|
||||
bind -n M-Enter new-window
|
||||
bind -n M-c kill-pane
|
||||
|
||||
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
||||
|
||||
set-option -g status-position top
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||
@ -55,16 +23,39 @@ set-option -sg escape-time 1
|
||||
set-option -g focus-events on
|
||||
set-option -g status-right-length 100
|
||||
set-option -g set-clipboard on
|
||||
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
||||
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
||||
|
||||
# Key bindings
|
||||
set -g @smart-splits_move_left_key 'C-h' # key-mapping for navigation.
|
||||
set -g @smart-splits_move_down_key 'C-j' # --"--
|
||||
set -g @smart-splits_move_up_key 'C-k' # --"--
|
||||
set -g @smart-splits_move_right_key 'C-l' # --"--
|
||||
set -g @smart-splits_resize_left_key 'M-h' # key-mapping for resizing.
|
||||
set -g @smart-splits_resize_down_key 'M-j' # --"--
|
||||
set -g @smart-splits_resize_up_key 'M-k' # --"--
|
||||
set -g @smart-splits_resize_right_key 'M-l' # --"--
|
||||
|
||||
bind h if -F "#{@pane-is-vim}" 'split-window -h -b -c "#{pane_current_path}" "source ~/.bashrc && nvim"' 'split-window -h -b'
|
||||
bind l if -F "#{@pane-is-vim}" 'split-window -h -c "#{pane_current_path}" "source ~/.bashrc && nvim"' 'split-window -h'
|
||||
bind j split-window -v -p 10 -c "#{pane_current_path}"
|
||||
bind k split-window -v -b -c "#{pane_current_path}"
|
||||
|
||||
bind -n C-g display-popup -d "#{pane_current_path}" -E -w 90% -h 90% "lazygit"
|
||||
|
||||
# Status bar config
|
||||
set -g status-interval 2
|
||||
set -g status-bg "#303030"
|
||||
set -g status-fg "#c6c6c6"
|
||||
set -g status-left '#[bg=#87afd7,fg=#000000] #{session_name} '
|
||||
set -g status-right '#[fg=#87afd7,bg=#303030]#[fg=#c6c6c6,bg=#303030] #{pane_current_path} #[bg=#87afd7,fg=#000000] %d-%b-%Y %H:%M '
|
||||
set -g status-justify left
|
||||
|
||||
set-window-option -g window-status-separator ''
|
||||
set-window-option -g window-status-format '#[bg=#303030,fg=#555555] #I '
|
||||
set-window-option -g window-status-current-format '#[bg=#303030,fg=#c6c6c6] #I '
|
||||
|
||||
# Window styling
|
||||
set -g window-style 'bg=default,fg=#c6c6c6'
|
||||
set -g window-active-style 'bg=default,fg=#c6c6c6'
|
||||
set -g pane-border-style 'bg=#262626,fg=#000000'
|
||||
|
||||
@ -257,6 +257,7 @@ if [ "${ROLES[TERMINAL]}" == "yes" ]; then
|
||||
ln -sf ~/linuxbox/config/nvim/init.lua ~/.config/nvim/init.lua
|
||||
ln -sf ~/linuxbox/config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
|
||||
ln -sf ~/linuxbox/config/lazygit/config.yml ~/.config/lazygit/config.yml
|
||||
ln -sf ~/linuxbox/start_nvim.sh ~/.local/bin/start_nvim
|
||||
|
||||
if [ -d ~/.local/share/nvim/lazy ]; then
|
||||
nvim --headless "+Lazy! sync" +qa
|
||||
@ -268,14 +269,6 @@ if [ "${ROLES[TERMINAL]}" == "yes" ]; then
|
||||
~/.fzf/install --all
|
||||
source ~/.fzf.bash
|
||||
|
||||
# printf -- '\033[33m Installing ble.sh\n\033[37m'
|
||||
# if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
|
||||
# cd ~
|
||||
# git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
|
||||
# make -C ble.sh install
|
||||
# if [ -d ~/ble.sh ]; then rm -rf ~/ble.sh; fi
|
||||
# ln -sf ~/linuxbox/blerc ~/.blerc
|
||||
|
||||
printf -- '\033[33m Installing LSP servers\n\033[37m'
|
||||
sudo pacman --noconfirm --needed -S prettier stylua python-black shfmt lua-language-server bash-language-server ccls vscode-html-languageserver vscode-json-languageserver marksman pyright yaml-language-server vscode-css-languageserver clang
|
||||
yay --noconfirm -S --needed --aur dockerfile-language-server
|
||||
|
||||
@ -83,6 +83,8 @@ else
|
||||
ln -sf ~/linuxbox/config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml
|
||||
fi
|
||||
ln -sf ~/linuxbox/update_wrapper.sh ~/.local/bin/update
|
||||
ln -sf ~/linuxbox/start_nvim.sh ~/.local/bin/start_nvim
|
||||
ln -sf ~/linuxbox/start_toolbox.sh ~/.local/bin/start_toolbox
|
||||
|
||||
# Install brew
|
||||
printf -- '\033[33m Installing Homebrew\n\033[37m'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user