Compare commits
No commits in common. "f8033113e5efded85de78e7db5ca96a2b6e8d648" and "6bf24d23ecec15beaf602f8a93733f399650f261" have entirely different histories.
f8033113e5
...
6bf24d23ec
@ -58,8 +58,7 @@
|
||||
|
||||
{:des "+ <-> ~ on advantage"
|
||||
:rules [:adv2 [:!Requal_sign :!Rgrave_accent_and_tilde :en]
|
||||
[:!Rgrave_accent_and_tilde :non_us_backslash :en]
|
||||
[:non_us_backslash :!Sequal_sign]]}
|
||||
[:!Rgrave_accent_and_tilde :!Requal_sign :en]]}
|
||||
|
||||
|
||||
{:des "Alternative language switches: Lcmd->English, Rcmd->Russian, Rshift-> Russian"
|
||||
@ -71,10 +70,11 @@
|
||||
[:!Ct [:!Ct {:input :en}]]
|
||||
[:!Cl [:!Cl {:input :en}]]
|
||||
;; [:!Ctab [:!Ctab {:input :en}]]
|
||||
]}
|
||||
]}
|
||||
|
||||
{:des "Caps->Russian, LShift->English"
|
||||
:rules [[:##caps_lock ["capskey" 1] :ru {:alone {:input :en}
|
||||
:rules [[:##left_shift :left_shift nil {:alone {:input :en}}]
|
||||
[:##caps_lock ["capskey" 1] :ru {:alone {:input :en}
|
||||
:afterup ["capskey" 0]}]
|
||||
[:##caps_lock ["capskey" 1] :en {:alone {:input :ru}
|
||||
:afterup ["capskey" 0]}]
|
||||
@ -144,11 +144,10 @@
|
||||
:held :caps_lock}]
|
||||
[:##right_shift :right_shift :en {:alone :comma
|
||||
:held :caps_lock}]]}
|
||||
{:des "Lshift->Plus"
|
||||
:rules [[:##left_shift :left_shift nil {:alone :!Sequal_sign}]]}
|
||||
|
||||
{:des "Rcommand -> comma, but not on advantage"
|
||||
:rules [[:##right_command :right_command [:ru :!adv2] {:alone :!R6}]]}]
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -169,7 +168,7 @@
|
||||
;; Q | right_command
|
||||
;; W | right_control
|
||||
;; E | right_option
|
||||
;; R | right_shift
|
||||
;; R | right_shift
|
||||
;; P | caps_lock
|
||||
;; !! | mandatory command + control + optional + shift (hyper)
|
||||
;; ## | optional any
|
||||
|
@ -31,7 +31,7 @@ require("lazy").setup({
|
||||
-- Gruvbox colorscheme
|
||||
{ "ellisonleao/gruvbox.nvim", priority = 1000 },
|
||||
-- Treesitter for better highlighting and moving
|
||||
{ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" , tag="v0.9.2"},
|
||||
{ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" },
|
||||
{ "nvim-telescope/telescope.nvim", tag = "0.1.1", dependencies = { "nvim-lua/plenary.nvim" } },
|
||||
{ "ojroques/nvim-osc52" },
|
||||
{ "nvim-tree/nvim-tree.lua" },
|
||||
@ -112,7 +112,7 @@ require("toggleterm").setup({})
|
||||
require("hop").setup()
|
||||
require("mini.ai").setup()
|
||||
require("mini.pairs").setup()
|
||||
-- require("mini.comment").setup()
|
||||
require("mini.comment").setup()
|
||||
require("mini.starter").setup()
|
||||
require("mini.statusline").setup()
|
||||
require("mini.tabline").setup()
|
||||
|
@ -23,14 +23,15 @@ if status is-interactive
|
||||
|
||||
if type -q jump
|
||||
# initialize jump cd
|
||||
jump shell fish --bind=z | source
|
||||
jump shell fish | source
|
||||
end
|
||||
end
|
||||
# aliases
|
||||
alias b "bat -p"
|
||||
alias b "bat -p --pager=never"
|
||||
alias l "ls -la"
|
||||
alias lll "ls -latr"
|
||||
alias lg "lazygit"
|
||||
alias z j
|
||||
|
||||
# abbreviations
|
||||
abbr lsn littlesnitch
|
||||
|
@ -3,6 +3,7 @@ jorgebucaran/nvm.fish
|
||||
laughedelic/pisces
|
||||
jorgebucaran/replay.fish
|
||||
z11i/github-copilot-cli.fish
|
||||
ilancosman/tide@v5
|
||||
gazorby/fish-abbreviation-tips
|
||||
franciscolourenco/done
|
||||
nickeb96/puffer-fish
|
||||
@ -10,4 +11,3 @@ patrickf1/colored_man_pages.fish
|
||||
jhillyerd/plugin-git
|
||||
patrickf1/fzf.fish
|
||||
lilyball/nix-env.fish
|
||||
ilancosman/tide@v6
|
||||
|
@ -220,19 +220,5 @@ wezterm.on(
|
||||
end
|
||||
)
|
||||
|
||||
wezterm.on('update-right-status', function(window, pane)
|
||||
local domain = pane:get_domain_name()
|
||||
if (domain == "local") then
|
||||
domain = ""
|
||||
end
|
||||
-- Make it italic and underlined
|
||||
window:set_right_status(wezterm.format {
|
||||
{ Attribute = { Underline = 'None' } },
|
||||
{ Attribute = { Italic = false } },
|
||||
{ Text = domain },
|
||||
})
|
||||
end)
|
||||
|
||||
|
||||
-- and finally, return the configuration to wezterm
|
||||
return config
|
||||
|
@ -1,129 +1,61 @@
|
||||
#!/usr/bin/env bash
|
||||
#Config
|
||||
STEPS=12
|
||||
PAD_LEN=4
|
||||
|
||||
BASE_PACKAGES="gnupg curl wget git gcc"
|
||||
ACT_PACKAGES="ripgrep unzip htop fzf bat gawk jq nnn tmux mc nethogs ngrep mtr"
|
||||
|
||||
#Colors
|
||||
USER=$(whoami)
|
||||
Green='\033[0;32m' # Green
|
||||
Blue='\033[0;34m' # Blue
|
||||
Yello='\033[0;33m' # Blue
|
||||
Gray='\033[38;5;7m' # Light Gray
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
#Setup
|
||||
TERM_WIDTH_BASE=$(tput cols)
|
||||
LINES=$(tput lines)
|
||||
USER=$(whoami)
|
||||
STEP=1
|
||||
cd
|
||||
cd ~
|
||||
|
||||
echo -e "
|
||||
|
||||
$Green""###############################################################################
|
||||
|
||||
$Green###############################################################################
|
||||
## ##
|
||||
## Ready to install Anton Volnuhin's env ##
|
||||
## Update caches and upgrade packages ##
|
||||
## ##
|
||||
## Press $Yello""Enter"$Green" to continue, $Yello""Ctrl-C"$Green" to abort ##
|
||||
## email: anton@volnuhin.com ##
|
||||
## ##
|
||||
###############################################################################$NC
|
||||
|
||||
"
|
||||
read
|
||||
|
||||
print_block
|
||||
|
||||
|
||||
|
||||
get_line ()
|
||||
{
|
||||
IFS='[;' read -p $'\e[6n' -d R -a pos -rs || echo "failed with error: $? ; ${pos[*]}"
|
||||
echo ${pos[1]}
|
||||
}
|
||||
|
||||
print_block ()
|
||||
{
|
||||
local ln=$(get_line)
|
||||
if [[ "$ln" -lt "$(($LINES - $STEPS))" ]];then
|
||||
tput csr 0 $LINES
|
||||
tput cup $(($LINES - $STEPS - 2)) 0
|
||||
else
|
||||
ln=$(($LINES - $STEPS - 1))
|
||||
fi
|
||||
echo "..........................................................."
|
||||
for i in $(seq 1 12)
|
||||
do
|
||||
echo -n " >"
|
||||
tput el
|
||||
echo
|
||||
done
|
||||
tput cup $(($ln - 3)) 0
|
||||
}
|
||||
|
||||
new_line () {
|
||||
# move cursor to current step's line
|
||||
local ln=$(get_line)
|
||||
tput csr 0 $LINES
|
||||
tput cup $(($LINES - $STEPS - 2 + $STEP)) 0
|
||||
|
||||
echo -e "==> "$Green$1$NC
|
||||
|
||||
STEP=$(($STEP + 1))
|
||||
|
||||
tput csr 0 $(($LINES - $STEPS - 3))
|
||||
tput cup $(($ln - 1)) 0
|
||||
echo -e "\n--> "$Blue$1$NC
|
||||
tput el
|
||||
}
|
||||
|
||||
pad() {
|
||||
local PADDING=$(printf "%${PAD_LEN}s") # 4 spaces of padding
|
||||
local TERM_WIDTH=$(($TERM_WIDTH_BASE - $PAD_LEN))
|
||||
while IFS= read -r line; do
|
||||
echo -e $Gray$line$NC | fold -s -w $TERM_WIDTH | sed "s/^/$PADDING/"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
||||
new_line "Update caches and upgrade packages"
|
||||
###############################################################################$NC"
|
||||
|
||||
{{ if eq .chezmoi.os "darwin" -}}
|
||||
if ! type brew; then
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 2>&1|pad
|
||||
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
brew update 2>&1|pad
|
||||
brew update
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
sudo dnf update -y 2>&1|pad
|
||||
sudo dnf update -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}}
|
||||
sudo apt-get update 2>&1|pad
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -o "Dpkg::Options::=--force-confold" -o "Dpkg::Options::=--force-confdef" upgrade -y --allow-downgrades --allow-remove-essential --allow-change-held-packages 2>&1|pad
|
||||
sudo apt-get install software-properties-common -y 2>&1|pad
|
||||
sudo apt-get update
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -o "Dpkg::Options::=--force-confold" -o "Dpkg::Options::=--force-confdef" upgrade -y --allow-downgrades --allow-remove-essential --allow-change-held-packages
|
||||
sudo apt-get install software-properties-common -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "arch" -}}
|
||||
sudo pacman -Syu --noconfirm 2>&1|pad
|
||||
sudo pacman -Syu --noconfirm
|
||||
|
||||
{{ end -}}
|
||||
|
||||
|
||||
new_line "Install base packages"
|
||||
echo -e "
|
||||
|
||||
|
||||
$Green###############################################################################
|
||||
## ##
|
||||
## Install base packages ##
|
||||
## ##
|
||||
###############################################################################$NC"
|
||||
|
||||
{{ if eq .chezmoi.os "darwin" -}}
|
||||
brew install -q $BASE_PACKAGES python difftastic 2>&1|pad
|
||||
brew install -q $BASE_PACKAGES python difftastic
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
sudo dnf install $BASE_PACKAGES difftastic kitty-terminfo util-linux-user python3-pip -y 2>&1|pad
|
||||
sudo dnf install $BASE_PACKAGES difftastic kitty-terminfo util-linux-user python3-pip -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}}
|
||||
sudo apt install $BASE_PACKAGES kitty-terminfo direnv python3-pip -y 2>&1|pad
|
||||
sudo apt install $BASE_PACKAGES kitty-terminfo direnv python3-pip -y
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "arch" -}}
|
||||
sudo pacman -Sy --noconfirm $BASE_PACKAGES difftastic kitty-terminfo python3-pip 2>&1|pad
|
||||
sudo pacman -Sy --noconfirm $BASE_PACKAGES difftastic kitty-terminfo python3-pip
|
||||
|
||||
{{ end -}}
|
||||
|
||||
@ -133,8 +65,15 @@ new_line "Install base packages"
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
if ! type nix &> /dev/null
|
||||
then
|
||||
new_line "Install nix packet manager (single user)"
|
||||
bash <(curl -L https://nixos.org/nix/install) --no-daemon 2>&1|pad
|
||||
echo -e "
|
||||
|
||||
|
||||
$Green###############################################################################
|
||||
## ##
|
||||
## Install nix packet manager (single user) ##
|
||||
## ##
|
||||
###############################################################################$NC"
|
||||
bash <(curl -L https://nixos.org/nix/install) --no-daemon
|
||||
. ~/.nix-profile/etc/profile.d/nix.sh
|
||||
fi
|
||||
|
||||
@ -143,84 +82,86 @@ fi
|
||||
################################################################################
|
||||
|
||||
{{ if eq .chezmoi.osRelease.id "debian" "ubuntu" -}}
|
||||
echo -e "
|
||||
|
||||
|
||||
$Green################################################################################
|
||||
## ##
|
||||
## Subscribe to PPA for fish, lazygit, neovim in ubuntu/debian ##
|
||||
## ##
|
||||
################################################################################$NC"
|
||||
|
||||
|
||||
{{ if eq .chezmoi.osRelease.id "debian" -}}
|
||||
|
||||
new_line "Subscribe to PPA for fish"
|
||||
## Setup fish repo in debian
|
||||
VERS={{ .chezmoi.osRelease.versionID }}
|
||||
echo "deb http://download.opensuse.org/repositories/shells:/fish:/release:/3/Debian_$VERS/ /" | sudo tee /etc/apt/sources.list.d/shells:fish:release:3.list
|
||||
curl -fsSL "https://download.opensuse.org/repositories/shells:fish:release:3/Debian_$VERS/Release.key" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_fish_release_3.gpg > /dev/null
|
||||
|
||||
{{ else -}}
|
||||
new_line "Subscribe to PPA for fish"
|
||||
## Setup fish repo in ubuntu
|
||||
sudo apt-add-repository ppa:fish-shell/release-3 -y 2>&1|pad
|
||||
sudo apt-add-repository ppa:fish-shell/release-3 -y
|
||||
|
||||
new_line "Subscribe to PPA for neovim"
|
||||
## Neovim ppa
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y 2>&1|pad
|
||||
sudo add-apt-repository ppa:neovim-ppa/unstable -y
|
||||
|
||||
{{ end -}}
|
||||
sudo apt-get update 2>&1|pad
|
||||
sudo apt-get update
|
||||
{{ end -}}
|
||||
|
||||
{{ end -}}
|
||||
|
||||
|
||||
echo -e "
|
||||
|
||||
|
||||
$Green###############################################################################
|
||||
## ##
|
||||
## Install neovim, fish, fisher, atuin, jump, and the rest of packages ##
|
||||
## ##
|
||||
###############################################################################$NC"
|
||||
sleep 3
|
||||
|
||||
new_line "Install neovim, fish, atuin, jump and the rest"
|
||||
{{ if eq .chezmoi.os "darwin" -}}
|
||||
brew install -q fish neovim $ACT_PACKAGES atuin jump fd sk dust lazygit 2>&1|pad
|
||||
brew install -q fish neovim $ACT_PACKAGES atuin jump fd sk dust lazygit
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "fedora" -}}
|
||||
new_line "via DNF"
|
||||
sudo dnf install neovim fish $ACT_PACKAGES fd-find skim pam_ssh_agent_auth -y 2>&1|pad
|
||||
new_line "via NIX"
|
||||
nix-env -iA nixpkgs.atuin nixpkgs.jump nixpkgs.du-dust nixpkgs.lazygit 2>&1|pad
|
||||
sudo dnf install neovim fish $ACT_PACKAGES fd-find skim pam_ssh_agent_auth -y
|
||||
nix-env -iA nixpkgs.atuin nixpkgs.jump nixpkgs.du-dust nixpkgs.lazygit
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "arch" -}}
|
||||
sudo pacman -Sy --noconfirm neovim fish atuin $ACT_PACKAGES fd skim lazygit 2>&1|pad
|
||||
nix-env -iA nixpkgs.jump nixpkgs.du-dust 2>&1|pad
|
||||
sudo pacman -Sy --noconfirm neovim fish atuin $ACT_PACKAGES fd skim lazygit
|
||||
nix-env -iA nixpkgs.jump nixpkgs.du-dust
|
||||
|
||||
{{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}}
|
||||
sudo apt install fish neovim $ACT_PACKAGES libpam-ssh-agent-auth -y 2>&1|pad
|
||||
sudo apt install fish neovim $ACT_PACKAGES libpam-ssh-agent-auth -y
|
||||
|
||||
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
|
||||
curl --silent -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" 2>&1|pad
|
||||
tar xf lazygit.tar.gz lazygit 2>&1|pad
|
||||
sudo install lazygit /usr/local/bin 2>&1|pad
|
||||
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||
tar xf lazygit.tar.gz lazygit
|
||||
sudo install lazygit /usr/local/bin
|
||||
|
||||
nix-env -iA nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin 2>&1|pad
|
||||
nix-env -iA nixpkgs.jump nixpkgs.skim nixpkgs.du-dust nixpkgs.atuin
|
||||
|
||||
{{ end -}}
|
||||
|
||||
new_line "Installing shell-gpt"
|
||||
pipx install shell-gpt 2>&1|pad
|
||||
## Install shell-gpt
|
||||
echo
|
||||
echo -e "$Green""Installing shell-gpt$NC"
|
||||
pip install shell-gpt -q --break-system-packages
|
||||
|
||||
new_line "Install fisher plugin manager for fish"
|
||||
## Install fisher plugin manager for fish, so that we may update in after plugin list sync by chezmoi
|
||||
if ! fish -c fisher &>/dev/null
|
||||
then
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher" 2>&1|pad
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
fi
|
||||
|
||||
|
||||
new_line "Installing and configuring tide prompt for fish"
|
||||
fish -c "fisher install ilancosman/tide@v6" 2>&1|pad
|
||||
fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Slanted --powerline_prompt_heads=Slanted --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Few icons' --transient=No" >/dev/null
|
||||
fish -c "set -Ux tide_context_always_display true"
|
||||
|
||||
|
||||
new_line "Change default shell to fish for user $USER"
|
||||
## Change default shell to fish
|
||||
if [ "$(basename $SHELL)" != "fish" ]
|
||||
then
|
||||
echo
|
||||
echo
|
||||
echo "Changing shell to fish for user $USER"
|
||||
sudo chsh -s $(command -v fish) $USER
|
||||
fi
|
||||
|
||||
|
||||
tput csr 0 $LINES
|
||||
tput cup $LINES 0
|
||||
echo
|
||||
|
Loading…
Reference in New Issue
Block a user