sync to master

This commit is contained in:
Christoph J. Scherr 2024-01-20 21:09:54 +01:00
commit 03521ea17a
10 changed files with 2682 additions and 17 deletions

212
.config/btop/btop.conf Normal file
View File

@ -0,0 +1,212 @@
#? Config file for btop v. 1.2.13
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
color_theme = "gruvbox_dark_v2"
#* If the theme set background should be shown, set to False if you want terminal background transparency.
theme_background = False
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
truecolor = True
#* Set to true to force tty mode regardless if a real tty has been detected or not.
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = False
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use whitespace " " as separator between different presets.
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = True
#* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = True
#* Default symbols to use for graph creation, "braille", "block" or "tty".
#* "braille" offers the highest resolution but might not be included in all fonts.
#* "block" has half the resolution of braille but uses more common characters.
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
graph_symbol = "block"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_cpu = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_mem = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_net = "default"
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
graph_symbol_proc = "default"
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = 1000
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
proc_sorting = "cpu lazy"
#* Reverse sorting order, True or False.
proc_reversed = False
#* Show processes as a tree.
proc_tree = False
#* Use the cpu graph colors in the process list.
proc_colors = True
#* Use a darkening gradient in the process list.
proc_gradient = True
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
proc_per_core = False
#* Show process memory as bytes instead of percent.
proc_mem_bytes = True
#* Show cpu graph for each process.
proc_cpu_graphs = True
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
proc_info_smaps = False
#* Show proc box on left side of screen instead of right.
proc_left = False
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = True
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_upper = "total"
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
#* Select from a list of detected attributes from the options menu.
cpu_graph_lower = "user"
#* Toggles if the lower CPU graph should be inverted.
cpu_invert_lower = False
#* Set to True to completely disable the lower CPU graph.
cpu_single_graph = False
#* Show cpu box at bottom of screen instead of top.
cpu_bottom = False
#* Shows the system uptime in the CPU box.
show_uptime = True
#* Show cpu temperature.
check_temp = True
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
cpu_sensor = "Auto"
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
show_coretemp = True
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
#* Example: "4:0 5:1 6:3"
cpu_core_map = ""
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
temp_scale = "celsius"
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
base_10_sizes = False
#* Show CPU frequency.
show_cpu_freq = True
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
clock_format = "/user@/host %X"
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
background_update = True
#* Custom cpu model name, empty string to disable.
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
disks_filter = "exclude=/boot /proc /boot/efi"
#* Show graphs instead of meters for memory values.
mem_graphs = True
#* Show mem box below net box instead of above.
mem_below_net = False
#* Count ZFS ARC in cached and available memory.
zfs_arc_cached = True
#* If swap memory should be shown in memory box.
show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True
#* If mem box should be split to also show disks info.
show_disks = True
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
only_physical = True
#* Read disks list from /etc/fstab. This also disables only_physical.
use_fstab = True
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
zfs_hide_datasets = False
#* Set to true to show available disk space for privileged users.
disk_free_priv = False
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
show_io_stat = True
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
io_mode = False
#* Set to True to show combined read/write io graphs in io mode.
io_graph_combined = False
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
#* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = ""
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 1000
net_upload = 100
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
net_auto = True
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* Show battery stats in top right if battery is present.
show_battery = True
#* Which battery to use if multiple are present. "Auto" for auto detection.
selected_battery = "Auto"
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"

2245
.config/kitty/kitty.conf Normal file

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit d6f6f4721444555aff8b57df24f84b600b221cb2
Subproject commit 84e4a0a20bb82841db6c144dd4a2ff64e532e11f

@ -0,0 +1 @@
Subproject commit 7c63964eb68b102e8b6f69d176120fad26f12baa

View File

@ -9,3 +9,5 @@
[safe]
directory = /storage/emulated/0/Documents/the-novel
directory = /storage/emulated/0/the-novel-obsidian
[pull]
rebase = false

15
.gitignore vendored
View File

@ -3,17 +3,22 @@
# except:
!.zshrc
!.vimrc
!.ideavimrc
!.config
!.config/nvim
!.config/nvim/**
!.config/btop
!.config/btop/**
!.config/kitty
!.config/kitty/*
!.config/kitty/**
!.gitignore
!.zsh
!.zsh/**
!.tmux.conf
!.gitconfig
!.local/share/fzf
!.local/share/nnn
!.local/share/fzf/**
!.local/share/nnn/**
!.local/fzf
!.local/fzf/**
!.local/nvim
!.local/nvim/**
.config/btop/btop.log

5
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule ".config/nvim"]
[submodule "NvChad"]
path = .config/nvim
url = https://git.cscherr.de/PlexSheep/neovim-confs
[submodule "nvchad-custom"]
path = .custon/nvim/lua/custom
url = https://git.cscherr.de/PlexSheep/nvchad-custom

26
.ideavimrc Normal file
View File

@ -0,0 +1,26 @@
"" Source your .vimrc
source /home/plex/.vimrc
"" -- Suggested options --
" Show a few lines of context around the cursor. Note that this makes the
" text scroll if you mouse-click near the start or end of the window.
set scrolloff=5
" Do incremental searching.
set incsearch
" Do the joining with the ide
set ideajoin
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc

129
.vimrc Normal file
View File

@ -0,0 +1,129 @@
" GENERAL CONFIGS ----------------------------------------------------------------------------------
syntax on " syntax highlighting
set nocompatible " disable compatibility to old-time vi
set number
set nocompatible
set hlsearch " highlight search
set incsearch " incremental search
set tabstop=4 " number of columns occupied by a tab
set softtabstop=4 " see multiple spaces as tab stops so <BS> does the right thing
set expandtab " converts tabs to white space
set shiftwidth=4 " width for auto indents
set autoindent " indent a new line the same amount as the line just typed
set number " add line numbers
set wildmode=longest,list " get bash-like tab completions
set cc=100 " set an 100 column border for good coding style
set mouse=a " enable mouse for help file editing and hitting prompts
set cursorline " highlight current cursor line
set ttyfast " Speed up scrolling in Vim
set fdm=indent " folding method syntax
set foldlevel=10 " only fold when a certain complexity is reached by default.
" This applies only at startup.
set numberwidth=4 " How much space the line numbers should take
set signcolumn=yes " Show extra icons in the line numbers (like git marks, errors)
set timeout timeoutlen=400 " How long to wait for non prefix free hotkey melodies
set ttimeoutlen=0
" Avoid showing message extra message when using completion
set shortmess+=c
"allow auto-indenting depending on file type
filetype plugin indent on
filetype plugin on
let g:indentLine_char = '│'
" HOTKEYS ------------------------------------------------------------------------------------------
" add lines with double o
noremap oo o<ESC>
noremap OO O<ESC>
" H and L for end and beginning
nmap H ^
nmap L $
vmap H ^
vmap L $
" useful functions for arrow keys
" (and force the user to use `hjkl`)
" right/left to add/remove a tab in the beginning of the line.
nmap <Left> <<
nmap <Right> >>
" same for visual mode (plus reselecting stuff for visual mode)
vmap <Left> <gv
vmap <Right> >gv
" up and down move lines up and down
nmap <Up> :m -2<CR>
nmap <Down> :m +1<CR>
" same for visual mode (plus reselecting stuff for visual mode)
vmap <Up> :m -2<CR>
vmap <Down> :m +1<CR>
" resize windows
nnoremap <C-Left> :vertical resize -1<CR>
nnoremap <C-Right> :vertical resize +1<CR>
nnoremap <C-Up> :resize -1<CR>
nnoremap <C-Down> :resize +1<CR>
" hit F3 to toggle search highlighting"
nnoremap <F3> :set hlsearch!<CR>
nnoremap <SPACE> <Nop>
let mapleader=" "
map <leader>t :echo "leader tested!"<CR>
map <leader>h :noh<CR>
" copy to Wayland clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wY Y :call system("wl-copy", @")<CR>
nnoremap <leader>wy y :call system("wl-copy", @")<CR>
nnoremap <leader>wyy yy :call system("wl-copy", @")<CR>
" copy to system clipboard when leader is used. (note, install gvim for this)
vnoremap <leader>y "+y
nnoremap <leader>Y "+Y
nnoremap <leader>y "+y
nnoremap <leader>yy "+yy
" don't write the pasted upon stuff in visual mode into the register
vnoremap p pgvy
" open terminal with F12
nnoremap <F12> :terminal<CR>
" vsplit with <Leader>, then "
map <Leader>" :vsplit<CR>
" split with <Leader>, then %"
map <Leader>% :split<CR>
" join with <leader>j
nnoremap <leader>j :join<CR>
" join up with <leader>J
nnoremap <leader>J :move .-2<CR> :join<CR>
" split lines with <leader>s
nnoremap <leader>s i<CR><ESC>
" split lines up with <leader>S
nnoremap <leader>S i<CR><ESC> V:m -2<CR>
" move screen a line up/down with alt U/D
nmap <A-u> kzz
nmap <A-d> jzz
" spell checking -----------------------------------------------------------------------------------
set spell spelllang=en
" set a location
set spellfile=~/.config/nvim/spell/en.utf-8.add
" go to last or next misspelled word
nnoremap zn ]s
nnoremap zN [s
" same as above but only with bad words (unrecognized)
nnoremap Zn ]S
nnoremap ZN [S

62
.zshrc
View File

@ -1,30 +1,41 @@
### ENVVARS
export PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/home/.local/bin
PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/home/.local/bin
export PATH
export EDITOR=nvim
export editor=nvim
export XDG_CONFIG_HOME=~/.config
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
export ZSH=$HOME/.zsh
export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard.
# cb would have to open every 2 seconds and steal
# focus. This sucks, so I will have to disable GUI
# integration (yes that means ctrl+v) for now.
#
# For wayland, set this to `1`
# see https://github.com/Slackadays/Clipboard/issues/171
export DATEFMT='+%a %Y-%m-%d %X'
### Aliases
alias l="ls -lah"
alias ll="ls -lh"
alias la="ls -a"
alias ls="ls"
alias l="lsd -lah --date \"$DATEFMT\""
alias ll="lsd -lh --date \"$DATEFMT\""
alias la="lsd -a --date \"$DATEFMT\""
alias ls="lsd --date \"$DATEFMT\""
alias grep="grep --color"
alias egrep="grep -E"
alias lgrep="find | grep"
alias psgrep="ps axu | grep"
alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
alias datefmt='date $DATEFMT'
alias gg=lazygit
alias reload="source ~/.zshrc"
alias gls=/bin/ls
### non standard aliases
if [ -f ~/.zsh_aliases ]; then
source ~/.zsh_aliases
fi
alias neorg='nvim -c "Neorg workspace $1"'
alias bat=batcat
alias accon="HOST=$(hostname) conda activate"
alias gotemp="cd $(mktemp -d)"
alias open=xdg-open
### Functions
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
@ -33,10 +44,15 @@ function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
function newpass() {
LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0}
}
function condac() {
conda activate $@
export HOST=$(hostname)
}
### ---- zsh options -------------------------------------
setopt autocd
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_IGNORE_ALL_DUPS
setopt appendhistory
setopt INC_APPEND_HISTORY
@ -94,6 +110,7 @@ bindkey '^M' expand-dots-then-accept-line
PS1='%B%F{red}%n@%m%k %B%F{cyan}%(4~|...|)%3~%F{white} %# %b%f%k'
### ---- ZSH MODULES -----------------------------------
fpath+=$ZSH/zfunc
# enable completion features
autoload -Uz compinit
compinit -d ~/.cache/zcompdump
@ -175,3 +192,28 @@ else
eval "$(zoxide init zsh)"
fi
### --- conda Config -------------------------------------
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/plex/.local/share/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/plex/.local/share/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# we don't want to see (base) constantly, so we do this:
PS1=$(echo $PS1 | sed 's/(base) //') # remove base
### load unversioned zsh code
if [ -f ~/.zsh.local ]; then
source ~/.zsh.local
else
touch ~/.zsh.local
fi