diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..251da3b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "config/zsh/plugins/zsh-autosuggestions"] + path = config/zsh/plugins/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions diff --git a/config/alacritty/alacritty_desktop.yml b/config/alacritty/alacritty_desktop.yml new file mode 100644 index 0000000..558007a --- /dev/null +++ b/config/alacritty/alacritty_desktop.yml @@ -0,0 +1,551 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +env: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + TERM: xterm-256color + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. + # If both are `0`, this setting is ignored. + #dimensions: + # columns: 0 + # lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + padding: + x: 4 + y: 4 + + # Spread additional padding evenly around the terminal content. + #dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background, but no title bar buttons + decorations: full + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title + #title: Alacritty + + # Window class (Linux/BSD only): + #class: + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` and `light`. + # Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + +#scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + #history: 10000 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + #multiplier: 3 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + family: DejaVuSansMono Nerd Font + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + family: DejaVuSansMono Nerd Font + + # The `style` can be specified to pick a specific face. + style: Bold + + # Italic font face + italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + family: DejaVuSansMono Nerd Font + + # The `style` can be specified to pick a specific face. + style: Italic + + # Bold italic font face + bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + family: DejaVuSansMono Nerd Font + + # The `style` can be specified to pick a specific face. + style: Bold Italic + + # Point size + size: 8 + + # Offset is the extra space around each character. `offset.y` can be thought of + # as modifying the line spacing, and `offset.x` as modifying the letter spacing. + #offset: + # x: 0 + # y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the right, + # increasing `y` moves the glyph upwards. + #glyph_offset: + # x: 0 + # y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` to `false` + # + # macOS >= 10.14.x: + # + # If the font quality on non-retina display looks bad then set + # `use_thin_strokes` to `true` and enable font smoothing by running the + # following command: + # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` + # + # This is a global setting and will require a log out or restart to take + # effect. + #use_thin_strokes: true + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: false + +# Colors (Dracula) +colors: + # Default colors + primary: + background: '#282a36' + foreground: '#f8f8f2' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not present. + # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` + # is `false`, the normal foreground color will be used. + #dim_foreground: '0x9a9a9a' + bright_foreground: '#6e46a4' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. If these are unset, + # the cursor color will be the inverse of the cell color. + cursor: + text: '#44475a' + cursor: '#f8f8f2' + + # Normal colors + normal: + black: '#262626' + red: '#e64747' + green: '#42e66c' + yellow: '#e4f34a' + blue: '#9b6bdf' + magenta: '#e356a7' + cyan: '#75d7ec' + white: '#efa554' + + # Bright colors + bright: + black: '#7a7a7a' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#bd93f9' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#ffb86c' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#14151b' + # red: '#ff2222' + # green: '#1ef956' + # yellow: '#ebf85b' + # blue: '#4d5b86' + # magenta: '#ff46b0' + # cyan: '#59dffc' + # white: '#e6e6d1' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '0xff00ff' }` + # + indexed_colors: [] + +# Visual Bell +# +# Any time the BEL code is received, Alacritty "rings" the visual bell. Once +# rung, the terminal background will be set to white and transition back to the +# default background color. You can control the rate of this transition by +# setting the `duration` property (represented in milliseconds). You can also +# configure the transition function by setting the `animation` property. +# +# Values for `animation`: +# - Ease +# - EaseOut +# - EaseOutSine +# - EaseOutQuad +# - EaseOutCubic +# - EaseOutQuart +# - EaseOutQuint +# - EaseOutExpo +# - EaseOutCirc +# - Linear +# +# Specifying a `duration` of `0` will disable the visual bell. +#visual_bell: +# animation: EaseOutExpo +# duration: 0 +# color: '#ffffff' + +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. +background_opacity: 0.9 + +#selection: + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +# Allow terminal applications to change Alacritty's window title. +#dynamic_title: true + +#cursor: + # Cursor style + # + # Values for `style`: + # - ▇ Block + # - _ Underline + # - | Beam + #style: Block + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + +# Live config reload (changes require restart) +#live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`. +# Entries in `shell.args` are passed unmodified as arguments to the shell. +# +# Default: +# - (macOS) /bin/bash --login +# - (Linux/BSD) user login shell +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +#working_directory: None + +# WinPTY backend (Windows only) +# +# Alacritty defaults to using the newer ConPTY backend if it is available, +# since it resolves a lot of bugs and is quite a bit faster. If it is not +# available, the the WinPTY backend will be used instead. +# +# Setting this option to `true` makes Alacritty use the legacy WinPTY backend, +# even if the ConPTY backend is available. +#winpty_backend: false + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +#mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + #hide_when_typing: false + + #url: + # URL launcher + # + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + # + # When set to `None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux/BSD) xdg-open + # - (Windows) explorer + #launcher: + # program: xdg-open + # args: [] + + # URL modifiers + # + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + #modifiers: None + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty captures the mouse, the +# `Shift` modifier is automatically added as a requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings) +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Middle, action: PasteSelection } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - Copy +# - Paste +# - PasteSelection +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Minimize +# - Quit +# - ToggleFullscreen +# - SpawnNewInstance +# - ClearLogNotice +# - ReceiveChar +# - None +# +# (macOS only): +# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Alt +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# Bindings are always filled by default, but will be replaced when a new +# binding with the same triggers is defined. To unset a default binding, it can +# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# at once. +#key_bindings: + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Add, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Add, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: K, mods: Command, chars: "\x0c" } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: H, mods: Command, action: Hide } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, chars: "\x0c" } + #- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } + #- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } + #- { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } + #- { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc new file mode 100755 index 0000000..edf35b6 --- /dev/null +++ b/config/bspwm/bspwmrc @@ -0,0 +1,40 @@ +#! /usr/bin/bash + +# Workaround for: https://github.com/baskerville/bspwm/issues/52 +wmname LG3D +export _JAVA_AWT_WM_NONPARENTING=1 + + +# Fix monitors +xrandr --output DisplayPort-0 --primary --auto --output DisplayPort-1 --auto --left-of DisplayPort-0 --output HDMI-A-0 --auto --right-of DisplayPort-0 + + +sxhkd & +picom -b +copyq & + +# https://wiki.archlinux.org/index.php/GNOME/Keyring +# eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) +# export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh) + +# Wallpaper and finally the status bar +feh --bg-scale ~/Pictures/wallpaper.jpg +$HOME/.config/polybar/launchpolybar +# Swallow parent process with the child +pidof bspswallow || bspswallow & + + +bspc config border_width 1 +bspc config window_gap 7 + +bspc config split_ratio 0.50 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config focused_border_color \#444444 +bspc config normal_border_color \#080808 + +bspc monitor DisplayPort-0 -d 4 5 6 7 8 +bspc monitor DisplayPort-1 -d 1 2 3 +bspc monitor HDMI-A-0 -d 9 0 + +bspc rule -a Zathura state=tiled diff --git a/config/bspwm/noswallow b/config/bspwm/noswallow new file mode 100644 index 0000000..6d2f17b --- /dev/null +++ b/config/bspwm/noswallow @@ -0,0 +1,2 @@ +xev + diff --git a/config/bspwm/terminals b/config/bspwm/terminals new file mode 100644 index 0000000..414337e --- /dev/null +++ b/config/bspwm/terminals @@ -0,0 +1 @@ +Alacritty diff --git a/config/lf/lfrc b/config/lf/lfrc new file mode 100644 index 0000000..091d20b --- /dev/null +++ b/config/lf/lfrc @@ -0,0 +1,139 @@ +set previewer pistol +set hidden true +set color256 true +set drawbox true +set icons true +set ignorecase true + +cmd open ${{ + case $(file --mime-type "$f" -bL) in + text/*|application/json) $EDITOR "$f";; + image/*) sxiv "$f";; + application/pdf) zathura "$f";; + video/*) mpv "$f";; + *) xdg-open "$f";; + esac +}} + +cmd mkdir ${{ + printf "Directory Name: " + read ans + mkdir $ans +}} + +cmd mkfile ${{ + printf "File Name: " + read ans + $EDITOR $ans +}} + +cmd chmod ${{ + printf "Bits: " + read ans + for file in "$fx" + do + chmod $ans $file + done + + lf -remote "send reload" +}} + +cmd sudochmod ${{ + printf "(sudo) Bits: " + read ans + for file in "$fx" + do + sudo chmod $ans $file + done + + lf -remote "send reload" +}} + +cmd sudomkfile ${{ + printf "(sudo) File Name: " + read ans + sudo $EDITOR $ans +}} + +cmd setwallpaper %cp "$f" ~/.config/wall.png && feh --bg-scale "$f" + +cmd fzfjump ${{ + res="$(find . -maxdepth 3 | fzf --reverse --header='Jump to location')" + if [ -f "$res" ]; then + cmd="select" + elif [ -d "$res" ]; then + cmd="cd" + fi + lf -remote "send $id $cmd \"$res\"" +}} + +cmd unarchive ${{ + case "$f" in + *.zip) unzip "$f" ;; + *.tar*) tar -xvf "$f";; + *) echo "Unsupported Format";; + esac +}} + +# Key Bindings + +# Remove some default bindings +map m +map o +map n +map "'" +map '"' +map d +map c +map e +map f +map v +map i +map i invert +map w + +# File Openers +map ee $$EDITOR "$f" +map v $view "$f" +map u unarchive + +# Finder +map f fzfjump + +map . set hidden! +map dd delete +map p paste +map y copy +map x cut +map open +map mf mkfile +map md mkdir +map mr sudomkfile +map ch chmod +map cr sudochmod +map bg setwallpaper +map r rename +map H top +map L bottom +map R reload +map C clear +map U unselect + +map gh cd ~ +map gp cd ~/Pictures +map gw cd ~/Pictures/Wallpapers + +map gd cd ~/Documents +map gD cd ~/Downloads + +map gb cd ~/bin + +map gc. cd ~/code +map gcg cd ~/code/Projects/Golang/src +map gcp cd ~/code/Projects/Python +map gcr cd ~/code/Projects/Rust + +map giws cd ~/code/IWS +map gcfg cd ~/.config +map ge cd /etc +map g/ cd / diff --git a/config/nvim/init.vim b/config/nvim/init.vim new file mode 100644 index 0000000..91fa20c --- /dev/null +++ b/config/nvim/init.vim @@ -0,0 +1,494 @@ +" Fisa-nvim-config +" http://nvim.fisadev.com +" version: 11.1 + +" Vim-plug initialization {{{ +" Avoid modifying this section, unless you are very sure of what you are doing + +let vim_plug_just_installed = 0 +let vim_plug_path = expand('~/.config/nvim/autoload/plug.vim') +if !filereadable(vim_plug_path) + echo "Installing Vim-plug..." + echo "" + silent !mkdir -p ~/.config/nvim/autoload + silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + let vim_plug_just_installed = 1 +endif + +" manually load vim-plug the first time +if vim_plug_just_installed + :execute 'source '.fnameescape(vim_plug_path) +endif + +" Obscure hacks done, you can now modify the rest of the .vimrc as you wish :) +" }}} +" Active plugins {{{ +" You can disable or add new ones here: + +" this needs to be here, so vim-plug knows we are declaring the plugins we +" want to use +call plug#begin('~/.config/nvim/plugged') + +" Now the actual plugins: + +" VimWiki +Plug 'vimwiki/vimwiki' + +" Golang plugin +Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } + +" Markdown previewer +Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } } + +" Markdown Syntax +Plug 'godlygeek/tabular' +Plug 'elzr/vim-json' +Plug 'plasticboy/vim-markdown' + +" Code commenter +Plug 'scrooloose/nerdcommenter' + +" Better file browser +Plug 'scrooloose/nerdtree' + +" Class/module browser +Plug 'majutsushi/tagbar' +" TODO known problems: +" * current block not refreshing + +" Search results counter +Plug 'vim-scripts/IndexedSearch' + +" Badwolf Colorscheme +Plug 'sjl/badwolf' + +" Airline +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' + +" Code and files fuzzy finder +" Plug 'ctrlpvim/ctrlp.vim' +" Extension to ctrlp, for fuzzy command finder +" Plug 'fisadev/vim-ctrlp-cmdpalette' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' + +" Async autocompletion +Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } +" Completion from other opened files +Plug 'Shougo/context_filetype.vim' +" Python autocompletion +Plug 'zchee/deoplete-jedi', { 'do': ':UpdateRemotePlugins' } +" Just to add the python go-to-definition and similar features, autocompletion +" from this plugin is disabled +Plug 'davidhalter/jedi-vim' + +" Automatically close parenthesis, etc +Plug 'Townk/vim-autoclose' + +" Surround +Plug 'tpope/vim-surround' + +" Indent text object +Plug 'michaeljsmith/vim-indent-object' + +" Indentation based movements +Plug 'jeetsukumaran/vim-indentwise' + +" Better language packs +Plug 'sheerun/vim-polyglot' + +" Paint css colors with the real color +Plug 'lilydjwg/colorizer' + +" Window chooser +Plug 't9md/vim-choosewin' + +" Automatically sort python imports +Plug 'fisadev/vim-isort' + +" Highlight matching html tags +Plug 'valloric/MatchTagAlways' + +" Generate html in a simple way +Plug 'mattn/emmet-vim' + +" Git integration +Plug 'tpope/vim-fugitive' + +" Git/mercurial/others diff icons on the side of the file lines +Plug 'mhinz/vim-signify' + +" Yank history navigation +Plug 'vim-scripts/YankRing.vim' + +" Black Linter integration +Plug 'psf/black', { 'branch': 'stable' } + +" Nice icons +Plug 'ryanoasis/vim-devicons' + +" Easier Terminal splits +Plug 'vimlab/split-term.vim' + +" Dracula theme +Plug 'dracula/vim', {'as': 'dracula'} + +" Tell vim-plug we finished declaring plugins, so it can load them +call plug#end() + +" Install plugins the first time vim runs + +if vim_plug_just_installed + echo "Installing Bundles, please ignore key map error messages" + :PlugInstall +endif +" }}} +" Vim settings and mappings {{{ +" You can edit them as you wish + +" tabs and spaces handling +set expandtab +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set smarttab +if has("autocmd") + au BufReadPost * if &modifiable | retab | endif +endif + +" autoread and autowrite +augroup save + au! + au FocusLost * wall +augroup END +set nohidden +set nobackup +set noswapfile +set nowritebackup +set autoread +set autowrite +set autowriteall + +" persistant undo +set undodir=~/.vim/undo +set undofile + +set path+=** + +" + +" Reloads vimrc after saving but keeps cursor position +if !exists('*ReloadVimrc') + fun! ReloadVimrc() + let save_cursor = getcurpos() + source $MYVIMRC + call setpos('.', save_cursor) + endfun +endif +autocmd! BufWritePost $MYVIMRC call ReloadVimrc() + +" Set 80 character column identifier +set colorcolumn=80,100,120 + +" show line numbers +set number relativenumber + +" Toggle between number and relativenumber +function! ToggleNumber() + if(&relativenumber == 1) + set norelativenumber + set number + else + set number relativenumber + endif +endfunc + +:augroup numbertoggle +: autocmd! +: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber +: autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber +:augroup END + +nnoremap :call ToggleNumber() +nnoremap :buffers:buffer + +" Highlight current line +set cursorline + +" Load filetype-specific indent files +filetype indent on + +" Visual autocompletion for command window +set wildmenu + +" Redraw only when needed +set lazyredraw + +" Highlight matching brackets +set showmatch + +" Transparent background +let g:dracula_colorterm = 0 + +" use 256 colors when possible +if (&term =~? 'mlterm\|xterm\|xterm-256\|screen-256') || has('nvim') + let &t_Co = 256 + colorscheme dracula +else + colorscheme delek +endif + +" needed so deoplete can auto select the first suggestion +" set completeopt+=noinsert +" comment this line to enable autocompletion preview window +" (displays documentation related to the selected completion option) +" set completeopt-=preview + +" autocompletion of files and commands behaves like shell +" (complete only the common part, list the options that match) +set wildmode=list:longest + +" when scrolling, keep cursor 5 lines away from screen border +set scrolloff=5 + +" clear search results +nnoremap // :noh + +" clear empty spaces at the end of lines on save of python files +autocmd BufWritePre *.py :%s/\s\+$//e + +" Ability to add python breakpoints +" (I use ipdb, but you can change it to whatever tool you use for debugging) +au FileType python map b Oimport pudb; pudb.set_trace() + +set incsearch " Search as characters are entered +set hlsearch " Highlight matches + +" Turn off search highlight +nnoremap m :nohlsearch + +" Enable folding +set foldenable +set foldlevelstart=10 " Open most folds when file opened +set foldnestmax=10 " Only nest folds 10 deep +" Use Space to open and close folds +nnoremap za +set foldmethod=indent + +" Movement remaps +" Visually move between lines +nnoremap j gj +nnoremap k gk +" Move to beginning/end of line with better keybindings +nnoremap B ^ +nnoremap E $ +" Highlight last inserted text +nnoremap gV `[v`] + +" Leader Shortcuts +let mapleader="," +" Use jk as escape +inoremap jk + +" Check final line for modeline +set modelines=1 + +" Set Python interpreters +let g:python3_host_prog = '/home/dustyp/.pyenv/versions/3.8.2/bin/python' +let g:python2_host_prog = '/home/dustyp/.pyenv/versions/2.7.16/bin/python' + +" Remap Ctrl+hjkl to move between windows +nnoremap h +nnoremap j +nnoremap k +nnoremap l + +" Enable Mouse support +set mouse=a +" }}} +" Plugins settings and mappings {{{ +" Tagbar {{{ + +" toggle tagbar display +map :TagbarToggle +" autofocus on tagbar open +let g:tagbar_autofocus = 1 +" }}} +" NERDTree {{{ + +" toggle nerdtree display +map :NERDTreeToggle +" open nerdtree with the current file selected +nmap t :NERDTreeFind +" don;t show these file types +let NERDTreeIgnore = ['\.pyc$', '\.pyo$'] +" }}} +" Black {{{ + +" Execute Black on file save +autocmd BufWritePre *.py execute ':Black' + +" Execute Black with keypress +nnoremap :Black +" }}} +" Fzf {{{ + +" file finder mapping +nmap e :Files +" tags (symbols) in current file finder mapping +nmap g :BTag +" tags (symbols) in all files finder mapping +nmap G :Tags +" general code finder in current file mapping +nmap f :BLines +" general code finder in all files mapping +nmap F :Lines +" commands finder mapping +nmap c :Commands +" search in path +nmap ag :Ag +" to be able to call CtrlP with default search text +function! CtrlPWithSearchText(search_text, ctrlp_command_end) + execute ':CtrlP' . a:ctrlp_command_end + call feedkeys(a:search_text) +endfunction +" same as previous mappings, but calling with current word as default text +nmap wg :call CtrlPWithSearchText(expand(''), 'BufTag') +nmap wG :call CtrlPWithSearchText(expand(''), 'BufTagAll') +nmap wf :call CtrlPWithSearchText(expand(''), 'Line') +nmap we :call CtrlPWithSearchText(expand(''), '') +nmap pe :call CtrlPWithSearchText(expand(''), '') +nmap wm :call CtrlPWithSearchText(expand(''), 'MRUFiles') +nmap wc :call CtrlPWithSearchText(expand(''), 'CmdPalette') +" }}} +" Deoplete {{{ + +" Use deoplete. + +let g:deoplete#enable_at_startup = 1 +let g:deoplete#enable_ignore_case = 1 +call deoplete#custom#option("enable_smart_case", 1) +" complete with words from any opened file +let g:context_filetype#same_filetypes = {} +let g:context_filetype#same_filetypes._ = '_' +" }}} +" Jedi-vim {{{ + +" Disable autocompletion (using deoplete instead) +let g:jedi#completions_enabled = 0 + +" All these mappings work only for python code: +" Go to definition +let g:jedi#goto_command = ',d' +" Find ocurrences +let g:jedi#usages_command = ',o' +" Find assignments +let g:jedi#goto_assignments_command = ',a' +" Go to definition in new tab +nmap ,D :tab split:call jedi#goto() +" }}} +" Window Chooser {{{ + +" mapping +nmap - (choosewin) +" show big letters +let g:choosewin_overlay_enable = 1 +" }}} +" Signify {{{ + +" this first setting decides in which order try to guess your current vcs +" UPDATE it to reflect your preferences, it will speed up opening files +let g:signify_vcs_list = [ 'git' ] +" mappings to jump to changed blocks +nmap sn (signify-next-hunk) +nmap sp (signify-prev-hunk) +" nicer colors +highlight DiffAdd cterm=bold ctermbg=none ctermfg=119 +highlight DiffDelete cterm=bold ctermbg=none ctermfg=167 +highlight DiffChange cterm=bold ctermbg=none ctermfg=227 +highlight SignifySignAdd cterm=bold ctermbg=237 ctermfg=119 +highlight SignifySignDelete cterm=bold ctermbg=237 ctermfg=167 +highlight SignifySignChange cterm=bold ctermbg=237 ctermfg=227 +" }}} +" Autoclose {{{ + +" Fix to let ESC work as espected with Autoclose plugin +" (without this, when showing an autocompletion window, ESC won't leave insert +" mode) +let g:AutoClosePumvisible = {"ENTER": "\", "ESC": "\"} +" }}} +" Yankring {{{ + +" Fix for yankring and neovim problem when system has non-text things copied +" in clipboard +let g:yankring_clipboard_monitor = 0 +let g:yankring_history_dir = '~/.config/nvim/' +" }}} +" Airline {{{ + +let g:airline_powerline_fonts = 1 +let g:airline_theme = 'bubblegum' +let g:airline#extensions#whitespace#enabled = 0 +let g:airline#extensions#tabline#enabled = 1 +" to use fancy symbols for airline, uncomment the following lines and use a +" patched font (more info on docs/fancy_symbols.rst) +if !exists('g:airline_symbols') + let g:airline_symbols = {} +endif +let g:airline_left_sep = '⮀' +let g:airline_left_alt_sep = '⮁' +let g:airline_right_sep = '⮂' +let g:airline_right_alt_sep = '⮃' +let g:airline_symbols.branch = '⭠' +let g:airline_symbols.readonly = '⭤' +let g:airline_symbols.linenr = '⭡' +" }}} +" Isort {{{ +nnoremap s :Isort +" }}} +" Split Term {{{ +" Split terms to the right and below current buffer +set splitright +set splitbelow +" Set default shell to ZSH +let g:split_term_default_shell = "zsh" + +" Shortcuts to open terminals +nnoremap :VTerm +nnoremap :10Term +nnoremap :VTerm python +" }}} +" Vim-Markdown {{{ +let g:vim_markdown_folding_disabled = 1 +let g:vim_markdown_conceal = 0 +let g:tex_conceal = "" +let g:vim_markdown_math = 1 +let g:vim_markdown_frontmatter = 1 " for YAML format +let g:vim_markdown_toml_frontmatter = 1 " for TOML format +let g:vim_markdown_json_frontmatter = 1 " for JSON format +" }}} +" Markdown Preview {{{ +nnoremap :MarkdownPreview +let g:mkdp_auto_close = 0 +" }}} +" vim-go {{{ +let g:go_fmt_command = "goimports" +let g:go_auto_type_info = 1 +" }}} +" vimwiki {{{ +let g:vimwiki_list = [ + \{'path': '~/Notes', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Programming', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Programming/Golang', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Programming/Python', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Programming/Rust', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Britecore', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Arch', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/AWS', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Bible Study', 'syntax': 'markdown', 'ext': '.md'}, + \{'path': '~/Notes/Preparedness', 'syntax': 'markdown', 'ext': '.md'}] +" }}} +" }}} + +" vim:foldmethod=marker:foldlevel=0 diff --git a/config/polybar/desktop_config b/config/polybar/desktop_config new file mode 100644 index 0000000..cee7bcc --- /dev/null +++ b/config/polybar/desktop_config @@ -0,0 +1,542 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +;background = ${xrdb:color0:#222} +background = #282a36 +background-alt = #7a7a7a +;foreground = ${xrdb:color7:#222} +foreground = #ffb86c +foreground-alt = #7a7a7a +primary = #f8f8f2 +secondary = #e64747 +alert = #ff5555 + +[bar/topbar] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 6.0 +fixed-center = false +monitor = DisplayPort-0 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 4 +border-color = #000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = DejaVuSansMono Nerd Font:style=Regular:size=8;4 +font-1 = Font Awesome 5 Free:style=Solid:size=10;4 +font-2 = Font Awesome 5 Free:style=Regular:size=10;4 +font-3 = FontAwesome5Brands:style=Regular:size=10;4 + +modules-left = bspwm +modules-center = xwindow +modules-right = filesystem alsa memory cpu wlan eth temperature date powermenu + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[bar/left] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 6.0 +fixed-center = false +monitor = DisplayPort-1 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 4 +border-color = #000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = DejaVuSansMono Nerd Font:style=Regular:size=8;4 +font-1 = Font Awesome 5 Free:style=Solid:size=10;4 +font-2 = Font Awesome 5 Free:style=Regular:size=10;4 +font-3 = FontAwesome5Brands:style=Regular:size=10;4 + +modules-left = bspwm +modules-center = xwindow +modules-right = filesystem alsa memory cpu wlan eth temperature date + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[bar/right] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 6.0 +fixed-center = false +monitor = HDMI-A-0 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 4 +border-color = #000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = DejaVuSansMono Nerd Font:style=Regular:size=8;4 +font-1 = Font Awesome 5 Free:style=Solid:size=10;4 +font-2 = Font Awesome 5 Free:style=Regular:size=10;4 +font-3 = FontAwesome5Brands:style=Regular:size=10;4 + +modules-left = bspwm +modules-center = xwindow +modules-right = filesystem alsa memory cpu wlan eth temperature date + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[module/xwindow] +type = internal/xwindow +label = %title:0:30:...% + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-prefix-underline = ${colors.secondary} + +label-layout = %layout% +label-layout-underline = ${colors.secondary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.secondary} +label-indicator-underline = ${colors.secondary} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / +mount-1 = /home + +label-mounted = %{F#75d7ec}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +[module/bspwm] +type = internal/bspwm + +ws-icon-0 = "1;" +ws-icon-1 = "2;" +ws-icon-2 = "3;" +ws-icon-3 = "4;" +ws-icon-4 = "5;" +ws-icon-5 = "6;" +ws-icon-6 = "7;" +ws-icon-7 = "8;ﱮ" +ws-icon-8 = "9;ﭮ" +ws-icon-9 = "0;" +ws-icon-default = "" + +label-focused = %name%:%icon% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 1 + +label-occupied = %name%:%icon% +label-occupied-padding = 1 + +label-urgent = %name%:%icon%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +label-empty = %name%:%icon% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 1 + +; Separator in between workspaces +; label-separator = | + +[module/i3] +type = internal/i3 +format = +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 = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = 2 + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +format-online = + +icon-prev = ← +icon-stop = ■ +icon-play = ▶ +icon-pause = ❚❚ +icon-next = → + +label-song-maxlen = 25 +label-song-ellipsis = true + +[module/xbacklight] +type = internal/xbacklight + +format =