Compare commits

...

9 Commits

Author SHA1 Message Date
jolzem 6f7975fabe Included Alacritty color in config 2026-05-03 19:13:30 +02:00
jolzem 51e3ce3311 Outsourced Alacritty color 2026-05-03 19:12:05 +02:00
jolzem 2885a7d851 Updated colorscheme 2026-02-22 20:25:12 +01:00
jolzem c91d1f22ed Made yay config portable 2026-02-19 19:24:12 +01:00
jolzem e2c2cf41a3 Cleaned up vim config 2026-02-19 15:56:21 +01:00
jolzem 1d773607dd Removed old csgo config 2026-02-19 11:55:32 +01:00
jolzem 61be3cb0a7 Updated git editor 2026-02-19 11:55:08 +01:00
jolzem 01fb5edb24 Overhaul of alacritty config 2026-02-19 11:44:49 +01:00
jolzem 2c68ba6210 Overhaul of zsh config 2026-02-18 20:54:17 +01:00
13 changed files with 207 additions and 483 deletions
+20 -121
View File
@@ -1,128 +1,27 @@
[general] [general]
live_config_reload = true live_config_reload = true
import = [
[bell] "~/.config/alacritty/desktop.toml",
animation = "EaseOutExpo" "~/.config/alacritty/color.toml"
color = "0x1c1d27" ]
duration = 1
[colors]
draw_bold_text_with_bright_colors = true
[cursor]
style = "Beam"
unfocused_hollow = true
[font]
size = 12.0
[font.bold]
family = "DMMono Nerd Font"
style = "Bold"
[font.italic]
family = "DMMono Nerd Font"
style = "Italic"
[font.normal]
family = "DMMono Nerd Font"
style = "Medium"
[font.offset]
x = 0
y = 0
[[keyboard.bindings]]
action = "Paste"
key = "V"
mods = "Alt"
[[keyboard.bindings]]
action = "Copy"
key = "C"
mods = "Alt"
[[keyboard.bindings]]
action = "Quit"
key = "Q"
mods = "Super"
[[keyboard.bindings]]
action = "ToggleFullscreen"
key = "N"
mods = "Alt"
[[keyboard.bindings]]
action = "SpawnNewInstance"
key = "Return"
mods = "Super"
[[keyboard.bindings]]
action = "ScrollLineDown"
key = "J"
mods = "Alt"
[[keyboard.bindings]]
action = "ScrollLineUp"
key = "K"
mods = "Alt"
[[keyboard.bindings]]
action = "ScrollToBottom"
key = "L"
mods = "Alt"
[[keyboard.bindings]]
action = "ScrollToBottom"
key = "H"
mods = "Alt"
# Colors (Gruvbox dark)
# Default colors
[colors.primary]
# hard contrast background = = '#1d2021'
background = '#282828'
# soft contrast background = = '#32302f'
foreground = '#ebdbb2'
# Normal colors
[colors.normal]
black = '#282828'
red = '#cc241d'
green = '#98971a'
yellow = '#d79921'
blue = '#458588'
magenta = '#b16286'
cyan = '#689d6a'
white = '#a89984'
# Bright colors
[colors.bright]
black = '#928374'
red = '#fb4934'
green = '#b8bb26'
yellow = '#fabd2f'
blue = '#83a598'
magenta = '#d3869b'
cyan = '#8ec07c'
white = '#ebdbb2'
[mouse]
hide_when_typing = true
[scrolling]
history = 1000
[terminal.shell]
program = "/bin/zsh"
[window]
decorations = "None"
dynamic_padding = true
opacity = 0.9
[window.padding] [window.padding]
x = 32 x = 32
y = 32 y = 32
[font]
size = 12.0
[colors]
draw_bold_text_with_bright_colors = true
[cursor.style]
shape = "Block"
blinking = "On"
[keyboard]
bindings = [
{ key = "C", mods = "Alt", action = "Copy" },
{ key = "V", mods = "Alt", action = "Paste" }
]
+39
View File
@@ -0,0 +1,39 @@
# XTerm's default colors
# Default colors
[colors.primary]
background = '#000000'
foreground = '#ffffff'
# Normal colors
[colors.normal]
black = '#000000'
red = '#cd0000'
green = '#00cd00'
yellow = '#cdcd00'
blue = '#0000ee'
magenta = '#cd00cd'
cyan = '#00cdcd'
white = '#e5e5e5'
# Bright colors
[colors.bright]
black = '#7f7f7f'
red = '#ff0000'
green = '#00ff00'
yellow = '#ffff00'
blue = '#5c5cff'
magenta = '#ff00ff'
cyan = '#00ffff'
white = '#ffffff'
# Dim colors
[colors.dim]
black = '#000000'
red = '#9a0000'
green = '#009a00'
yellow = '#9a9a00'
blue = '#0000b4'
magenta = '#9a009a'
cyan = '#009a9a'
white = '#b2b2b2'
+21
View File
@@ -0,0 +1,21 @@
[window]
decorations = "None"
dynamic_padding = true
opacity = 0.9
[font.normal]
family = "JetBrainsMono Nerd Font"
style = "Light"
[font.bold]
family = "JetBrainsMono Nerd Font"
style = "Medium"
[font.italic]
family = "JetBrainsMono Nerd Font"
style = "Light Italic"
[font.bold_italic]
family = "JetBrainsMono Nerd Font"
style = "Medium Italic"
-152
View File
@@ -1,152 +0,0 @@
// Setup local server tick rate
tick 128
// Set rates according to your internet connection
rate 786432
// All the essential settings
con_enable // enable console
gameinstructor_enable 0 // disable instructions
cl_disablefreezecam 1 // disable death cam
cl_forcepreload 0 // force preloading
lobby_default_privacy_bits1 2 // lobby privacy: 0: private 1: public 2: clan 4: nearby 6: clan and nearby
cl_showloadout 1 // show weapons on bottom left
hud_showtargetid 1 // show enemy name on hover
cl_hud_bomb_under_radar 1 // show bomb under radar
cl_hud_playercount_pos 0 // show scoreboard/playercount on top
cl_hud_radar_scale 0.9 // how big radar is in hud
cl_cmdrate 128 // max command packets sent each second
cl_updaterate 128 // max command packets received each second
cl_teammate_colors_show 1 // show player colors
cl_radar_scale 0.4 // adjust zoom of radar
cl_radar_always_centered 0 // radar not centered on you
cl_radar_icon_scale_min 1 // how large character dots are
cl_use_opens_buy_menu 0 // dont open buy menu when pressing use
cl_interp 0.007813 // interpolation
cl_interp_ratio 1 // use cl_interp value
cl_predict 1 // predict on client side
cl_predictweapons 1 // predict weapon effects on client side
fps_max 150 // cap fps at 150
mm_dedicated_search_maxping 75 // matchmaking maximum ping 75
cl_autowepswitch 0 // don't auto switch weapon
joystick 0 // disable joystick
// Viewmodel
viewmodel_offset_x "2"
viewmodel_offset_y "2"
viewmodel_offset_z "-2"
viewmodel_fov "68"
viewmodel_presetpos "0" // don't reset after game restart
cl_viewmodel_shift_left_amt "0"
cl_viewmodel_shift_right_amt "0"
cl_bobcycle "0"
cl_bobamt_vert "0"
cl_bob_lower_amt "0"
cl_bobamt_lat "0"
cl_righthand 1
// Enable netgraph stats under scoreboard
net_graph 1
net_graphpos 2
// Crosshair
cl_crosshair_drawoutline "0"
cl_crosshaircolor "1"
cl_crosshairdot "0"
cl_crosshairgap "-2"
cl_crosshairgap_useweaponvalue "0"
cl_crosshairsize "2"
cl_crosshairstyle "4"
cl_crosshairthickness "0.5"
cl_crosshairusealpha "1"
// Switch all music off except 10s round end warning
volume 0.3
snd_musicvolume 0.3
snd_deathcamera_volume 0
snd_mapobjective_volume 0
snd_menumusic_volume 0
snd_roundend_volume 0
snd_roundstart_volume 0
snd_tensecondwarning_volume 0.2
snd_mvp_volume 0.2
// Stereo Settings
snd_mixahead 0.05
snd_headphone_pan_exponent 1
snd_headphone_pan_radial_weight 0
snd_front_headphone_position 90
snd_rear_headphone_position 90
// Voice Chat
voice_enable 1
voice_loopback 0
voice_scale .8
// Binds
unbindall
// Mouse
sensitivity "1.32"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind mwheeldown "+jump"
m_rawinput 1
m_customaccel 0
m_mousespeed 0
// Keyboard
// Directional
bind "w" "+forward"
bind "s" "+back"
bind "a" "+moveleft"
bind "d" "+moveright"
bind "ctrl" "+speed"
bind "shift" "+duck"
// interact/select
bind "r" "+reload"
bind "e" "+use"
bind "g" "drop"
bind "q" "lastinv" // last used weapon
bind "1" "slot1" // SMG/Rifle
bind "2" "slot2" // Pistol
bind "3" "slot3" // Knife
bind "4" "slot4" // Grenades
bind "5" "slot5" // Bomb
bind "x" "slot12" // healthshot
bind "t" "+lookatweapon" // inspect
bind "k" "say_team" // team chat
bind "h" "say" // global chat
bind "y" "+spray_menu" // spray
bind "]" "toggleconsole" // console
bind "tab" "+score" // scoreboard
// Buy
bind "space" "buymenu"
bind "b" "buy vest"
bind "v" "buy vesthelm"
bind "u" "buy defuser"
bind "i" "buy hegrenade"
bind "o" "buy molotov"
bind "p" "buy flashbang"
bind "[" "buy smokegrenade"
bind "," "buy ak47"
bind "." "buy deagle"
bind "/" "buy awp"
bind "SEMICOLON" "buy mac10"
// Alias
alias "dm" "ignorerad; ignoremsg; voice_enable 0" // silence
alias "undodm" "ignorerad; ignorerad; ignoremsg; ignoremsg; voice_enable 1"
alias "dc" "disconnect" // easy disconnect
alias "cd" "disconnect"
alias "+jumpthrow" "+jump;-attack"
alias "-jumpthrow" "-jump"
bind "c" "+jumpthrow"
host_writeconfig
+21 -12
View File
@@ -22,17 +22,25 @@ for option in "$@"; do
[ ! -d "$HOME/.config/alacritty" ] && mkdir -p "$HOME/.config/alacritty" [ ! -d "$HOME/.config/alacritty" ] && mkdir -p "$HOME/.config/alacritty"
link "$PWD/alacritty/alacritty.toml" "$HOME/.config/alacritty/alacritty.toml" link "$PWD/alacritty/alacritty.toml" "$HOME/.config/alacritty/alacritty.toml"
;; ;;
alacritty-desktop)
[ ! -d "$HOME/.config/alacritty" ] && mkdir -p "$HOME/.config/alacritty"
link "$PWD/alacritty/desktop.toml" "$HOME/.config/alacritty/desktop.toml"
;;
alacritty-color)
[ ! -d "$HOME/.config/alacritty" ] && mkdir -p "$HOME/.config/alacritty"
link "$PWD/alacritty/color.toml" "$HOME/.config/alacritty/color.toml"
;;
zsh) zsh)
[ ! -d "$HOME/.config/zsh" ] && mkdir -p "$HOME/.config/zsh" mkdir -p "$HOME/.config/zsh"
link "$PWD/zsh/.zshrc" "$HOME/.config/zsh/.zshrc" mkdir -p "/etc/zsh"
link "$PWD/zsh/aliases" "$HOME/.config/zsh/aliases" echo "export ZDOTDIR=\"\$HOME\"/.config/zsh" | sudo tee /etc/zsh/zshenv
[ -e "/etc/zsh/zshenv" ] && sudo mv /etc/zsh/zshenv /etc/zsh/zshenv.bak && sudo ln -s "$PWD/zsh/zshenv" /etc/zsh/zshenv || sudo ln -s "$PWD/zsh/zshenv" /etc/zsh/zshenv
curl -fLo $HOME/.config/zsh/zsh-autosuggestions.zsh --create-dirs \ ZSH="$HOME/.config/zsh/ohmyzsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
https://raw.githubusercontent.com/zsh-users/zsh-autosuggestions/master/zsh-autosuggestions.zsh
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.config/zsh/zsh-syntax-highlighting mkdir -p ~/.config/zsh/ohmyzsh/custom/plugins
git clone https://github.com/romkatv/gitstatus.git $HOME/.config/zsh/gitstatus git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.config/zsh/ohmyzsh/custom/plugins/zsh-syntax-highlighting
mv "$HOME/.config/zsh/gitstatus/gitstatus.prompt.zsh" "$HOME/.config/zsh/gitstatus/gitstatus.prompt.zsh.bak" git clone https://github.com/zsh-users/zsh-autosuggestions ~/.config/zsh/ohmyzsh/custom/plugins/zsh-autosuggestions
link "$PWD/zsh/gitstatus.prompt.zsh" "$HOME/.config/zsh/gitstatus/gitstatus.prompt.zsh" link "$PWD/zsh/zshrc" "$HOME/.config/zsh/.zshrc"
;; ;;
git) git)
[ ! -d "$HOME/.config/git" ] && mkdir -p "$HOME/.config/git" [ ! -d "$HOME/.config/git" ] && mkdir -p "$HOME/.config/git"
@@ -58,8 +66,9 @@ for option in "$@"; do
cp scripts/* "$HOME/.local/bin" cp scripts/* "$HOME/.local/bin"
;; ;;
vim) vim)
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim mkdir -p ~/.config/vim
link "$PWD/vim/vimrc" "$HOME/.vim/vimrc" git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/vim/bundle/Vundle.vim
link "$PWD/vim/vimrc" "$HOME/.config/vim/vimrc"
vim +PluginInstall +qall vim +PluginInstall +qall
;; ;;
yay) yay)
+1 -1
View File
@@ -15,7 +15,7 @@
rebase = false rebase = false
[core] [core]
editor = nvim editor = vim
[http] [http]
sslVerify = false sslVerify = false
+10 -19
View File
@@ -1,5 +1,5 @@
set nocompatible set nocompatible
filetype off filetype plugin indent on
syntax on " enable syntax highlighting syntax on " enable syntax highlighting
set number relativenumber " relative line numbers set number relativenumber " relative line numbers
set ai " Sets auto-indentation set ai " Sets auto-indentation
@@ -27,57 +27,48 @@ set bg=dark " set dark background
set wildmode=longest,list,full set wildmode=longest,list,full
set mouse=a " enable mouse set mouse=a " enable mouse
set splitright " always split right set splitright " always split right
set viminfo+=n$HOME/.vim/viminfo " save viminfo in .vim dir to keep ~/ clean set viminfo+=n~/.config/vim/viminfo " save viminfo in .vim dir to keep ~/ clean
" Set the runtime path to include Vundle and initialize " Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim set rtp+=~/.config/vim/bundle/Vundle.vim
" Download plug-ins to the ~/.vim/plugged/ directory " Download plug-ins to the ~/.config/vim/plugged/ directory
call vundle#begin('~/.vim/plugged') call vundle#begin('~/.config/vim/plugged')
Plugin 'VundleVim/Vundle.vim' " Let Vundle manage Vundle Plugin 'VundleVim/Vundle.vim' " Let Vundle manage Vundle
Plugin 'sheerun/vim-polyglot' " Syntax highlighting Plugin 'sheerun/vim-polyglot' " Syntax highlighting
Plugin 'jiangmiao/auto-pairs' " Pair completion Plugin 'jiangmiao/auto-pairs' " Pair completion
Plugin 'lervag/vimtex' " LaTeX tools Plugin 'lervag/vimtex' " LaTeX tools
Plugin 'vim-airline/vim-airline' " Nicer info line Plugin 'vim-airline/vim-airline' " Nicer info line
Plugin 'junegunn/goyo.vim' " Zen Workspace
Plugin 'alvan/vim-closetag' " Auto close HTML tags Plugin 'alvan/vim-closetag' " Auto close HTML tags
Plugin 'https://github.com/morhetz/gruvbox' " Color scheme Plugin 'https://github.com/nanotech/jellybeans.vim' " Color Scheme
Plugin 'https://github.com/ap/vim-css-color' " highlight color codes in their color Plugin 'https://github.com/ap/vim-css-color' " highlight color codes in their color
Plugin 'https://github.com/907th/vim-auto-save.git' " auto save Plugin 'https://github.com/907th/vim-auto-save.git' " auto save
call vundle#end() call vundle#end()
colorscheme gruvbox try
colorscheme jellybeans
filetype plugin indent on catch
endtry
let g:auto_save = 1 let g:auto_save = 1
let g:AutoPairsShortcutToggle = '<C-P>' " Press Ctrl+P to disable pair completion let g:AutoPairsShortcutToggle = '<C-P>' " Press Ctrl+P to disable pair completion
let g:vimtex_view_method = 'zathura' let g:vimtex_view_method = 'zathura'
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
" REMAPPING
" jump to last known position when opening a file " jump to last known position when opening a file
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
map <C-g> :Goyo<CR>
imap <C-g> <esc>:Goyo<CR>a
" indent with tab " indent with tab
vnoremap <Tab> >gv vnoremap <Tab> >gv
vnoremap <S-Tab> <gv vnoremap <S-Tab> <gv
vnoremap <Tab> >> vnoremap <Tab> >>
inoremap <Tab> <Esc>>>a
nnoremap <Tab> >> nnoremap <Tab> >>
inoremap <S-Tab> <Esc><<a
nnoremap <S-Tab> << nnoremap <S-Tab> <<
" jump to beginning of selection when exiting visual mode " jump to beginning of selection when exiting visual mode
vnoremap <Esc> o<Esc> vnoremap <Esc> o<Esc>
autocmd BufWritePre,BufRead *.tex :VimtexCompile " autocompile tex docs
autocmd VimLeave *.tex :!texclear % " clear tex junk when closing tex file
autocmd BufWritePre * %s/\s\+$//e " auto delete trailing white space on save autocmd BufWritePre * %s/\s\+$//e " auto delete trailing white space on save
autocmd BufWritePost *.vim source %
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"aururl": "https://aur.archlinux.org", "aururl": "https://aur.archlinux.org",
"aurrpcurl": "https://aur.archlinux.org/rpc?", "aurrpcurl": "https://aur.archlinux.org/rpc?",
"buildDir": "/home/johannes/.cache/yay", "buildDir": "~/.cache/yay",
"editor": "", "editor": "",
"editorflags": "", "editorflags": "",
"makepkgbin": "makepkg", "makepkgbin": "makepkg",
-27
View File
@@ -1,27 +0,0 @@
autoload -Uz promptinit
promptinit
bindkey -e
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" backward-kill-word
setopt histignorealldups sharehistory
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=$HOME/.config/zsh/zsh_history
# Modern completion system
autoload -Uz compinit
compinit -d ~/.cache/zsh/ > /dev/null 2>&1
_comp_options+=(globdots) # include hidden files
autoload -U colors && colors
source /etc/zsh/zshenv
source $HOME/.config/zsh/aliases
source $HOME/.config/zsh/zsh-autosuggestions.zsh
source $HOME/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $HOME/.config/zsh/gitstatus/gitstatus.prompt.zsh
-22
View File
@@ -1,22 +0,0 @@
alias sudo='/usr/bin/doas '
alias ls='ls --color=auto'
alias ll='ls -lAh --color=auto'
alias la='ls -A --color=auto'
alias l='ls -A --color=auto'
alias cp='rsync -ah --progress'
alias grep='grep --color=auto'
alias sc='source /home/johannes/.config/zsh/.zshrc' # reload zsh configuration
alias cn='clear && neofetch'
alias live-server='live-server --port=1111 --host=127.0.0.1 --no-css-inject'
alias pac='doas pacman'
alias minecraft-launcher='minecraft-launcher --workDir /home/johannes/.local/share/minecraft'
alias enablebluetooth='doas modprobe btusb'
alias virt-manager='/bin/sudo -i virt-manager'
# Typos
alias al="ls -lAh --color=auto"
alias s=""
alias vnim="nvim"
alias daos="doas "
alias celar="clear"
alias gti="git"
-111
View File
@@ -1,111 +0,0 @@
# Simple Zsh prompt with Git status.
# Source gitstatus.plugin.zsh from $GITSTATUS_DIR or from the same directory
# in which the current script resides if the variable isn't set.
source "${GITSTATUS_DIR:-${${(%):-%x}:h}}/gitstatus.plugin.zsh" || return
# Sets GITSTATUS_PROMPT to reflect the state of the current git repository. Empty if not
# in a git repository. In addition, sets GITSTATUS_PROMPT_LEN to the number of columns
# $GITSTATUS_PROMPT will occupy when printed.
#
# Example:
#
# GITSTATUS_PROMPT='master ⇣42⇡42 ⇠42⇢42 *42 merge ~42 +42 !42 ?42'
# GITSTATUS_PROMPT_LEN=39
#
# master current branch
# ⇣42 local branch is 42 commits behind the remote
# ⇡42 local branch is 42 commits ahead of the remote
# ⇠42 local branch is 42 commits behind the push remote
# ⇢42 local branch is 42 commits ahead of the push remote
# *42 42 stashes
# merge merge in progress
# ~42 42 merge conflicts
# +42 42 staged changes
# !42 42 unstaged changes
# ?42 42 untracked files
function gitstatus_prompt_update() {
emulate -L zsh
typeset -g GITSTATUS_PROMPT=''
typeset -gi GITSTATUS_PROMPT_LEN=0
# Call gitstatus_query synchronously. Note that gitstatus_query can also be called
# asynchronously; see documentation in gitstatus.plugin.zsh.
gitstatus_query 'MY' || return 1 # error
[[ $VCS_STATUS_RESULT == 'ok-sync' ]] || return 0 # not a git repo
local clean='%76F' # green foreground
local modified='%178F' # yellow foreground
local untracked='%39F' # blue foreground
local conflicted='%196F' # red foreground
local p
local where # branch name, tag or commit
if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then
where=$VCS_STATUS_LOCAL_BRANCH
elif [[ -n $VCS_STATUS_TAG ]]; then
p+='%f#'
where=$VCS_STATUS_TAG
else
p+='%f@'
where=${VCS_STATUS_COMMIT[1,8]}
fi
(( $#where > 32 )) && where[13,-13]="…" # truncate long branch names and tags
p+="${clean}${where//\%/%%}" # escape %
# ⇣42 if behind the remote.
(( VCS_STATUS_COMMITS_BEHIND )) && p+=" ${clean}${VCS_STATUS_COMMITS_BEHIND}"
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=" "
(( VCS_STATUS_COMMITS_AHEAD )) && p+="${clean}${VCS_STATUS_COMMITS_AHEAD}"
# ⇠42 if behind the push remote.
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=" ${clean}${VCS_STATUS_PUSH_COMMITS_BEHIND}"
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && p+=" "
# ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.
(( VCS_STATUS_PUSH_COMMITS_AHEAD )) && p+="${clean}${VCS_STATUS_PUSH_COMMITS_AHEAD}"
# *42 if have stashes.
(( VCS_STATUS_STASHES )) && p+=" ${clean}*${VCS_STATUS_STASHES}"
# 'merge' if the repo is in an unusual state.
[[ -n $VCS_STATUS_ACTION ]] && p+=" ${conflicted}${VCS_STATUS_ACTION}"
# ~42 if have merge conflicts.
(( VCS_STATUS_NUM_CONFLICTED )) && p+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}"
# +42 if have staged changes.
(( VCS_STATUS_NUM_STAGED )) && p+=" ${modified}+${VCS_STATUS_NUM_STAGED}"
# !42 if have unstaged changes.
(( VCS_STATUS_NUM_UNSTAGED )) && p+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}"
# ?42 if have untracked files. It's really a question mark, your font isn't broken.
(( VCS_STATUS_NUM_UNTRACKED )) && p+=" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}"
GITSTATUS_PROMPT="${p}%f"
# The length of GITSTATUS_PROMPT after removing %f and %F.
GITSTATUS_PROMPT_LEN="${(m)#${${GITSTATUS_PROMPT//\%\%/x}//\%(f|<->F)}}"
}
# Start gitstatusd instance with name "MY". The same name is passed to
# gitstatus_query in gitstatus_prompt_update. The flags with -1 as values
# enable staged, unstaged, conflicted and untracked counters.
gitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY'
# On every prompt, fetch git status and set GITSTATUS_PROMPT.
autoload -Uz add-zsh-hook
add-zsh-hook precmd gitstatus_prompt_update
# Enable/disable the right prompt options.
setopt no_prompt_bang prompt_percent prompt_subst
# Customize prompt. Put $GITSTATUS_PROMPT in it to reflect git status.
#
# Example:
#
# user@host ~/projects/skynet master ⇡42
# % █
#
# The current directory gets truncated from the left if the whole prompt doesn't fit on the line.
PROMPT='%F{cyan}%n@%m%f ' # green user@host
PROMPT+='%F{blue}%$((-GITSTATUS_PROMPT_LEN-1))<…<%~%<<%f' # blue current working directory
PROMPT+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}' # git status
PROMPT+=$'\n' # new line
PROMPT+='%F{%(?.green.red)}%#%f ' # %/# (normal/root); green/red (ok/error)
-17
View File
@@ -1,17 +0,0 @@
# XDG Base Directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_DATA_DIRS="/usr/local/share:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"
export XDG_CONFIG_DIRS="/etc/xdg"
# ~/ Cleanup
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export ZDOTDIR="$HOME"/.config/zsh
export HISTFILE="${XDG_STATE_HOME}"/bash/history
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export TEXMFVAR="$XDG_CACHE_HOME"/texlive/texmf-var
export PATH="$PATH:$HOME/.local/bin:/sbin"
export GPG_TTY=$(tty)
+94
View File
@@ -0,0 +1,94 @@
export ZSH="$ZDOTDIR/ohmyzsh"
ZSH_THEME="bira"
zstyle ':omz:update' mode auto # update automatically without asking
# command execution time stamp shown in the history command output.
HIST_STAMPS="dd.mm.yyyy"
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)
source $ZSH/oh-my-zsh.sh
#######################################################
#
# User configuration
#
#######################################################
#
# Aliases
#
alias pac="doas pacman"
alias sudo="doas "
alias mv="mv -i"
alias ls="ls --color=auto"
alias ll="ls -lAh --color=auto"
alias la="ls -A --color=auto"
alias l="ls -A --color=auto"
alias grep="grep --color=auto"
# Typos
alias al="ls -lAh --color=auto"
alias s=""
alias daos="doas "
alias celar="clear"
alias gti="git"
alias mc="mv -i"
#
# Variables
#
# XDG Base Directories
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.local/cache"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_DATA_DIRS="/usr/local/share:/usr/share"
export XDG_CONFIG_DIRS="/etc/xdg"
# ~/ Cleanup
export CARGO_HOME="$XDG_DATA_HOME"/cargo
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export ZDOTDIR="$HOME"/.config/zsh
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
export TEXMFVAR="$XDG_CACHE_HOME"/texlive/texmf-var
export PATH="$PATH:$HOME/.local/bin:/sbin"
export GPG_TTY=$(tty)
export XDG_DATA_DIRS="$XDG_DATA_DIRS:/var/lib/flatpak/exports/share"
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"
#
# Behaviour
#
# Modern completion system
autoload -Uz compinit
compinit -d ~/.cache/zsh/ > /dev/null 2>&1
_comp_options+=(globdots) # include hidden files
# shell history
HISTFILE=~/.config/zsh/history
HISTSIZE=100000
SAVEHIST=100000
# Search history with Up / Down
bindkey "\e[A" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward
setopt hist_ignore_all_dups # remove older duplicate entries from history
setopt hist_reduce_blanks # remove superfluous blanks from history items
setopt inc_append_history # save history entries as soon as they are entered
setopt share_history # share history between different instances of the shell
setopt auto_cd # cd by typing directory name if it's not a command
setopt correct_all # autocorrect commands
setopt auto_list # automatically list choices on ambiguous completion
setopt auto_menu # automatically use menu completion
setopt always_to_end # move cursor to end if word had one match