diff --git a/.gitignore b/.gitignore index c304e25..0268261 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ # Slic3r Prusa Edition /Slic3rPE/cache /Slic3rPE/slic3r.ini + +.mypy_cache/ diff --git a/Xresources b/Xresources index 1a85e64..0d64955 100644 --- a/Xresources +++ b/Xresources @@ -1,2 +1,2 @@ -Xcursor.size: 24 -Xft.dpi: 192 +Xcursor.size: 16 +Xft.dpi: 96 diff --git a/config/fish/config.fish b/config/fish/config.fish index 79341be..116ca50 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -1,4 +1,5 @@ #!/usr/bin/fish +set PATH /usr/bin/vendor_perl $PATH set PATH $HOME/.yarn/bin $PATH set PATH $HOME/.local/bin $PATH set PATH $HOME/Android/Sdk/platform-tools $PATH @@ -33,3 +34,7 @@ end function f find -iname "*$argv*" end + +function wttr + curl "https://wttr.in/$argv" +end diff --git a/config/fish/fish_variables b/config/fish/fish_variables new file mode 100644 index 0000000..ab1dfc4 --- /dev/null +++ b/config/fish/fish_variables @@ -0,0 +1,31 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_init_2_39_8:\x1d +SETUVAR __fish_init_2_3_0:\x1d +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:\x2d\x2dbold +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:brmagenta +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:bryellow\x1e\x2d\x2dbold +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:bryellow +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:brblue +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_greeting: +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:\x1d +SETUVAR fish_pager_color_description:B3A06D\x1eyellow +SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish index 8f0fd51..1a7ec87 100644 --- a/config/fish/functions/fish_prompt.fish +++ b/config/fish/functions/fish_prompt.fish @@ -17,7 +17,7 @@ set __fish_git_prompt_char_stashstate '⚑' set __fish_git_prompt_char_upstream_ahead '⇡' set __fish_git_prompt_char_upstream_behind '⇣' -set __prompt_bg 35373b +set __prompt_bg 404552 function fish_prompt diff --git a/config/i3/backlight.fish b/config/i3/backlight.fish index d0f29c5..ce72c8a 100755 --- a/config/i3/backlight.fish +++ b/config/i3/backlight.fish @@ -2,19 +2,19 @@ xbacklight $argv[1..-1] set brightness (cat /sys/class/backlight/intel_backlight/brightness) -set bar (seq -s "─" 0 (math $brightness / 36) | tr -d '[:digit:]') +set bar (seq -s "─" 0 (math $brightness / 42) | tr -d '[:digit:]') -set percentage (printf '%44s%d%%' '' (math $brightness / 12)) +set percentage (printf '%16s%d%%' '' (math $brightness / 12)) set body "$percentage\n $bar" -set title ' Brightness' +set title ' Helderheid' set file /tmp/notify-brightness.id -set age (find "$file" -cmin -0.025) +set age (find "$file" -cmin -0,025) if [ -n "$age" ] - dunstify -r (cat "$file") -t 1500 "$title" "$body" + notify-send.sh -r (cat "$file") -t 1500 "$title" "$body" touch "$file" else - set id (dunstify -p -t 1500 "$title" "$body") + set id (notify-send.sh -p -t 1500 "$title" "$body") echo $id > "$file" chmod 600 "$file" end diff --git a/config/i3/compact.py b/config/i3/compact.py new file mode 100644 index 0000000..160ac16 --- /dev/null +++ b/config/i3/compact.py @@ -0,0 +1,11 @@ +import i3ipc +import sys +from itertools import zip_longest, count + +i3 = i3ipc.Connection() + +workspaces = (w.name for w in i3.get_workspaces()) +for i, workspace in zip(count(1), workspaces): + name = workspace.split(":", 1)[-1] + i3.command(f"rename workspace '{workspace}' to '{i}:{name}'") + print(i, name, file=sys.stderr) diff --git a/config/i3/cycle-monitor.py b/config/i3/cycle-monitor.py deleted file mode 100755 index dbbd58b..0000000 --- a/config/i3/cycle-monitor.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -# Source: https://gist.github.com/justbuchanan/00b8d4aac604fa6ab41b7c5acae71ee8 -import i3 - -outputs = i3.get_outputs() -workspaces = i3.get_workspaces() - -# figure out what is on, and what is currently on your screen. -workspace = list(filter(lambda s: s['focused']==True, workspaces)) -output = list(filter(lambda s: s['active']==True, outputs)) - -# figure out the other workspace name -other_workspace = list(filter(lambda s: s['name']!=workspace[0]['output'], output)) - -# send current to the no-active one -i3.command('move', 'workspace to output '+other_workspace[0]['name']) diff --git a/config/i3/icons.py b/config/i3/icons.py index 8ff83d2..a04b230 100644 --- a/config/i3/icons.py +++ b/config/i3/icons.py @@ -5,7 +5,7 @@ # # This script listens for i3 events and updates workspace names to show icons # for running programs. It contains icons for a few programs, but more can -# easily be added by inserting them into WINDOW_ICONS below. +# easily be added by inserting them into XORG_ICONS below. # # Dependencies # * xorg-xprop - install through system package manager @@ -41,8 +41,9 @@ FA_BEZIER_CURVE = "\uF55B" FA_VECTOR_SQUARE = "\uF5CB" FA_VOLUME_UP = "\uF028" FA_STEAM = "\uF1B6" +FA_COMMENT_ALT = "\uF27A" -WINDOW_ICONS = { +XORG_ICONS = { "Blender": FA_CUBE, "chromium": FA_CHROME, "code": FA_CODE, @@ -56,7 +57,9 @@ WINDOW_ICONS = { "Gnome-terminal": FA_TERMINAL, "google-chrome": FA_CHROME, "inkscape": FA_PAINT_BRUSH, + "jetbrains-clion": FA_CODE, "jetbrains-pycharm": FA_CODE, + "jetbrains-rider": FA_CODE, "jetbrains-webstorm": FA_CODE, "libreoffice": FA_FILE_TEXT_O, "mupdf": FA_FILE_PDF_O, @@ -79,6 +82,7 @@ WINDOW_ICONS = { } WAYLAND_ICONS = { + "Alacritty": FA_TERMINAL, "Blender": FA_CUBE, "chromium": FA_CHROME, "code": FA_CODE, @@ -92,12 +96,15 @@ WAYLAND_ICONS = { "gnome-terminal-server": FA_TERMINAL, "google-chrome": FA_CHROME, "inkscape": FA_PAINT_BRUSH, + "jetbrains-clion": FA_CODE, "jetbrains-pycharm": FA_CODE, + "jetbrains-rider": FA_CODE, "jetbrains-webstorm": FA_CODE, "libreoffice": FA_FILE_TEXT_O, "mupdf": FA_FILE_PDF_O, "nautilus": FA_FOLDER, "org.gnome.Nautilus": FA_FOLDER, + "polari": FA_COMMENT_ALT, "pulseeffects": FA_VOLUME_UP, "slic3r-gui": FA_CUBE, "slic3r-prusa3d": FA_CUBE, @@ -113,6 +120,10 @@ WAYLAND_ICONS = { "xfce4-terminal": FA_TERMINAL, } +TERMINAL_APPS = { + "vim": FA_CODE, + "weechat": "\uf075", +} i3 = i3ipc.Connection() @@ -135,6 +146,11 @@ def xprop(win_id, property): def icon_for_window(window): + if window.app_id == "Alacritty": + app = window.name.split()[0] + if app in TERMINAL_APPS: + return TERMINAL_APPS[app] + if window.app_id: # Wayland if window.app_id in WAYLAND_ICONS: @@ -146,8 +162,8 @@ def icon_for_window(window): classes = xprop(window.window, "WM_CLASS") if classes: for cls in classes: - if cls in WINDOW_ICONS: - return WINDOW_ICONS[cls] + if cls in XORG_ICONS: + return XORG_ICONS[cls] print("No icon available for window with classes: %s" % str(classes)) return "*" @@ -167,7 +183,7 @@ def rename(): def on_change(i3, e): """Call rename() on relevant window events.""" print(f"{e.change}") - if e.change in ["new", "close", "move"]: + if e.change in ["new", "close", "move", "title"]: rename() diff --git a/config/i3/next-free.py b/config/i3/next-free.py new file mode 100644 index 0000000..f4185bd --- /dev/null +++ b/config/i3/next-free.py @@ -0,0 +1,15 @@ +import i3ipc +import sys +from itertools import zip_longest, count + +i3 = i3ipc.Connection() + +workspaces = sorted(int(w.name.split(":")[0]) for w in i3.get_workspaces()) +for i, workspace in zip_longest(count(1), workspaces): + print(i, workspace, file=sys.stderr) + if i != workspace: + print(i) + break +else: + print("no free workspace found", file=sys.stderr) + sys.exit(1) diff --git a/config/i3/swap-workspaces.sh b/config/i3/swap-workspaces.sh new file mode 100755 index 0000000..0f3e603 --- /dev/null +++ b/config/i3/swap-workspaces.sh @@ -0,0 +1,19 @@ +#!/bin/bash +workspaces=$(swaymsg -t get_workspaces | jq -r '.[].name') +first=$(echo "$workspaces" | bemenu -i -p 'First workspace') +second=$(echo "$workspaces" | grep -v "$first" | bemenu -i -p 'Second workspace') +echo "'$first ' | '$second '" + +first_number=$(echo "$first" | cut -d':' -f1) +second_number=$(echo "$second" | cut -d':' -f1) + +first_name=$(echo "$first" | cut -d':' -f2) +second_name=$(echo "$second" | cut -d':' -f2) + +temp=$RANDOM +echo "RENAMING FIRST ($first_number) TO TEMP" +swaymsg rename workspace number "$first_number" to "$second_name" +echo "RENAMING SECOND ($second_number) TO $first_number" +swaymsg rename workspace number "$second_number" to "$first_number:$second_name" +echo "RENAMING FIRST ($first_number) TO $second_number" +swaymsg rename workspace "$second_name" to "$second_number:$first_name" diff --git a/config/i3/volume.fish b/config/i3/volume.fish index ed4c373..753bc28 100755 --- a/config/i3/volume.fish +++ b/config/i3/volume.fish @@ -3,12 +3,12 @@ pamixer $argv[1..-1] set volume (pamixer --get-volume) set muted (pamixer --get-mute) -set bar (seq -s "─" 0 (math $volume / 3) | tr -d '[:digit:]') +set bar (seq -s "─" 0 (math $volume / 3.5) | tr -d '[:digit:]') if [ $muted = 'true' ] set body (printf '%41sMuted') else - set percentage (printf '%44s%d%%' '' "$volume") + set percentage (printf '%16s%d%%' '' "$volume") set body "$percentage\n $bar" end @@ -16,31 +16,31 @@ set icon '' if [ $muted = 'true' ] set icon '' else if [ $argv[1] = '-d' ] - set icon ' ' + set icon '' end set name ( \ pactl list | \ grep -A1000 'Name: '(pactl info | grep '^Default Sink' | cut -d' ' -f 3-)'$' | \ - grep -m1 'Active Port' | \ + grep -m1 'Actieve poort' | \ cut -d' ' -f 3- \ ) if [ $name = 'analog-output-speaker' ] set name 'Speakers' else if [ $name = 'analog-output-headphones' ] - set name 'Line-out' + set name 'Headphones' end set title "$icon Volume ($name)" set file /tmp/notify-volume.id -set age (find "$file" -cmin -0.025) +set age (find "$file" -cmin -0,025) if [ -n "$age" ] - dunstify -r (cat "$file") -t 1500 "$title" "$body" + notify-send.sh -r (cat "$file") -t 1500 "$title" "$body" touch "$file" else - set id (dunstify -p -t 1500 "$title" "$body") + set id (notify-send.sh -p -t 1500 "$title" "$body") echo $id > "$file" chmod 600 "$file" end diff --git a/config/nvim/init.vim b/config/nvim/init.vim index 07dcbac..e8e8496 100644 --- a/config/nvim/init.vim +++ b/config/nvim/init.vim @@ -3,66 +3,78 @@ call plug#begin("~/.nvim/bundle") " Other Plug 'bronson/vim-visual-star-search' Plug 'prabirshrestha/async.vim' +Plug 'tweekmonster/startuptime.vim' " UI -Plug 'airblade/vim-gitgutter' +"Plug 'airblade/vim-gitgutter' " currently broken :( Plug 'Asheq/close-buffers.vim' Plug 'haya14busa/incsearch.vim' Plug 'mhinz/vim-startify' Plug 'ryanoasis/vim-devicons' Plug 'scrooloose/nerdtree' -Plug 'sjl/gundo.vim' Plug 'tomasiser/vim-code-dark' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'Yggdroot/indentLine' " Programming helpers -"Plug 'bfrg/vim-cpp-modern' +"Plug 'deoplete-plugins/deoplete-clang' "Plug 'guns/xterm-color-table.vim' -"Plug 'justmao945/vim-clang' "Plug 'prabirshrestha/vim-lsp' +"Plug 'scrooloose/syntastic' +"Plug 'Shougo/neoinclude.vim' +Plug 'bkad/CamelCaseMotion' Plug 'Chiel92/vim-autoformat' Plug 'ctrlpvim/ctrlp.vim' -Plug 'deoplete-plugins/deoplete-clang' +Plug 'dense-analysis/ale' Plug 'deoplete-plugins/deoplete-jedi' +Plug 'easymotion/vim-easymotion' Plug 'godlygeek/tabular' +Plug 'sebastianmarkow/deoplete-rust' Plug 'keith/swift.vim' -Plug 'majutsushi/tagbar' -Plug 'scrooloose/syntastic' +"Plug 'majutsushi/tagbar' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } -Plug 'Shougo/neoinclude.vim' +Plug 'tpope/vim-commentary' +Plug 'tpope/vim-eunuch' +Plug 'tpope/vim-git' +Plug 'tpope/vim-markdown' Plug 'tpope/vim-sleuth' +Plug 'tpope/vim-speeddating' Plug 'tpope/vim-surround' " Language support -"Plug 'ryanolsonx/vim-lsp-swift' "Plug 'landaire/deoplete-swift' +"Plug 'mitsuhiko/vim-jinja' +"Plug 'ryanolsonx/vim-lsp-swift' Plug 'artur-shaik/vim-javacomplete2' Plug 'cespare/vim-toml' Plug 'coc-extensions/coc-svelte' +Plug 'cstrahan/vim-capnp' Plug 'digitaltoad/vim-pug' Plug 'evanleck/vim-svelte' Plug 'gryf/kickass-syntax-vim' +Plug 'hiphish/jinja.vim' Plug 'hsanson/vim-android' Plug 'leafgarland/typescript-vim' +Plug 'lervag/vimtex' Plug 'martinda/Jenkinsfile-vim-syntax' -Plug 'mitsuhiko/vim-jinja' -Plug 'mxw/vim-jsx' -Plug 'natebosch/vim-lsc' +Plug 'MaxMEllon/vim-jsx-pretty' +Plug 'othree/yajs.vim' +Plug 'peitalin/vim-jsx-typescript' Plug 'plasticboy/vim-markdown' Plug 'posva/vim-vue' Plug 'rust-lang/rust.vim' Plug 'tikhomirov/vim-glsl' Plug 'udalov/kotlin-vim' Plug 'ziglang/zig.vim' +Plug 'jceb/vim-orgmode' call plug#end() " Misc set mouse=a -set nowrap -set shell=zsh +set wrap linebreak +set shell=fish set scrolloff=5 set ruler set backspace=2 @@ -74,12 +86,9 @@ set splitright set splitbelow set relativenumber let &colorcolumn="+".join(range(1, 255), ",+") -let mapleader="," set termguicolors nnoremap :buffers:buffer - -" Gundo -nnoremap :GundoToggle +let maplocalleader="\" " Tagbar nmap :TagbarOpenAutoClose @@ -92,7 +101,7 @@ if !exists('g:airline_symbols') endif let g:airline_theme = 'codedark' -let g:airline_left_sep = ' ' +let g:airline_left_sep = '' let g:airline_left_alt_sep = '| ' let g:airline_right_sep = '' let g:airline_right_alt_sep = '|' @@ -103,15 +112,13 @@ let g:airline_symbols.maxlinenr = '' let g:airline_symbols.whitespace = 'Ξ' let g:airline#extensions#tabline#enabled = 1 -let g:airline#extensions#tabline#left_sep = '' -let g:airline#extensions#tabline#left_alt_sep = '|' let g:airline#extensions#tabline#show_tab_nr = 0 let g:airline#extensions#tabline#show_tab_type = 0 +let g:airline#extensions#ale#enabled = 1 " Syntax coloring syntax enable set synmaxcol=1024 -set background=dark colorscheme codedark hi WarningMsg ctermbg=0 @@ -120,16 +127,18 @@ let g:indentLine_color_term = 20 let g:indentLine_char = '│' let g:indentLine_concealcursor = '' let g:indentLine_indentLevel = 25 -let g:indentLine_fileType = ['vhdl'] +let g:indentLine_fileType = ['vhdl', 'vim', 'tex', 'plaintex', 'cpp', 'cpp.jinja'] " Startify let g:startify_session_dir = $HOME . '/.nvim/sessions' let g:startify_session_autoload = 1 let g:startify_session_persistence = 1 +let g:startify_change_to_dir = 0 +let g:startify_change_to_vcs_root = 1 " Formatting set encoding=utf-8 -set tabstop=8 +set tabstop=4 set shiftwidth=4 set expandtab set autoindent @@ -140,15 +149,19 @@ set list listchars=tab:\ \ ,trail:•,precedes:…,extends:… " Maximum line widths au FileType text,markdown setlocal textwidth=80 au FileType python setlocal textwidth=88 +au FileType javascript setlocal textwidth=90 au FileType swift setlocal textwidth=120 +au FileType tex setlocal textwidth=90 +au FileType cpp,cpp.jinja setlocal textwidth=90 + +" Formatters +au FileType javascript setlocal formatprg=prettier +au FileType javascript.jsx setlocal formatprg=prettier " Line numbering set number " Search -set ignorecase -set smartcase - map / (incsearch-forward) map ? (incsearch-backward) map g/ (incsearch-stay) @@ -171,16 +184,19 @@ set undoreload=10000 " Completion set completeopt=menu,menuone,longest +" Open files at where they were closed. +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") + \| exe "normal! g'\"" | endif +endif + """ Shortcuts -"nnoremap :wa:split:terminal make run -vnoremap "+y -inoremap "+pa map :set invpaste if has("nvim") - tnoremap h - tnoremap j - tnoremap k - tnoremap l + tnoremap h + tnoremap j + tnoremap k + tnoremap l endif nnoremap h nnoremap j @@ -197,13 +213,13 @@ set directory=~/.nvim/backup """ Vimpager if exists("vimpager") - au BufRead * set scrolloff=0 - set noruler - set nocursorline - set colorcolumn= - set nonumber - au BufRead * set laststatus=0 - let g:airline#extensions#tabline#enabled = 0 + au BufRead * set scrolloff=0 + set noruler + set nocursorline + set colorcolumn= + set nonumber + au BufRead * set laststatus=0 + let g:airline#extensions#tabline#enabled = 0 endif let vimpager_disable_ansiesc = 1 @@ -214,38 +230,19 @@ let g:vim_markdown_folding_disabled = 1 map :NERDTreeToggle autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif -""" vim-autoformat -"au BufWrite * :Autoformat - -""" vim-lsc -let g:lsc_server_commands = {'dart': 'dart_language_server'} - """ Deoplete let g:deoplete#enable_at_startup = 1 -let g:jedi#completions_enabled = 0 -let g:jedi#auto_vim_configuration = 0 -let g:jedi#smart_auto_mappings = 0 -let g:jedi#show_call_signatures = 0 -""" vim-clang -let g:clang_c_options = '-std=c11' -let g:clang_cpp_options = '-std=c++17' - -""" syntastic -let g:syntastic_cpp_compiler = 'clang++' -let g:syntastic_cpp_compiler_options = '-std=c++17 -Wall -Wextra -pedantic' -let g:syntastic_python_pylint_args = '-e max-line-length=88' -let g:syntastic_python_flake8_args = '--max-line-length=88' - -""" vim-lsc -" C++/C - if executable('clangd') - au User lsp_setup call lsp#register_server({ - \ 'name': 'clangd', - \ 'cmd': {server_info->['clangd']}, - \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], - \ }) -endif +""" ale +let g:ale_linters = { 'python': ['flake8', 'mypy'] } +let g:ale_python_flake8_options='--max-line-length=88' +let g:ale_python_mypy_options='--ignore-missing-imports' +let g:ale_c_parse_compile_commands = 1 +let g:ale_c_build_dir_names = ['build', 'bin', '.'] +let g:ale_fixers = { 'python': ['black'], 'cpp': ['clang-format'], 'javascript': ['eslint', 'prettier'], 'yaml': ['prettier'] } +let g:ale_linters = { 'cpp': ['clangcheck'] } +let g:ale_completion_enabled = 1 +set omnifunc=ale#completion#OmniFunc " Python if executable('pyls') @@ -263,7 +260,27 @@ autocmd FileType java setlocal omnifunc=javacomplete#Complete """ rust.vim let g:rustfmt_autosave = 1 +""" jinja.vim +autocmd! BufRead,BufNewFile *.cpp,*.html call jinja#AdjustFiletype() + " command! Workman set langmap=LO,OL,JN,NJ,KE,EK,HY,YH,lo,ol,jn,nj,ke,ek,hy,yh " command! Qwerty set langmap= +""" Snippets +au FileType tex,plaintex nnoremap ,fig :-1read ~sijmen/.config/nvim/snippets/figure.texj/[{:]} +au FileType tex,plaintex nnoremap ,lst :-1read ~sijmen/.config/nvim/snippets/listing.texj/([=:](,$){}^$) + +""" CamelCaseMotion +map w CamelCaseMotion_w +map b CamelCaseMotion_b +map e CamelCaseMotion_e +map ge CamelCaseMotion_ge +sunmap w +sunmap b +sunmap e +sunmap ge + +""" latex +let g:tex_conceal = 'adgms' + set path=$PWD/** diff --git a/config/nvim/snippets/figure.tex b/config/nvim/snippets/figure.tex new file mode 100644 index 0000000..5f1873c --- /dev/null +++ b/config/nvim/snippets/figure.tex @@ -0,0 +1,6 @@ +\begin{figure}[h] + \centering + \includegraphics[width=\textwidth]{} + \caption{}% + \label{fig:} +\end{figure} \ No newline at end of file diff --git a/config/nvim/snippets/listing.tex b/config/nvim/snippets/listing.tex new file mode 100644 index 0000000..edb5104 --- /dev/null +++ b/config/nvim/snippets/listing.tex @@ -0,0 +1,10 @@ +\begin{minipage}{\textwidth} + \begin{lstlisting}[ + language=, + caption={}, + columns=fixed, + label={}, + ] + + \end{lstlisting} +\end{minipage} diff --git a/config/sway/config b/config/sway/config index 910754c..aeca3da 100644 --- a/config/sway/config +++ b/config/sway/config @@ -1,7 +1,39 @@ # i3 config file (v4) # # Please see http://i3wm.org/docs/userguide.html for a complete reference! -output eDP-1 scale 2 +output * bg /home/sijmen/Pictures/Bureaubladachtergronden/ia4x8geen2z31.jpg fill + +# Laptop display +output 'Unknown 0x06D7 0x00000000' { + scale 2 + pos 0 0 + subpixel rgb +} + +# Default HDMI to right-of +output HDMI-A-2 pos 1920 0 + +# Screens at parents' +# Mom left +output 'Philips Consumer Electronics Company PHL 243V7 0x000034F4' { + pos -960 -1080 + mode 1920x1080@74.973000Hz + subpixel rgb + bg ~/Pictures/Bureaubladachtergronden/road-left.jpg fill +} +# Mom right +output 'Philips Consumer Electronics Company PHL 243V7 0x000034F5' { + pos 960 -1080 + mode 1920x1080@74.973000Hz + subpixel rgb + bg ~/Pictures/Bureaubladachtergronden/road-right.jpg fill +} + +# Bit +output 'Philips Consumer Electronics Company PHL 272B8Q UK01947014710' { + pos 0 -1440 + subpixel rgb +} set $mod Mod4 @@ -13,7 +45,7 @@ font pango:Ubuntu, Icons 11 floating_modifier $mod # start a terminal -bindsym $mod+Return exec --no-startup-id termite +bindsym $mod+Return exec --no-startup-id alacritty bindsym $mod+Ctrl+Return exec --no-startup-id thunar bindsym $mod+Shift+Return exec --no-startup-id code @@ -21,10 +53,12 @@ bindsym $mod+Shift+Return exec --no-startup-id code bindsym $mod+q exec --no-startup-id ~/.config/i3/cursor.sh kill # start dmenu (a program launcher) -bindsym $mod+space exec --no-startup-id i3-dmenu-desktop +bindsym $mod+space exec --no-startup-id BEMENU_BACKEND=wayland i3-dmenu-desktop --dmenu='bemenu -i' +bindsym $mod+alt+w exec --no-startup-id nmcli c up "$(nmcli -m=m c s | grep -B2 'wifi' | grep 'NAME:' | sed 's/NAME: *//' | dmenu)" +bindsym $mod+alt+u exec --no-startup-id UUID=$(uuidgen) && echo $UUID | wl-copy && notify-send "UUID copied to clipboard" "$UUID" # lock the desktop -bindsym $mod+l exec --no-startup-id swaylock -c 000000 -i "/home/sijmen/Pictures/beeg.png" +bindsym $mod+l exec --no-startup-id swaylock -c 000000 -i eDP-1:~/Pictures/Bureaubladachtergronden/ip4deFQ-10.jpg -i HDMI-A-2:~/Pictures/Bureaubladachtergronden/ip4deFQ-01.jpg -i DP-1:~/Pictures/Bureaubladachtergronden/ip4deFQ-00.jpg # alternatively, you can use the cursor keys: bindsym $mod+Left exec --no-startup-id ~/.config/i3/cursor.sh focus left @@ -94,7 +128,7 @@ bindsym $mod+Ctrl+0 workspace number 20 # scroll though workspaces bindsym $mod+Tab exec --no-startup-id ~/.config/i3/cursor.sh workspace next -bindsym $mod+Shift+Tab exec --no-startup-id ~/.config/i3/cursor.sh workspace previous +bindsym $mod+Shift+Tab exec --no-startup-id ~/.config/i3/cursor.sh workspace prev # move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 @@ -118,8 +152,14 @@ bindsym $mod+Ctrl+Shift+8 move container to workspace number 18 bindsym $mod+Ctrl+Shift+9 move container to workspace number 19 bindsym $mod+Ctrl+Shift+0 move container to workspace number 20 -# move focused container to the next display -bindsym $mod+m exec --no-startup-id ~/.config/i3/cycle-monitor.py +bindsym $mod+Ctrl+Left move workspace output left +bindsym $mod+Ctrl+Down move workspace output down +bindsym $mod+Ctrl+Up move workspace output up +bindsym $mod+Ctrl+Right move workspace output right + +bindsym $mod+Ctrl+f exec --no-startup-id "swaymsg workspace $(python ~/.config/i3/next-free.py)" +bindsym $mod+Ctrl+Shift+f exec --no-startup-id "swaymsg move container to workspace number $(python ~/.config/i3/next-free.py)" +bindsym $mod+Ctrl+c exec --no-startup-id "python ~/.config/i3/compact.py" bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart @@ -147,16 +187,15 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle bindsym XF86Calculator exec --no-startup-id gnome-calculator bindsym Print exec --no-startup-id grim -g "$(slurp)" - | wl-copy && notify-send --urgency=low "Screenshot taken" -bindsym Shift+Print exec --no-startup-id /usr/bin/bash -c 'cd /tmp && f="$(escrotum -s)" && echo "/tmp/$f" | xclip -se c && notify-send --urgency=low "Screenshot taken" "$f"' +bindsym Ctrl+Print exec --no-startup-id grim - | wl-copy && notify-send --urgency=low "Screenshot taken" +bindsym Shift+Print exec --no-startup-id grim -g "$(slurp)" /tmp/screenshot.png && wl-copy "/tmp/screenshot.png" && notify-send --urgency=low "Screenshot taken" bindsym $mod+Print exec --no-startup-id $HOME/.config/i3/screenrecord.sh -bindsym $mod+t exec --no-startup-id i3-sensible-terminal -t i3tree -- bash -c "perl -Mutf8 -CS $(which i3tree) | less" - -for_window [title="^i3tree$"] floating enable -for_window [class="^Gpick$"] floating enable -for_window [class="^Arandr$"] floating enable -for_window [class="^Pavucontrol$"] floating enable -for_window [class="^Gnome-calculator$"] floating enable +for_window [class="^jetbrains-toolbox$"] floating enable +for_window [app_id="^gnome-calculator$"] floating enable +for_window [app_id="^qemu$"] floating enable +for_window [class="^jetbrains-" title="^win0$"] floating enable +for_window [app_id="^thunar$" title="^Voortgang van bestandbewerking$"] floating enable # Light theme ## class border backgr. text indic. child_border @@ -167,10 +206,10 @@ for_window [class="^Gnome-calculator$"] floating enable # Dark theme # class border backgr. text indic. child_border -client.focused #292b2e #607d8b #ffffff #b0bec5 #4db6ac -client.focused_inactive #292b2e #37474f #ffffff #78909c #292b2e -client.unfocused #292b2e #37474f #ffffff #78909c #292b2e -client.urgent #292b2e #ff5722 #ffffff #ffab91 #bf360c +client.focused #5294e2 #5294e2 #ffffff #b0bec5 #5294e2 +client.focused_inactive #2b2e39 #2f343f #ffffff #78909c #2b2e39 +client.unfocused #2b2e39 #2f343f #ffffff #78909c #2b2e39 +client.urgent #2b2e39 #ff5722 #ffffff #ffab91 #bf360c # resize window (you can also use the mouse for that) mode "resize" { @@ -223,14 +262,26 @@ bar { } for_window [class="^.*"] border pixel 2 -gaps inner 8 +gaps inner 0 -output * bg /home/sijmen/Pictures/malta.jpg fill +#output * bg /home/sijmen/Pictures/malta.jpg fill exec --no-startup-id sh -c "PYTHONUNBUFFERED=1 python $HOME/.config/i3/icons.py 2>&1 > /tmp/icons.log" +focus_follows_mouse no #exec --no-startup-id redshift -l 52.37:4.889 -t 6500:3000 - input "1739:0:Synaptics_TM3276-031" { - dwt disabled - natural_scroll enabled - } +input "1739:0:Synaptics_TM3276-031" { + dwt disabled + natural_scroll enabled +} +input "2:10:TPPS/2_IBM_TrackPoint" { + pointer_accel 0.4 +} + +input type:keyboard { + xkb_options caps:backspace,compose:ralt + xkb_layout us + xkb_variant workman +} + +exec --no-startup-id source /etc/profile diff --git a/config/termite/config b/config/termite/config index 2912847..be327e5 100644 --- a/config/termite/config +++ b/config/termite/config @@ -2,4 +2,48 @@ font = Ubuntu Mono 11 [colors] -background = #181818 +background = #2f343f +foreground = #d3dae3 +foreground_bold = #e0e0e0 +cursor = #e0e0e0 +cursor_foreground = #1d1f21 + +# 16 color space + +# Black, Gray, Silver, White +color0 = #2f343f +color8 = #969896 +color7 = #d3dae3 +color15 = #ffffff + +# Red +color1 = #cc6666 +color9 = #cc6666 + +# Green +color2 = #b5bd68 +color10 = #b5bd68 + +# Yellow +color3 = #f0c674 +color11 = #f0c674 + +# Blue +color4 = #81a2be +color12 = #81a2be + +# Purple +color5 = #b294bb +color13 = #b294bb + +# Teal +color6 = #8abeb7 +color14 = #8abeb7 + +# Extra colors +color16 = #de935f +color17 = #a3685a +color18 = #282a2e +color19 = #373b41 +color20 = #b4b7b4 +color21 = #e0e0e0 diff --git a/gitconfig b/gitconfig index 69ff69f..4ef1383 100644 --- a/gitconfig +++ b/gitconfig @@ -1,10 +1,17 @@ [user] email = me@sijmenschoon.nl name = Sijmen Schoon + signingkey = DAF7821E067D9C48 [core] editor = nvim -[filter "lfs"] - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process - required = true + quotepath = false + commitGraph = true + pager = diff-so-fancy | less --tabs=4 -RFX +[color] + diff = off +[gc] + writeCommitGraph = true +[commit] + gpgsign = true +[credential] + helper = /usr/lib/git-core/git-credential-gnome-keyring diff --git a/spacemacs b/spacemacs index 235c826..0e3b24e 100644 --- a/spacemacs +++ b/spacemacs @@ -146,7 +146,7 @@ values." ;; Default font, or prioritized list of fonts. `powerline-scale' allows to ;; quickly tweak the mode-line size to make separators look not too crappy. dotspacemacs-default-font '("Ubuntu Mono" - :size 27 + :size 14 :weight normal :width normal :powerline-scale 1.6)