Compare commits

..

No commits in common. 'main' and 'nvim' have entirely different histories.
main ... nvim

78
.gitmodules vendored

@ -8,9 +8,45 @@
[submodule "zsh-autosuggestions"]
path = shells/oh-my-zsh/custom/plugins/zsh-autosuggestions
url = https://github.com/zsh-users/zsh-autosuggestions.git
[submodule "nerdtree"]
path = editors/vim/pack/man/start/nerdtree
url = https://github.com/preservim/nerdtree.git
[submodule "vim-obsession"]
path = editors/vim/pack/man/start/vim-obsession
url = https://github.com/tpope/vim-obsession
[submodule "vim-go"]
path = editors/vim/pack/man/start/vim-go
url = https://github.com/fatih/vim-go
[submodule "vim-commentary"]
path = editors/vim/pack/man/start/vim-commentary
url = https://github.com/tpope/vim-commentary.git
[submodule "vim-surround"]
path = editors/vim/pack/man/start/vim-surround
url = https://github.com/tpope/vim-surround.git
[submodule "vim-airline"]
path = editors/vim/pack/man/start/vim-airline
url = https://github.com/vim-airline/vim-airline.git
[submodule "vim-fugitive"]
path = editors/vim/pack/man/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "vimtex"]
path = editors/vim/pack/man/start/vimtex
url = https://github.com/lervag/vimtex.git
[submodule "vim-nerdtree-tabs"]
path = editors/vim/pack/man/start/vim-nerdtree-tabs
url = https://github.com/jistr/vim-nerdtree-tabs
[submodule "editors/vim/pack/man/start/vim-typescript"]
path = editors/vim/pack/man/start/vim-typescript
url = https://github.com/leafgarland/typescript-vim.git
[submodule "tmux-mem-cpu-load"]
path = src/tmux-mem-cpu-load
url = https://github.com/thewtex/tmux-mem-cpu-load
[submodule "vimwiki"]
path = editors/vim/pack/man/start/vimwiki
url = https://github.com/vimwiki/vimwiki.git
[submodule "vim-markdown"]
path = editors/vim/pack/man/start/vim-markdown
url = https://github.com/preservim/vim-markdown.git
[submodule "fzf"]
path = src/fzf
url = https://github.com/junegunn/fzf.git
@ -41,6 +77,42 @@
[submodule "device-battery"]
path = src/device-battery
url = https://git.keegandeppe.com/kdeppe/device-battery.git
[submodule "neovim"]
path = editors/neovim
url = https://git.keegandeppe.com/kdeppe/neovim.git
[submodule "editors/nvim/site/pack/filebroswer/start/nvim-tree"]
path = editors/nvim/site/pack/filebroswer/start/nvim-tree
url = https://github.com/nvim-tree/nvim-tree.lua
[submodule "editors/nvim/site/pack/markdown/opt/vim-markdown"]
path = editors/nvim/site/pack/markdown/opt/vim-markdown
url = https://github.com/preservim/vim-markdown
[submodule "editors/nvim/site/pack/markdown/opt/vimwiki"]
path = editors/nvim/site/pack/markdown/opt/vimwiki
url = https://github.com/vimwiki/vimwiki.git
[submodule "editors/nvim/site/pack/golang/opt/vim-go"]
path = editors/nvim/site/pack/golang/opt/vim-go
url = https://github.com/fatih/vim-go.git
[submodule "editors/nvim/site/pack/statusbar/start/vim-airline"]
path = editors/nvim/site/pack/statusbar/start/vim-airline
url = https://github.com/vim-airline/vim-airline.git
[submodule "editors/nvim/site/pack/typescript/opt/vim-typescript"]
path = editors/nvim/site/pack/typescript/opt/vim-typescript
url = https://github.com/leafgarland/typescript-vim.git
[submodule "editors/nvim/site/pack/markdown/start/markdown-preview.nvim"]
path = editors/nvim/site/pack/markdown/start/markdown-preview.nvim
url = https://github.com/iamcco/markdown-preview.nvim.git
[submodule "editors/nvim/site/pack/filebroswer/start/telescope.nvim"]
path = editors/nvim/site/pack/filebroswer/start/telescope.nvim
url = https://github.com/nvim-telescope/telescope.nvim.git
[submodule "editors/nvim/site/pack/filebroswer/start/plenary.nvim"]
path = editors/nvim/site/pack/filebroswer/start/plenary.nvim
url = https://github.com/nvim-lua/plenary.nvim.git
[submodule "editors/nvim/site/pack/qol/start/vim-commentary"]
path = editors/nvim/site/pack/qol/start/vim-commentary
url = https://github.com/tpope/vim-commentary.git
[submodule "editors/nvim/site/pack/qol/start/vim-surround"]
path = editors/nvim/site/pack/qol/start/vim-surround
url = https://github.com/tpope/vim-surround.git
[submodule "editors/nvim/site/pack/qol/start/vim-fugitive"]
path = editors/nvim/site/pack/qol/start/vim-fugitive
url = https://github.com/tpope/vim-fugitive.git
[submodule "editors/nvim/site/pack/qol/start/vim-startuptime"]
path = editors/nvim/site/pack/qol/start/vim-startuptime
url = https://github.com/dstein64/vim-startuptime.git

@ -1,5 +1,4 @@
# dotfiles
### TODO
- port scripts to use rofi or equiv
- Add main polybar file and create bar as needed from modules

@ -4,4 +4,7 @@ bat
calcurse
pam-gnupg
zfxtop
neovim
lua
tmuxp
xclip

@ -1,9 +1,6 @@
picom
polybar
feh
imagemagick
rofi
rofi-calc
mpv
mpd
mpc

@ -1,11 +0,0 @@
neovim
lua
# language servers
clang
gopls
python-lsp-server
typescript-language-server
lua-language-server
rust-analyzer
# various tools
xclip

@ -1,2 +0,0 @@
seafile
seafile-client

@ -1,19 +0,0 @@
#!/usr/bin/env bash
# Expects a file with pacakge names on newlines in $1
# Will skip lines beginning in a #
#
# Rationale:
# I hated how long it took to extract cached AUR packages just to tell me that
# it is up to date and skip installation.
# This helper loops over arguments and installs only packages not already on the system.
# Then the built in package manager can maintain these packages
packages=`cat "$1" | grep -v '#'`
for package in "$packages" ; do
echo "$package"
continue
needed=`yay -Qi "$package" 2>&1 >/dev/null`
[ -n "$needed" ] && yay --sudoloop --nodiffmenu --noeditmenu --nocleanmenu --noupgrademenu -S "$package"
done

@ -0,0 +1,49 @@
#!/bin/bash
# getting focused pwd
PID=$(xdotool getwindowfocus getwindowpid)
child=$PID
children=()
while [ -n "$child" ] ; do
children+=($child)
child=$(pgrep -P $child)
done
last_ps=$(ps ${children[-1]} | grep -v PID | awk '{print $5}')
if [ "$last_ps" == "tmux" ] ; then
current_pane=$(tmux list-panes | grep '(active)' | grep -o '^[0-9]')
cwd=$(tmux display-message -p -t $current_pane -F '#{pane_current_path}')
else
cwd=$(readlink -e /proc/${children[-1]}/cwd)
fi
# change to the directory
cd $cwd
files=$(find * -type f)
selection=$(echo "$files" | rofi-dmenu)
# exit on quit
if [ -z "$selection" ] ; then
exit 0
fi
# grab extension
extension=$(echo "$selection" | grep -o '.\([a-zA-Z]\+\)$')
# get proper opener
case "$extension" in
'.pdf') prg="zathura" ;;
'.md') prg="vim" ;;
'.png') prg="feh" ;;
'.jpg') prg="feh" ;;
'.jpeg') prg="feh" ;;
*) prg="xdg-open" ;;
esac
if [[ "$1" == '-S' && "$prg" =~ [feh|zathura] ]] ; then
swallow $prg "$selection"
else
$prg "$selection"
fi

@ -7,15 +7,14 @@ SYNC_IN_PROGRESS=$(printf '%s%s' '%{F#FF0}' $(echo -e '\Uf1216')) # yellow
SYNC_FAILED=$(printf '%s%s' '%{F#F00}' $(echo -e '\Uf0b98')) # red
if ! command -v seaf-cli &>/dev/null ; then
echo "depends on seaf-cli">&2
echo "Seafile not downloaded to device!">&2
echo "$SYNC_FAILED"
exit 1
fi
# getting folder status and trimming headers
SEAFILE_STATUS=$(seaf-cli status 2>/dev/null | tail -n +2)
SEAFILE_STATUS=$(seaf-cli status | tail -n +2)
ERRORS=$(echo "$SEAFILE_STATUS" | grep "error")
if [[ -n "$ERRORS" ]] ; then
# some directories have errors
echo "Error: Failed to sync">&2

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# checks mullvad status for monitoring in polybar
CONNECTED=$(printf '%s%s' '%{F#0F0}' $(echo -e '\Uf0318')) # green
DISCONNECTED=$(printf '%s%s' '%{F#F00}' $(echo -e '\Uf0319')) # red
# check that its installed
if ! command -v mullvad &>/dev/null ; then
echo "Seafile not downloaded to device!">&2
echo "$DISCONNECTED"
exit 1
fi
# reading vpn status as continous output
while read VPN_STATUS; do
VPN_DISCONNECTED=$(echo "$VPN_STATUS" | grep Disconnect);
if [[ -n "$VPN_DISCONNECTED" ]] ; then
# vpn is disconnected
echo "$DISCONNECTED"
continue
fi
# connected
echo "$CONNECTED"
done < <(mullvad status listen)

@ -1 +0,0 @@
Subproject commit 4af034b82620c67492f951be0fbbe0a024ab31e2

@ -0,0 +1,453 @@
" File: hybrid.vim
" Maintainer: Andrew Wong (w0ng)
" URL: https://github.com/w0ng/vim-hybrid
" Modified: 27 Jan 2013 07:33 AM AEST
" License: MIT
" Description:"{{{
" ----------------------------------------------------------------------------
" The default RGB colour palette is taken from Tomorrow-Night.vim:
" https://github.com/chriskempson/vim-tomorrow-theme
"
" The reduced RGB colour palette is taken from Codecademy's online editor:
" https://www.codecademy.com/learn
"
" The syntax highlighting scheme is taken from jellybeans.vim:
" https://github.com/nanotech/jellybeans.vim
"
" The is code taken from solarized.vim:
" https://github.com/altercation/vim-colors-solarized
"}}}
" Requirements And Recommendations:"{{{
" ----------------------------------------------------------------------------
" Requirements
" - gVim 7.3+ on Linux, Mac and Windows.
" - Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours.
"
" Due to the limited 256 palette, colours in Vim and gVim will still be slightly
" different.
"
" In order to have Vim use the same colours as gVim (the way this colour scheme
" is intended), it is recommended that you define the basic 16 colours in your
" terminal.
"
" For Linux users (rxvt-unicode, xterm):
"
" 1. Add the default palette to ~/.Xresources:
"
" https://gist.github.com/3278077
"
" or alternatively, add the reduced contrast palette to ~/.Xresources:
"
" https://gist.github.com/w0ng/16e33902508b4a0350ae
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"
" For OSX users (iTerm):
"
" 1. Import the default colour preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors
"
" or alternatively, import the reduced contrast color preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"}}}
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = &background
let g:colors_name = "hybrid"
"}}}
" GUI And Cterm Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {'gui' : {} , 'cterm' : {}}
if exists("g:hybrid_reduced_contrast") && g:hybrid_reduced_contrast == 1
let s:gui_background = "#232c31"
let s:gui_selection = "#425059"
let s:gui_line = "#2d3c46"
let s:gui_comment = "#6c7a80"
else
let s:gui_background = "#1d1f21"
let s:gui_selection = "#373b41"
let s:gui_line = "#282a2e"
let s:gui_comment = "#707880"
endif
let s:palette.gui.background = { 'dark' : s:gui_background , 'light' : "#e4e4e4" }
let s:palette.gui.foreground = { 'dark' : "#c5c8c6" , 'light' : "#000000" }
let s:palette.gui.selection = { 'dark' : s:gui_selection , 'light' : "#bcbcbc" }
let s:palette.gui.line = { 'dark' : s:gui_line , 'light' : "#d0d0d0" }
let s:palette.gui.comment = { 'dark' : s:gui_comment , 'light' : "#5f5f5f" }
let s:palette.gui.red = { 'dark' : "#cc6666" , 'light' : "#5f0000" }
let s:palette.gui.orange = { 'dark' : "#de935f" , 'light' : "#875f00" }
let s:palette.gui.yellow = { 'dark' : "#f0c674" , 'light' : "#5f5f00" }
let s:palette.gui.green = { 'dark' : "#b5bd68" , 'light' : "#005f00" }
let s:palette.gui.aqua = { 'dark' : "#8abeb7" , 'light' : "#005f5f" }
let s:palette.gui.blue = { 'dark' : "#81a2be" , 'light' : "#00005f" }
let s:palette.gui.purple = { 'dark' : "#b294bb" , 'light' : "#5f005f" }
let s:palette.gui.window = { 'dark' : "#303030" , 'light' : "#9e9e9e" }
let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c" , 'light' : "#808080" }
let s:palette.gui.addbg = { 'dark' : "#5F875F" , 'light' : "#d7ffd7" }
let s:palette.gui.addfg = { 'dark' : "#d7ffaf" , 'light' : "#005f00" }
let s:palette.gui.changebg = { 'dark' : "#5F5F87" , 'light' : "#d7d7ff" }
let s:palette.gui.changefg = { 'dark' : "#d7d7ff" , 'light' : "#5f005f" }
let s:palette.gui.delbg = { 'dark' : "#cc6666" , 'light' : "#ffd7d7" }
let s:palette.gui.darkblue = { 'dark' : "#00005f" , 'light' : "#d7ffd7" }
let s:palette.gui.darkcyan = { 'dark' : "#005f5f" , 'light' : "#005f00" }
let s:palette.gui.darkred = { 'dark' : "#5f0000" , 'light' : "#d7d7ff" }
let s:palette.gui.darkpurple = { 'dark' : "#5f005f" , 'light' : "#5f005f" }
if exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:cterm_foreground = "15" " White
let s:cterm_selection = "8" " DarkGrey
let s:cterm_line = "0" " Black
let s:cterm_comment = "7" " LightGrey
let s:cterm_red = "9" " LightRed
let s:cterm_orange = "3" " DarkYellow
let s:cterm_yellow = "11" " LightYellow
let s:cterm_green = "10" " LightGreen
let s:cterm_aqua = "14" " LightCyan
let s:cterm_blue = "12" " LightBlue
let s:cterm_purple = "13" " LightMagenta
let s:cterm_delbg = "9" " LightRed
else
let s:cterm_foreground = "250"
let s:cterm_selection = "237"
let s:cterm_line = "235"
let s:cterm_comment = "243"
let s:cterm_red = "167"
let s:cterm_orange = "173"
let s:cterm_yellow = "221"
let s:cterm_green = "143"
let s:cterm_aqua = "109"
let s:cterm_blue = "110"
let s:cterm_purple = "139"
let s:cterm_delbg = "167"
endif
let s:palette.cterm.background = { 'dark' : "234" , 'light' : "254" }
let s:palette.cterm.foreground = { 'dark' : s:cterm_foreground , 'light' : "16" }
let s:palette.cterm.window = { 'dark' : "236" , 'light' : "247" }
let s:palette.cterm.selection = { 'dark' : s:cterm_selection , 'light' : "250" }
let s:palette.cterm.line = { 'dark' : s:cterm_line , 'light' : "252" }
let s:palette.cterm.comment = { 'dark' : s:cterm_comment , 'light' : "59" }
let s:palette.cterm.red = { 'dark' : s:cterm_red , 'light' : "52" }
let s:palette.cterm.orange = { 'dark' : s:cterm_orange , 'light' : "94" }
let s:palette.cterm.yellow = { 'dark' : s:cterm_yellow , 'light' : "58" }
let s:palette.cterm.green = { 'dark' : s:cterm_green , 'light' : "22" }
let s:palette.cterm.aqua = { 'dark' : s:cterm_aqua , 'light' : "23" }
let s:palette.cterm.blue = { 'dark' : s:cterm_blue , 'light' : "17" }
let s:palette.cterm.purple = { 'dark' : s:cterm_purple , 'light' : "53" }
let s:palette.cterm.darkcolumn = { 'dark' : "234" , 'light' : "244" }
let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" }
let s:palette.cterm.addfg = { 'dark' : "193" , 'light' : "22" }
let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" }
let s:palette.cterm.changefg = { 'dark' : "189" , 'light' : "53" }
let s:palette.cterm.delbg = { 'dark' : s:cterm_delbg , 'light' : "224" }
let s:palette.cterm.darkblue = { 'dark' : "17" , 'light' : "194" }
let s:palette.cterm.darkcyan = { 'dark' : "24" , 'light' : "22" }
let s:palette.cterm.darkred = { 'dark' : "52" , 'light' : "189" }
let s:palette.cterm.darkpurple = { 'dark' : "53" , 'light' : "53" }
"}}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
" Given a:hi_elem = bg, a:field = comment
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment
let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=...
let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=...
exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
call s:build_prim('bg', 'foreground')
call s:build_prim('bg', 'background')
call s:build_prim('bg', 'selection')
call s:build_prim('bg', 'line')
call s:build_prim('bg', 'comment')
call s:build_prim('bg', 'red')
call s:build_prim('bg', 'orange')
call s:build_prim('bg', 'yellow')
call s:build_prim('bg', 'green')
call s:build_prim('bg', 'aqua')
call s:build_prim('bg', 'blue')
call s:build_prim('bg', 'purple')
call s:build_prim('bg', 'window')
call s:build_prim('bg', 'darkcolumn')
call s:build_prim('bg', 'addbg')
call s:build_prim('bg', 'addfg')
call s:build_prim('bg', 'changebg')
call s:build_prim('bg', 'changefg')
call s:build_prim('bg', 'delbg')
call s:build_prim('bg', 'darkblue')
call s:build_prim('bg', 'darkcyan')
call s:build_prim('bg', 'darkred')
call s:build_prim('bg', 'darkpurple')
let s:fg_none = ' guifg=NONE ctermfg=NONE'
call s:build_prim('fg', 'foreground')
call s:build_prim('fg', 'background')
call s:build_prim('fg', 'selection')
call s:build_prim('fg', 'line')
call s:build_prim('fg', 'comment')
call s:build_prim('fg', 'red')
call s:build_prim('fg', 'orange')
call s:build_prim('fg', 'yellow')
call s:build_prim('fg', 'green')
call s:build_prim('fg', 'aqua')
call s:build_prim('fg', 'blue')
call s:build_prim('fg', 'purple')
call s:build_prim('fg', 'window')
call s:build_prim('fg', 'darkcolumn')
call s:build_prim('fg', 'addbg')
call s:build_prim('fg', 'addfg')
call s:build_prim('fg', 'changebg')
call s:build_prim('fg', 'changefg')
call s:build_prim('fg', 'darkblue')
call s:build_prim('fg', 'darkcyan')
call s:build_prim('fg', 'darkred')
call s:build_prim('fg', 'darkpurple')
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
exe "let s:sp_none = ' guisp=". s:none ."'"
exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'"
exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'"
exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'"
exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'"
exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'"
exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'"
exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'"
exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'"
exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'"
exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'"
exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'"
exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'"
exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'"
exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'"
exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'"
exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'"
exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'"
exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'"
exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'"
exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'"
exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal"
" Cursor"
" CursorIM"
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none
exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none
exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none
exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none
exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd
exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
" Incsearch"
exe "hi! LineNr" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none
exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr
exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr
exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr
exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr
exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr
exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none
" FIXME LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
" Use defined custom background colour for terminal Vim.
if !has('gui_running') && exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:bg_normal = s:bg_none
else
let s:bg_normal = s:bg_background
endif
exe "hi! Normal" .s:fg_foreground .s:bg_normal .s:fmt_none
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded Special
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
" Legal:"{{{
" ----------------------------------------------------------------------------
" Copyright (c) 2011 Ethan Schoonover
" Copyright (c) 2009-2012 NanoTech
" Copyright (c) 2012 w0ng
"
" Permission is hereby granted, free of charge, to any per
" son obtaining a copy of this software and associated doc
" umentation files (the “Software”), to deal in the Soft
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
" }}}

@ -0,0 +1,48 @@
require('keymap')
require('plugins')
require('calcurse')
require('i3conf')
-- prevent cursor override
vim.cmd('set guicursor=')
-- basic settings
vim.cmd('filetype plugin indent on')
vim.cmd('set ts=4 sts=4 sw=4 expandtab')
-- hybrid numbering
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.cursorline = true
vim.opt.compatible = false
-- ignores search case unless capital is used
vim.opt.smartcase = true
vim.opt.hlsearch = true
-- colorscheme and syntax settings
vim.cmd([[
syntax enable
colorscheme hybrid
hi Normal ctermbg=NONE
]])
-- defaults to transparent
transparent = true
-- timeouts
vim.opt.ttimeout = true
vim.opt.ttimeoutlen = 100
-- nvim tree basics
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- vimwiki changes
vim.cmd([[
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext':'.md'}]
]])

@ -0,0 +1,7 @@
-- calcurse -> markdown
vim.api.nvim_create_autocmd({"BufRead","BufNewFile"}, {
pattern = {"/tmp/calcurse*","~/.local/share/calcurse/notes/*"},
command = "set filetype=markdown",
})

@ -0,0 +1,325 @@
local M = {}
_VT_NS = vim.api.nvim_create_namespace("lsp_signature")
local prescript
local prescript_hi
local due_hi
local ft
local today
local today_hi
local overdue
local overdue_hi
local date_hi
local pattern_start
local pattern_end
local use_clock_time
local use_clock_today
local use_seconds
local default_due_time
local user_hour
local user_min
local user_sec
local date_pattern
local datetime_pattern
local datetime12_pattern
local fulldate_pattern
local fulldatetime_pattern
local fulldatetime12_pattern
local regex_hi
local update_rate
local function patternify(str)
return str:gsub("[%(%)%.%%%+%-%*%?%[%^%$%]]", "%%%1")
end
local function regexify(str) return str:gsub("\\%^%$%.%*~%[%]&", "\\%1") end
local function make_pattern(pattern)
return patternify(pattern_start) .. pattern:gsub('%(', ''):gsub('%)', '') ..
patternify(pattern_end)
end
local function make_pattern_match(pattern)
return patternify(pattern_start) .. pattern .. patternify(pattern_end)
end
local function parseDue(due)
local year = 31556926
local month = 2629743
local week = 604800
local day = 86400
local hour = 3600
local minute = 60
local res = ''
local is_today = due < day
if due >= year then
res = res .. math.floor(due / year) .. 'y '
due = due % year
end
if due >= month then
res = res .. math.floor(due / month) .. 'm '
due = due % month
end
if due >= week then
res = res .. math.floor(due / week) .. 'w '
due = due % week
end
if use_clock_time or (is_today and use_clock_today) then
if due >= day then
res = res .. math.floor(due / day) .. 'd '
due = due % day
end
if due >= hour then
res = res .. math.floor(due / hour) .. 'h '
due = due % hour
end
if due >= minute then
res = res .. math.floor(due / minute) .. 'min '
due = due % minute
end
if use_seconds then res = res .. math.floor(due / 1) + 1 .. 's ' end
else
res = res .. math.floor(due / day) + 1 .. 'd '
end
return res
end
function M.setup(c)
c = c or {}
use_clock_time = c.use_clock_time or false
use_clock_today = c.use_clock_time or false
if type(c.use_seconds) == 'boolean' then
use_seconds = c.use_seconds
else
use_seconds = c.use_clock_time or false
end
update_rate = c.update_rate or
(use_clock_time and (use_seconds and 1000 or 60000) or 0)
default_due_time = c.default_due_time or 'midnight'
prescript = c.prescript or 'due: '
prescript_hi = c.prescript_hi or 'Comment'
due_hi = c.due_hi or 'String'
ft = c.ft or '*.md'
today = c.today or 'TODAY'
today_hi = c.today_hi or 'Character'
overdue = c.overdue or 'OVERDUE'
overdue_hi = c.overdue_hi or 'Error'
date_hi = c.date_hi or 'Conceal'
week_hi = c.week_hi or 'Question'
pattern_start = c.pattern_start or '<'
pattern_end = c.pattern_end or '>'
date_pattern = c.date_pattern or '(%d%d)%-(%d%d)'
datetime_pattern = c.datetime_pattern or (date_pattern .. ' (%d+):(%d%d)')
datetime12_pattern = c.datetime12_pattern or (datetime_pattern .. ' (%a%a)')
fulldate_pattern = c.fulldate_pattern or ('(%d%d%d%d)%-' .. date_pattern)
fulldatetime_pattern = c.fulldatetime_pattern or
('(%d%d%d%d)%-' .. datetime_pattern)
fulldatetime12_pattern = c.fulldatetime12_pattern or
(fulldatetime_pattern .. ' (%a%a)')
regex_hi = c.regex_hi or
"\\d*-*\\d\\+-\\d\\+\\( \\d*:\\d*\\( \\a\\a\\)\\?\\)\\?"
if default_due_time == "midnight" then
user_hour = 23
user_min = 59
user_sec = 59
elseif default_due_time == "noon" then
user_hour = 12
user_min = 00
user_sec = 00
end
local regex_start = regexify(pattern_start)
local regex_end = regexify(pattern_end)
local regex_hi_full = '/' .. regex_start .. regex_hi .. regex_end .. '/'
vim.api.nvim_exec(string.format(
[[
augroup Due
autocmd!
autocmd BufEnter %s lua require("due_nvim").draw(0)
autocmd BufEnter %s lua require("due_nvim").async_update(0)
autocmd InsertLeave %s lua require("due_nvim").redraw(0)
autocmd TextChanged %s lua require("due_nvim").redraw(0)
autocmd TextChangedI %s lua require("due_nvim").redraw(0)
autocmd BufEnter %s syn match DueDate %s display containedin=mkdNonListItemBlock,mkdListItemLine,mkdBlockquote conceal
autocmd BufEnter %s hi def link DueDate %s
augroup END
]] , ft, ft, ft, ft, ft, ft, regex_hi_full, ft, date_hi),
false
)
-- old autcmd
--autocmd BufEnter %s syn match DueDate %s display containedin=mkdNonListItemBlock,mkdListItemLine,mkdBlockquote contained conceal
end
local function draw_due(due, buf, key)
local parsed
if due > 0 then
if not (use_clock_time or use_clock_today) and due < 86400 then
parsed = { today, today_hi }
elseif due < 86400 then
parsed = { parseDue(due), today_hi }
elseif due < 604800 then
parsed = { parseDue(due), due_hi }
else
parsed = { parseDue(due), week_hi }
end
else
parsed = { overdue, overdue_hi }
end
vim.api.nvim_buf_set_virtual_text(buf, _VT_NS, key - 1,
{ { prescript, prescript_hi }, parsed }, {})
end
function M.draw(buf)
-- get current time
local now = os.time(os.date('*t'))
-- find which date pattern is being passed in by user
for key, value in pairs(vim.api.nvim_buf_get_lines(buf, 0, -1, {})) do
local fulldatetime12 = value:match(make_pattern(fulldatetime12_pattern))
if fulldatetime12 then
local year, month, day, hour, min, period =
fulldatetime12:match(make_pattern_match(fulldatetime12_pattern))
hour = tonumber(hour)
local is_pm = period:lower() == 'pm'
if is_pm and hour < 12 or not is_pm and hour == 12 then
hour = hour + 12
if hour == 24 then
hour = 0
end
end
draw_due(os.time({
year = year,
month = month,
day = day,
hour = hour,
min = min,
sec = user_sec
}) - now, buf, key)
goto continue
end
local fulldatetime = value:match(make_pattern(fulldatetime_pattern))
if fulldatetime then
local year, month, day, hour, min =
fulldatetime:match(make_pattern_match(fulldatetime_pattern))
draw_due(os.time({
year = year,
month = month,
day = day,
hour = hour,
min = min,
sec = user_sec
}) - now, buf, key)
goto continue
end
local fulldate = value:match(make_pattern(fulldate_pattern))
if fulldate then
local year, month, day = fulldate:match(make_pattern_match(
fulldate_pattern))
draw_due(os.time({
year = year,
month = month,
day = day,
hour = user_hour,
min = user_min,
sec = user_sec
}) - now, buf, key)
goto continue
end
local datetime12 = value:match(make_pattern(datetime12_pattern))
if datetime12 then
local month, day, hour, min, period =
datetime12:match(make_pattern_match(datetime12_pattern))
local year = os.date("%Y")
hour = tonumber(hour)
local is_pm = period:lower() == 'pm'
if is_pm and hour < 12 or not is_pm and hour == 12 then
hour = hour + 12
if hour == 24 then
hour = 0
end
end
draw_due(os.time({
year = year,
month = month,
day = day,
hour = hour,
min = min,
sec = user_sec
}) - now, buf, key)
goto continue
end
local datetime = value:match(make_pattern(datetime_pattern))
if datetime then
local month, day, hour, min = datetime:match(make_pattern_match(
datetime_pattern))
local year = os.date("%Y")
draw_due(os.time({
year = year,
month = month,
day = day,
hour = hour,
min = min,
sec = user_sec
}) - now, buf, key)
goto continue
end
local date = value:match(make_pattern(date_pattern))
if date then
local month, day = date:match(make_pattern_match(date_pattern))
local year = os.date("%Y")
draw_due(os.time({
year = year,
month = month,
day = day,
hour = user_hour,
min = user_min,
sec = user_sec
}) - now, buf, key)
goto continue
end
::continue::
end
end
function M.clear(buf) vim.api.nvim_buf_clear_namespace(buf, _VT_NS, 0, -1) end
function M.redraw(buf)
M.clear(buf)
M.draw(buf)
end
function M.async_update(buf)
if update_rate <= 0 then return end
local timer = vim.loop.new_timer()
timer:start(update_rate, 0, vim.schedule_wrap(function()
M.redraw(buf)
M.async_update(buf)
end))
end
return M

@ -0,0 +1,11 @@
require('telescope').setup({
defaults = {
layout_config = {
horizontal = { width = 0.5 }
},
},
})
local builtin = require('telescope.builtin')
vim.keymap.set('n','<leader>f', builtin.find_files, {})
vim.keymap.set('n','<leader>s', builtin.spell_suggest, {})

@ -0,0 +1,6 @@
-- recognize i3 config from dotfiles
--
vim.api.nvim_create_autocmd({"BufRead","BufNewFile"}, {
pattern = {"*/i3/*.conf"},
command = "set filetype=i3config",
})

@ -0,0 +1,38 @@
require("transparent")
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>b", ":lua toggleTransparent()<CR>")
-- nvim-tree bindings
vim.keymap.set("n", "<leader>t", ":NvimTreeToggle<CR>")
vim.keymap.set("n", "<leader>a", ":lua spellToggle()<CR>")
-- toggle spell check
function spellToggle()
if vim.o.spell == nil or vim.o.spell then
vim.o.spell = false
else
vim.o.spell = true
end
end
-- markdown preview
vim.keymap.set("n", "<leader>p", ":MarkdownPreviewToggle<CR>")
-- custom shell script to move windows
vim.cmd([[
function OpenMarkdownPreview (url)
execute "silent ! markdown-preview.sh " . a:url
endfunction
]])
vim.g.mkdp_browserfunc = 'OpenMarkdownPreview'
-- git actions
vim.keymap.set("n", "<leader>ga", ":Git add .<CR>")
vim.keymap.set("n", "<leader>gm", ":Git commit<CR>")

@ -0,0 +1,13 @@
require('tree')
require('fuzzy')
-- airline settings
if vim.g.airline_symbols == nil then
vim.g.airline_symbols = vim.empty_dict()
end
vim.g.airline_powerline_fonts = 1
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.maxlinenr = ''
vim.g.airline_symbols.dirty = ''

@ -0,0 +1,9 @@
function toggleTransparent()
transparent = not transparent
if transparent then
vim.cmd("hi Normal ctermbg=NONE")
else
vim.cmd("set background=dark")
vim.cmd("syntax enable")
end
end

@ -0,0 +1,40 @@
require('nvim-tree').setup({
open_on_tab = false,
filters = {
dotfiles = true,
},
actions = {
open_file = {
quit_on_open = true,
},
},
})
showHiddenFiles = false
local function open_nvim_tree(data)
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
local empty_file = data.file == ""
if not directory and not empty_file then
return
end
if directory then
vim.cmd.cd(data.file)
end
vim.cmd.enew()
vim.cmd.bw(data.buf)
-- change to directory and open
require("nvim-tree.api").tree.open()
end
-- toggle dotfiles visibility
vim.keymap.set("n", "<leader>d", ":lua require('nvim-tree.api').tree.toggle_hidden_filter()<CR>")
-- nvim-tree open at startup
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree, })

@ -0,0 +1,15 @@
L2
L3
Pset
Kalynn
Appt
EPR
S983
Airpods
swiffer
postlab
TypeScript
ADTs
tradeoffs
nonterminal
righthand

@ -0,0 +1,453 @@
" File: hybrid.vim
" Maintainer: Andrew Wong (w0ng)
" URL: https://github.com/w0ng/vim-hybrid
" Modified: 27 Jan 2013 07:33 AM AEST
" License: MIT
" Description:"{{{
" ----------------------------------------------------------------------------
" The default RGB colour palette is taken from Tomorrow-Night.vim:
" https://github.com/chriskempson/vim-tomorrow-theme
"
" The reduced RGB colour palette is taken from Codecademy's online editor:
" https://www.codecademy.com/learn
"
" The syntax highlighting scheme is taken from jellybeans.vim:
" https://github.com/nanotech/jellybeans.vim
"
" The is code taken from solarized.vim:
" https://github.com/altercation/vim-colors-solarized
"}}}
" Requirements And Recommendations:"{{{
" ----------------------------------------------------------------------------
" Requirements
" - gVim 7.3+ on Linux, Mac and Windows.
" - Vim 7.3+ on Linux and Mac, using a terminal that supports 256 colours.
"
" Due to the limited 256 palette, colours in Vim and gVim will still be slightly
" different.
"
" In order to have Vim use the same colours as gVim (the way this colour scheme
" is intended), it is recommended that you define the basic 16 colours in your
" terminal.
"
" For Linux users (rxvt-unicode, xterm):
"
" 1. Add the default palette to ~/.Xresources:
"
" https://gist.github.com/3278077
"
" or alternatively, add the reduced contrast palette to ~/.Xresources:
"
" https://gist.github.com/w0ng/16e33902508b4a0350ae
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"
" For OSX users (iTerm):
"
" 1. Import the default colour preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid.itermcolors
"
" or alternatively, import the reduced contrast color preset into iTerm:
"
" https://raw.githubusercontent.com/w0ng/dotfiles/master/iterm2/hybrid-reduced-contrast.itermcolors
"
" 2. Add to ~/.vimrc:
"
" let g:hybrid_custom_term_colors = 1
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette.
" colorscheme hybrid
"}}}
" Initialisation:"{{{
" ----------------------------------------------------------------------------
hi clear
if exists("syntax_on")
syntax reset
endif
let s:style = &background
let g:colors_name = "hybrid"
"}}}
" GUI And Cterm Palettes:"{{{
" ----------------------------------------------------------------------------
let s:palette = {'gui' : {} , 'cterm' : {}}
if exists("g:hybrid_reduced_contrast") && g:hybrid_reduced_contrast == 1
let s:gui_background = "#232c31"
let s:gui_selection = "#425059"
let s:gui_line = "#2d3c46"
let s:gui_comment = "#6c7a80"
else
let s:gui_background = "#1d1f21"
let s:gui_selection = "#373b41"
let s:gui_line = "#282a2e"
let s:gui_comment = "#707880"
endif
let s:palette.gui.background = { 'dark' : s:gui_background , 'light' : "#e4e4e4" }
let s:palette.gui.foreground = { 'dark' : "#c5c8c6" , 'light' : "#000000" }
let s:palette.gui.selection = { 'dark' : s:gui_selection , 'light' : "#bcbcbc" }
let s:palette.gui.line = { 'dark' : s:gui_line , 'light' : "#d0d0d0" }
let s:palette.gui.comment = { 'dark' : s:gui_comment , 'light' : "#5f5f5f" }
let s:palette.gui.red = { 'dark' : "#cc6666" , 'light' : "#5f0000" }
let s:palette.gui.orange = { 'dark' : "#de935f" , 'light' : "#875f00" }
let s:palette.gui.yellow = { 'dark' : "#f0c674" , 'light' : "#5f5f00" }
let s:palette.gui.green = { 'dark' : "#b5bd68" , 'light' : "#005f00" }
let s:palette.gui.aqua = { 'dark' : "#8abeb7" , 'light' : "#005f5f" }
let s:palette.gui.blue = { 'dark' : "#81a2be" , 'light' : "#00005f" }
let s:palette.gui.purple = { 'dark' : "#b294bb" , 'light' : "#5f005f" }
let s:palette.gui.window = { 'dark' : "#303030" , 'light' : "#9e9e9e" }
let s:palette.gui.darkcolumn = { 'dark' : "#1c1c1c" , 'light' : "#808080" }
let s:palette.gui.addbg = { 'dark' : "#5F875F" , 'light' : "#d7ffd7" }
let s:palette.gui.addfg = { 'dark' : "#d7ffaf" , 'light' : "#005f00" }
let s:palette.gui.changebg = { 'dark' : "#5F5F87" , 'light' : "#d7d7ff" }
let s:palette.gui.changefg = { 'dark' : "#d7d7ff" , 'light' : "#5f005f" }
let s:palette.gui.delbg = { 'dark' : "#cc6666" , 'light' : "#ffd7d7" }
let s:palette.gui.darkblue = { 'dark' : "#00005f" , 'light' : "#d7ffd7" }
let s:palette.gui.darkcyan = { 'dark' : "#005f5f" , 'light' : "#005f00" }
let s:palette.gui.darkred = { 'dark' : "#5f0000" , 'light' : "#d7d7ff" }
let s:palette.gui.darkpurple = { 'dark' : "#5f005f" , 'light' : "#5f005f" }
if exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:cterm_foreground = "15" " White
let s:cterm_selection = "8" " DarkGrey
let s:cterm_line = "0" " Black
let s:cterm_comment = "7" " LightGrey
let s:cterm_red = "9" " LightRed
let s:cterm_orange = "3" " DarkYellow
let s:cterm_yellow = "11" " LightYellow
let s:cterm_green = "10" " LightGreen
let s:cterm_aqua = "14" " LightCyan
let s:cterm_blue = "12" " LightBlue
let s:cterm_purple = "13" " LightMagenta
let s:cterm_delbg = "9" " LightRed
else
let s:cterm_foreground = "250"
let s:cterm_selection = "237"
let s:cterm_line = "235"
let s:cterm_comment = "243"
let s:cterm_red = "167"
let s:cterm_orange = "173"
let s:cterm_yellow = "221"
let s:cterm_green = "143"
let s:cterm_aqua = "109"
let s:cterm_blue = "110"
let s:cterm_purple = "139"
let s:cterm_delbg = "167"
endif
let s:palette.cterm.background = { 'dark' : "234" , 'light' : "254" }
let s:palette.cterm.foreground = { 'dark' : s:cterm_foreground , 'light' : "16" }
let s:palette.cterm.window = { 'dark' : "236" , 'light' : "247" }
let s:palette.cterm.selection = { 'dark' : s:cterm_selection , 'light' : "250" }
let s:palette.cterm.line = { 'dark' : s:cterm_line , 'light' : "252" }
let s:palette.cterm.comment = { 'dark' : s:cterm_comment , 'light' : "59" }
let s:palette.cterm.red = { 'dark' : s:cterm_red , 'light' : "52" }
let s:palette.cterm.orange = { 'dark' : s:cterm_orange , 'light' : "94" }
let s:palette.cterm.yellow = { 'dark' : s:cterm_yellow , 'light' : "58" }
let s:palette.cterm.green = { 'dark' : s:cterm_green , 'light' : "22" }
let s:palette.cterm.aqua = { 'dark' : s:cterm_aqua , 'light' : "23" }
let s:palette.cterm.blue = { 'dark' : s:cterm_blue , 'light' : "17" }
let s:palette.cterm.purple = { 'dark' : s:cterm_purple , 'light' : "53" }
let s:palette.cterm.darkcolumn = { 'dark' : "234" , 'light' : "244" }
let s:palette.cterm.addbg = { 'dark' : "65" , 'light' : "194" }
let s:palette.cterm.addfg = { 'dark' : "193" , 'light' : "22" }
let s:palette.cterm.changebg = { 'dark' : "60" , 'light' : "189" }
let s:palette.cterm.changefg = { 'dark' : "189" , 'light' : "53" }
let s:palette.cterm.delbg = { 'dark' : s:cterm_delbg , 'light' : "224" }
let s:palette.cterm.darkblue = { 'dark' : "17" , 'light' : "194" }
let s:palette.cterm.darkcyan = { 'dark' : "24" , 'light' : "22" }
let s:palette.cterm.darkred = { 'dark' : "52" , 'light' : "189" }
let s:palette.cterm.darkpurple = { 'dark' : "53" , 'light' : "53" }
"}}}
" Formatting Options:"{{{
" ----------------------------------------------------------------------------
let s:none = "NONE"
let s:t_none = "NONE"
let s:n = "NONE"
let s:c = ",undercurl"
let s:r = ",reverse"
let s:s = ",standout"
let s:b = ",bold"
let s:u = ",underline"
let s:i = ",italic"
"}}}
" Highlighting Primitives:"{{{
" ----------------------------------------------------------------------------
function! s:build_prim(hi_elem, field)
" Given a:hi_elem = bg, a:field = comment
let l:vname = "s:" . a:hi_elem . "_" . a:field " s:bg_comment
let l:gui_assign = "gui".a:hi_elem."=".s:palette.gui[a:field][s:style] " guibg=...
let l:cterm_assign = "cterm".a:hi_elem."=".s:palette.cterm[a:field][s:style] " ctermbg=...
exe "let " . l:vname . " = ' " . l:gui_assign . " " . l:cterm_assign . "'"
endfunction
let s:bg_none = ' guibg=NONE ctermbg=NONE'
call s:build_prim('bg', 'foreground')
call s:build_prim('bg', 'background')
call s:build_prim('bg', 'selection')
call s:build_prim('bg', 'line')
call s:build_prim('bg', 'comment')
call s:build_prim('bg', 'red')
call s:build_prim('bg', 'orange')
call s:build_prim('bg', 'yellow')
call s:build_prim('bg', 'green')
call s:build_prim('bg', 'aqua')
call s:build_prim('bg', 'blue')
call s:build_prim('bg', 'purple')
call s:build_prim('bg', 'window')
call s:build_prim('bg', 'darkcolumn')
call s:build_prim('bg', 'addbg')
call s:build_prim('bg', 'addfg')
call s:build_prim('bg', 'changebg')
call s:build_prim('bg', 'changefg')
call s:build_prim('bg', 'delbg')
call s:build_prim('bg', 'darkblue')
call s:build_prim('bg', 'darkcyan')
call s:build_prim('bg', 'darkred')
call s:build_prim('bg', 'darkpurple')
let s:fg_none = ' guifg=NONE ctermfg=NONE'
call s:build_prim('fg', 'foreground')
call s:build_prim('fg', 'background')
call s:build_prim('fg', 'selection')
call s:build_prim('fg', 'line')
call s:build_prim('fg', 'comment')
call s:build_prim('fg', 'red')
call s:build_prim('fg', 'orange')
call s:build_prim('fg', 'yellow')
call s:build_prim('fg', 'green')
call s:build_prim('fg', 'aqua')
call s:build_prim('fg', 'blue')
call s:build_prim('fg', 'purple')
call s:build_prim('fg', 'window')
call s:build_prim('fg', 'darkcolumn')
call s:build_prim('fg', 'addbg')
call s:build_prim('fg', 'addfg')
call s:build_prim('fg', 'changebg')
call s:build_prim('fg', 'changefg')
call s:build_prim('fg', 'darkblue')
call s:build_prim('fg', 'darkcyan')
call s:build_prim('fg', 'darkred')
call s:build_prim('fg', 'darkpurple')
exe "let s:fmt_none = ' gui=NONE". " cterm=NONE". " term=NONE" ."'"
exe "let s:fmt_bold = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_bldi = ' gui=NONE".s:b. " cterm=NONE".s:b. " term=NONE".s:b ."'"
exe "let s:fmt_undr = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_undb = ' gui=NONE".s:u.s:b. " cterm=NONE".s:u.s:b. " term=NONE".s:u.s:b."'"
exe "let s:fmt_undi = ' gui=NONE".s:u. " cterm=NONE".s:u. " term=NONE".s:u ."'"
exe "let s:fmt_curl = ' gui=NONE".s:c. " cterm=NONE".s:c. " term=NONE".s:c ."'"
exe "let s:fmt_ital = ' gui=NONE".s:i. " cterm=NONE".s:i. " term=NONE".s:i ."'"
exe "let s:fmt_stnd = ' gui=NONE".s:s. " cterm=NONE".s:s. " term=NONE".s:s ."'"
exe "let s:fmt_revr = ' gui=NONE".s:r. " cterm=NONE".s:r. " term=NONE".s:r ."'"
exe "let s:fmt_revb = ' gui=NONE".s:r.s:b. " cterm=NONE".s:r.s:b. " term=NONE".s:r.s:b."'"
exe "let s:sp_none = ' guisp=". s:none ."'"
exe "let s:sp_foreground = ' guisp=". s:palette.gui.foreground[s:style] ."'"
exe "let s:sp_background = ' guisp=". s:palette.gui.background[s:style] ."'"
exe "let s:sp_selection = ' guisp=". s:palette.gui.selection[s:style] ."'"
exe "let s:sp_line = ' guisp=". s:palette.gui.line[s:style] ."'"
exe "let s:sp_comment = ' guisp=". s:palette.gui.comment[s:style] ."'"
exe "let s:sp_red = ' guisp=". s:palette.gui.red[s:style] ."'"
exe "let s:sp_orange = ' guisp=". s:palette.gui.orange[s:style] ."'"
exe "let s:sp_yellow = ' guisp=". s:palette.gui.yellow[s:style] ."'"
exe "let s:sp_green = ' guisp=". s:palette.gui.green[s:style] ."'"
exe "let s:sp_aqua = ' guisp=". s:palette.gui.aqua[s:style] ."'"
exe "let s:sp_blue = ' guisp=". s:palette.gui.blue[s:style] ."'"
exe "let s:sp_purple = ' guisp=". s:palette.gui.purple[s:style] ."'"
exe "let s:sp_window = ' guisp=". s:palette.gui.window[s:style] ."'"
exe "let s:sp_addbg = ' guisp=". s:palette.gui.addbg[s:style] ."'"
exe "let s:sp_addfg = ' guisp=". s:palette.gui.addfg[s:style] ."'"
exe "let s:sp_changebg = ' guisp=". s:palette.gui.changebg[s:style] ."'"
exe "let s:sp_changefg = ' guisp=". s:palette.gui.changefg[s:style] ."'"
exe "let s:sp_darkblue = ' guisp=". s:palette.gui.darkblue[s:style] ."'"
exe "let s:sp_darkcyan = ' guisp=". s:palette.gui.darkcyan[s:style] ."'"
exe "let s:sp_darkred = ' guisp=". s:palette.gui.darkred[s:style] ."'"
exe "let s:sp_darkpurple = ' guisp=". s:palette.gui.darkpurple[s:style] ."'"
"}}}
" Vim Highlighting: (see :help highlight-groups)"{{{
" ----------------------------------------------------------------------------
exe "hi! ColorColumn" .s:fg_none .s:bg_line .s:fmt_none
" Conceal"
" Cursor"
" CursorIM"
exe "hi! CursorColumn" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! CursorLine" .s:fg_none .s:bg_line .s:fmt_none
exe "hi! Directory" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! DiffAdd" .s:fg_addfg .s:bg_addbg .s:fmt_none
exe "hi! DiffChange" .s:fg_changefg .s:bg_changebg .s:fmt_none
exe "hi! DiffDelete" .s:fg_background .s:bg_delbg .s:fmt_none
exe "hi! DiffText" .s:fg_background .s:bg_blue .s:fmt_none
exe "hi! ErrorMsg" .s:fg_background .s:bg_red .s:fmt_stnd
exe "hi! VertSplit" .s:fg_window .s:bg_none .s:fmt_none
exe "hi! Folded" .s:fg_comment .s:bg_darkcolumn .s:fmt_none
exe "hi! FoldColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
exe "hi! SignColumn" .s:fg_none .s:bg_darkcolumn .s:fmt_none
" Incsearch"
exe "hi! LineNr" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! CursorLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! MatchParen" .s:fg_background .s:bg_changebg .s:fmt_none
exe "hi! ModeMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! MoreMsg" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! NonText" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! Pmenu" .s:fg_foreground .s:bg_selection .s:fmt_none
exe "hi! PmenuSel" .s:fg_foreground .s:bg_selection .s:fmt_revr
" PmenuSbar"
" PmenuThumb"
exe "hi! Question" .s:fg_green .s:bg_none .s:fmt_none
exe "hi! Search" .s:fg_background .s:bg_yellow .s:fmt_none
exe "hi! SpecialKey" .s:fg_selection .s:bg_none .s:fmt_none
exe "hi! SpellCap" .s:fg_blue .s:bg_darkblue .s:fmt_undr
exe "hi! SpellLocal" .s:fg_aqua .s:bg_darkcyan .s:fmt_undr
exe "hi! SpellBad" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! SpellRare" .s:fg_purple .s:bg_darkpurple .s:fmt_undr
exe "hi! StatusLine" .s:fg_comment .s:bg_background .s:fmt_revr
exe "hi! StatusLineNC" .s:fg_window .s:bg_comment .s:fmt_revr
exe "hi! TabLine" .s:fg_foreground .s:bg_darkcolumn .s:fmt_revr
" TabLineFill"
" TabLineSel"
exe "hi! Title" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Visual" .s:fg_none .s:bg_selection .s:fmt_none
" VisualNos"
exe "hi! WarningMsg" .s:fg_red .s:bg_none .s:fmt_none
" FIXME LongLineWarning to use variables instead of hardcoding
hi LongLineWarning guifg=NONE guibg=#371F1C gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
" WildMenu"
" Use defined custom background colour for terminal Vim.
if !has('gui_running') && exists("g:hybrid_custom_term_colors") && g:hybrid_custom_term_colors == 1
let s:bg_normal = s:bg_none
else
let s:bg_normal = s:bg_background
endif
exe "hi! Normal" .s:fg_foreground .s:bg_normal .s:fmt_none
"}}}
" Generic Syntax Highlighting: (see :help group-name)"{{{
" ----------------------------------------------------------------------------
exe "hi! Comment" .s:fg_comment .s:bg_none .s:fmt_none
exe "hi! Constant" .s:fg_red .s:bg_none .s:fmt_none
exe "hi! String" .s:fg_green .s:bg_none .s:fmt_none
" Character"
" Number"
" Boolean"
" Float"
exe "hi! Identifier" .s:fg_purple .s:bg_none .s:fmt_none
exe "hi! Function" .s:fg_yellow .s:bg_none .s:fmt_none
exe "hi! Statement" .s:fg_blue .s:bg_none .s:fmt_none
" Conditional"
" Repeat"
" Label"
exe "hi! Operator" .s:fg_aqua .s:bg_none .s:fmt_none
" Keyword"
" Exception"
exe "hi! PreProc" .s:fg_aqua .s:bg_none .s:fmt_none
" Include"
" Define"
" Macro"
" PreCondit"
exe "hi! Type" .s:fg_orange .s:bg_none .s:fmt_none
" StorageClass"
exe "hi! Structure" .s:fg_aqua .s:bg_none .s:fmt_none
" Typedef"
exe "hi! Special" .s:fg_green .s:bg_none .s:fmt_none
" SpecialChar"
" Tag"
" Delimiter"
" SpecialComment"
" Debug"
"
exe "hi! Underlined" .s:fg_blue .s:bg_none .s:fmt_none
exe "hi! Ignore" .s:fg_none .s:bg_none .s:fmt_none
exe "hi! Error" .s:fg_red .s:bg_darkred .s:fmt_undr
exe "hi! Todo" .s:fg_addfg .s:bg_none .s:fmt_none
" Quickfix window highlighting
exe "hi! qfLineNr" .s:fg_yellow .s:bg_none .s:fmt_none
" qfFileName"
" qfLineNr"
" qfError"
"}}}
" Diff Syntax Highlighting:"{{{
" ----------------------------------------------------------------------------
" Diff
" diffOldFile
" diffNewFile
" diffFile
" diffOnly
" diffIdentical
" diffDiffer
" diffBDiffer
" diffIsA
" diffNoEOL
" diffCommon
hi! link diffRemoved Constant
" diffChanged
hi! link diffAdded Special
" diffLine
" diffSubname
" diffComment
"}}}
"
" This is needed for some reason: {{{
let &background = s:style
" }}}
" Legal:"{{{
" ----------------------------------------------------------------------------
" Copyright (c) 2011 Ethan Schoonover
" Copyright (c) 2009-2012 NanoTech
" Copyright (c) 2012 w0ng
"
" Permission is hereby granted, free of charge, to any per
" son obtaining a copy of this software and associated doc
" umentation files (the “Software”), to deal in the Soft
" ware without restriction, including without limitation
" the rights to use, copy, modify, merge, publish, distrib
" ute, sublicense, and/or sell copies of the Software, and
" to permit persons to whom the Software is furnished to do
" so, subject to the following conditions:
"
" The above copyright notice and this permission notice
" shall be included in all copies or substantial portions
" of the Software.
"
" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU
" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON
" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
" THE SOFTWARE.
" }}}

@ -0,0 +1,40 @@
require('keymap')
require('plugins')
require('calcurse')
-- prevent cursor override
vim.cmd('set guicursor=')
-- basic settings
vim.cmd('filetype plugin indent on')
vim.cmd('set ts=4 sts=4 sw=4 expandtab')
vim.opt.relativenumber = true
vim.opt.compatible = false
-- colorscheme and syntax settings
vim.cmd([[
syntax enable
colorscheme hybrid
hi Normal ctermbg=NONE
]])
-- defaults to transparent
transparent = true
-- timeouts
vim.opt.ttimeout = true
vim.opt.ttimeoutlen = 100
-- nvim tree basics
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- vimwiki changes
vim.cmd([[
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext':'.md'}]
]])

@ -0,0 +1,7 @@
-- calcurse -> markdown
vim.api.nvim_create_autocmd({"BufRead","BufNewFile"}, {
pattern = {"/tmp/calcurse*","~/.local/share/calcurse/notes/*"},
command = "set filetype=markdown",
})

@ -0,0 +1,24 @@
require("transparent")
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>b", ":lua toggleTransparent()<CR>")
-- nvim-tree bindings
vim.keymap.set("n", "<leader>t", ":NvimTreeToggle<CR>")
vim.keymap.set("n", "<leader>s", ":lua spellToggle()<CR>")
-- toggle spell check
function spellToggle()
if vim.o.spell == nil or vim.o.spell then
vim.o.spell = false
else
vim.o.spell = true
end
end
-- markdown preview
vim.keymap.set("n", "<leader>p", ":MarkdownPreviewToggle<CR>")

@ -0,0 +1,12 @@
require('tree')
-- airline settings
if vim.g.airline_symbols == nil then
vim.g.airline_symbols = vim.empty_dict()
end
vim.g.airline_powerline_fonts = 1
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.maxlinenr = ''
vim.g.airline_symbols.dirty = ''

@ -0,0 +1,9 @@
function toggleTransparent()
transparent = not transparent
if transparent then
vim.cmd("hi Normal ctermbg=NONE")
else
vim.cmd("set background=dark")
vim.cmd("syntax enable")
end
end

@ -0,0 +1,40 @@
require('nvim-tree').setup({
open_on_tab = false,
filters = {
dotfiles = true,
},
actions = {
open_file = {
quit_on_open = true,
},
},
})
showHiddenFiles = false
local function open_nvim_tree(data)
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
local empty_file = data.file == ""
if not directory and not empty_file then
return
end
if directory then
vim.cmd.cd(data.file)
end
vim.cmd.enew()
vim.cmd.bw(data.buf)
-- change to directory and open
require("nvim-tree.api").tree.open()
end
-- toggle dotfiles visibility
vim.keymap.set("n", "<leader>d", ":lua require('nvim-tree.api').tree.toggle_hidden_filter()<CR>")
-- nvim-tree open at startup
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree, })

@ -0,0 +1,8 @@
vim.cmd('packadd vim-go')
vim.g.go_hightlight_types = 1
vim.g.go_hightlight_fields = 1
vim.g.go_hightlight_functions = 1
vim.g.go_hightlight_function_calls = 1
vim.g.go_hightlight_operators = 1
vim.g.go_hightlight_extra_types = 1

@ -0,0 +1,27 @@
-- adding packages
vim.cmd('packadd vim-markdown')
vim.cmd('packadd vimwiki')
-- due date highlighting
require('due_nvim').setup {
ft = '*.md',
date_hi = 'Comment',
week_hi = 'Structure',
pattern_start = '<',
pattern_end = '>',
use_clock_time = true,
use_clock_today = true,
use_seconds = false,
}
-- setting spell check
vim.cmd([[
setlocal spell
setlocal wrap
]])
-- markdown plugin settings
vim.opt.conceallevel = 2
vim.g.vim_markdown_folding_disabled = 1
vim.g.vim_markdown_math = 1
vim.g.vim_markdown_strikethrough = 1

@ -0,0 +1,2 @@
-- adding packages
vim.cmd('packadd vim-typescript')

@ -0,0 +1 @@
Subproject commit 94e3b0990017a42fa4581ea3d0bc08b897727d4d

@ -0,0 +1 @@
Subproject commit 253d34830709d690f013daf2853a9d21ad7accab

@ -0,0 +1 @@
Subproject commit 942fe5faef47b21241e970551eba407bc10d9547

@ -0,0 +1 @@
Subproject commit a494378f6c106a97e39c62b493c14476f9f7de4f

@ -0,0 +1 @@
Subproject commit 5d3d1b6cbdc4be0b4c6105c1ab1f769d76d3c68f

@ -0,0 +1 @@
Subproject commit dec6a9ecab3e5ec9ceff28b84cabb5c62d05ee9f

@ -0,0 +1 @@
Subproject commit 02cc3874738bc0f86e4b91f09b8a0ac88aef8e96

@ -0,0 +1 @@
Subproject commit e87cd90dc09c2a203e13af9704bd0ef79303d755

@ -0,0 +1 @@
Subproject commit ef99f1d90cdb33a52931aed5868785b51fb9411d

@ -0,0 +1 @@
Subproject commit 6580cf539c33a212f4f5542068a3b4dd2b3ad834

@ -0,0 +1 @@
Subproject commit 3d188ed2113431cf8dac77be61b842acb64433d9

@ -0,0 +1 @@
Subproject commit a532fed72ace069e61c0132125b728316f9abd3c

@ -0,0 +1 @@
Subproject commit 52f3ca3474d51f5021696ffb7297d989e49121ac

@ -53,7 +53,6 @@ bindsym $mod+d exec --no-startup-id rofi-launcher
bindsym $mod+o exec --no-startup-id rofi-files
bindsym $mod+Shift+o exec --no-startup-id rofi-files -S
bindsym $mod+space exec --no-startup-id rofi-calc
# setting up a vimscratch pad to use vimwiki
for_window [instance="todo"] move window to scratchpad
@ -109,7 +108,7 @@ bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
# bindsym $mod+space focus mode_toggle
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent

@ -1,8 +1,8 @@
include base.conf
# binding workspaces
workspace 1 output DP-0
workspace 2 output DP-2
workspace 1 output DP-2
workspace 2 output DP-0
# poly bar
exec_always --no-startup-id polybar-launch.sh desktop-bar

@ -31,7 +31,9 @@ shadow-offset-y = -7;
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0). shadow-blue = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
@ -217,8 +219,10 @@ blur-background-exclude = [
# `xrender` is the default one.
#
# backend = "glx"
backend = "glx";
backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.

@ -6,7 +6,7 @@ foreground = #DDD
primary = #F0C674
secondary = #8ABEB7
disabled = #707880
alert = #A54242S
alert = #A54242
[section/base-bar]
; base bar settings
@ -38,7 +38,7 @@ font-0 = Hack Nerd Font:size=10;2
height = 14pt
; modules
modules-left = xworkspaces weather-thinkpad
modules-right = battery pulseaudio memory cpu wlan seafile calendar-sync bg-selector date-tp powermenu
modules-right = battery pulseaudio memory cpu wlan uptime seafile calendar-sync bg-selector date-tp powermenu
[bar/desktop-bar]
; desktop bar config
@ -46,10 +46,10 @@ inherit = section/base-bar
; height
height = 24pt
; modules
modules-left = xworkspaces focus-fast spotify spotify-len
modules-left = xworkspaces focus-fast spotify spotify-len todo
;modules-left = xworkspaces spotify spotify-len
modules-center = weather-desktop
modules-right = pulseaudio memory cpu temperature wlan eth vpn dev-bat packages seafile calendar-sync bg-selector quotes date powermenu
modules-right = pulseaudio memory cpu temperature eth dev-bat seafile calendar-sync bg-selector quotes date powermenu
[bar/work-bar]
; desktop bar config
@ -57,9 +57,10 @@ inherit = section/base-bar
; height
height = 18pt
; modules
modules-left = xworkspaces focus-fast
modules-left = xworkspaces focus todo
;modules-left = xworkspaces spotify spotify-len
modules-center = weather-desktop
modules-right = memory cpu eth seafile bg-selector date-tp powermenu
modules-right = memory cpu temperature eth seafile bg-selector date powermenu
[module/xworkspaces]
type = internal/xworkspaces
@ -298,22 +299,5 @@ format-prefix = "UP "
format-prefix-foreground = ${colors.primary}
exec = display_uptime
[module/packages]
type = custom/script
interval = 600
exec = printf "%s %s\n" `echo -e '\ueb29'` `pacman -Qu | wc -l`
[module/vpn]
; custom vpn script
type = custom/script
exec = vpn_status.sh
tail = true
[module/crypto]
; custom crypto script
type = custom/script
exec = /home/spinach/sb-ticker 20
tail = true
[settings]
screenchange-reload = true

@ -1 +1 @@
Subproject commit dbf546e61c0ca848f2474db55b601dead6d41f7e
Subproject commit 0def3cd15974a19606a93082778c043d370df8bd

@ -1,6 +1,6 @@
- shell:
- [arch/yay_installer, Installing yay]
- [bin/arch_package_installer.sh arch/base, installing base dependancies]
#command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S `cat arch/base.deps | grep -v '#'`"
#description: "Installing base dependancies"
-
command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S `cat arch/base.deps | grep -v '#'`"
description: "Installing base dependancies"

@ -1,4 +1,4 @@
- shell:
- [bin/arch_package_installer.sh arch/i3, Installing i3 dependancies]
#command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S `cat arch/i3.deps | grep -v '#'`"
#description: "Installing i3 dependancies"
-
command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S `cat arch/i3.deps | grep -v '#'`"
description: "Installing i3 dependancies"

@ -1,7 +0,0 @@
- shell:
- [bin/arch_package_installer.sh arch/nvim, Installing nvim dependancies]
# command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S `cat arch/nvim.deps | grep -v '#'`"
# description: "Installing base dependancies"
# stderr: true
# stdout: true

@ -0,0 +1,5 @@
- shell:
-
command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S picom"
description: "Installing picom"

@ -0,0 +1,5 @@
- shell:
-
command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S polybar"
description: "Installing polybar"

@ -2,5 +2,6 @@
- [cd src/fzf && make install, Building fzf]
- link:
~/.fzf: src/fzf
~/.local/bin/fzf: src/fzf/bin/fzf
~/.local/bin/fzf-tmux: src/fzf/bin/fzf-tmux

@ -1,7 +0,0 @@
- link:
~/.config/nvim: editors/neovim/config
~/.local/share/nvim/site: editors/neovim/site
- shell:
- command: "cd editors/neovim/site/pack/markdown/start/markdown-preview.nvim/app && if [[ -z `ls bin 2>/dev/null` ]] ; then ./install.sh; fi"
#- [cd editors/neovim/site/pack/markdown/start/markdown-preview.nvim && yarn install --checkfiles && NODE_OPTIONS=--openssl-legacy-provider yarn build, building markdown preview]

@ -0,0 +1,10 @@
- clean:
~/.config/nvim:
~/.local/share/nvim:
- link:
~/.config/nvim: editors/nvim/mac-config
~/.local/share/nvim/site: editors/nvim/site
- shell:
- [cd editors/nvim/site/pack/markdown/start/markdown-preview.nvim && yarn install && NODE_OPTIONS=--openssl-legacy-provider yarn build, building markdown preview]

@ -0,0 +1,10 @@
- clean:
~/.config/nvim:
~/.local/share/nvim:
- link:
~/.config/nvim: editors/nvim/config
~/.local/share/nvim/site: editors/nvim/site
- shell:
- [cd editors/nvim/site/pack/markdown/start/markdown-preview.nvim && yarn install && NODE_OPTIONS=--openssl-legacy-provider yarn build, building markdown preview]

@ -2,4 +2,4 @@
- [bin/oh-my-zsh-check.sh]
- link:
~/.local/share/omz-custom: shells/oh-my-zsh
~/.local/share/oh-my-zsh: shells/oh-my-zsh

@ -8,13 +8,13 @@
- link:
~/.local/bin/ssh_agent_check: bin/ssh_agent_check
~/.local/bin/poly_spotify: bin/poly_spotify
~/.local/bin/rofi-files: bin/rofi-files
~/.local/bin/i3-scratchpad.sh: bin/i3-scratchpad.sh
~/.local/bin/todo_display.sh: bin/todo_display.sh
~/.local/bin/display_uptime: bin/display_uptime
~/.local/bin/markdown-preview.sh: bin/markdown-preview.sh
~/.local/bin/docker_check: bin/docker_check
~/.local/bin/seafile_check: bin/seafile_check
~/.local/bin/vpn_status.sh: bin/vpn_status.sh
~/.local/bin/watertracker: src/watertracker/watertracker
~/.local/bin/device_battery.sh: src/device-battery/device_battery.sh
~/.local/bin/weather: src/weather/weather

@ -2,7 +2,7 @@
~/.config/systemd/user/seafile.service: services/seafile.service
- shell:
- [bin/arch_package_installer.sh arch/seafile, Installing seafile]
# command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S seafile seafile-client"
# description: "Installing seafile"
- [systemctl --user enable seafile && systemctl --user start seafile, enabling autostart]
-
command: "yay --sudoloop --nodiffmenu --noeditmenu --noupgrademenu --nocleanmenu --noredownload --norebuild --useask --needed -S seafile seafile-client"
description: "Installing seafile"
- command: "systemctl --user enable seafile && systemctl --user start seafile"

@ -1,2 +1,2 @@
- shell:
- [cd shells/st && sudo make install CONFIG=desktop && tic -sx st.info && make clean, Installing st (desktop)]
- [cd shells/st && sudo make install CONFIG=desktop && make clean, Installing st (desktop)]

@ -1,2 +1,2 @@
- shell:
- [cd shells/st && sudo make install CONFIG=thinkpad && tic -sx st.info && make clean, Installing st (Thinkpad)]
- [cd shells/st && sudo make install CONFIG=thinkpad, Installing st (Thinkpad)]

@ -1,2 +1,2 @@
- shell:
- [cd shells/st && sudo make install CONFIG=work && tic -sx st.info && make clean, Installing st (work)]
- [cd shells/st && sudo make install CONFIG=work, Installing st (work)]

@ -1,6 +1,3 @@
- link:
~/.local/bin/timetracker: src/timetracker/timetracker
~/.config/systemd/user/timesheet.service: src/timetracker/timesheet.service
- shell:
- [systemctl --user enable "timesheet.service", enabling systemd for timesheet]

@ -1,2 +1,2 @@
- link:
~/.config/tmux/tmux.conf: terminals/tmux/tmux.sparse.conf
~/.tmux.conf: terminals/tmux/tmux.sparse.conf

@ -1,10 +0,0 @@
- shell:
- command: chsh -s $(which zsh)
stdin: true
stdout: true
stderr: true
- link:
~/.zprofile: shells/zsh/zprofile
~/.zshrc: shells/zsh/zshrc.basic
~/.p10k.sh: shells/zsh/p10k.sh

@ -1,9 +1,6 @@
- shell:
- command: bin/zsh-check
stdin: true
stdout: true
- [bin/zsh-check]
- link:
~/.config/zsh/.zprofile: shells/zsh/zprofile
~/.config/zsh/.zshrc: shells/zsh/zshrc
~/.config/zsh/.p10k.sh: shells/zsh/p10k.sh
~/.zshrc: shells/zsh/zshrc
~/.zprofile: shells/zsh/zprofile

@ -1,2 +0,0 @@
- shell:
- [echo 'export ZDOTDIR="$HOME/.config/zsh"' > /etc/zsh/zshenv, "creating zshenv"]

@ -1,7 +1,7 @@
nvim.apple
tmux.apple
zsh
oh-my-zsh
tmux.apple
neovim
fzf
scripts
calcurse

@ -1,9 +1,9 @@
arch.base
arch.i3
arch.nvim
neovim
arch.picom
arch.polybar
nvim
zsh
zshenv-sudo
oh-my-zsh
fzf
tmux.sparse

@ -1,5 +0,0 @@
tmux.sparse
zsh.basic
oh-my-zsh
neovim
clean

@ -0,0 +1,21 @@
arch.base
arch.i3
arch.picom
arch.polybar
nvim
zsh
oh-my-zsh
fzf
tmux.sparse
tmuxp
st.desktop
i3.desktop
polybar
picom
rofi
lf
scripts
calcurse
seafile
passwords
clean

@ -0,0 +1,19 @@
arch.base
arch.i3
arch.picom
arch.polybar
zsh
oh-my-zsh
fzf
tmux.sparse
st.thinkpad
i3.thinkpad
polybar
picom
rofi
lf
scripts
calcurse
seafile
passwords
clean

@ -0,0 +1,18 @@
arch.base
arch.i3
arch.picom
arch.polybar
zsh
oh-my-zsh
fzf
tmux.sparse
nvim
st.work
i3.work
picom
polybar
rofi
lf
scripts
timetracker
clean

@ -2,4 +2,3 @@ profile/arch
st.work
i3.work
timetracker
seafile

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1 +1 @@
Subproject commit c1b5b2c8aab51b2a5b0d29d078e3cb53bb4c46bb
Subproject commit b474978b2e9435c10ca66f8281352ebc825264f4

@ -1 +1 @@
Subproject commit 56aba76874efb3bb5914d8eaf9e356057113aea7
Subproject commit 462ef27cf39db4a837eeecf7135fb65cd0b8789a

@ -0,0 +1,487 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Hack Nerd Font:pixelsize=20:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* bg opacity */
float alpha = 0.8, alphaUnfocused = 0.6;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"gray90", /* default foreground colour */
"black", /* default background colour */
"#c5c8c6", // hybrid fg
"#1d1f21", // hybrid bg
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 260;
unsigned int defaultbg = 261;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
unsigned int bg = 261, bgUnfocused = 261;
/*
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
* Default style of cursor
* 0: blinking block
* 1: blinking block (default)
* 2: steady block ("")
* 3: blinking underline
* 4: steady underline ("_")
* 5: blinking bar
* 6: steady bar ("|")
* 7: blinking st cursor
* 8: steady st cursor
*/
static unsigned int cursorstyle = 3;
static Rune stcursor = 0x2603; /* snowman ("☃") */
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

@ -0,0 +1,487 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Hack Nerd Font:pixelsize=14:antialias=true:autohint=true";
static int borderpx = 1;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* bg opacity */
float alpha = 0.85, alphaUnfocused = 0.6;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"gray90", /* default foreground colour */
"black", /* default background colour */
"#c5c8c6", // hybrid fg
"#1d1f21", // hybrid bg
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 260;
unsigned int defaultbg = 261;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
unsigned int bg = 261, bgUnfocused = 261;
/*
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
* Default style of cursor
* 0: blinking block
* 1: blinking block (default)
* 2: steady block ("")
* 3: blinking underline
* 4: steady underline ("_")
* 5: blinking bar
* 6: steady bar ("|")
* 7: blinking st cursor
* 8: steady st cursor
*/
static unsigned int cursorstyle = 3;
static Rune stcursor = 0x2603; /* snowman ("☃") */
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

@ -0,0 +1,487 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Hack Nerd Font:pixelsize=16:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* bg opacity */
float alpha = 0.8, alphaUnfocused = 0.6;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"gray90", /* default foreground colour */
"black", /* default background colour */
"#c5c8c6", // hybrid fg
"#1d1f21", // hybrid bg
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 260;
unsigned int defaultbg = 261;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
unsigned int bg = 261, bgUnfocused = 261;
/*
* https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81
* Default style of cursor
* 0: blinking block
* 1: blinking block (default)
* 2: steady block ("")
* 3: blinking underline
* 4: steady underline ("_")
* 5: blinking bar
* 6: steady bar ("|")
* 7: blinking st cursor
* 8: steady st cursor
*/
static unsigned int cursorstyle = 3;
static Rune stcursor = 0x2603; /* snowman ("☃") */
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

File diff suppressed because it is too large Load Diff

@ -1 +0,0 @@
export ZDOTDIR="$HOME/.config/zsh"

@ -8,13 +8,6 @@ fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l > /dev/null || ssh-add ~/.ssh/id_ed25519
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
@ -28,41 +21,50 @@ fi
# fixing gopath and binaries
export GOPATH="$HOME/.local/share/go"
# moving cargo cache dir
export CARGO_HOME="$HOME/.local/share/cargo"
export RUSTUP_HOME="$HOME/.local/sare/rustup"
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
export ZSH="$HOME/.oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
plugins=(
zsh-autosugggestions
)
# ZSH theme
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
#list of good themes [amuse,aussiegeek,passion]
ZSH_THEME="powerlevel10k/powerlevel10k"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
zsh-autosuggestions
git
)
#vi-mode
source $ZSH/oh-my-zsh.sh
# vi-mode settings
export KEYTIMEOUT=10
bindkey -v
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
@ -76,15 +78,33 @@ bindkey -v
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
ZSH_CUSTOM=$HOME/.local/share/oh-my-zsh/custom
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
zsh-autosuggestions
git
)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# export EDITOR='mvim'
# fi
# Compilation flags
@ -93,42 +113,40 @@ bindkey -v
#
# switching to neovim
alias vim="nvim"
# helpful aliasis
alias ifconfig="/sbin/ifconfig"
# git stuff
alias gadd="git add ."
alias gbug="git add . && git commit -m 'bug fixes'"
alias gp="git push"
# bb ip remove work related
# bb ip remove
alias bbrm='ssh-keygen -f "/home/kdeppe/.ssh/known_hosts" -R "192.168.7.2"'
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export POWERLEVEL9K_CONFIG_FILE="$HOME/.config/zsh/.p10k.sh"
[[ ! -f "$POWERLEVEL9K_CONFIG_FILE" ]] || source "$POWERLEVEL9K_CONFIG_FILE"
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# home and clear
alias c="cd && clear"
# colorize ls
alias ls="ls --color=auto"
# water tracking alias
alias nalgene="water 32"
alias tt="timetracker"
alias bb="bluebikes"
alias task="go-task"
# setting up location variables
# source "$HOME/.dotfiles/bin/weather/location.sh"
#source "$HOME/.dotfiles/bin/startup/tmux_start.sh"
export FZF_DEFAULT_OPTS='--layout=reverse --border'
#alias bat="batcat" Only needed on ubuntu/debian
# vim wiki alias
alias vimwiki="nvim '+cd %:p:h' $HOME/vimwiki/index.md"
#alias vimwiki="cd $HOME/vimwiki && nvim index.md"
# yt-dlp alias for simplicity
alias yt-vid="yt-dlp -P $HOME/media/video"
alias yt-mu="yt-dlp -P $HOME/media/music -x -f m4a/bestaudio --add-metadata --recode mp4"
# git aliases
alias gadd="git add ."
alias gbug="git add . && git commit -m 'bug fixes'"
alias gp="git push"
alias glog="git log --pretty --oneline --graph --all --decorate"
# copying with progress
alias cpr="rsync -r -hh --info=stats1,progress2"

@ -1,107 +0,0 @@
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# path fix for deb
export PATH=$PATH:/usr/local/bin
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# fixing gopath and binaries
export GOPATH="$HOME/.local/share/go"
# moving cargo cache dir
export CARGO_HOME="$HOME/.local/share/cargo"
export RUSTUP_HOME="$HOME/.local/sare/rustup"
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# ZSH theme
ZSH_THEME="powerlevel10k/powerlevel10k"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
zsh-autosuggestions
git
)
#vi-mode
source $ZSH/oh-my-zsh.sh
# vi-mode settings
export KEYTIMEOUT=10
bindkey -v
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
#
# switching to neovim
alias vim="nvim"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export POWERLEVEL9K_CONFIG_FILE="$HOME/.config/zsh/.p10k.sh"
[[ ! -f "$POWERLEVEL9K_CONFIG_FILE" ]] || source "$POWERLEVEL9K_CONFIG_FILE"
# home and clear
alias c="cd && clear"
# colorize ls
alias ls="ls --color=auto"
export FZF_DEFAULT_OPTS='--layout=reverse --border'
# git aliases
alias gadd="git add ."
alias gbug="git add . && git commit -m 'bug fixes'"
alias gp="git push"
alias glog="git log --pretty --oneline --graph --all --decorate"

@ -1 +1 @@
Subproject commit e75250ac9f2ea0ad557fe971a263842c0717b80f
Subproject commit 06434a49350a669263b7bc45e5210b5f3e699ced

@ -1 +1 @@
Subproject commit 96670d5f16dcf23d590eb1d83d1de351b2e8fb15
Subproject commit 20230402d087858ca9a93aa8fe53d289f29c1836

@ -1 +1 @@
Subproject commit c5672a5864bc78a932de438e4f64fefcee5c6ea6
Subproject commit dbe65c011c8f9d653470333a07a9892ab2d227c7

@ -1,7 +1,4 @@
# Improve Colors set -g default-terminal "screen-256color"
set -g default-terminal "st-256color"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# change keybinding to something sane
set -g prefix M-a
# Set scrollback buffer
@ -32,18 +29,6 @@ bind-key a attach -c "#{pane_current_path}"
# setting up TPM
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# adding tmux ssh support
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'MunifTanjim/tmux-suspend'
# suspend key
set -g @suspend_key 'F12'
# suspend cutom colors
set -g @suspend_suspended_options " \
window-status-current-style::bg=color94 dim\\,fg=black, \
@mode_indicator_custom_prompt:: ---- , \
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \
status-style::bg=color94 dim\\,fg=black bold dim, \
"
# clock settings
set -g clock-mode-colour white
@ -51,15 +36,10 @@ set -g clock-mode-colour white
# status config
set -g status-interval 10
set -g status-style "bg=black, fg=brightWhite"
set -g status-right "%a, %b %d %l:%M %P #{tmux_mode_indicator}"
set -g status-right "%a, %b %d %l:%M %P "
set -g status-right-length 100
set -g status-left ""
# change active window color
set-window-option -g window-status-current-style "bg=white, fg=black"
# set -g default-terminal "${TERM}"
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
# set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# tmux auto start
# set -g @plugin 'tmux-plugins/tmux-resurrect'
# set -g @plugin 'tmux-plugins/tmux-continuum'
@ -71,10 +51,9 @@ set-window-option -g window-status-current-style "bg=white, fg=black"
# set -g @continuum-boot 'on'
#set -g @continuum-systemd-start-cmd 'new-session -d -s doormat'
set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.local/share/tmux/plugins"
# auto install plugins at correct directory
if "test ! -d ~/.local/share/tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm && ~/.local/share/tmux/plugins/tpm/bin/install_plugins'"
# auto install plugins
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# run tpm
run '~/.local/share/tmux/plugins/tpm/tpm'
run '~/.tmux/plugins/tpm/tpm'

Loading…
Cancel
Save