move all existing stuff to old/
This commit is contained in:
parent
c215878777
commit
35f5e8472b
49 changed files with 0 additions and 0 deletions
2
old/Xresources
Normal file
2
old/Xresources
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include ".cache/wal/colors.Xresources"
|
||||
#include ".Xresources.local"
|
1
old/_bin/desktop-env
Executable file
1
old/_bin/desktop-env
Executable file
|
@ -0,0 +1 @@
|
|||
#!/bin/sh
|
5
old/_bin/i3-clean-workspace
Executable file
5
old/_bin/i3-clean-workspace
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
WORKSPACES=$(i3-msg -t get_workspaces)
|
||||
# echo $WORKSPACES | jq
|
||||
|
||||
echo $WORKSPACES
|
35
old/_bin/i3exit
Executable file
35
old/_bin/i3exit
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
lock() {
|
||||
if [ -e "$(which i3lock)" ]; then
|
||||
i3lock
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
lock)
|
||||
~/bin/lockscreen
|
||||
;;
|
||||
logout)
|
||||
i3-msg exit
|
||||
;;
|
||||
suspend)
|
||||
lock && systemctl suspend
|
||||
;;
|
||||
hibernate)
|
||||
lock && systemctl hibernate
|
||||
;;
|
||||
blank)
|
||||
sleep 1; xset dpms force off
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {lock|logout|suspend|hibernate|blank|reboot|shutdown}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit 0
|
15
old/_bin/import-gsettings
Executable file
15
old/_bin/import-gsettings
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# usage: import-gsettings
|
||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
|
||||
if [ ! -f "$config" ]; then exit 1; fi
|
||||
|
||||
gnome_schema="org.gnome.desktop.interface"
|
||||
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
|
||||
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
|
||||
gsettings set "$gnome_schema" icon-theme "$icon_theme"
|
||||
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
|
||||
gsettings set "$gnome_schema" font-name "$font_name"
|
54
old/_bin/launcher
Executable file
54
old/_bin/launcher
Executable file
|
@ -0,0 +1,54 @@
|
|||
#!/bin/sh
|
||||
|
||||
function prepend_alpha() {
|
||||
_rgb=$1
|
||||
_alpha=$2
|
||||
echo ${_rgb//\#/\#${_alpha}}
|
||||
}
|
||||
|
||||
function color() {
|
||||
_index=$1
|
||||
_alpha=${2:-}
|
||||
_color=${colors[$_index]}
|
||||
if [ "$_alpha" != "" ]; then
|
||||
echo $(prepend_alpha $_color $_alpha)
|
||||
else
|
||||
echo $_color
|
||||
fi
|
||||
}
|
||||
|
||||
# read colors from wal into array 'colors'
|
||||
if [ -f ~/.cache/wal/colors ]; then
|
||||
IFS=$'\n' read -d '' -r -a colors < ~/.cache/wal/colors
|
||||
fi
|
||||
|
||||
_bg=$(color 0 "aa")
|
||||
_bg2=$(color 0 "55")
|
||||
_fg=${colors[5]}
|
||||
_fg2=${colors[8]}
|
||||
_clear="#00000000"
|
||||
|
||||
|
||||
if command -v rofi &> /dev/null; then
|
||||
rofi -show drun -modi drun \
|
||||
-color-window "$_bg, $_bg, $_fg" \
|
||||
-color-normal "$_clear, $_fg, $_bg2, $_fg, $_bg" \
|
||||
-color-active "$_clear, $_fg, $_clear, $_fg, $_clear" \
|
||||
-opacity 10 \
|
||||
-width 80 \
|
||||
-padding 20 \
|
||||
-bw 2 \
|
||||
-separator-style none \
|
||||
-line-padding 3 \
|
||||
-icon-theme "Paper" \
|
||||
-location 0 \
|
||||
-hide-scrollbar \
|
||||
-show-icons true \
|
||||
-font "Abel 11" \
|
||||
-display-run ">" \
|
||||
-theme-str "#prompt-colon { enabled: false; }"
|
||||
elif command -v wofi &> /dev/null; then
|
||||
COMMAND=wofi
|
||||
$COMMAND --show drun --color=$HOME/.cache/wal/colors
|
||||
fi
|
||||
|
24
old/_bin/screengrab
Executable file
24
old/_bin/screengrab
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
with_maim() {
|
||||
mkdir -p ${HOME}/screenshot
|
||||
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
|
||||
maim -s -n -o -p 1 -f png -m 10 -u | tee $TARGET | xclip -selection clipboard -t image/png
|
||||
[ -s ${TARGET} ] || rm ${TARGET}
|
||||
}
|
||||
|
||||
with_grim() {
|
||||
# requires: grim, wl-clipboard, and slurp.
|
||||
mkdir -p ${HOME}/screenshot
|
||||
TARGET="${HOME}/screenshot/grab-$(date +'%Y%m%d%H%M%S').png"
|
||||
grim -g "$(slurp)" $TARGET
|
||||
if [ -s $TARGET ]; then
|
||||
wl-copy < $TARGET
|
||||
fi
|
||||
}
|
||||
|
||||
case "${XDG_SESSION_TYPE}" in
|
||||
wayland) with_grim;;
|
||||
*) with_maim;;
|
||||
esac
|
||||
|
||||
|
159
old/_config/i3/config-orig
Normal file
159
old/_config/i3/config-orig
Normal file
|
@ -0,0 +1,159 @@
|
|||
# use windows key for mod
|
||||
set $mod Mod4
|
||||
|
||||
# quick-launch
|
||||
bindsym $mod+Return exec kitty
|
||||
bindsym $mod+Home exec thunar
|
||||
bindsym $mod+b exec firefox
|
||||
bindsym $mod+d exec --no-startup-id ~/bin/launcher
|
||||
bindsym --release $mod+g exec --no-startup-id ~/bin/screengrab
|
||||
|
||||
# i3 actions
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# window bindings and behavior
|
||||
floating_modifier $mod
|
||||
focus_follows_mouse no
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# move window focus (Vim style)
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# move window focus (with arrow keys)
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move window (Vim style)
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# move window (with arrow keys)
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# splits
|
||||
bindsym $mod+u split h
|
||||
bindsym $mod+i split v
|
||||
|
||||
# fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# toggle tiling/floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# toggle focus between tiling/floating
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# switch to specific workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# move focus to adjacent output
|
||||
bindsym $mod+bracketleft focus output left
|
||||
bindsym $mod+bracketright focus output right
|
||||
|
||||
# jump to workspace on same output
|
||||
bindsym $mod+Shift+bracketleft workspace prev_on_output
|
||||
bindsym $mod+Shift+bracketright workspace next_on_output
|
||||
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
|
||||
# nice system menu
|
||||
set $mode_system System (e) logout, (r) reboot, (shift+s) shutdown
|
||||
mode "$mode_system" {
|
||||
bindsym e exec --no-startup-id ~/bin/i3exit logout, mode "default"
|
||||
bindsym r exec --no-startup-id ~/bin/i3exit reboot, mode "default"
|
||||
bindsym Shift+s exec --no-startup-id ~/bin/i3exit shutdown, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+Shift+e mode "$mode_system"
|
||||
|
||||
# appearance
|
||||
font xft:artwiz lime 7
|
||||
default_border pixel 5
|
||||
font xft:Roboto 13
|
||||
# gaps inner 8
|
||||
# gaps outer 0
|
||||
|
||||
# app specific launch flags
|
||||
for_window [class="Peek"] floating enable
|
||||
|
||||
#set_from_resource $fg i3wm.color7
|
||||
#set_from_resource $bg i3wm.color2
|
||||
#set_from_resource $bgalt i3wm.color8
|
||||
|
||||
workspace_layout default
|
||||
|
||||
# class brdr bg txt indic childbdr
|
||||
client.focused $bg $bg $fg $bg $bg
|
||||
client.focused_inactive $bg $bg $fg $bg $bg
|
||||
client.unfocused $bgalt $bgalt $fg $bg $bgalt
|
||||
|
||||
# client.urgent $bg $bg $fg $bg $bg
|
||||
# client.placeholder $bg $bg $fg $bg $bg
|
||||
# client.background $bg
|
||||
|
||||
# autostart
|
||||
#exec --no-startup-id wal -q -t -i ~/wallpaper --saturate 0.8
|
||||
exec_always ~/.config/polybar/launch.sh
|
||||
|
15
old/_config/kitty/kitty.conf
Normal file
15
old/_config/kitty/kitty.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
font_family Envy Code R
|
||||
bold_font Envy Code R Bold
|
||||
italic_font Envy Code R Italic
|
||||
# font_family Meslo LG L DZ Nerd Font Mono
|
||||
italic_font auto
|
||||
bold_font auto
|
||||
bold_italic_font auto
|
||||
|
||||
font_size 12.0
|
||||
|
||||
window_padding_width 2.0
|
||||
term xterm-256color
|
||||
enable_audio_bell no
|
||||
sync_to_monitor yes
|
||||
background_opacity 0.99
|
1
old/_config/mpv/.gitignore
vendored
Normal file
1
old/_config/mpv/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
watch_later/*
|
1
old/_config/mpv/mpv.conf
Normal file
1
old/_config/mpv/mpv.conf
Normal file
|
@ -0,0 +1 @@
|
|||
loop-file=yes
|
2
old/_config/mpv/sbs.conf
Normal file
2
old/_config/mpv/sbs.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
glsl_shader=~~/sbs-tweak.glsl
|
||||
loop-file=yes
|
8
old/_config/mpv/shaders/sbs-tweak.glsl
Normal file
8
old/_config/mpv/shaders/sbs-tweak.glsl
Normal file
|
@ -0,0 +1,8 @@
|
|||
//!HOOK CHROMA
|
||||
//!BIND HOOKED
|
||||
//!BIND LUMA
|
||||
|
||||
vec4 hook() {
|
||||
vec3 _m = vec3(HOOKED_pos, 0.5);
|
||||
return vec4(_m, 1.0);
|
||||
}
|
1
old/_config/nvim/.gitignore
vendored
Normal file
1
old/_config/nvim/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.netrwhist
|
31
old/_config/nvim/coc-settings.json
Normal file
31
old/_config/nvim/coc-settings.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"languageserver": {
|
||||
"ccls": {
|
||||
"command": "ccls",
|
||||
"filetypes": [
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
"rootPatterns": [
|
||||
".ccls",
|
||||
".git/",
|
||||
".hg/",
|
||||
".vim/",
|
||||
"compile_commands.json"
|
||||
],
|
||||
"initializationOptions":{
|
||||
"cache": {
|
||||
"directory": "/tmp/ccls"
|
||||
}
|
||||
}
|
||||
},
|
||||
"godot": {
|
||||
"host": "127.0.0.1",
|
||||
"filetypes": ["gdscript"],
|
||||
"port": 6008
|
||||
}
|
||||
},
|
||||
"tsserver.log": "normal",
|
||||
"svelte.enable-ts-plugin": true,
|
||||
"svelte.language-server.ls-path": "node_modules/svelte-language-server/bin/server.js"
|
||||
}
|
6
old/_config/nvim/ftplugin/gdscript.vim
Normal file
6
old/_config/nvim/ftplugin/gdscript.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
" to use folding provided by plugin
|
||||
setlocal tabstop=2
|
||||
nnoremap <buffer> <F4> :GodotRunLast<CR>
|
||||
nnoremap <buffer> <F5> :GodotRun<CR>
|
||||
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
|
||||
nnoremap <buffer> <F7> :GodotRunFZF<CR>
|
345
old/_config/nvim/init.vim
Normal file
345
old/_config/nvim/init.vim
Normal file
|
@ -0,0 +1,345 @@
|
|||
" Mark's super duper _
|
||||
" _ __ ___ _____ _(_)_ __ ___
|
||||
"| '_ \ / _ \/ _ \ \ / / | '_ ` _ \
|
||||
"| | | | __/ (_) \ V /| | | | | | |
|
||||
"|_| |_|\___|\___/ \_/ |_|_| |_| |_|
|
||||
|
||||
set title
|
||||
set history=700
|
||||
set background=dark
|
||||
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
syntax enable
|
||||
|
||||
let mapleader=" "
|
||||
let maplocalleader=" "
|
||||
|
||||
set autoread " automatically reload changed files
|
||||
set wildmenu " handy auto complete menu
|
||||
|
||||
set list
|
||||
set listchars=tab:·\ ,trail:▂,extends:»,precedes:«
|
||||
set infercase " completion recognizes capitalization
|
||||
set smartcase
|
||||
set ignorecase
|
||||
set incsearch " search as you type
|
||||
set hidden " sometimes I don't want to save a buffer before switching away from it
|
||||
set cmdheight=2
|
||||
set updatetime=750
|
||||
set signcolumn=yes
|
||||
set shortmess+=c
|
||||
|
||||
set completeopt-=preview
|
||||
set matchtime=1
|
||||
set modeline
|
||||
set modelines=5
|
||||
set noswapfile
|
||||
set scrolloff=8
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set spell
|
||||
set tabstop=4
|
||||
set termguicolors
|
||||
set filetype
|
||||
" install vim-plug
|
||||
if !filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !echo "Installing vim-plug..."
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
endif
|
||||
call plug#begin('~/.local/share/nvim/plugged')
|
||||
|
||||
" color schemes
|
||||
Plug 'dylanaraps/wal.vim'
|
||||
Plug 'crusoexia/vim-monokai', "{{{
|
||||
let g:monokai_term_italic = 1
|
||||
let g:monokai_gui_italic = 1
|
||||
"}}}
|
||||
Plug 'sainnhe/sonokai', "{{{
|
||||
" let g:sonokai_style = "andromeda"
|
||||
let g:sonokai_style = "atlantis"
|
||||
" let g:sonokai_style = "default"
|
||||
" let g:sonokai_style = "maia"
|
||||
" let g:sonokai_style = "shusia"
|
||||
"}}}
|
||||
Plug 'ghifarit53/tokyonight-vim', "{{{
|
||||
let g:tokyonight_style = 'night'
|
||||
let g:tokyonight_enable_italic = 1
|
||||
let g:tokyonight_trasnparent_background = 1
|
||||
"}}}
|
||||
Plug 'dracula/vim', {'as': 'dracula'}
|
||||
Plug 'nanotech/jellybeans.vim', "{{{
|
||||
let g:jellybeans_use_term_italics=1
|
||||
let g:jellybeans_use_gui_italics=1
|
||||
" let g:jellybeans_use_lowcolor_black=1
|
||||
"}}}
|
||||
" Plug 'tomasr/molokai'
|
||||
" Plug 'fmoralesc/molokayo'
|
||||
"
|
||||
" syntax
|
||||
Plug 'cakebaker/scss-syntax.vim'
|
||||
"Plug 'calviken/vim-gdscript3'
|
||||
Plug 'ianks/vim-tsx'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
"Plug 'lepture/vim-jinja'
|
||||
Plug 'nikvdp/ejs-syntax'
|
||||
Plug 'noahfrederick/vim-noctu'
|
||||
Plug 'posva/vim-vue'
|
||||
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
||||
Plug 'pantharshit00/vim-prisma'
|
||||
Plug 'alexlafroscia/postcss-syntax.vim'
|
||||
Plug 'cespare/vim-toml'
|
||||
Plug 'norcalli/nvim-colorizer.lua'
|
||||
Plug 'rhysd/vim-grammarous', "{{{
|
||||
" nmap <leader><n> <Plug>(grammarous-move-to-next-error)
|
||||
" nmap <leader><p> <Plug>(grammarous-move-to-previous-error)
|
||||
let g:grammarous#jar_url = 'https://www.languagetool.org/download/LanguageTool-5.9.zip'
|
||||
"}}}
|
||||
|
||||
" functionality
|
||||
Plug 'tpope/vim-sensible'
|
||||
Plug 'tpope/vim-abolish'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-dispatch'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
Plug 'tpope/vim-sleuth'
|
||||
Plug 'tpope/vim-commentary', "{{{
|
||||
nmap <leader>c <Plug>Commentary
|
||||
xmap <leader>c <Plug>Commentary
|
||||
omap <leader>c <Plug>Commentary
|
||||
nmap <leader>cc <Plug>CommentaryLine
|
||||
autocmd FileType vue setlocal commentstring=//\ %s
|
||||
"}}}
|
||||
|
||||
Plug 'tpope/vim-fugitive', "{{{
|
||||
map \b :Git blame<CR>
|
||||
map \l :Git log<CR>
|
||||
map \gs :Git status<CR>
|
||||
"}}}
|
||||
|
||||
" Plug 'sheerun/vim-polyglot'
|
||||
Plug 'preservim/tagbar', "{{{
|
||||
map \t :TagbarToggle<CR>
|
||||
"}}}
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}, "{{{
|
||||
" inoremap <silent><expr> <TAB>
|
||||
" \ pumvisible() ? "\<C-n>" :
|
||||
" \ <SID>check_back_space() ? "\<TAB>" :
|
||||
" \ coc#refresh()
|
||||
|
||||
" inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
||||
\ <SID>check_back_space() ? "\<Tab>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
" Remap keys for gotos
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" navigate diagnostics
|
||||
nmap <silent> ]d :<Plug>(coc-diagnostic-next)<CR>
|
||||
nmap <silent> [d :<Plug>(coc-diagnostic-prev)<CR>
|
||||
|
||||
" navigate current list
|
||||
nmap <silent> ]p :<C-u>CocPrev<CR>
|
||||
nmap <silent> [p :<C-u>CocNext<CR>
|
||||
|
||||
nmap <leader>f <Plug>(coc-fix-current)
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Remap for rename current word
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Remap for do codeAction of selection region
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Highlight symbol under cursor on CursorHold
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Use K to show documentation in preview window
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||
" Coc only does snippet and additional edit on confirm.
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
"}}}
|
||||
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'vim-airline/vim-airline', "{{{
|
||||
let g:airline_symbols = {}
|
||||
let g:airline_symbols.branch = '⭠'
|
||||
let g:airline_symbols.readonly = '⭤'
|
||||
let g:airline_symbols.linenr = '⭡'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline_theme = 'sonokai'
|
||||
" let g:airline_theme = 'jellybeans'
|
||||
"}}}
|
||||
Plug 'mattn/webapi-vim'
|
||||
Plug 'mattn/gist-vim'
|
||||
Plug 'mhinz/vim-signify'
|
||||
Plug 'easymotion/vim-easymotion', "{{{
|
||||
map <Leader><Leader> <Plug>(easymotion-prefix)
|
||||
"}}}
|
||||
|
||||
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'}
|
||||
Plug 'junegunn/fzf.vim', "{{{
|
||||
function! s:buflist()
|
||||
redir => ls
|
||||
silent ls
|
||||
redir END
|
||||
return split(ls,'\n')
|
||||
endfunction
|
||||
|
||||
function! s:bufopen(e)
|
||||
execute 'buffer' matchstr(a:e, '^[ 0-9]*')
|
||||
endfunction
|
||||
|
||||
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
||||
\ 'source': reverse(<sid>buflist()),
|
||||
\ 'sink': function('<sid>bufopen'),
|
||||
\ 'options': '+m',
|
||||
\ 'down': len(<sid>buflist()) + 2
|
||||
\})<CR>
|
||||
|
||||
|
||||
function! s:FuzzyFiles()
|
||||
let gitparent=system('git rev-parse --show-toplevel')[:-2]
|
||||
let rootdir='.'
|
||||
if empty(matchstr(gitparent, '^fatal:.*'))
|
||||
silent call fzf#run({
|
||||
\ 'dir': gitparent,
|
||||
\ 'source': '(git ls-tree -r --name-only HEAD | rg --files)',
|
||||
\ 'sink': 'e',
|
||||
\})
|
||||
else
|
||||
silent call fzf#run({
|
||||
\ 'dir': '.',
|
||||
\ 'source': 'rg --files',
|
||||
\ 'sink': 'e',
|
||||
\})
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
\ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(<q-args>), 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||
\ : fzf#vim#with_preview({'options': '--delimiter : --nth 4..'}, 'right:80%:hidden', '?'),
|
||||
\ <bang>0)
|
||||
|
||||
nnoremap <silent> ; :call <sid>FuzzyFiles()<CR>
|
||||
nnoremap <leader>/ :Rg<CR>
|
||||
|
||||
"}}}
|
||||
Plug 'habamax/vim-godot', "{{{
|
||||
"}}}
|
||||
Plug 'leafOfTree/vim-svelte-plugin', "{{{
|
||||
let g:vim_svelte_plugin_load_full_syntax = 1
|
||||
let g:vim_svelte_plugin_use_typescript = 1
|
||||
"}}}
|
||||
call plug#end()
|
||||
" theme / visual
|
||||
try
|
||||
colorscheme dracula
|
||||
catch
|
||||
endtry
|
||||
hi clear SpellBad " italicize misspellings
|
||||
hi SpellBad gui=underline cterm=italic
|
||||
|
||||
highlight ExtraWhitespace ctermbg=20 ctermfg=1
|
||||
match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
|
||||
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
||||
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinLeave * call clearmatches()
|
||||
|
||||
" Initialize colorizer
|
||||
lua require'colorizer'.setup()
|
||||
|
||||
" List items are always weird distracting colors
|
||||
hi SpecialKey ctermfg=238
|
||||
|
||||
" key mappings
|
||||
map <C-n> :bnext<cr> " next buffer
|
||||
map <C-p> :bprev<cr> " prev buffer
|
||||
|
||||
nmap <C-j> <C-W>j " focus window down
|
||||
nmap <C-k> <C-W>k " focus window up
|
||||
nmap <C-h> <C-W>h " focus window left
|
||||
nmap <C-l> <C-W>l " focus window right
|
||||
|
||||
vnoremap <C-o> :sort<cr> " visual select and sort
|
||||
noremap <F7> mzgg=G`z<cr> " auto-format entire document
|
||||
|
||||
nnoremap <leader>pu :PlugUpdate<cr> " update plugins managed by vim-plugged
|
||||
nnoremap <leader>pi :PlugInstall<cr> " install new plugins
|
||||
nnoremap <leader>pc :PlugClean<cr> " clean removed plugins
|
||||
|
||||
nnoremap zn ]s " next misspelling
|
||||
nnoremap zp [s " prev misspelling
|
||||
nnoremap zf <Esc>1z= " replace misspelling with first suggestion
|
||||
|
||||
nnoremap <leader>n :set number!<cr> " toggle numbering
|
||||
|
||||
nnoremap <leader>ve :e $MYVIMRC<cr> " quick open (literally) this file
|
||||
|
||||
nmap <leader>w :w!<cr> " fast save
|
||||
|
||||
" clear trailing white space
|
||||
nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
||||
|
||||
" prefer ripgrep if available
|
||||
if executable('rg')
|
||||
set grepprg="rg --vimgrep"
|
||||
endif
|
||||
|
||||
" save with sudo
|
||||
command! W execute 'w !sudo tee %> /dev/null' <bar> edit!
|
||||
|
||||
" netrw
|
||||
nnoremap \e :Lexplore!<CR>
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_altv = 1
|
||||
let g:netrw_winsize = 25
|
||||
let g:netrw_browse_split = 4
|
||||
augroup netrw_mapping
|
||||
autocmd!
|
||||
autocmd filetype netrw call NetrwMapping()
|
||||
augroup END
|
||||
function! NetrwMapping()
|
||||
noremap <buffer> \e :bd<CR>
|
||||
endfunction
|
||||
|
||||
" close if final buffer is netrw or the quickfix
|
||||
augroup finalcountdown
|
||||
au!
|
||||
autocmd WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&filetype") == "netrw" || &buftype == 'quickfix' |q|endif
|
||||
nmap - :Lexplore<cr>
|
||||
augroup END
|
||||
|
||||
" read .vimlocal if available
|
||||
if filereadable(expand('~/.vimlocal'))
|
||||
source ~/.vimlocal
|
||||
endif
|
32
old/_config/picom.conf
Normal file
32
old/_config/picom.conf
Normal file
|
@ -0,0 +1,32 @@
|
|||
#backend = "xrender";
|
||||
mark-wmwin-focused = true;
|
||||
detect-client-opacity = true;
|
||||
|
||||
refresh-rate = 0;
|
||||
sync = "none";
|
||||
detect-transient = true;
|
||||
detect-client-leader = true;
|
||||
fading = true;
|
||||
fade-delta = 20;
|
||||
fade-in-step = 0.2;
|
||||
fade-out-step = 0.2;
|
||||
|
||||
blur-kern = "3x3box"
|
||||
blur-background = false;
|
||||
|
||||
### Shadows
|
||||
shadow = true;
|
||||
shadow-opacity = 0.3;
|
||||
#shadow-radius = 3;
|
||||
shadow-exclude = [
|
||||
"class_g = 'slop'",
|
||||
]
|
||||
|
||||
opacity-rule = [
|
||||
"98:class_g = 'kitty' && focused",
|
||||
"95:class_g = 'kitty' && !focused",
|
||||
"98:name *= 'polybar'"
|
||||
];
|
||||
|
||||
# other
|
||||
unredir-if-possible = true;
|
222
old/_config/polybar/config
Normal file
222
old/_config/polybar/config
Normal file
|
@ -0,0 +1,222 @@
|
|||
|
||||
[colors]
|
||||
background = ${xrdb:color0:#333}
|
||||
foreground = ${xrdb:color5:#aaa}
|
||||
foreground-alt = ${xrdb:color6:#fff}
|
||||
alert = ${xrdb:color3:#f00}
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
[settings]
|
||||
throttle-output = 5
|
||||
throttle-output-for = 10
|
||||
throttle-input-for = 30
|
||||
compositing-background = source
|
||||
screenchange-reload = true
|
||||
|
||||
|
||||
|
||||
[bar/base]
|
||||
monitor = ${env:MONITOR}
|
||||
override-redirect = false
|
||||
dpi = 92
|
||||
width = 100%
|
||||
height = 24
|
||||
top = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
border-bottom-size = 2
|
||||
border-color = ${xrdb:color2:#333}
|
||||
|
||||
padding = 1
|
||||
module-margin = 2
|
||||
|
||||
line-color = $f00
|
||||
fixed-center = true
|
||||
|
||||
font-0 = Roboto:style=Black:size=10;1
|
||||
font-1 = Material\-Icons:style=Regular:size=12;2
|
||||
font-2 = Unifont:style=Regular:size=14;0
|
||||
|
||||
scroll-up = i3wm-wsnext
|
||||
scroll-down = i3wm-wsprev
|
||||
|
||||
cursor-click = pointer
|
||||
|
||||
[bar/primary]
|
||||
inherit = bar/base
|
||||
modules-left = i3
|
||||
modules-right = wired-network filesystem memory date pulseaudio
|
||||
|
||||
tray-position = right
|
||||
tray-background = ${bar.background}
|
||||
tray-maxsize = 24444
|
||||
|
||||
[bar/secondary]
|
||||
inherit = bar/base
|
||||
|
||||
top = true
|
||||
modules-left = i3
|
||||
modules-right = date
|
||||
|
||||
font-0 = Roboto:style=Black:size=10;1
|
||||
font-1 = Material\-Design\-Iconic\-Font:style=Design-Iconic-Font:size=18;2
|
||||
font-2 = Unifont:style=Regular:size=14;0
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
border-bottom-size = 2
|
||||
border-color = ${xrdb:color2:#333}
|
||||
|
||||
|
||||
[module/window]
|
||||
type = internal/xwindow
|
||||
label = %title:0:200:...%
|
||||
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
|
||||
; Only show workspaces on the same output as the bar
|
||||
pin-workspaces = true
|
||||
|
||||
label-mode-padding = 2
|
||||
label-mode-foreground = ${colors.foreground}
|
||||
label-mode-background = ${colors.background}
|
||||
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %name%
|
||||
label-focused-foreground = ${self.label-mode-background}
|
||||
label-focused-background = ${self.label-mode-foreground}
|
||||
label-focused-padding = ${self.label-mode-padding}
|
||||
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %name%
|
||||
label-unfocused-foreground = ${self.label-mode-foreground}
|
||||
label-unfocused-padding = ${self.label-mode-padding}
|
||||
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %name%
|
||||
label-visible-foreground = ${colors.foreground-alt}
|
||||
label-visible-background = ${self.label-mode-background}
|
||||
label-visible-padding = ${self.label-mode-padding}
|
||||
label-visible-underline = 2
|
||||
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %name%
|
||||
label-urgent-background = ${colors.background}
|
||||
label-urgent-foreground = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
label-separator =
|
||||
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = ${colors.foreground}
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
||||
[module/wired-network]
|
||||
type = internal/network
|
||||
interface = enp0s25
|
||||
|
||||
label-connected = %downspeed:8% %upspeed:8%
|
||||
label-disconnected = "X"
|
||||
|
||||
bar-signal-format = %fill%%indicator%%empty%
|
||||
bar-signal-width = 5
|
||||
bar-signal-indicator = |
|
||||
bar-signal-fill = .
|
||||
bar-signal-empty = ' '
|
||||
animation-packetloss-0 = ⚠
|
||||
animation-packetloss-0-foreground = #ffa64c
|
||||
animation-packetloss-1 = 📶
|
||||
animation-packetloss-1-foreground = #000000
|
||||
; Framerate in milliseconds
|
||||
animation-packetloss-framerate = 500
|
||||
|
||||
format-packetloss = <animation-packetloss> <label-connected>
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <label>
|
||||
;format-prefix = " "
|
||||
format-prefix =
|
||||
label = " %gb_used% (%percentage_used%% of %gb_total%)"
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
format-volume = <bar-volume>
|
||||
interval = 5
|
||||
; ramp-volume-0 =
|
||||
; ramp-volume-1 =
|
||||
; ramp-volume-2 =
|
||||
ramp-volume-foreground = #f0f
|
||||
label-muted =
|
||||
|
||||
bar-volume-format=%fill%%indicator%%empty%
|
||||
bar-volume-width = 20
|
||||
bar-volume-foreground-0 = ${colors.foreground}
|
||||
bar-volume-foreground-1 = ${colors.alert}
|
||||
bar-volume-gradient = true
|
||||
|
||||
bar-volume-fill = -
|
||||
bar-volume-indicator = |
|
||||
bar-volume-empty = -
|
||||
|
||||
bar-volume-indicator-color = #0f0
|
||||
;bar-volume-indicator = |
|
||||
;bar-volume-indicator-font = 2
|
||||
;bar-volume-fill = ─
|
||||
;bar-volume-fill-font = 2
|
||||
;bar-volume-empty = ─
|
||||
;bar-volume-empty-font = 2
|
||||
;bar-volume-empty-foreground = ${colors.foreground}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
date = "%a %Y/%m/%d"
|
||||
;date-alt = "%a, %b %e"
|
||||
;date-alt = " %Y-%m-%d"
|
||||
time = %r
|
||||
label = " %date% %time%"
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
|
||||
interval = 10
|
||||
fixed-values = true
|
||||
spacing = 4
|
||||
|
||||
label-unmounted =
|
||||
label-mounted = %mountpoint% %used% (%percentage_used%% of %total%)
|
||||
|
||||
; vim:ft=cfg:
|
30
old/_config/polybar/launch.sh
Executable file
30
old/_config/polybar/launch.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
POLYBAR_CONFIG=$(dirname $0)/config
|
||||
|
||||
# kill polybar and wait for shutdown
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
displays=($(xrandr --listactivemonitors | tail -n +2 | awk '{ print $2 }'))
|
||||
|
||||
# display 'primary' bar on primary display and 'secondary' bar on all other displays
|
||||
for display in ${displays[@]}; do
|
||||
# discard leading '+'
|
||||
display=${display:1}
|
||||
|
||||
# If display name begins with '*' (primary) or only one display is available
|
||||
isprimary=0
|
||||
if [ $(expr match ${display} '^\*') -eq 1 ] || [ ${#displays[@]} -eq 1 ]; then
|
||||
isprimary=1
|
||||
fi
|
||||
|
||||
# Choose appropriate configuration depending whether or not this is a primary display
|
||||
[ $isprimary -eq 1 ] && config='primary' || config='secondary'
|
||||
|
||||
# Clean up the display name
|
||||
display=${display#"*"} # discard leading '*' if present
|
||||
|
||||
echo $display $isprimary $config
|
||||
# Launch polybar!
|
||||
MONITOR=${display} polybar ${config} -r --config-file=${POLYBAR_CONFIG} &
|
||||
done
|
175
old/_config/sway/config
Normal file
175
old/_config/sway/config
Normal file
|
@ -0,0 +1,175 @@
|
|||
# use windows key for mod
|
||||
set $mod Mod4
|
||||
|
||||
# quick-launch
|
||||
bindsym $mod+Return exec kitty
|
||||
bindsym $mod+Home exec thunar
|
||||
bindsym $mod+b exec firefox
|
||||
bindsym $mod+d exec --no-startup-id ~/bin/launcher
|
||||
bindsym --release $mod+g exec --no-startup-id ~/bin/screengrab
|
||||
|
||||
# i3 actions
|
||||
bindsym $mod+Shift+c reload
|
||||
bindsym $mod+Shift+r restart
|
||||
|
||||
# window bindings and behavior
|
||||
floating_modifier $mod
|
||||
focus_follows_mouse no
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# move window focus (Vim style)
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# move window focus (with arrow keys)
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move window (Vim style)
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# move window (with arrow keys)
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# splits
|
||||
bindsym $mod+u split h
|
||||
bindsym $mod+i split v
|
||||
|
||||
# fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# toggle tiling/floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# toggle focus between tiling/floating
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# switch to specific workspace
|
||||
bindsym $mod+1 workspace 1
|
||||
bindsym $mod+2 workspace 2
|
||||
bindsym $mod+3 workspace 3
|
||||
bindsym $mod+4 workspace 4
|
||||
bindsym $mod+5 workspace 5
|
||||
bindsym $mod+6 workspace 6
|
||||
bindsym $mod+7 workspace 7
|
||||
bindsym $mod+8 workspace 8
|
||||
bindsym $mod+9 workspace 9
|
||||
bindsym $mod+0 workspace 10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace 1
|
||||
bindsym $mod+Shift+2 move container to workspace 2
|
||||
bindsym $mod+Shift+3 move container to workspace 3
|
||||
bindsym $mod+Shift+4 move container to workspace 4
|
||||
bindsym $mod+Shift+5 move container to workspace 5
|
||||
bindsym $mod+Shift+6 move container to workspace 6
|
||||
bindsym $mod+Shift+7 move container to workspace 7
|
||||
bindsym $mod+Shift+8 move container to workspace 8
|
||||
bindsym $mod+Shift+9 move container to workspace 9
|
||||
bindsym $mod+Shift+0 move container to workspace 10
|
||||
|
||||
# move focus to adjacent output
|
||||
bindsym $mod+bracketleft focus output left
|
||||
bindsym $mod+bracketright focus output right
|
||||
|
||||
# jump to workspace on same output
|
||||
bindsym $mod+Shift+bracketleft workspace prev_on_output
|
||||
bindsym $mod+Shift+bracketright workspace next_on_output
|
||||
|
||||
mode "resize" {
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
|
||||
# nice system menu
|
||||
set $mode_system System (e) logout, (r) reboot, (shift+s) shutdown
|
||||
mode "$mode_system" {
|
||||
bindsym e exec --no-startup-id ~/bin/i3exit logout, mode "default"
|
||||
bindsym r exec --no-startup-id ~/bin/i3exit reboot, mode "default"
|
||||
bindsym Shift+s exec --no-startup-id ~/bin/i3exit shutdown, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+Shift+e mode "$mode_system"
|
||||
|
||||
# appearance
|
||||
font xft:artwiz lime 7
|
||||
default_border pixel 5
|
||||
font xft:Roboto 13
|
||||
gaps inner 5
|
||||
|
||||
# app specific launch flags
|
||||
for_window [class="Peek"] floating enable
|
||||
|
||||
include "$HOME/.cache/wal/colors-sway"
|
||||
set $fg $color3
|
||||
set $bg $color1
|
||||
set $bgalt $color7
|
||||
workspace_layout default
|
||||
|
||||
# class brdr bg txt indic childbdr
|
||||
client.focused $bg $bg $fg $bg $bg
|
||||
client.focused_inactive $bg $bg $fg $bg $bg
|
||||
client.unfocused $bgalt $bgalt $fg $bg $bgalt
|
||||
|
||||
# client.urgent $bg $bg $fg $bg $bg
|
||||
# client.placeholder $bg $bg $fg $bg $bg
|
||||
# client.background $bg
|
||||
|
||||
# autostart
|
||||
exec_always mako
|
||||
exec_always import-gsettings
|
||||
exec systemctl --user import-environment
|
||||
|
||||
input "type:keyboard" {
|
||||
xkb_options caps:swapescape
|
||||
}
|
||||
|
||||
include "$HOME/.config/sway/hosts/`hostname`"
|
||||
|
||||
output * bg $wallpaper fill
|
||||
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
set $opacity 0.9
|
||||
for_window [app_id="kitty"] opacity $opacity;
|
||||
|
||||
exec "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
12
old/_config/sway/hosts/nisse
Normal file
12
old/_config/sway/hosts/nisse
Normal file
|
@ -0,0 +1,12 @@
|
|||
set $monitor-center DP-1
|
||||
set $monitor-left DP-2
|
||||
set $kamvas HDMI-A-1
|
||||
|
||||
output $monitor-center pos 2160 1080 res 3840x2160
|
||||
output $monitor-left pos 0 0 res 3840x2160 transform 270
|
||||
output $kamvas pos 2995 3240
|
||||
|
||||
set $kamvas-stylus '9580:109:HID_256c:006d'
|
||||
set $kamvas-pad '9580:109:HID_256c:006d_Pad'
|
||||
input $kamvas-stylus map_to_output $kamvas
|
||||
input $kamvas-pad map_to_output $kamvas
|
0
old/_config/sway/hosts/vaettr
Normal file
0
old/_config/sway/hosts/vaettr
Normal file
15
old/_config/user-dirs.dirs
Normal file
15
old/_config/user-dirs.dirs
Normal file
|
@ -0,0 +1,15 @@
|
|||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
XDG_DESKTOP_DIR="$HOME/desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/pub"
|
||||
XDG_DOCUMENTS_DIR="$HOME/docs"
|
||||
XDG_MUSIC_DIR="$HOME/media/music"
|
||||
XDG_PICTURES_DIR="$HOME/media/pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/media/videos"
|
1
old/_config/user-dirs.locale
Normal file
1
old/_config/user-dirs.locale
Normal file
|
@ -0,0 +1 @@
|
|||
en_US
|
38
old/_config/waybar/config
Normal file
38
old/_config/waybar/config
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["network", "pulseaudio", "temperature", "cpu", "memory", "clock", "tray"],
|
||||
"enable-bar-scroll": true,
|
||||
"pulseaudio": {
|
||||
"tooltip": false,
|
||||
"scroll-step": 5,
|
||||
"format": "{icon} {volume}%",
|
||||
"format-icons": {
|
||||
"default": ["奄", "奔", "墳"]
|
||||
}
|
||||
},
|
||||
"temperature": {
|
||||
"format": "{temperatureF}°F",
|
||||
},
|
||||
"network": {
|
||||
"tooltip": false,
|
||||
"format-wifi": " {essid} {ipaddr}",
|
||||
"format-ethernet": " {ipaddr}"
|
||||
},
|
||||
"cpu": {
|
||||
"tooltip": false,
|
||||
"format": " {}%"
|
||||
},
|
||||
"memory": {
|
||||
"tooltip": false,
|
||||
"format": " {}%"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 24,
|
||||
"spacing": 5,
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a, %b %d %I:%M%p %Z %d/%m/%Y}",
|
||||
},
|
||||
}
|
65
old/_config/waybar/style.css
Normal file
65
old/_config/waybar/style.css
Normal file
|
@ -0,0 +1,65 @@
|
|||
@import url('/home/mark/.cache/wal/colors-waybar.css');
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
font-family: Font Awesome, "Ubuntu", "Droid", "MesloLGL Nerd Font", Roboto, sans-serif;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
color: @foreground;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.modules-right,
|
||||
.modules-left {
|
||||
margin: 0;
|
||||
padding: 2px 10px;
|
||||
background-color: alpha(@background, 0.7);
|
||||
}
|
||||
.modules-right {
|
||||
border-radius: 0 0 0 10px;
|
||||
}
|
||||
.modules-left {
|
||||
border-radius: 0 0 10px 0;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
border-radius: 2px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
color: @color1;
|
||||
animation-duration: 0.5s;
|
||||
/* animation-name: blink; */
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
color: @color2;
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
animation-duration: 0.5s;
|
||||
/* animation-name: blink; */
|
||||
background-color: @color15;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#tray,
|
||||
#mode {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
}
|
167
old/_config/waybar/style2.css
Normal file
167
old/_config/waybar/style2.css
Normal file
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
********************************************
|
||||
*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*
|
||||
*░░█▀█░█░░░█░█░█▀▀░░░█░█░█░░░▀█▀░█▀▄░█▀█░░*
|
||||
*░░█▀▀░█░░░█░█░▀▀█░░░█░█░█░░░░█░░█▀▄░█▀█░░*
|
||||
*░░▀░░░▀▀▀░▀▀▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░▀░▀░▀░▀░░*
|
||||
*░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░*
|
||||
********************************************
|
||||
*/
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Nerd Font Hack;
|
||||
font-size: 14px;
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-top: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
/*
|
||||
color: #f8f8f2;
|
||||
background: #282a36;
|
||||
*/
|
||||
color: transparent;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.termite #window,
|
||||
window#waybar.Firefox #window,
|
||||
window#waybar.Navigator #window,
|
||||
window#waybar.PCSX2 #window {
|
||||
color: #4d4d4d;
|
||||
background: #e6e6e6;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin-top: 8px;
|
||||
margin-left: 12px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
background: #282a36;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #f8f8f2;
|
||||
background: transparent;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #9aedfe;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
color: #ff79c6;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
background: #282a36;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #5af78e;
|
||||
}
|
||||
|
||||
#mpd.disconnected,
|
||||
#mpd.stopped {
|
||||
color: #f8f8f2;
|
||||
background: #282a36;
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #bd93f9;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #9aedfe;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #5af78e;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #f1fa8c;
|
||||
}
|
||||
|
||||
#memory {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #4d4d4d;
|
||||
background: #ff6e67;
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-top: 8px;
|
||||
margin-left: 8px;
|
||||
margin-right: 12px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 26px;
|
||||
transition: none;
|
||||
color: #f8f8f2;
|
||||
background: #282a36;
|
||||
}
|
||||
|
103
old/_config/zsh/configs/default/00-options.zsh
Normal file
103
old/_config/zsh/configs/default/00-options.zsh
Normal file
|
@ -0,0 +1,103 @@
|
|||
# Treat glob chars as literals when there are no matches (like bash)
|
||||
setopt no_nomatch
|
||||
|
||||
## History
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
|
||||
# Don't record consecutive duplicates or lines starting with a space
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_reduce_blanks
|
||||
setopt hist_expire_dups_first
|
||||
setopt share_history
|
||||
|
||||
# Append to the history file instead of over-writing it after each session
|
||||
#setopt inc_append_history
|
||||
|
||||
|
||||
# Enable Vim mode (press esc to start)
|
||||
bindkey -e
|
||||
|
||||
# Fancy ctrl-z (thanks, Adam Stankiewicz!)
|
||||
fancy-ctrl-z () {
|
||||
if [[ $#BUFFER -eq 0 ]]; then
|
||||
fg
|
||||
zle redisplay
|
||||
else
|
||||
zle push-input
|
||||
zle clear-screen
|
||||
fi
|
||||
}
|
||||
zle -N fancy-ctrl-z
|
||||
bindkey '^Z' fancy-ctrl-z
|
||||
|
||||
bindkey '^P' up-line-or-search
|
||||
bindkey '^N' down-line-or-search
|
||||
|
||||
autoload -Uz colors && colors
|
||||
setopt prompt_subst
|
||||
|
||||
fish_pwd() {
|
||||
echo ${${:-/${(j:/:)${(M)${(s:/:)${(D)PWD:h}}#(|.)[^.]}}/${PWD:t}}//\/~/\~}
|
||||
}
|
||||
|
||||
sorin_pwd() {
|
||||
local current_pwd="${PWD/#$HOME/~}"
|
||||
local ret_directory
|
||||
if [[ "$current_pwd" == "~" ]]; then
|
||||
ret_directory="~"
|
||||
unset MATCH
|
||||
else
|
||||
ret_directory=${${:-${(j:/:)${(M)${(s:/:)${(D)PWD:h}}#(|.)[^.]}}/${PWD:t}}//\/~/\~}
|
||||
fi
|
||||
echo $ret_directory
|
||||
}
|
||||
|
||||
## Prompts
|
||||
PROMPT=''
|
||||
if [[ ! -z "$SSH_CLIENT" ]] then
|
||||
PROMPT+="%B%F{blue}%m%b%f "
|
||||
fi
|
||||
PROMPT+="%F{blue}"
|
||||
PROMPT+='$(sorin_pwd)'
|
||||
PROMPT+="❯ "
|
||||
PROMPT+="%f%s%b "
|
||||
|
||||
# Get LS_COLORS
|
||||
if [[ -z "${LS_COLORS}" ]] && [[ -x '/usr/bin/dircolors' ]]; then
|
||||
eval "$( /usr/bin/dircolors -b )"
|
||||
fi
|
||||
|
||||
## Completion Settings
|
||||
######################
|
||||
(( ${fpath[(I)/usr/share/zsh/site-functions]} )) ||
|
||||
fpath+=( /usr/share/zsh/site-functions )
|
||||
|
||||
autoload -Uz compinit && compinit
|
||||
zmodload zsh/complist
|
||||
|
||||
# Offer to correct mispelings
|
||||
setopt correct
|
||||
|
||||
# Always display tags separately
|
||||
zstyle ':completion:*' group-name ''
|
||||
|
||||
# Case-insensitive matching
|
||||
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
|
||||
|
||||
# Show completing ____' in the menu thing
|
||||
zstyle ':completion:*:descriptions' format $'%{\e[0;35m%}completing %B%d:%b%{\e[0m%}'
|
||||
|
||||
# Display a selection box around the completion menu items
|
||||
zstyle ':completion:*' menu select=2
|
||||
|
||||
# Ignore users with /bin/false or /bin/nologin as their log-in shell
|
||||
zstyle ':completion:*' users ${${${(f)"$( < /etc/passwd )"}:#*/(false|nologin)}%%:*}
|
||||
|
||||
# Define the order and display names of groups for `ssh`
|
||||
zstyle ':completion:*:ssh:*' tag-order 'hosts:hosts:host users:users:user'
|
||||
zstyle ':completion:*:ssh:*' group-order 'hosts users'
|
2
old/_config/zsh/configs/default/00-wal-color-scheme.zsh
Normal file
2
old/_config/zsh/configs/default/00-wal-color-scheme.zsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
local _path=~/.cache/wal/sequences
|
||||
[ -f $_path ] && (cat $_path)
|
80
old/_config/zsh/configs/default/01-ssh-agent.zsh
Normal file
80
old/_config/zsh/configs/default/01-ssh-agent.zsh
Normal file
|
@ -0,0 +1,80 @@
|
|||
typeset _agent_forwarding _ssh_env_cache
|
||||
|
||||
function _start_agent() {
|
||||
local lifetime
|
||||
zstyle -s :omz:plugins:ssh-agent lifetime lifetime
|
||||
|
||||
# start ssh-agent and setup environment
|
||||
echo Starting ssh-agent...
|
||||
ssh-agent -s ${lifetime:+-t} ${lifetime} | sed 's/^echo/#echo/' >! $_ssh_env_cache
|
||||
chmod 600 $_ssh_env_cache
|
||||
. $_ssh_env_cache > /dev/null
|
||||
}
|
||||
|
||||
function _add_identities() {
|
||||
local id line sig
|
||||
local -a identities loaded_sigs loaded_ids not_loaded
|
||||
zstyle -a :omz:plugins:ssh-agent identities identities
|
||||
|
||||
# check for .ssh folder presence
|
||||
if [[ ! -d $HOME/.ssh ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# add default keys if no identities were set up via zstyle
|
||||
# this is to mimic the call to ssh-add with no identities
|
||||
if [[ ${#identities} -eq 0 ]]; then
|
||||
# key list found on `ssh-add` man page's DESCRIPTION section
|
||||
for id in id_rsa id_dsa id_ecdsa id_ed25519 identity; do
|
||||
# check if file exists
|
||||
[[ -f "$HOME/.ssh/$id" ]] && identities+=$id
|
||||
done
|
||||
fi
|
||||
|
||||
# get list of loaded identities' signatures and filenames
|
||||
for line in ${(f)"$(ssh-add -l)"}; do
|
||||
loaded_sigs+=${${(z)line}[2]}
|
||||
loaded_ids+=${${(z)line}[3]}
|
||||
done
|
||||
|
||||
# add identities if not already loaded
|
||||
for id in $identities; do
|
||||
# check for filename match, otherwise try for signature match
|
||||
if [[ ${loaded_ids[(I)$HOME/.ssh/$id]} -le 0 ]]; then
|
||||
sig="$(ssh-keygen -lf "$HOME/.ssh/$id" | awk '{print $2}')"
|
||||
[[ ${loaded_sigs[(I)$sig]} -le 0 ]] && not_loaded+="$HOME/.ssh/$id"
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -n "$not_loaded" ]] && ssh-add ${^not_loaded}
|
||||
}
|
||||
|
||||
# Get the filename to store/lookup the environment from
|
||||
_ssh_env_cache="$HOME/.ssh/environment-$HOST"
|
||||
|
||||
# test if agent-forwarding is enabled
|
||||
zstyle -b :omz:plugins:ssh-agent agent-forwarding _agent_forwarding
|
||||
|
||||
if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
|
||||
# Add a nifty symlink for screen/tmux if agent forwarding
|
||||
[[ -L $SSH_AUTH_SOCK ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen
|
||||
elif [[ -f "$_ssh_env_cache" ]]; then
|
||||
# Source SSH settings, if applicable
|
||||
. $_ssh_env_cache > /dev/null
|
||||
if [[ $USER == "root" ]]; then
|
||||
FILTER="ax"
|
||||
else
|
||||
FILTER="x"
|
||||
fi
|
||||
ps $FILTER | grep ssh-agent | grep -q $SSH_AGENT_PID || {
|
||||
_start_agent
|
||||
}
|
||||
else
|
||||
_start_agent
|
||||
fi
|
||||
|
||||
_add_identities
|
||||
|
||||
# tidy up after ourselves
|
||||
unset _agent_forwarding _ssh_env_cache
|
||||
unfunction _start_agent _add_identities
|
39
old/_config/zsh/configs/default/aliases.zsh
Normal file
39
old/_config/zsh/configs/default/aliases.zsh
Normal file
|
@ -0,0 +1,39 @@
|
|||
alias wallpaper="feh --bg-fill -z"
|
||||
alias retheme="wal -q -t -i ~/wallpaper --saturate 0.8"
|
||||
alias svim="sudo nvim"
|
||||
alias capesc="setxkbmap -option caps:escape"
|
||||
alias mapstylus='xinput --map-to-output $(xinput --list --id-only "ELAN2514:00 04F3:2594 Pen Pen (0)") eDP-1'
|
||||
#alias rsync="noglob rsync"
|
||||
alias tmux="TERM=xterm-256color tmux"
|
||||
|
||||
# Make `sudo` respect aliases
|
||||
alias sudo='sudo '
|
||||
|
||||
# Enable colorized `ls`
|
||||
if [[ -n "${ZSH_VERSION}" ]]; then
|
||||
alias ls='ls -p --color=auto $=LS_OPTIONS'
|
||||
elif [[ -n "${BASH_VERSION}" ]]; then
|
||||
alias ls='ls -p --color=auto $LS_OPTIONS'
|
||||
fi
|
||||
|
||||
# Alias dig to drill on boxes where I don't have dig but do have drill
|
||||
if (( ! $+commands[dig] && $+commands[drill] )) then
|
||||
alias dig='drill'
|
||||
fi
|
||||
|
||||
# Handy `ls` aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
|
||||
# Enable grep color
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
# Default editor alias
|
||||
alias edit='${EDITOR}:-vim}'
|
||||
|
||||
#Prefer neovim if available
|
||||
if (( $+commands[nvim] )) then
|
||||
alias vim='nvim'
|
||||
alias vimdiff='nvim -d'
|
||||
fi
|
7
old/_config/zsh/configs/default/colored-man-pages.zsh
Normal file
7
old/_config/zsh/configs/default/colored-man-pages.zsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
export LESS_TERMCAP_mb=$'\E[01;31m'
|
||||
export LESS_TERMCAP_md=$'\E[01;38;5;74m'
|
||||
export LESS_TERMCAP_me=$'\E[0m'
|
||||
export LESS_TERMCAP_se=$'\E[0m'
|
||||
export LESS_TERMCAP_so=$'\E[38;33;246m'
|
||||
export LESS_TERMCAP_ue=$'\E[0m'
|
||||
export LESS_TERMCAP_us=$'\E[04;38;5;146m'
|
77
old/_config/zsh/configs/default/git-status.zsh
Normal file
77
old/_config/zsh/configs/default/git-status.zsh
Normal file
|
@ -0,0 +1,77 @@
|
|||
GIT_PROMPT_PREFIX=""
|
||||
GIT_PROMPT_SUFFIX="%f%k"
|
||||
GIT_PROMPT_AHEAD="%F{yellow}NUM⬆ %f"
|
||||
GIT_PROMPT_BEHIND="%F{green}NUM⬇ %f"
|
||||
GIT_PROMPT_DELETED="%F{red}NUM◉ %f"
|
||||
GIT_PROMPT_MERGING="%{$fg_bold[magenta]%}Y%{$reset_color%}"
|
||||
GIT_PROMPT_UNTRACKED="%F{yellow}?%f"
|
||||
GIT_PROMPT_MODIFIED="%F{blue}✱ %f"
|
||||
GIT_PROMPT_STAGED="%F{green}✚ %f"
|
||||
|
||||
parse_git_branch() {
|
||||
(git symbolic-ref -q HEAD || git name-rev --name-only --no-undefined --always HEAD) 2> /dev/null
|
||||
}
|
||||
|
||||
parse_git_state() {
|
||||
local added=0
|
||||
local deleted=0
|
||||
local modified=0
|
||||
local renamed=0
|
||||
local unmerged=0
|
||||
local untracked=0
|
||||
local dirty=0
|
||||
|
||||
local status_cmd="git status --porcelain"
|
||||
while IFS=$'\n' read line; do
|
||||
[[ "$line" == ([ACDMT][\ MT]|[ACMT]D)\ * ]] && (( added++ ))
|
||||
[[ "$line" == [\ ACMRT]D\ * ]] && (( deleted++ ))
|
||||
[[ "$line" == ?[MT]\ * ]] && (( modified++ ))
|
||||
[[ "$line" == R?\ * ]] && (( renamed++ ))
|
||||
[[ "$line" == (AA|DD|U?|?U)\ * ]] && (( unmerged++ ))
|
||||
[[ "$line" == \?\?\ * ]] && (( untracked++ ))
|
||||
(( dirty++ ))
|
||||
done < <(${(z)status_cmd} 2> /dev/null)
|
||||
|
||||
local GIT_STATE=''
|
||||
local ahead_and_behind_cmd='git rev-list --count --left-right HEAD...@{upstream}'
|
||||
local ahead_and_behind="$(${(z)ahead_and_behind_cmd} 2> /dev/null)"
|
||||
local ahead="$ahead_and_behind[(w)1]"
|
||||
local behind="$ahead_and_behind[(w)2]"
|
||||
|
||||
if (( ahead > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_AHEAD//NUM/$ahead}
|
||||
fi
|
||||
|
||||
if (( behind > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_BEHIND//NUM/$behind}
|
||||
fi
|
||||
|
||||
if (( added > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_STAGED}
|
||||
fi
|
||||
|
||||
if (( deleted > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_DELETED//NUM/$deleted}
|
||||
fi
|
||||
|
||||
if (( modified > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_MODIFIED}
|
||||
fi
|
||||
|
||||
if (( untracked > 0 )); then
|
||||
GIT_STATE=$GIT_STATE${GIT_PROMPT_UNTRACKED}
|
||||
fi
|
||||
|
||||
if [[ -n $GIT_STATE ]]; then
|
||||
echo "$GIT_STATE"
|
||||
fi
|
||||
}
|
||||
|
||||
git_prompt_string() {
|
||||
local git_where="$(parse_git_branch)"
|
||||
[ -n "$git_where" ] && echo "$GIT_PROMPT_PREFIX%F{magenta}${git_where#(refs/heads/|tags/)} $GIT_PROMPT_SYMBOLS$(parse_git_state)$GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
RPS1='$(git_prompt_string)'
|
||||
|
||||
#RPS1=$GIT_PROMPT_STAGED
|
5
old/_config/zsh/configs/default/godot.zsh
Normal file
5
old/_config/zsh/configs/default/godot.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
# if neovim-remote is present, create an alias for nvim
|
||||
if (( $+commands[nvr] )) then
|
||||
alias gdvim="NVIM_LISTEN_ADDRESS=/tmp/$USER-godot nvr"
|
||||
fi
|
31
old/_config/zsh/configs/default/paths.zsh
Normal file
31
old/_config/zsh/configs/default/paths.zsh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#/// My local scripts path
|
||||
export PATH=$HOME/bin:$PATH
|
||||
|
||||
#/// npm
|
||||
export PATH=$HOME/node_modules/.bin:$PATH
|
||||
|
||||
#/// Go
|
||||
export GOPATH=$HOME/go
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
|
||||
#/// Lua Rocks
|
||||
export PATH=$PATH:$HOME/.luarocks/bin
|
||||
|
||||
#/// Ruby Gems
|
||||
export PATH=$PATH:$HOME/.gem/ruby/2.4.0/bin
|
||||
|
||||
#/// ccache / colorgcc
|
||||
# if (( $+commands[colorgcc] )); then
|
||||
# export PATH="/usr/lib/colorgcc/bin/:$PATH"
|
||||
# fi
|
||||
|
||||
if (( $+commands[ccache] )); then
|
||||
export CCACHE_PATH="/usr/bin"
|
||||
export PATH="/usr/lib/ccache/bin/:$PATH"
|
||||
fi
|
||||
|
||||
export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"
|
||||
|
||||
#/// Android SDK
|
||||
export ANDROID_NDK_ROOT=/opt/android-ndk
|
||||
export ANDROID_HOME=/opt/android-sdk
|
3
old/_config/zsh/configs/default/wayland.zsh
Normal file
3
old/_config/zsh/configs/default/wayland.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
if (( $+commands[sway] )) then
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
fi
|
143
old/_install.sh
Executable file
143
old/_install.sh
Executable file
|
@ -0,0 +1,143 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
homedir=$HOME
|
||||
basedir=$homedir/.dotfiles
|
||||
bindir=$homedir/bin
|
||||
gitbase=git://github.com/Klowner/dotfiles.git
|
||||
gitorigin=git@github.com:Klowner/dotfiles.git
|
||||
gitbranch=${GIT_BRANCH:-master}
|
||||
tarball=http://github.com/Klowner/dotfiles/tarball/$gitbranch
|
||||
|
||||
function has() {
|
||||
return $( which $1 >/dev/null)
|
||||
}
|
||||
|
||||
function note() {
|
||||
echo -e "\e[32;1m * \e[0m$*"
|
||||
}
|
||||
|
||||
function warn() {
|
||||
echo -e "\e[31;1m * \e[0m$*"
|
||||
}
|
||||
|
||||
function die() {
|
||||
warn $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
function install() {
|
||||
method=$1
|
||||
src=$2
|
||||
dst=$3
|
||||
if [ -e $dst ]; then
|
||||
if [ -L $dst ]; then
|
||||
# already symlinked
|
||||
return
|
||||
else
|
||||
# rename files with an ".old" extension
|
||||
warn "$dst already exists, renaming to $dst.old"
|
||||
backup=$dst.old
|
||||
# if [ -e $backup ]; then
|
||||
# die "$backup already exists. Aborting."
|
||||
# fi
|
||||
mv -v $dst $backup
|
||||
fi
|
||||
fi
|
||||
|
||||
case $method in
|
||||
link)
|
||||
# Update existing or create new symlinks
|
||||
ln -vsf $src $dst
|
||||
;;
|
||||
copy)
|
||||
cp -a $src $dst
|
||||
;;
|
||||
*)
|
||||
warn "Unknown install method: $1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
function link() {
|
||||
install link $1 $2
|
||||
}
|
||||
|
||||
function copy() {
|
||||
install copy $1 $2
|
||||
}
|
||||
|
||||
function unpack_tarball() {
|
||||
note "Downloading tarball..."
|
||||
mkdir -vp $basedir
|
||||
cd $basedir
|
||||
tempfile=TEMP.tar.gz
|
||||
if has curl; then
|
||||
curl -L $tarball >$tempfile
|
||||
elif has wget; then
|
||||
wget -O $tempfile $tarball
|
||||
else:
|
||||
die "Can't download tarball."
|
||||
fi
|
||||
tar --strip-components 1 -zxvf $tempfile
|
||||
rm -v $tempfile
|
||||
}
|
||||
|
||||
if [ -e $basedir ]; then
|
||||
# basedir exists, update it.
|
||||
cd $basedir
|
||||
if [ -e .git ]; then
|
||||
note "Updating dotfiles from git..."
|
||||
git pull --rebase origin $gitbranch
|
||||
else
|
||||
unpack_tarball
|
||||
fi
|
||||
else
|
||||
# .dotfiles directory needs to be installed. Try downloading first
|
||||
# with git and then fallback to tarball.
|
||||
if has git; then
|
||||
note "Cloning from git..."
|
||||
git clone --single-branch --branch $gitbranch $gitbase $basedir
|
||||
cd $basedir
|
||||
git submodule init
|
||||
git submodule update --init --recursive
|
||||
else
|
||||
warn "Git not installed."
|
||||
unpack_tarball
|
||||
fi
|
||||
fi
|
||||
|
||||
note "Symlinking dotfiles..."
|
||||
for path in * ; do
|
||||
# Skip any files beginning with underscores.
|
||||
if [ $(expr match $path '^_') -eq 1 ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
src=$basedir/$path
|
||||
dst=$homedir/.$path
|
||||
|
||||
if [ -L $src ]; then
|
||||
copy $src $dst
|
||||
else
|
||||
link $src $dst
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p $homedir/.config
|
||||
for path in _config/*; do
|
||||
path=${path##*/}
|
||||
link $basedir/_config/$path $homedir/.config/${path}
|
||||
done
|
||||
|
||||
note "Installing bin/ directory..."
|
||||
mkdir -v -p $bindir
|
||||
if [ -d _bin ]; then
|
||||
for path in _bin/*; do
|
||||
relpath=${path##*/}
|
||||
link $basedir/$path $bindir/$relpath
|
||||
done
|
||||
fi
|
||||
|
||||
note "Done."
|
||||
|
||||
# vim:ts=4:sw=4:et:
|
13
old/_xinitrc/xinitrc.all
Executable file
13
old/_xinitrc/xinitrc.all
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
if_have() {
|
||||
command -v $1 2>&1> /dev/null
|
||||
}
|
||||
|
||||
if_have setxkbmap && { setxkbmap -option caps:swapescape & }
|
||||
if_have picom && { picom & }
|
||||
if_have wal && { wal -t -q -i ~/wallpaper & }
|
||||
if_have lxsession && { lxsession -s i3 & }
|
||||
if_have pnmixer && { pnmixer & }
|
||||
if_have dropbox && { dropbox & }
|
||||
if_have syncthing-gtk && { syncthing-gtk & }
|
5
old/_xinitrc/xinitrc.loki
Executable file
5
old/_xinitrc/xinitrc.loki
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
~/.screenlayout/4display.sh
|
||||
wal -t -q -i ~/wallpaper &
|
||||
#lxsession -s i3 &
|
||||
#syncthing-gtk -m &
|
5
old/_xinitrc/xinitrc.nisse
Executable file
5
old/_xinitrc/xinitrc.nisse
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
if_have() {
|
||||
command -v $1 2>&1> /dev/null
|
||||
}
|
||||
~/.screenlayout/horiz-vert-4k-flip.sh
|
5
old/_xinitrc/xinitrc.vaettr
Executable file
5
old/_xinitrc/xinitrc.vaettr
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
# compton &
|
||||
# wal -t -q -i ~/wallpaper &
|
||||
# lxsession -s i3 &
|
||||
# syncthing-gtk -m &
|
1
old/tmux.conf
Normal file
1
old/tmux.conf
Normal file
|
@ -0,0 +1 @@
|
|||
set-window-option -g mode-mouse on
|
2
old/vim/.gitignore
vendored
Normal file
2
old/vim/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
autoload/
|
||||
bundle/
|
6
old/vim/after/ftplugin/gdscript.vim
Normal file
6
old/vim/after/ftplugin/gdscript.vim
Normal file
|
@ -0,0 +1,6 @@
|
|||
setlocal tabstop=4
|
||||
nnoremap <buffer> <F4> :GodotRunLast<CR>
|
||||
nnoremap <buffer> <F5> :GodotRun<CR>
|
||||
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
|
||||
nnoremap <buffer> <F7> :GodotRunFZF<CR>
|
||||
|
29
old/vim/coc-settings.json
Normal file
29
old/vim/coc-settings.json
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"languageserver": {
|
||||
"ccls": {
|
||||
"command": "ccls",
|
||||
"filetypes": [
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
"rootPatterns": [
|
||||
".ccls",
|
||||
".git/",
|
||||
".hg/",
|
||||
".vim/",
|
||||
"compile_commands.json"
|
||||
],
|
||||
"initializationOptions":{
|
||||
"cache": {
|
||||
"directory": "/tmp/ccls"
|
||||
}
|
||||
}
|
||||
},
|
||||
"godot": {
|
||||
"host": "127.0.0.1",
|
||||
"filetypes": ["gdscript"],
|
||||
"port": 6008
|
||||
}
|
||||
},
|
||||
"tsserver.log": "off"
|
||||
}
|
313
old/vim/vimrc
Normal file
313
old/vim/vimrc
Normal file
|
@ -0,0 +1,313 @@
|
|||
set title
|
||||
set history=700
|
||||
set background=dark
|
||||
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
|
||||
syntax enable
|
||||
|
||||
let mapleader = " "
|
||||
let maplocalleader = " "
|
||||
|
||||
set autoread " automatically re-read modified files
|
||||
set wildmenu " handy auto-complete menu
|
||||
|
||||
" Ignore compiled files
|
||||
set wildignore=*.o,*~,*.pyc
|
||||
|
||||
set ruler " always show current position
|
||||
set cmdheight=2 " height of the command bar
|
||||
|
||||
set hid " buffer becomes hidden when it abandoned
|
||||
|
||||
set backspace=eol,start,indent " make backspace not be stupid
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
set list
|
||||
set listchars=trail:·,precedes:«,extends:»,eol:↲,tab:→\
|
||||
set ignorecase " ignore case when searching
|
||||
set smartcase " be "smart" about case when searching
|
||||
set hlsearch " highlight search results
|
||||
set incsearch " enable incremental search
|
||||
set lazyredraw " don't redraw while executing macros
|
||||
|
||||
set magic " enable magic for regexps
|
||||
set showmatch " show matching bracket pairs
|
||||
set matchtime=1
|
||||
|
||||
set noswapfile
|
||||
set modeline
|
||||
set spell " spell checking, woo
|
||||
|
||||
set foldcolumn=1
|
||||
set ruler " always show current position
|
||||
|
||||
" set tabstop=4 " who the heck uses 8-space tabs?
|
||||
" set shiftwidth=4
|
||||
" set smarttab
|
||||
set shiftwidth=2
|
||||
|
||||
" auto-install vim-plug
|
||||
if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | quit
|
||||
endif
|
||||
|
||||
" begin vim-plug items
|
||||
call plug#begin('~/.vim/bundle')
|
||||
|
||||
" color schemes
|
||||
Plug 'dylanaraps/wal.vim'
|
||||
|
||||
" syntax
|
||||
Plug 'cakebaker/scss-syntax.vim'
|
||||
Plug 'calviken/vim-gdscript3'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
Plug 'lepture/vim-jinja'
|
||||
Plug 'posva/vim-vue'
|
||||
Plug 'nikvdp/ejs-syntax'
|
||||
Plug 'chrisbra/Colorizer'
|
||||
Plug 'noahfrederick/vim-noctu'
|
||||
|
||||
" functionality
|
||||
Plug 'tpope/vim-sensible'
|
||||
Plug 'tpope/vim-abolish'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-dispatch'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
Plug 'tpope/vim-sleuth'
|
||||
Plug 'tpope/vim-commentary', "{{{
|
||||
nmap <leader>c <Plug>Commentary
|
||||
xmap <leader>c <Plug>Commentary
|
||||
omap <leader>c <Plug>Commentary
|
||||
nmap <leader>cc <Plug>CommentaryLine
|
||||
autocmd FileType vue setlocal commentstring=//\ %s
|
||||
"}}}
|
||||
Plug 'tpope/vim-fugitive', "{{{
|
||||
map \b :Gblame<CR>
|
||||
map \l :Glog<CR>
|
||||
map \gs :Gstatus<CR>
|
||||
"}}}
|
||||
Plug 'justinmk/vim-dirvish', "{{{
|
||||
nmap \e <Plug>(dirvish_up)
|
||||
augroup dirvish_mapping
|
||||
autocmd!
|
||||
autocmd! FileType dirvish call DirvishMapping()
|
||||
augroup END
|
||||
function! DirvishMapping()
|
||||
nmap <buffer> \e gq>
|
||||
endfunction
|
||||
"}}}
|
||||
Plug 'kristijanhusak/vim-dirvish-git'
|
||||
Plug 'mattn/webapi-vim'
|
||||
Plug 'mattn/vim-gist'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'easymotion/vim-easymotion', "{{{
|
||||
map <leader><leader> <plug>(easymotion-prefix)
|
||||
"}}}
|
||||
Plug 'habamax/vim-godot'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}, "{{{
|
||||
" let g:coc_global_extensions = [
|
||||
" \ 'coc-css',
|
||||
" \ 'coc-emoji',
|
||||
" \ 'coc-eslint',
|
||||
" \ 'coc-json',
|
||||
" \ 'coc-prettier',
|
||||
" \ 'coc-rls',
|
||||
" \ 'coc-tslint',
|
||||
" \ 'coc-tslint-plugin',
|
||||
" \ 'coc-tsserver',
|
||||
" \ 'coc-yaml',
|
||||
" \ ]
|
||||
Plug 'pappasam/coc-jedi', {'do': 'yarn install --frozen-lockfile'}
|
||||
set signcolumn=yes
|
||||
set updatetime=750
|
||||
set shortmess+=c
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Remap keys for gotos
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
nmap <silent> ]p :<C-u>CocPrev<CR>
|
||||
nmap <silent> [p :<C-u>CocNext<CR>
|
||||
|
||||
nmap <leader>f <Plug>(coc-fix-current)
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
" Highlight symbol under cursor on CursorHold
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Use K to show documentation in preview window
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||
" Coc only does snippet and additional edit on confirm.
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
|
||||
" Customize coc appearance
|
||||
hi CocHighlightText cterm=italic
|
||||
"}}}
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'vim-airline/vim-airline', "{{{
|
||||
let g:airline_symbols = {}
|
||||
let g:airline_symbols.branch = '⭠'
|
||||
let g:airline_symbols.readonly = '⭤'
|
||||
let g:airline_symbols.linenr = '⭡'
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline_theme = 'wal'
|
||||
"}}}
|
||||
Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'}
|
||||
Plug 'junegunn/fzf.vim', "{{{
|
||||
function! s:buflist()
|
||||
redir => ls
|
||||
silent ls
|
||||
redir END
|
||||
return split(ls,'\n')
|
||||
endfunction
|
||||
|
||||
function! s:bufopen(e)
|
||||
execute 'buffer' matchstr(a:e, '^[ 0-9]*')
|
||||
endfunction
|
||||
|
||||
nnoremap <silent> <Leader><Enter> :call fzf#run({
|
||||
\ 'source': reverse(<sid>buflist()),
|
||||
\ 'sink': function('<sid>bufopen'),
|
||||
\ 'options': '+m',
|
||||
\ 'down': len(<sid>buflist()) + 2
|
||||
\})<CR>
|
||||
|
||||
|
||||
function! s:FuzzyFiles()
|
||||
let gitparent=system('git rev-parse --show-toplevel')[:-2]
|
||||
let rootdir='.'
|
||||
|
||||
if empty(matchstr(gitparent, '^fatal:.*'))
|
||||
silent call fzf#run({
|
||||
\ 'dir': gitparent,
|
||||
\ 'source': '(git ls-tree -r --name-only HEAD | rg --files)',
|
||||
\ 'sink': 'e',
|
||||
\})
|
||||
else
|
||||
silent call fzf#run({
|
||||
\ 'dir': '.',
|
||||
\ 'source': 'rg --files',
|
||||
\ 'sink': 'e',
|
||||
\})
|
||||
endif
|
||||
endfunction
|
||||
|
||||
command! -bang -nargs=* Rg
|
||||
\ call fzf#vim#grep(
|
||||
\ 'rg --column --line-number --no-heading --color=always '.shellescape(<q-args>), 1,
|
||||
\ <bang>0 ? fzf#vim#with_preview('up:60%')
|
||||
\ : fzf#vim#with_preview('right:50%:hidden', '?'),
|
||||
\ <bang>0)
|
||||
|
||||
nnoremap <silent> ; :call <sid>FuzzyFiles()<CR>
|
||||
nnoremap <leader>/ :Rg<CR>
|
||||
|
||||
"}}}
|
||||
call plug#end()
|
||||
|
||||
"--- Visuals
|
||||
highlight ExtraWhitespace ctermbg=20 ctermfg=1
|
||||
match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
|
||||
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
||||
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinLeave * call clearmatches()
|
||||
|
||||
try
|
||||
colorscheme wal
|
||||
catch
|
||||
endtry
|
||||
|
||||
" Display mispellings as italicised
|
||||
hi clear SpellBad
|
||||
hi SpellBad gui=underline cterm=italic
|
||||
hi Pmenu ctermbg=16
|
||||
|
||||
" List items are always weird distracting colors
|
||||
hi SpecialKey ctermfg=238
|
||||
|
||||
"--- Mappings
|
||||
map <C-n> :bnext<cr> " next buffer
|
||||
map <C-p> :bprev<cr> " prev buffer
|
||||
|
||||
nmap <C-j> <C-W>j " focus window down
|
||||
nmap <C-k> <C-W>k " focus window up
|
||||
nmap <C-h> <C-W>h " focus window left
|
||||
nmap <C-l> <C-W>l " focus window right
|
||||
|
||||
vnoremap <C-o> :sort<cr> " visual select and sort
|
||||
noremap <F7> mzgg=G`z<cr> " auto-format entire document
|
||||
|
||||
nnoremap <leader>pu :PlugUpdate<cr> " update plugins managed by vim-plugged
|
||||
nnoremap <leader>pi :PlugInstall<cr> " install new plugins
|
||||
nnoremap <leader>pc :PlugClean<cr> " clean removed plugins
|
||||
|
||||
nnoremap zn ]s " next misspelling
|
||||
nnoremap zp [s " prev misspelling
|
||||
nnoremap zf <Esc>1z= " replace misspelling with first suggestion
|
||||
|
||||
nnoremap <leader>n :set number!<cr> " toggle numbering
|
||||
|
||||
nnoremap <leader>ve :e $MYVIMRC<cr> " quick open (literally) this file
|
||||
|
||||
nmap <leader>w :w!<cr> " fast save
|
||||
|
||||
" clear trailing white space
|
||||
nnoremap <silent> <F5> :let _s=@/ <Bar> :%s/\s\+$//e <Bar> :let @/=_s <Bar> :nohl <Bar> :unlet _s <CR>
|
||||
|
||||
" prefer ripgrep if available
|
||||
if executable('rg')
|
||||
set grepprg="rg --vimgrep"
|
||||
endif
|
||||
|
||||
" save with sudo
|
||||
command! W execute 'w !sudo tee %> /dev/null' <bar> edit!
|
||||
|
||||
" read .vimlocal if available
|
||||
if filereadable(expand('~/.vimlocal'))
|
||||
source ~/.vimlocal
|
||||
endif
|
||||
|
||||
" netrw
|
||||
" nnoremap <buffer> \e <Plug>VinegarUp
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_altv = 1
|
||||
let g:netrw_winsize = 25
|
||||
let g:netrw_browse_split = 4
|
||||
augroup netrw_mapping
|
||||
autocmd!
|
||||
autocmd FileType netrw call NetrwMapping()
|
||||
autocmd FileType netrw setl bufhidden=wipe
|
||||
augroup END
|
||||
function! NetrwMapping()
|
||||
noremap <buffer> \e :bd<CR>
|
||||
endfunction
|
27
old/xinitrc
Executable file
27
old/xinitrc
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
cd $HOME
|
||||
if [ -d /etc/X11/xinit/xinitrc.d ]; then
|
||||
for f in /etc/X11/xinit/xinitrc.d/*; do
|
||||
[ -x "$f" ] && . "$f"
|
||||
done
|
||||
unset f
|
||||
fi
|
||||
|
||||
# Merge .Xresources
|
||||
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources
|
||||
|
||||
# export ssh-user-agent variables
|
||||
eval $(systemctl --user show-environment | grep SSH_AUTH_SOCK)
|
||||
export SSH_AUTH_SOCK
|
||||
|
||||
# Per-host init
|
||||
filepath=$(dirname $(readlink -f $0))
|
||||
for f in "all" "$(hostname)"; do
|
||||
f="${filepath}/_xinitrc/xinitrc.$f"
|
||||
echo $f
|
||||
[ -e "$f" ] && . "$f"
|
||||
done
|
||||
unset filepath
|
||||
|
||||
# Launch i3!
|
||||
exec i3
|
37
old/zshrc
Normal file
37
old/zshrc
Normal file
|
@ -0,0 +1,37 @@
|
|||
# vim:set ft=zsh:
|
||||
|
||||
# options
|
||||
setopt AUTO_CD # If command typed is a directory, auto change to it
|
||||
setopt HIST_IGNORE_DUPS # Ignore duplicate history entries
|
||||
setopt HIST_REDUCE_BLANKS # Reduce blacks from commands in history
|
||||
setopt EXTENDED_HISTORY # Include more information about command executed, etc
|
||||
setopt COMPLETE_IN_WORD # Allow completion from within a word/phrase
|
||||
setopt PROMPT_SUBST # Enable parameter expansion, etc. in prompt
|
||||
|
||||
export LS_OPTIONS='--group-directories-first'
|
||||
|
||||
# aliases
|
||||
alias retheme='wal -q -t -i ~/wallpaper -saturate 0.9'
|
||||
alias sudo='sudo '
|
||||
alias tmux='TERM=xterm-256color tmux'
|
||||
alias svim='sudo vim'
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias edit='${EDITOR:-vim}'
|
||||
|
||||
local _configpath=~/.config/zsh/configs
|
||||
for group in default ${HOST}; do
|
||||
local _grouppath=$_configpath/$group
|
||||
if [[ -d $_grouppath ]]; then
|
||||
for cfg in $_grouppath/*.zsh; do
|
||||
source $cfg
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
[ -f /usr/share/nvm/init-nvm.sh ] && source /usr/share/nvm/init-nvm.sh
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
|
||||
[ -f ~/.aliases ] && source ~/.aliases
|
Loading…
Add table
Add a link
Reference in a new issue