commit 9cd6b133f1a220c8ca3261443a648461a9f4236a Author: Penguin Date: Sat Jul 22 20:17:26 2023 -0500 reset repo diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..e1c2fac --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,880 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# Imports are loaded in order, skipping all missing files, with the importing +# file being loaded last. If a field is already present in a previous import, it +# will be replaced. +# +# All imports must either be absolute paths starting with `/`, or paths relative +# to the user's home directory starting with `~/`. +import: + - ~/.config/alacritty/spacemacs.yml + +# 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: alacritty + +#window: + # Window dimensions (changes require restart) + # + # Number of lines/columns (not pixels) in the terminal. The number of columns + # must be at least `2`, while using a value of `0` for columns and lines will + # fall back to the window manager's recommended size. + #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: 0 + # y: 0 + + # 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 and 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 + + # Allow terminal applications to change Alacritty's window title. + #dynamic_title: true + + # 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 + + # Scrolling distance multiplier. + #multiplier: 3 + +# Font configuration +font: + normal: + family: JetBrains Mono Nerd Font + style: SemiBold + + bold: + family: JetBrains Mono Nerd Font + style: Bold + + italic: + family: JetBrains Mono Nerd Font + style: SemiBold Italic + + bold_italic: + family: JetBrains Mono Nerd Font + style: Bold Italic + + size: 11 +#font: + # Normal (roman) font face + #normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + #family: monospace + + # 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: monospace + + # 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: monospace + + # 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: monospace + + # The `style` can be specified to pick a specific face. + #style: Bold Italic + + # Point size + #size: 11.0 + + # 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 upward. + #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`. + #use_thin_strokes: true + +# If `true`, bold text is drawn using the bright color variants. +#draw_bold_text_with_bright_colors: false + +# Colors (Tomorrow Night) +#colors: + # Default colors + #primary: + # background: '#1d1f21' + # foreground: '#c5c8c6' + + # 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: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #cursor: + # text: CellBackground + # cursor: CellForeground + + # Vi mode cursor colors + # + # Colors for the cursor when the vi mode is active. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #vi_mode_cursor: + # text: CellBackground + # cursor: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + #search: + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + #focused_match: + # foreground: '#ffffff' + # background: '#000000' + + #bar: + # background: '#c5c8c6' + # foreground: '#1d1f21' + + # Keyboard regex hints + #hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' + + # Line indicator + # + # Color used for the indicator displaying the position in history during + # search and vi mode. + # + # By default, these will use the opposing primary color. + #line_indicator: + # foreground: None + # background: None + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #selection: + # text: CellBackground + # background: CellForeground + + # Normal colors + #normal: + # black: '#1d1f21' + # red: '#cc6666' + # green: '#b5bd68' + # yellow: '#f0c674' + # blue: '#81a2be' + # magenta: '#b294bb' + # cyan: '#8abeb7' + # white: '#c5c8c6' + + # Bright colors + #bright: + # black: '#666666' + # red: '#d54e53' + # green: '#b9ca4a' + # yellow: '#e7c547' + # blue: '#7aa6da' + # magenta: '#c397d8' + # cyan: '#70c0b1' + # white: '#eaeaea' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#131415' + # red: '#864343' + # green: '#777c44' + # yellow: '#9e824c' + # blue: '#556a7d' + # magenta: '#75617b' + # cyan: '#5b7d78' + # white: '#828482' + + # 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: '#ff00ff' }` + # + #indexed_colors: [] + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +# 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: 1.0 + +#selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +cursor: + style: + shape: Beam +#cursor: + # Cursor style + #style: + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + #shape: Block + + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + #blinking: Off + + # Vi mode cursor style + # + # If the vi mode cursor style is `None` or not specified, it will fall back to + # the style of the active value of the normal cursor. + # + # See `cursor.style` for available options. + #vi_mode_style: None + + # Cursor blinking interval in milliseconds. + #blink_interval: 750 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + + # Thickness of the cursor relative to the cell width as floating point number + # from `0.0` to `1.0`. + #thickness: 0.15 + +# 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/zsh + 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 + +# 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 + +# Regex hints +# +# Terminal hints can be used to find text in the visible part of the terminal +# and pipe it to other applications. +#hints: + # Keys used for the hint labels. + #alphabet: "jfkdls;ahgurieowpq" + + # List with all available hints + # + # Each hint must have a `regex` and either an `action` or a `command` field. + # The fields `mouse`, `binding` and `post_processing` are optional. + # + # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and + # `mouse.mods` accept the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. + # + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs. + # + # Values for `action`: + # - Copy + # Copy the hint's text to the clipboard. + # - Paste + # Paste the hint's text to the terminal or search. + # - Select + # Select the hint's text. + # - MoveViModeCursor + # Move the vi mode cursor to the beginning of the hint. + #enabled: + # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + # command: xdg-open + # post_processing: true + # mouse: + # enabled: true + # mods: None + # binding: + # key: U + # mods: Control|Shift + +# 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 +# +# - ToggleViMode +# - SearchForward +# Start searching toward the right of the search origin. +# - SearchBackward +# Start searching toward the left of the search origin. +# - Copy +# - Paste +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollHalfPageUp +# - ScrollHalfPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# Remove the terminal's scrollback history. +# - Hide +# Hide the Alacritty window. +# - Minimize +# Minimize the Alacritty window. +# - Quit +# Quit Alacritty. +# - ToggleFullscreen +# - SpawnNewInstance +# Spawn a new instance of Alacritty. +# - ClearLogNotice +# Clear Alacritty's UI warning and error notice. +# - ClearSelection +# Remove the active selection. +# - ReceiveChar +# - None +# +# - Vi mode exclusive actions: +# +# - Open +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. +# - ToggleNormalSelection +# - ToggleLineSelection +# - ToggleBlockSelection +# - ToggleSemanticSelection +# Toggle semantic selection based on `selection.semantic_escape_chars`. +# +# - Vi mode exclusive cursor motion actions: +# +# - Up +# One line up. +# - Down +# One line down. +# - Left +# One character left. +# - Right +# One character right. +# - First +# First column, or beginning of the line when already at the first column. +# - Last +# Last column, or beginning of the line when already at the last column. +# - FirstOccupied +# First non-empty cell in this terminal row, or first non-empty cell of +# the line when already at the first cell of the row. +# - High +# Top of the screen. +# - Middle +# Center of the screen. +# - Low +# Bottom of the screen. +# - SemanticLeft +# Start of the previous semantically separated word. +# - SemanticRight +# Start of the next semantically separated word. +# - SemanticLeftEnd +# End of the previous semantically separated word. +# - SemanticRightEnd +# End of the next semantically separated word. +# - WordLeft +# Start of the previous whitespace separated word. +# - WordRight +# Start of the next whitespace separated word. +# - WordLeftEnd +# End of the previous whitespace separated word. +# - WordRightEnd +# End of the next whitespace separated word. +# - Bracket +# Character matching the bracket at the cursor's location. +# - SearchNext +# Beginning of the next match. +# - SearchPrevious +# Beginning of the previous match. +# - SearchStart +# Start of the match to the left of the vi mode cursor. +# - SearchEnd +# End of the match to the right of the vi mode cursor. +# +# - Search mode exclusive actions: +# - SearchFocusNext +# Move the focus to the next search match. +# - SearchFocusPrevious +# Move the focus to the previous search match. +# - SearchConfirm +# - SearchCancel +# - SearchClear +# Reset the search regex. +# - SearchDeleteWord +# Delete the last word in the search regex. +# - SearchHistoryPrevious +# Go to the previous regex in the search history. +# - SearchHistoryNext +# Go to the next regex in the search history. +# +# - macOS exclusive actions: +# - ToggleSimpleFullscreen +# Enter fullscreen without occupying another space. +# +# - Linux/BSD exclusive actions: +# +# - CopySelection +# Copy from the selection buffer. +# - PasteSelection +# Paste from the selection buffer. +# +# - `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 +# - Search +# - Alt +# - Vi +# +# 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 +# in the order they were defined in. +key_bindings: + - { key: N, mods: Control|Shift, action: SpawnNewInstance } + # - { key: Left, mods: Control, chars: "\x1bb" } # Skip word left + # - { key: Right, mods: Control, chars: "\x1bf" } # Skip word right + # - { key: Back, mods: Shift, chars: "\x15" } # Delete line + - { key: Back, mods: Control, chars: "\x1b\x7f" } # Delete word + +#key_bindings: + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, } + #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } + #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, } + #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + + # Vi Mode + #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } + #- { key: Escape, mode: Vi|~Search, action: ClearSelection } + #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } + #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } + #- { key: G, mode: Vi|~Search, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi|~Search, action: Copy } + #- { key: Y, mode: Vi|~Search, action: ClearSelection } + #- { key: Copy, mode: Vi|~Search, action: ClearSelection } + #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi|~Search, action: Open } + #- { key: K, mode: Vi|~Search, action: Up } + #- { key: J, mode: Vi|~Search, action: Down } + #- { key: H, mode: Vi|~Search, action: Left } + #- { key: L, mode: Vi|~Search, action: Right } + #- { key: Up, mode: Vi|~Search, action: Up } + #- { key: Down, mode: Vi|~Search, action: Down } + #- { key: Left, mode: Vi|~Search, action: Left } + #- { key: Right, mode: Vi|~Search, action: Right } + #- { key: Key0, mode: Vi|~Search, action: First } + #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } + #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi|~Search, action: High } + #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } + #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } + #- { key: B, mode: Vi|~Search, action: SemanticLeft } + #- { key: W, mode: Vi|~Search, action: SemanticRight } + #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } + #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } + #- { key: Slash, mode: Vi|~Search, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } + #- { key: N, mode: Vi|~Search, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + + # Search Mode + #- { key: Return, mode: Search|Vi, action: SearchConfirm } + #- { key: Escape, mode: Search, action: SearchCancel } + #- { key: C, mods: Control, mode: Search, action: SearchCancel } + #- { key: U, mods: Control, mode: Search, action: SearchClear } + #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } + #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } + #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } + #- { key: Up, mode: Search, action: SearchHistoryPrevious } + #- { key: Down, mode: Search, action: SearchHistoryNext } + #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } + #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } + #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Plus, mods: Control, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + +#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`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false diff --git a/.config/alacritty/argonaut.yml b/.config/alacritty/argonaut.yml new file mode 100644 index 0000000..1a7c386 --- /dev/null +++ b/.config/alacritty/argonaut.yml @@ -0,0 +1,32 @@ +colors: + # Default colors + primary: + background: '#292C3E' + foreground: '#EBEBEB' + + # Cursor colors + cursor: + text: '#FF261E' + cursor: '#FF261E' + + # Normal colors + normal: + black: '#0d0d0d' + red: '#FF301B' + green: '#A0E521' + yellow: '#FFC620' + blue: '#1BA6FA' + magenta: '#8763B8' + cyan: '#21DEEF' + white: '#EBEBEB' + + # Bright colors + bright: + black: '#6D7070' + red: '#FF4352' + green: '#B8E466' + yellow: '#FFD750' + blue: '#1BA6FA' + magenta: '#A578EA' + cyan: '#73FBF1' + white: '#FEFEF8' diff --git a/.config/alacritty/bloodmoon.yml b/.config/alacritty/bloodmoon.yml new file mode 100644 index 0000000..2ca9bf4 --- /dev/null +++ b/.config/alacritty/bloodmoon.yml @@ -0,0 +1,28 @@ +# Colors (Blood Moon) +colors: + # Default colors + primary: + background: '#10100E' + foreground: '#C6C6C4' + + # Normal colors + normal: + black: '#10100E' + red: '#C40233' + green: '#009F6B' + yellow: '#FFD700' + blue: '#0087BD' + magenta: '#9A4EAE' + cyan: '#20B2AA' + white: '#C6C6C4' + + # Bright colors + bright: + black: '#696969' + red: '#FF2400' + green: '#03C03C' + yellow: '#FDFF00' + blue: '#007FFF' + magenta: '#FF1493' + cyan: '#00CCCC' + white: '#FFFAFA' diff --git a/.config/alacritty/dracula.yml b/.config/alacritty/dracula.yml new file mode 100644 index 0000000..afafffa --- /dev/null +++ b/.config/alacritty/dracula.yml @@ -0,0 +1,61 @@ +# Dracula theme for Alacritty +# https://draculatheme.com/alacritty +# +# Color palette +# https://spec.draculatheme.com +# +# Template +# https://github.com/alacritty/alacritty/blob/master/alacritty.yml + +colors: + primary: + background: '#282a36' + foreground: '#f8f8f2' + bright_foreground: '#ffffff' + cursor: + text: CellBackground + cursor: CellForeground + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + search: + matches: + foreground: '#44475a' + background: '#50fa7b' + focused_match: + foreground: '#44475a' + background: '#ffb86c' + bar: + background: '#282a36' + foreground: '#f8f8f2' + hints: + start: + foreground: '#282a36' + background: '#f1fa8c' + end: + foreground: '#f1fa8c' + background: '#282a36' + line_indicator: + foreground: None + background: None + selection: + text: CellForeground + background: '#44475a' + normal: + black: '#21222c' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#bd93f9' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#f8f8f2' + bright: + black: '#6272a4' + red: '#ff6e6e' + green: '#69ff94' + yellow: '#ffffa5' + blue: '#d6acff' + magenta: '#ff92df' + cyan: '#a4ffff' + white: '#ffffff' diff --git a/.config/alacritty/spacemacs.yml b/.config/alacritty/spacemacs.yml new file mode 100644 index 0000000..0d8b7bd --- /dev/null +++ b/.config/alacritty/spacemacs.yml @@ -0,0 +1,42 @@ +# Base16 Spacemacs 256 - alacritty color config +# Nasser Alshammari (https://github.com/nashamri/spacemacs-theme) +colors: + # Default colors + primary: + background: '0x1f2022' + foreground: '0xa3a3a3' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '0x1f2022' + cursor: '0xa3a3a3' + + # Normal colors + normal: + black: '0x1f2022' + red: '0xf2241f' + green: '0x67b11d' + yellow: '0xb1951d' + blue: '0x4f97d7' + magenta: '0xa31db1' + cyan: '0x2d9574' + white: '0xa3a3a3' + + # Bright colors + bright: + black: '0x585858' + red: '0xf2241f' + green: '0x67b11d' + yellow: '0xb1951d' + blue: '0x4f97d7' + magenta: '0xa31db1' + cyan: '0x2d9574' + white: '0xf8f8f8' + + indexed_colors: + - { index: 16, color: '0xffa500' } + - { index: 17, color: '0xb03060' } + - { index: 18, color: '0x282828' } + - { index: 19, color: '0x444155' } + - { index: 20, color: '0xb8b8b8' } + - { index: 21, color: '0xe8e8e8' } diff --git a/.config/doom/config.el b/.config/doom/config.el new file mode 100644 index 0000000..3770abd --- /dev/null +++ b/.config/doom/config.el @@ -0,0 +1,325 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + +(require 'site-gentoo) +(require-theme 'spacemacs-theme) + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. It is optional. +;; (load-theme 'spamcemacs-dark t) +;; (use-package spacemacs-theme +;; :config +;; (load-theme 'spacemacs-dark t)) +(setq user-full-name (getenv "CONFIG_FULL_NAME") + user-mail-address (getenv "CONFIG_EMAIL_ADDRESS")) + +(setq doom-font (font-spec :family "JetBrains Mono Nerd Font" :size 14 :weight 'semibold) + doom-big-font (font-spec :family "JetBrains Mono Nerd Font" :size 28 :weight 'bold) + doom-serif-font (font-spec :family "JetBrains Mono Nerd Font" :size 14 :weight 'bold)) +;; (setq doom-font "JetBrains Mono Nerd Font") +;; Doom exposes five (optional) variables for controlling fonts in Doom: +;; +;; - `doom-font' -- the primary font to use +;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable) +;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; - `doom-unicode-font' -- for unicode glyphs +;; - `doom-serif-font' -- for the `fixed-pitch-serif' face +;; +;; See 'C-h v doom-font' for documentation and more examples of what they +;; accept. For example: +;; +;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) +;; +;; If you or Emacs can't find your font, use 'M-x describe-font' to look them +;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to +;; refresh your font settings. If Emacs still can't find your font, it likely +;; wasn't installed correctly. Font issues are rarely Doom issues! + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'spacemacs-dark) +;; (use-package spacemacs-theme-dark +;; :ensure t +;; :config +;; (load-theme 'spacemacs-dark-theme t)) +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") +(setq projectile-project-search-path '("~/Projects/")) + +;; Whenever you reconfigure a package, make sure to wrap your config in an +;; `after!' block, otherwise Doom's defaults may override your settings. E.g. +;; +;; (after! PACKAGE +;; (setq x y)) +;; +;; The exceptions to this rule: +;; +;; - Setting file/directory variables (like `org-directory') +;; - Setting variables which explicitly tell you to set them before their +;; package is loaded (see 'C-h v VARIABLE' to look up their documentation). +;; - Setting doom variables (which start with 'doom-' or '+'). +;; +;; Here are some additional functions/macros that will help you configure Doom. +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces, +;; etc). +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. +(require 'ansi-color) +(require 'dap-cpptools) +(require 'helm-make) +;; Indenting, formatting, etc +;; Universal (all langs) +(map! :leader + :desc "Comment/Uncomment" + "/" #'comment-line) +(map! :leader + :desc "Search project for text" + "s /" #'+default/search-project) +(with-eval-after-load 'evil + (map! + (:prefix "g" + :desc "New line after comment block" :n "o" #'+default/newline-below))) +(with-eval-after-load 'evil + (map! + (:prefix "g" + :desc "New line after comment block" :n "O" #'+default/newline-above))) +;; C/C++ +(c-add-style "penguin" + '("stroustrup" + (c-offsets-alist + (innamespace . -) + (inline-open . 0) + (inher-cont . c-lineup-multi-inher) + (arglist-cont-nonempty . +) + (template-args-cont . +)))) + +(defun penguin-c-hook() + (setq +format-with-lsp nil) + (map! + :leader + :prefix "p" + :desc "Compile project" :n "c" #'helm-make-projectile) + (map! + :leader + :prefix "c" + :desc "Compile project" :n "c" #'helm-make-projectile) + (map! + :leader + :prefix "c" + :desc "List project errors" :n "x" #'lsp-treemacs-errors-list) + (c-set-style "penguin") + (c-set-offset 'case-label '+) + (c-set-offset 'arglist-intro '+) + (setq lsp-headerline-breadcrumb-enable 't)) +(add-hook 'c-mode-hook 'penguin-c-hook) +(add-hook 'c++-mode-hook 'penguin-c-hook) +(add-hook 'after-change-major-mode-hook + (lambda () + (modify-syntax-entry ?_ "w"))) + +;; Markdown +(add-hook 'text-mode-hook + #'(lambda () + (setq indent-tabs-mode nil) + (setq tab-width 4))) +;; Rust +(after! rustic + (setq lsp-rust-server 'rust-analyzer)) +(setq lsp-rust-analyzer-cargo-watch-command "clippy") +(setq lsp-eldoc-render-all t) +(setq lsp-idle-delay 0.6) +(setq lsp-rust-analyzer-server-display-inlay-hints t) +(setq lsp-rust-analyzer-display-lifetime-elision-hints-enable "skip_trivial") +(setq lsp-rust-analyzer-display-chaining-hints t) +(setq lsp-rust-analyzer-display-lifetime-elision-hints-use-parameter-names nil) +(setq lsp-rust-analyzer-display-closure-return-type-hints t) +(setq lsp-rust-analyzer-display-parameter-hints nil) +(setq lsp-rust-analyzer-display-reborrow-hints nil) + +(setq dap-auto-configure-mode t) +(map! :map dap-mode-map + :leader + :prefix ("d" . "dap") + ;; basics + :desc "dap next" "n" #'dap-next + :desc "dap step in" "i" #'dap-step-in + :desc "dap step out" "o" #'dap-step-out + :desc "dap continue" "c" #'dap-continue + :desc "dap hydra" "h" #'dap-hydra + :desc "dap debug restart" "r" #'dap-debug-restart + :desc "dap debug" "s" #'dap-debug + + ;; debug + :prefix ("dd" . "Debug") + :desc "dap debug recent" "r" #'dap-debug-recent + :desc "dap debug last" "l" #'dap-debug-last + + ;; eval + :prefix ("de" . "Eval") + :desc "eval" "e" #'dap-eval + :desc "eval region" "r" #'dap-eval-region + :desc "eval thing at point" "s" #'dap-eval-thing-at-point + :desc "add expression" "a" #'dap-ui-expressions-add + :desc "remove expression" "d" #'dap-ui-expressions-remove + + :prefix ("db" . "Breakpoint") + :desc "dap breakpoint toggle" "b" #'dap-breakpoint-toggle + :desc "dap breakpoint condition" "c" #'dap-breakpoint-condition + :desc "dap breakpoint hit count" "h" #'dap-breakpoint-hit-condition + :desc "dap breakpoint log message" "l" #'dap-breakpoint-log-message) + +(after! org + (setq org-todo-keywords + '((sequence "TODO(t)" "PROJ(p)" "BLOCKED(b)" "WIP(w)" "|" "KILL(k)" "DONE(d)")))) + +(setq x-super-keysym 'meta) +(defhydra doom-window-resize-hydra (:hint nil) + " + _k_ increase height __ increase height +_h_ decrease width _l_ increase width __ decrease width __ increase width + _j_ decrease height __ decrease height + S-arrow key to shift by 5 +" + ("h" evil-window-decrease-width) + ("j" evil-window-increase-height) + ("k" evil-window-decrease-height) + ("l" evil-window-increase-width) + ("" evil-window-decrease-width) + ("" evil-window-increase-height) + ("" evil-window-decrease-height) + ("" evil-window-increase-width) + ("" (evil-window-decrease-width 20)) + ("" (evil-window-increase-height 20)) + ("" (evil-window-decrease-height 20)) + ("" (evil-window-increase-width 20)) + + ("q" nil)) +(map! + (:leader + :prefix "w" + :desc "Hydra resize" :n "SPC" #'doom-window-resize-hydra/body)) +;; (map! :leader +;; "f p" nil +;; "f P" nil) +(map! + :leader + :prefix "f" + :desc "Open doom config" "p" #'doom/open-private-config) +(setq evil-split-window-below t) + + +(defun penguin-helm-posframe-size-function () + "The default functon used by `helm-posframe-size-function'." + (list + :width (/ (frame-width) 2) + :height (or helm-posframe-height helm-display-buffer-height) + :min-height (or helm-posframe-min-height + (let ((height (+ helm-display-buffer-height 1))) + (min height (or helm-posframe-height height)))) + :min-width (or helm-posframe-min-width + (let ((width (round (* (frame-width) 0.62)))) + (min width (or helm-posframe-width width)))))) + +(setq helm-posframe-size-function #'penguin-helm-posframe-size-function) +(defun penguin-reload-dir-locals-for-current-buffer () + "reload dir locals for the current buffer" + (interactive) + (let ((enable-local-variables :all)) + (hack-dir-local-variables-non-file-buffer))) +(defun penguin-reload-dir-locals-for-all-buffer-in-this-directory () + "For every buffer with the same `default-directory` as the +current buffer's, reload dir-locals." + (interactive) + (let ((dir default-directory)) + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (when (equal default-directory dir) + (penguin-reload-dir-locals-for-current-buffer)))))) +;; fix compilation buffer error which wouldn't let me jump to errors +(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter) +(setq-default evil-kill-on-visual-paste nil) +(setq lsp-treemacs-sync-mode 1) +(defun apply-lang-settings-to-open-buffers () + "Apply C++ mode settings to open buffers." + (interactive) + (dolist (buffer (buffer-list)) + (with-current-buffer buffer + (when (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) + (penguin-c-hook))))) +(add-hook! 'doom-after-reload-hook #'apply-lang-settings-to-open-buffers) + +(setq org-noter-notes-search-path '("~/Documents/notes/")) +;; (setq lsp-clangd-binary-path '("/usr/bin/clangd")) +(defun wvxvw/export-rel-url (path desc format) + (cl-case format + (html (format "%s" path (or desc path))) + (latex (format "\\href{%s}{%s}" path (or desc path))) + (otherwise path))) + +(eval-after-load "org" + '(org-link-set-parameters "rel" :follow #'browse-url :export #'wvxvw/export-rel-url)) + + +(setq projectile-enable-caching nil) +(setq find-file-hook nil) + +;; kill company completion +(with-eval-after-load 'company + (define-key company-active-map (kbd "C-k") 'company-abort)) + +(after! org + (setq org-agenda-files + '("~/Documents/notes/agendas"))) + +(after! company + (set-company-backend! + 'emacs-lisp-mode + '(:separate + company-capf company-files)) + (set-company-backend! + 'sh-mode + '(:separate + company-capf company-shell company-files)) + (set-company-backend! + 'org-mode + '(:separate + company-dabbrev company-yasnippet company-ispell company-files))) + + +(map! + (:leader + :prefix "o" + :desc "Calendar" :n "c" #'cfw:open-org-calendar)) +(add-hook 'calendar-load-hook + (lambda () + (calendar-set-date-style 'american))) + +(setq calendar-holidays + (append holiday-general-holidays holiday-local-holidays + holiday-other-holidays + holiday-solar-holidays)) + +(setq calendar-christian-all-holidays-flag 't) diff --git a/.config/doom/init.el b/.config/doom/init.el new file mode 100644 index 0000000..32f9c04 --- /dev/null +++ b/.config/doom/init.el @@ -0,0 +1,194 @@ +;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a link to Doom's Module Index where all +;; of our modules are listed, including what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;bidi ; (tfel ot) thgir etirw uoy gnipleh + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + (helm +childframe +fuzzy +icons) ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;; ivy ; a search engine for love and life + ;;vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + ;;neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +all +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + ;;unicode ; extended unicode support for various languages + (vc-gutter +pretty) ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + ;;window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +all) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + ;;multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + ;;word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + (vterm +toggle) ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + ;;(spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + (debugger +lsp) ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + lsp ; M-x vscode + magit ; a git porcelain for Emacs + make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + ;;rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + tree-sitter ; syntax and parsing, sitting in a tree... + upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + ;;tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + (cc +lsp +tree-sitter) ; C > C++ == 1 + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(graphql +lsp) ; Give queries a REST + ;;(haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + ;;json ; At least it ain't XML + ;;(java +lsp) ; the poster child for carpal tunnel syndrome + ;;javascript ; all(hope(abandon(ye(who(enter(here)))))) + julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + ;;latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + ;;nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +dragndrop +pandoc) ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + ;;web ; the tubes + ;;yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + ;;(mu4e +org +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/.config/doom/packages.el b/.config/doom/packages.el new file mode 100644 index 0000000..f0a1de2 --- /dev/null +++ b/.config/doom/packages.el @@ -0,0 +1,55 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/radian-software/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see radian-software/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;(package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;(unpin! pinned-package) +;; ...or multiple packages +;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;(unpin! t) +(package! helm-icons) +(package! helm-company) +(package! helm-make) +(package! impatient-mode) +;; (package! spacemacs-theme) diff --git a/.config/doom/splash-images/doomEmacsDracula.png b/.config/doom/splash-images/doomEmacsDracula.png new file mode 100644 index 0000000..3221452 Binary files /dev/null and b/.config/doom/splash-images/doomEmacsDracula.png differ diff --git a/.config/doom/splash-images/doomEmacsDracula.svg b/.config/doom/splash-images/doomEmacsDracula.svg new file mode 100644 index 0000000..58fc991 --- /dev/null +++ b/.config/doom/splash-images/doomEmacsDracula.svg @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.config/doom/splash-images/epenguin-head.png b/.config/doom/splash-images/epenguin-head.png new file mode 100755 index 0000000..8a077cb Binary files /dev/null and b/.config/doom/splash-images/epenguin-head.png differ diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..6827e94 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,428 @@ +# General format of my i3 configuration file +# Uses colors from .Xresources to color windowborders + + +# i3 config file (v4) +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +# Set mod key (Mod1=, Mod4=) +set $mod Mod1 + +# set default desktop layout (default is tiling) +# workspace_layout tabbed + +# Configure border style +for_window [class=".*"] border pixel 1 +default_border pixel 1 + +# gaps top 100 +# gaps bottom 100 +# Hide borders +hide_edge_borders none + +# change borders +bindsym $mod+u border toggle + + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:JetBrains Nerd Font Mono 10, Jet Brains Nerd Font Mono 10 + +# Use Mouse+$mod to drag floating windows +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec --no-startup-id alacritty + +# kill focused window +bindsym $mod+Shift+q kill + +# start program launcher +#bindsym $mod+d exec --no-startup-id dmenu_recency +bindsym $mod+d exec --no-startup-id rofi -run-list-command ". ~/.bash_alises" -run-command "/bin/bash -i -c '{cmd}'" -show run +# launch categorized menu +bindsym $mod+z exec --no-startup-id morc_menu + +################################################################################################ +## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ## +################################################################################################ + +exec --no-startup-id volumeicon +# bindsym $mod+Ctrl+m exec terminal -e 'alsamixer' +#exec --no-startup-id pa-applet +bindsym $mod+Ctrl+m exec pavucontrol + +################################################################################################ + +# Screen brightness controls +# bindsym XF86MonBrightnessUp exec "xbacklight -inc 10; notify-send 'brightness up'" +# bindsym XF86MonBrightnessDown exec "xbacklight -dec 10; notify-send 'brightness down'" + +# Start Applications +bindsym $mod+Ctrl+b exec terminal -e 'bmenu' +bindsym $mod+F2 exec palemoon +bindsym $mod+F3 exec pcmanfm +# bindsym $mod+F3 exec ranger +bindsym $mod+Shift+F3 exec gksu pcmanfm +bindsym $mod+F5 exec terminal -e 'mocp' +bindsym $mod+t exec --no-startup-id pkill picom +bindsym $mod+Ctrl+t exec --no-startup-id picom -b +bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'" + +# Screenshots +bindsym Print exec --no-startup-id maim "/home/$USER/Pictures/Screenshots/$(date).png" +bindsym $mod+Print exec --no-startup-id maim --window $(xdotool getactivewindow) "/home/$USER/Pictures/Screenshots/$(date).png" +bindsym Shift+Print exec --no-startup-id maim --select "/home/$USER/Pictures/Screenshots/$(date).png" +bindsym $mod+Ctrl+x --release exec --no-startup-id xkill + +focus_follows_mouse no + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+odiaeresis focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+odiaeresis move right + +# alternatively, you can use the cursor 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 + +# workspace back and forth (with/without active container) +workspace_auto_back_and_forth yes +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +# split orientation +bindsym $mod+h split h +bindsym $mod+v split v +bindsym $mod+q split toggle + +# toggle fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# change focus between tiling / floating windows +bindsym $mod+space floating toggle + +# toggle sticky +bindsym $mod+Shift+s sticky toggle + +# focus the parent container +bindsym $mod+a focus parent + +# move the currently focused window to the scratchpad +bindsym $mod+Ctrl+plus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+Ctrl+minus scratchpad show + +#navigate workspaces next / previous +bindsym $mod+Ctrl+Right workspace next +bindsym $mod+Ctrl+Left workspace prev + +# Workspace names +# to display names or symbols instead of plain workspace numbers you can use +# something like: set $ws1 1:mail +# set $ws2 2: +# This is actually done in my polybar config + +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 + +# Move focused container to workspace +bindsym $mod+Ctrl+1 move container to workspace $ws1 +bindsym $mod+Ctrl+2 move container to workspace $ws2 +bindsym $mod+Ctrl+3 move container to workspace $ws3 +bindsym $mod+Ctrl+4 move container to workspace $ws4 +bindsym $mod+Ctrl+5 move container to workspace $ws5 +bindsym $mod+Ctrl+6 move container to workspace $ws6 +bindsym $mod+Ctrl+7 move container to workspace $ws7 +bindsym $mod+Ctrl+8 move container to workspace $ws8 +bindsym $mod+Ctrl+9 move container to workspace $ws9 + +# Move to workspace with focused container +bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 + +# Open applications on specific workspaces +# assign [class="Thunderbird"] $ws1 +# assign [class="Pale moon"] $ws2 +# assign [class="Pcmanfm"] $ws3 +# assign [class="Skype"] $ws5 + +# Open specific applications in floating mode +# for_window [title="alsamixer"] floating enable border pixel 1 +# for_window [class="Calamares"] floating enable border normal +# for_window [class="Clipgrab"] floating enable +# for_window [title="File Transfer*"] floating enable +# for_window [class="Galculator"] floating enable border pixel 1 +# for_window [class="GParted"] floating enable border normal +# for_window [title="i3_help"] floating enable sticky enable border normal +# for_window [class="Lightdm-gtk-greeter-settings"] floating enable +# for_window [class="Lxappearance"] floating enable sticky enable border normal +# for_window [class="Manjaro Settings Manager"] floating enable border normal +# for_window [class="Manjaro Welcome"] floating enable +# for_window [title="MuseScore: Play Panel"] floating enable +# for_window [class="Nitrogen"] floating enable sticky enable border normal +# for_window [class="Oblogout"] fullscreen enable +# for_window [class="octopi"] floating enable +# for_window [class="Pamac-manager"] floating enable +# for_window [class="Pavucontrol"] floating enable +# for_window [class="qt5ct"] floating enable sticky enable border normal +# for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal +# for_window [class="Simple-scan"] floating enable border normal +# for_window [class="(?i)System-config-printer.py"] floating enable border normal +# for_window [class="Skype"] floating enable border normal +# for_window [class="Thus"] floating enable border normal +# for_window [class="Timeset-gui"] floating enable border normal +# for_window [class="(?i)virtualbox"] floating enable border normal +# for_window [class="Xfburn"] floating enable +# for_window [class="Firefox"] floating enable border none +# for_window [class="discord"] floating enable border none +# for_window [class="skypeforlinux"] floating enable border none +# switch to workspace with urgent window automatically +for_window [urgent=latest] focus + +# reload the configuration file +bindsym $mod+Shift+c reload + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart + +# exit i3 (logs you out of your X session) +# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# Set shut down, restart and locking features +bindsym $mod+0 mode "$mode_system" +set $mode_system (e)xit, (s)uspend, (h)ibernate, (l)ock, switch_(u)ser, (r)eboot, (Shift+s)hutdown +mode "$mode_system" { + bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym s exec --no-startup-id i3exit suspend, mode "default" + bindsym u exec --no-startup-id i3exit switch_user, mode "default" + bindsym e exec --no-startup-id i3exit logout, mode "default" + bindsym h exec --no-startup-id i3exit hibernate, mode "default" + bindsym r exec --no-startup-id i3exit reboot, mode "default" + bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default" + + # exit system mode: "Enter" or "Escape" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# using plasma's logout screen instead of i3's +bindsym $mod+Shift+e exec --no-startup-id xfce4-session-logout + +# Resize window (you can also use the mouse for that) +bindsym $mod+r mode "resize" +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 5 px or 5 ppt + bindsym k resize grow height 5 px or 5 ppt + bindsym l resize shrink height 5 px or 5 ppt + bindsym semicolon resize grow width 5 px or 5 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 16 px or 16 ppt + bindsym Down resize grow height 16 px or 16 ppt + bindsym Up resize shrink height 16 px or 16 ppt + bindsym Right resize grow width 16 px or 16 ppt + + # exit resize mode: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# Lock screen +# bindsym $mod+9 exec --no-startup-id blurlock + +# Autostart applications +#exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +# exec --no-startup-id nm-applet +#exec --no-startup-id xfce4-power-manager +# exec --no-startup-id pamac-tray +# exec --no-startup-id clipit +#exec --no-startup-id blueman-applet +# exec_always --no-startup-id sbxkb +# exec --no-startup-id start_conky_maia +# exec --no-startup-id start_conky_green +#exec --no-startup-id xautolock -time 30 -locker blurlock +exec_always --no-startup-id fix_xcursor + +# Colors set from ~/.Xresources +set_from_resource $background background +set_from_resource $foreground foreground +set_from_resource $color0 color0 +set_from_resource $color1 color1 +set_from_resource $color2 color2 +set_from_resource $color3 color3 +set_from_resource $color4 color4 +set_from_resource $color5 color5 +set_from_resource $color6 color6 +set_from_resource $color7 color7 +set_from_resource $color8 color8 +set_from_resource $color9 color9 +set_from_resource $color10 color10 +set_from_resource $color11 color11 +set_from_resource $color12 color12 +set_from_resource $color13 color13 +set_from_resource $color14 color14 +set_from_resource $color15 color15 +exec i3 --shmlog-size=26214400 +exec_always --no-startup-id $HOME/.screenlayout/default.sh +exec_always --no-startup-id $HOME/.config/polybar/launch.sh +# bar { +# tray_output primary +# tray_padding 3 +# font pango:Hack Nerd Font Mono 11, FontAwesome 11 +# position top +# status_command $HOME/.cargo/bin/i3status-rs +# colors { +# separator #666666 +# background #222222 +# statusline #dddddd +# focused_workspace #E6E6E6 #44475A #F8F8F2 +# active_workspace #282A36 #44475A #F8F8F2 +# inactive_workspace #282A36 #282A36 #BFBFBF +# urgent_workspace #FF5555 #FF5555 #F8F8F2 +# binding_mode #FF5555 #FF5555 #F8F8F2 +# } +# } + + + +# colors { +# separator #666666 +# background #222222 +# statusline #dddddd +# focused_workspace #0088CC #0088CC #ffffff +# active_workspace #333333 #333333 #ffffff +# inactive_workspace #333333 #333333 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# } +# } + + +# hide/unhide i3status bar +#bindsym $mod+m bar mode toggle + +# Theme colors +# class border backgr. text indic. child_border +# My colors +client.background $background + +# client.focused $foreground $background $foreground $background #A4A4A4 +client.focused $foreground $background $foreground $background #FFFFFF +client.unfocused $foreground $background $foreground $background #878787 +client.focused_inactive $foreground $background $foreground $background #878787 +client.urgent $foreground $background $foreground $background $background +client.placeholder $foreground $background $foreground $background $background + + +############################# +### settings for i3-gaps: ### +############################# + +# increase inner gaps +bindsym $mod+plus gaps inner all plus 2 +# decrease inner gaps +bindsym $mod+minus gaps inner all minus 2 +# increase outer gaps +bindsym $mod+Shift+plus gaps outer all plus 2 +# increase outer gaps +bindsym $mod+Shift+minus gaps outer all minus 2 + +# Set inner/outer gaps +gaps inner 24 +gaps outer 0 + +# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size. +# gaps inner|outer current|all set|plus|minus +# gaps inner all set 10 +# gaps outer all plus 5 + +# Smart gaps (gaps used if only more than one container on the workspace) +# smart_gaps on + + +# for_window [class=^.*] floating enable +bindsym $mod+x move workspace to output right +# Pulse Audio Controls +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% # Increase +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% # Decrease +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # Mute + +# Plasma compatibility improvements +for_window [window_role="pop-up"] floating enable +for_window [window_role="task_dialog"] floating enable + +for_window [class="systemsettings"] floating enable +for_window [class="plasmashell"] floating enable; +for_window [class="Plasma"] floating enable; border none +for_window [title="plasma-desktop"] floating enable; border none +for_window [class="krunner"] floating enable; border none +for_window [class="Kmix"] floating enable; border none +for_window [class="Klipper"] floating enable; border none +for_window [class="Plasmoidviewer"] floating enable; border none +for_window [class="matplotlib"] floating enable; border none +for_window [class="plasmashell" window_type="notification"] border none, move right 700px, move down 450px +no_focus [class="plasmashell" window_type="notification"] + +for_window [title="Desktop — Plasma"] kill; floating enable; border none + +exec --no-startup-id flameshot +exec --no-startup-id nitrogen --restore; sleep 1; +exec_always --no-startup-id picom +bindsym $mod+n exec nitrogen --restore +bindsym $mod+m exec $HOME/.screenlayout/default.sh +bindsym $mod+Shift+p exec --no-startup-id $HOME/.config/polybar/launch.sh +exec --no-startup-id xsettingsd + +gaps top 50 diff --git a/.config/i3status-rust/config.toml b/.config/i3status-rust/config.toml new file mode 100644 index 0000000..55077e5 --- /dev/null +++ b/.config/i3status-rust/config.toml @@ -0,0 +1,44 @@ +icons_format = "{icon}" + +[theme] +theme = "native" +[icons] +icons = "material-nf" +[[block]] +block = "focused_window" +[block.format] +full = " $title.str(max_w:64) |" + +[[block]] +block = "disk_space" +path = "/" +info_type = "available" +alert_unit = "GB" +interval = 20 +warning = 20.0 +alert = 10.0 +format = "$icon $available" + +[[block]] +block = "memory" +format = "$icon $mem_used.eng(w:2) / $mem_total" +format_alt = "$icon $swap_used_percents" + +[[block]] +block = "cpu" +interval = 1 +format = "$barchart $utilization $frequency" + + +[[block]] +block = "time" +interval = 60 +[block.format] +full = " $icon $timestamp.datetime(f:'%a %m-%d-%y %I:%M %p', l:en_US)" + +[[block]] +block = "temperature" +interval = 5 +format = "$average " +chip = "k10temp-pci-00c3" +inputs = ["Tctl"] diff --git a/.config/i3status-rust/icons/awesome.toml b/.config/i3status-rust/icons/awesome.toml new file mode 100644 index 0000000..4c0bd4a --- /dev/null +++ b/.config/i3status-rust/icons/awesome.toml @@ -0,0 +1,98 @@ +# FontAwesome 4: https://fontawesome.com/v4.7.0/cheatsheet/ +backlight_empty = "\U0001f315" +backlight_full = "\U0001f311" +backlight_1 = "\U0001f314" +backlight_2 = "\U0001f314" +backlight_3 = "\U0001f314" +backlight_4 = "\U0001f314" +backlight_5 = "\U0001f313" +backlight_6 = "\U0001f313" +backlight_7 = "\U0001f313" +backlight_8 = "\U0001f313" +backlight_9 = "\U0001f313" +backlight_10 = "\U0001f312" +backlight_11 = "\U0001f312" +backlight_12 = "\U0001f312" +backlight_13 = "\U0001f312" +bat_charging = "\uf1e6" # fa-plug +bat_discharging = "\uf242" # fa-battery-half +bat_empty = "\uf244" # fa-battery-empty TODO remove on next release +bat_10 = "\uf244" # fa-battery-empty +bat_20 = "\uf243" # fa-battery-quarter +bat_30 = "\uf243" # fa-battery-quarter +bat_40 = "\uf243" # fa-battery-quarter +bat_50 = "\uf242" # fa-battery-half +bat_60 = "\uf242" # fa-battery-half +bat_70 = "\uf241" # fa-battery-three-quarters +bat_80 = "\uf241" # fa-battery-three-quarters +bat_90 = "\uf241" # fa-battery-three-quarters +bat_full = "\uf240" # fa-battery-full +bat_half = "\uf242" # fa-battery-half TODO remove on next release +bat_not_available = "\uf244" # fa-battery-empty +bat_quarter = "\uf243" # fa-battery-quarter TODO remove on next release +bat_three_quarters = "\uf241" # fa-battery-three-quarters TODO remove on next release +bell = "\uf0f3" # fa-bell +bell-slash = "\uf1f7" # fa-bell-slash-o +bluetooth = "\uf294" # fa-bluetooth-b +calendar = "\uf073" # fa-calendar +cogs = "\uf085" # fa-cogs +cpu = "\uf0e4" # fa-dashboard +cpu_boost_off = "\uf204" # fa-toggle-off +cpu_boost_on = "\uf205" # fa-toggle-on +disk_drive = "\uf0a0" # fa-hdd-o +docker = "\uf21a" # fa-ship +github = "\uf09b" # fa-github +gpu = "\uf26c" # fa-television +headphones = "\uf025" # fa-headphones +joystick = "\uf11b" # fa-gamepad +keyboard = "\uf11c" # fa-keyboard-o +mail = "\uf0e0" # fa-envelope +memory_mem = "\uf2db" # fa-microchip +memory_swap = "\uf0a0" # fa-hdd-o +mouse = "\uf245" # fa-mouse-pointer +music = "\uf001" # fa-music +music_next = "\uf061" # fa-arrow-right +music_pause = "\uf04c" # fa-pause +music_play = "\uf04b" # fa-play +music_prev = "\uf060" # fa-arrow-left +net_bridge = "\uf0e8" # fa-sitemap +net_down = "\u2b07" +net_loopback = "LO" +net_modem = "\uf095" # fa-phone +net_up = "\u2b06" +net_vpn = "\uf023" # fa-lock +net_wired = "\uf0ac" # fa-globe +net_wireless = "\uf1eb" # fa-wifi +notification = "\uf0a2" # fa-bell-o +phone = "\uf10b" # fa-mobile +phone_disconnected = "\U0001f4f5" +ping = "\u21ba" +pomodoro = "\U0001f345" +pomodoro_break = "\uf0f4" # fa-coffee +pomodoro_paused = "\uf04c" # fa-pause +pomodoro_started = "\uf04b" # fa-play +pomodoro_stopped = "\uf04d" # fa-stop +resolution = "\uf096" # fa-square-o +tasks = "\uf0ae" # fa-tasks +thermometer = "\uf2c8" # fa-thermometer-3 +time = "\uf017" # fa-clock-o +toggle_off = "\uf204" # fa-toggle-off +toggle_on = "\uf205" # fa-toggle-on +unknown = "\uf128" # fa-question +update = "\uf062" # fa-arrow-up +uptime = "\uf017" # fa-clock-o +volume_empty = "\uf026" # fa-volume-off +volume_full = "\uf028" # fa-volume-up +volume_half = "\uf027" # fa-volume-down +volume_muted = "\uf026 \uf00d" +microphone_empty = "\uf130" # fa-microphone +microphone_full = "\uf130" # fa-microphone +microphone_half = "\uf130" # fa-microphone +microphone_muted = "\uf131" # fa-microphone-slash +weather_clouds = "\uf0c2" # fa-cloud +weather_default = "\uf0c2" # fa-cloud +weather_rain = "\uf043" # fa-tint +weather_snow = "\uf2dc" # fa-snowflake-o +weather_sun = "\uf185" # fa-sun-o +weather_thunder = "\uf0e7" # fa-bolt +xrandr = "\uf26c" # fa-television diff --git a/.config/i3status-rust/icons/awesome5.toml b/.config/i3status-rust/icons/awesome5.toml new file mode 100644 index 0000000..0735193 --- /dev/null +++ b/.config/i3status-rust/icons/awesome5.toml @@ -0,0 +1,98 @@ +# FontAwesome 5: https://fontawesome.com/icons?d=gallery&p=2&m=free +backlight_empty = "\U0001f315" +backlight_full = "\U0001f311" +backlight_1 = "\U0001f314" +backlight_2 = "\U0001f314" +backlight_3 = "\U0001f314" +backlight_4 = "\U0001f314" +backlight_5 = "\U0001f313" +backlight_6 = "\U0001f313" +backlight_7 = "\U0001f313" +backlight_8 = "\U0001f313" +backlight_9 = "\U0001f313" +backlight_10 = "\U0001f312" +backlight_11 = "\U0001f312" +backlight_12 = "\U0001f312" +backlight_13 = "\U0001f312" +bat_charging = "\uf1e6" +bat_discharging = "\uf242" +bat_not_available = "\uf244" +bat_empty = "\uf244" # TODO remove on next release +bat_10 = "\uf244" +bat_20 = "\uf243" +bat_30 = "\uf243" +bat_40 = "\uf243" +bat_50 = "\uf242" +bat_60 = "\uf242" +bat_70 = "\uf241" +bat_80 = "\uf241" +bat_90 = "\uf241" +bat_full = "\uf240" +bat_half = "\uf242" # TODO remove on next release +bat_quarter = "\uf243" # TODO remove on next release +bat_three_quarters = "\uf241" # TODO remove on next release +bell = "\uf0f3" +bell-slash = "\uf1f6" +bluetooth = "\uf294" +calendar = "\uf073" +cogs = "\uf085" +cpu = "\uf3fd" +cpu_boost_on = "\uf205" +cpu_boost_off = "\uf204" +disk_drive = "\uf0a0" +docker = "\uf21a" +github = "\uf09b" +gpu = "\uf26c" +headphones = "\uf025" +joystick = "\uf11b" +keyboard = "\uf11c" +mail = "\uf0e0" +memory_mem = "\uf2db" +memory_swap = "\uf0a0" +mouse = "\uf245" +music = "\uf001" +music_next = "\uf061" +music_pause = "\uf04c" +music_play = "\uf04b" +music_prev = "\uf060" +net_bridge = "\uf0e8" +net_down = "\uf019" +net_loopback = "LO" +net_modem = "\uf095" +net_up = "\uf093" +net_vpn = "\uf023" +net_wired = "\uf6ff" +net_wireless = "\uf1eb" +notification = "\uf0f3" +phone = "\uf3cd" +phone_disconnected = "\U0001f4f5" +ping = "\uf362" +pomodoro = "\U0001f345" +pomodoro_break = "\uf0f4" # fa-coffee +pomodoro_paused = "\uf04c" # fa-pause +pomodoro_started = "\uf04b" # fa-play +pomodoro_stopped = "\uf04d" # fa-stop +resolution = "\uf096" # fa-square-o +tasks = "\uf0ae" +thermometer = "\uf2c8" +time = "\uf017" +toggle_off = "\uf204" +toggle_on = "\uf205" +unknown = "\uf128" +update = "\uf062" +uptime = "\uf2f2" +volume_empty = "\uf026" +volume_full = "\uf028" +volume_half = "\uf027" +volume_muted = "\uf6a9" +microphone_full = "\uf3c9" +microphone_half = "\uf3c9" +microphone_empty = "\uf3c9" +microphone_muted = "\uf539" +weather_clouds = "\uf0c2" +weather_default = "\uf0c2" # Cloud symbol as default +weather_rain = "\uf043" +weather_snow = "\uf2dc" +weather_sun = "\uf185" +weather_thunder = "\uf0e7" +xrandr = "\uf26c" diff --git a/.config/i3status-rust/icons/material-nf.toml b/.config/i3status-rust/icons/material-nf.toml new file mode 100644 index 0000000..e15c4ab --- /dev/null +++ b/.config/i3status-rust/icons/material-nf.toml @@ -0,0 +1,103 @@ +# Material from NerdFont +# https://www.nerdfonts.com/cheat-sheet +# +# Note: aviod using icons in the range 0xf500-0xfd46, +# as they will cause the block to render backwards +# until https://github.com/ryanoasis/nerd-fonts/issues/365 is fixed +backlight_empty = "\ue38d" # nf-weather-moon_new +backlight_full = "\ue39b" # nf-weather-moon_full +backlight_1 = "\ue3d4" # nf-weather-moon_alt_waxing_gibbous_6 +backlight_2 = "\ue3d3" # nf-weather-moon_alt_waxing_gibbous_5 +backlight_3 = "\ue3d2" # nf-weather-moon_alt_waxing_gibbous_4 +backlight_4 = "\ue3d1" # nf-weather-moon_alt_waxing_gibbous_3 +backlight_5 = "\ue3d0" # nf-weather-moon_alt_waxing_gibbous_2 +backlight_6 = "\ue3cf" # nf-weather-moon_alt_waxing_gibbous_1 +backlight_7 = "\ue3ce" # nf-weather-moon_alt_first_quarter +backlight_8 = "\ue3cd" # nf-weather-moon_alt_waxing_crescent_6 +backlight_9 = "\ue3cc" # nf-weather-moon_alt_waxing_crescent_5 +backlight_10 = "\ue3cb" # nf-weather-moon_alt_waxing_crescent_4 +backlight_11 = "\ue3ca" # nf-weather-moon_alt_waxing_crescent_3 +backlight_12 = "\ue3c9" # nf-weather-moon_alt_waxing_crescent_2 +backlight_13 = "\ue3c8" # nf-weather-moon_alt_waxing_crescent_1 +bat_charging = "\uf583" # nf-mdi-battery_charging +bat_discharging = "\uf57d" # nf-mdi-battery_50 +bat_empty = "\uf58d" # nf-mdi-battery_outline # TODO remove on next release +bat_not_available = "\uf590" # nf-mdi-battery_unknown +bat_10 = "\uf579" # nf-mdi-battery_10 +bat_20 = "\uf57a"# nf-mdi-battery_20 +bat_30 = "\uf57b"# nf-mdi-battery_30 +bat_40 = "\uf57c"# nf-mdi-battery_40 +bat_50 = "\uf57d" # nf-mdi-battery_50 +bat_60 = "\uf57e" # nf-mdi-battery_60 +bat_70 = "\uf57f" # nf-mdi-battery_70 +bat_80 = "\uf580" # nf-mdi-battery_80 +bat_90 = "\uf581" # nf-mdi-battery_90 +bat_full = "\uf578" # nf-mdi-battery +bat_half = "\uf57d" # nf-mdi-battery_50 # TODO remove on next release +bat_quarter = "\uf57a"# nf-mdi-battery_20 # TODO remove on next release +bat_three_quarters = "\uf57f" # nf-mdi-battery_70 # TODO remove on next release +bell = "\uf599" # nf-mdi-bell +bell-slash = "\uf59a" # nf-mdi-bell_off +bluetooth = "\uf5ae" # nf-mdi-bluetooth +calendar = "\uf5ec" # nf-mdi-calendar +cogs = "\uf992" # nf-mdi-settings +cpu = "\uf9c4" # nf-mdi-speedometer +cpu_boost_on = "\ufa20" +cpu_boost_off = "\ufa21" +disk_drive = "\uf7c9" # nf-mdi-harddisk +docker = "\uf308" # nf-linux-docker +github = "\uf7a3" # nf-mdi-github_circle +gpu = "\uf878" # nf-mdi-monitor +headphones = "\uf7ca" # nf-mdi-headphones +joystick = "\uf796" # nf-mdi-gamepad_variant +keyboard = "\uf80b" # nf-mdi-keyboard +mail = "\uf6ed" # nf-mdi-email +memory_mem = "\uf85a" # nf-mdi-memory +memory_swap = "\uf7c9" # nf-mdi-harddisk +mouse = "\uf87c" # nf-mdi-mouse +music = "\uf886" # nf-mdi-music_note +music_next = "\uf9ac" # nf-mdi-skip_next +music_pause = "\uf8e3" # nf-mdi-pause +music_play = "\uf909" # nf-mdi-play +music_prev = "\uf9ad" # nf-mdi-skip_previous +net_bridge = "\uf9a9" # nf-mdi-sitemap +net_down = "\uf6d9" # nf-mdi-download +net_loopback = "\uf56e" # nf-mdi-backup_restore +net_modem = "\uf8f1" # nf-mdi-phone +net_up = "\ufa51" # nf-mdi-upload +net_vpn = "\ufa81" # nf-mdi-vpn +net_wired = "\uf6ff" # nf-mdi-ethernet +net_wireless = "\ufaa8" # nf-mdi-wifi +notification = "\uf599" # nf-mdi-bell +phone = "\uf8f1" # nf-mdi-phone +phone_disconnected = "\ufb57" # nf-mdi-phone_minus +ping = "\ufa1e" # nf-mdi-timer_sand +pomodoro = "\ue001" # nf-pom-pomodoro_done +pomodoro_break = "\uf0f4" # nf-fa-coffee +pomodoro_paused = "\uf04c" # nf-fa-pause +pomodoro_started = "\uf04b" # nf-fa-play +pomodoro_stopped = "\uf04d" # nf-fa-stop +resolution = "\uf792" # nf-mdi-fullscreen +tasks = "\ufac6" # nf-mdi-playlist_check +thermometer = "\ufa0e" # nf-mdi-thermometer +time = "\uf64f" # nf-mdi-clock +toggle_off = "\ufa21" # nf-mdi-toggle_switch_off +toggle_on = "\ufa20" # nf-mdi-toggle_switch +unknown = "\uf685" # nf-mdi-comment_question_outline | TODO: Make default? +update = "\uf8d4" # nf-mdi-package_up +uptime = "\uf652" # nf-mdi-clock_in +volume_empty = "\ufa7e" # nf-mdi-volume_low +volume_full = "\ufa7d" # nf-mdi-volume_high +volume_half = "\ufa7f" # nf-mdi-volume_medium +volume_muted = "\uf466" # nf-mdi-volume_mute +microphone_full = "\uf86b" # nf-mdi-microphone +microphone_half = "\uf86b" # nf-mdi-microphone +microphone_empty = "\uf86d" # nf-mdi-microphone_outline +microphone_muted = "\uf86c" # nf-mdi-microphone_off +weather_clouds = "\ufa8f" # nf-mdi-weather_cloudy +weather_default = "\ufa8f" # Cloud symbol as default +weather_rain = "\ufa95" # nf-mdi-weather_pouring +weather_snow = "\ufa97" # nf-mdi-weather_snowy +weather_sun = "\ufa98" # nf-mdi-weather_sunny +weather_thunder = "\ue31d" # nf-weather-thunderstorm +xrandr = "\uf879}" # nf-mdi-monitor_multiple diff --git a/.config/i3status-rust/icons/material.toml b/.config/i3status-rust/icons/material.toml new file mode 100644 index 0000000..1fd5fac --- /dev/null +++ b/.config/i3status-rust/icons/material.toml @@ -0,0 +1,77 @@ +# Material Design icons by Google +# https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.codepoints +bat_charging = "\ue1a3" # battery_charging_full +bat_discharging = "\ue19c" # battery_alert +bat_empty = "\ue19c" # battery_alert TODO remove on next release +bat_10 = "\ue19c" # battery_alert +bat_20 = "\ue1a5" +bat_30 = "\ue1a5" +bat_40 = "\ue1a5" +bat_50 = "\ue1a5" # battery_std +bat_60 = "\ue1a5" # battery_std +bat_70 = "\ue1a5" +bat_80 = "\ue1a5" +bat_90 = "\ue1a5" +bat_full = "\ue1a4" # battery_full +bat_half = "\ue1a5" # battery_std TODO remove on next release +bat_quarter = "\ue1a5" # TODO remove on next release +bat_three_quarters = "\ue1a5" # TODO remove on next release +bat_not_available = "\ue1a6" # battery_unknown +bell = "\ue7f4" # notifications +bell-slash = "\ue7f8" # notifications_paused +bluetooth = "\ue1a7" # bluetooth +calendar = "\ue935" # calendar_today +cogs = "\ue8b8" # settings +cpu = "\ue640" # network_check +cpu_boost_on = "\ue837" +cpu_boost_off = "\ue836" +disk_drive = "\ue1db" # storage +docker = "\ue532" # directions_boat +github = "\ue86f" # code +gpu = "\ue333" # tv +headphones = "\ue60f" # bluetooth_audio +joystick = "\ue30f" # gamepad +keyboard = "\ue312" # keyboard +mail = "\ue0be" # email +memory_mem = "\ue322" # memory +memory_swap = "\ue8d4" # swap_horiz +mouse = "\ue323" # mouse +music = "\ue405" # music_note +music_next = "\ue044" # skip_next +music_pause = "\ue034" # skip_next +music_play = "\ue037" # play_arrow +music_prev = "\ue045" # skip_previous +net_wired = "\uefe6" # cable +net_wireless = "\ue63e" # wifi +net_loopback = "\ue028" # loop +net_up = "\uf09b" # upload +net_down = "\uf090" # download +notification = "\ue7f7" # notifications_active +phone = "\ue324" # phone_android +phone_disconnected = "\ue339" # device_unknown +ping = "\ue62a" # system_update +pomodoro = "\U0001f345" +pomodoro_break = "\uefef" # coffee +pomodoro_paused = "\ue034" # pause +pomodoro_started = "\ue037" # play_arrow +pomodoro_stopped = "\uef6a" # play_disabled ef6a +resolution = "\uf152" # crop-square-rounded +tasks = "\ue8f9" +thermometer = "\ue1ff" # device_thermostat +time = "\ue192" # access_time +toggle_off = "\ue836" # radio_button_on +toggle_on = "\ue837" # radio_button_on +update = "\ue8d7" # system_update_alt +uptime = "\ue425" # timer +volume_empty = "\ue04e" # volume_mute +volume_full = "\ue050" # volume_up +volume_half = "\ue04d" # volume_down +volume_muted = "\ue04f" # volume_off +microphone_full = "\ue029" # mic +microphone_half = "\ue029" # mic +microphone_empty = "\ue02a" # mic_none +microphone_muted = "\ue02b" # mic_off +weather_clouds = "\ue42d" # wb_cloudy +weather_default = "\ue42d" # wb_cloudy +weather_sun = "\ue430" # wb_sunny +xrandr = "\ue31e" diff --git a/.config/i3status-rust/themes/bad-wolf.toml b/.config/i3status-rust/themes/bad-wolf.toml new file mode 100644 index 0000000..b5fe595 --- /dev/null +++ b/.config/i3status-rust/themes/bad-wolf.toml @@ -0,0 +1,13 @@ +idle_bg = "#444444" +idle_fg = "#f5f5f5" +info_bg = "#626262" +info_fg = "#ffd680" +good_bg = "#afff00" +good_fg = "#000000" +warning_bg = "#ffaf00" +warning_fg = "#000000" +critical_bg = "#d70000" +critical_fg = "#000000" +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/gruvbox-dark.toml b/.config/i3status-rust/themes/gruvbox-dark.toml new file mode 100644 index 0000000..e4f14ae --- /dev/null +++ b/.config/i3status-rust/themes/gruvbox-dark.toml @@ -0,0 +1,13 @@ +idle_bg = "#282828" +idle_fg = "#ebdbb2" +info_bg = "#458588" +info_fg = "#ebdbb2" +good_bg = "#98971a" +good_fg = "#ebdbb2" +warning_bg = "#d79921" +warning_fg = "#ebdbb2" +critical_bg = "#cc241d" +critical_fg = "#ebdbb2" +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/gruvbox-light.toml b/.config/i3status-rust/themes/gruvbox-light.toml new file mode 100644 index 0000000..8b97c79 --- /dev/null +++ b/.config/i3status-rust/themes/gruvbox-light.toml @@ -0,0 +1,13 @@ +idle_bg = "#fbf1c7" +idle_fg = "#3c3836" +info_bg = "#458588" +info_fg = "#fbf1c7" +good_bg = "#98971a" +good_fg = "#fbf1c7" +warning_bg = "#d79921" +warning_fg = "#fbf1c7" +critical_bg = "#cc241d" +critical_fg = "#fbf1c7" +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/modern.toml b/.config/i3status-rust/themes/modern.toml new file mode 100644 index 0000000..450c716 --- /dev/null +++ b/.config/i3status-rust/themes/modern.toml @@ -0,0 +1,13 @@ +idle_bg = "#222D32" +idle_fg = "#CFD8DC" +info_bg = "#449CDB" +info_fg = "#1D1F21" +good_bg = "#99b938" +good_fg = "#1D1F21" +warning_bg = "#FE7E29" +warning_fg = "#1D1F21" +critical_bg = "#ff5252" +critical_fg = "#1D1F21" +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/native.toml b/.config/i3status-rust/themes/native.toml new file mode 100644 index 0000000..d7a17d2 --- /dev/null +++ b/.config/i3status-rust/themes/native.toml @@ -0,0 +1 @@ +# Nothing here diff --git a/.config/i3status-rust/themes/nord-dark.toml b/.config/i3status-rust/themes/nord-dark.toml new file mode 100644 index 0000000..6b98789 --- /dev/null +++ b/.config/i3status-rust/themes/nord-dark.toml @@ -0,0 +1,13 @@ +idle_bg = "#2e3440" # nord0 +idle_fg = "#81a1c1" # light blue +info_bg = "#5e81ac" # dark blue +info_fg = "#2e3440" # nord0 +good_bg = "#a3be86" # green +good_fg = "#2e3440" # nord0 +warning_bg = "#ebcb8b" # yellow +warning_fg = "#2e3440" # nord0 +critical_bg = "#bf616a" # red +critical_fg = "#2e3440" # nord0 +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/plain.toml b/.config/i3status-rust/themes/plain.toml new file mode 100644 index 0000000..75b586c --- /dev/null +++ b/.config/i3status-rust/themes/plain.toml @@ -0,0 +1,13 @@ +idle_bg = "#000000" +idle_fg = "#93a1a1" +info_bg = "#000000" +info_fg = "#93a1a1" +good_bg = "#000000" +good_fg = "#859900" +warning_bg = "#000000" +warning_fg = "#b58900" +critical_bg = "#000000" +critical_fg = "#dc322f" +separator = "|" +separator_bg = "#000000" +separator_fg = "#a9a9a9" diff --git a/.config/i3status-rust/themes/semi-native.toml b/.config/i3status-rust/themes/semi-native.toml new file mode 100644 index 0000000..861624c --- /dev/null +++ b/.config/i3status-rust/themes/semi-native.toml @@ -0,0 +1,5 @@ +idle_fg = "#93a1a1" +info_fg = "#93a1a1" +good_fg = "#859900" +warning_fg = "#b58900" +critical_fg = "#dc322f" diff --git a/.config/i3status-rust/themes/slick.toml b/.config/i3status-rust/themes/slick.toml new file mode 100644 index 0000000..ddfd6a8 --- /dev/null +++ b/.config/i3status-rust/themes/slick.toml @@ -0,0 +1,15 @@ +idle_bg = "#424242" +idle_fg = "#ffffff" +info_bg = "#2196f3" +info_fg = "#ffffff" +good_bg = "#8bc34a" +good_fg = "#000000" +warning_bg = "#ffc107" +warning_fg = "#000000" +critical_bg = "#f44336" +critical_fg = "#ffffff" +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" +alternating_tint_bg = "#11111100" +alternating_tint_fg = "#11111100" diff --git a/.config/i3status-rust/themes/solarized-dark.toml b/.config/i3status-rust/themes/solarized-dark.toml new file mode 100644 index 0000000..c4d3f14 --- /dev/null +++ b/.config/i3status-rust/themes/solarized-dark.toml @@ -0,0 +1,13 @@ +idle_bg = "#002b36" # base03 +idle_fg = "#93a1a1" # base1 +info_bg = "#268bd2" # blue +info_fg = "#002b36" # base03 +good_bg = "#859900" # green +good_fg = "#002b36" # base03 +warning_bg = "#b58900" # yellow +warning_fg = "#002b36" # base03 +critical_bg = "#dc322f" # red +critical_fg = "#002b36" # base03 +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/solarized-light.toml b/.config/i3status-rust/themes/solarized-light.toml new file mode 100644 index 0000000..32b8693 --- /dev/null +++ b/.config/i3status-rust/themes/solarized-light.toml @@ -0,0 +1,13 @@ +idle_bg = "#fdf6e3" # base3 +idle_fg = "#586e75" # base01 +info_bg = "#268bd2" # blue +info_fg = "#fdf6e3" # base3 +good_bg = "#859900" # green +good_fg = "#fdf6e3" # base3 +warning_bg = "#b58900" # yellow +warning_fg = "#fdf6e3" # base3 +critical_bg = "#dc322f" # red +critical_fg = "#fdf6e3" # base3 +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/i3status-rust/themes/space-villain.toml b/.config/i3status-rust/themes/space-villain.toml new file mode 100644 index 0000000..1249007 --- /dev/null +++ b/.config/i3status-rust/themes/space-villain.toml @@ -0,0 +1,13 @@ +idle_bg = "#06060f" # Rich black +idle_fg = "#c1c1c1" # Silver +info_bg = "#00223f" # Maastricht Blue +info_fg = "#c1c1c1" # Silver +good_bg = "#394049" # Arsenic +good_fg = "#c1c1c1" # Silver +warning_bg = "#2d1637" # Dark Purple +warning_fg = "#c1c1c1" # Silver +critical_bg = "#c1c1c1" # Silver +critical_fg = "#2c1637" # Dark Purple +separator = "\ue0b2" +separator_bg = "auto" +separator_fg = "auto" diff --git a/.config/lvim/.gitignore b/.config/lvim/.gitignore new file mode 100644 index 0000000..47ad858 --- /dev/null +++ b/.config/lvim/.gitignore @@ -0,0 +1 @@ +plugin/* diff --git a/.config/lvim/config.lua b/.config/lvim/config.lua new file mode 100644 index 0000000..a8b114d --- /dev/null +++ b/.config/lvim/config.lua @@ -0,0 +1,322 @@ +--[[ +lvim is the global options object + +Linters should be +filled in as strings with either +a global executable or a path to +an executable +]] +-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT + +-- vim.cmd [[set nomodeline]] +-- vim.cmd [[set modelines=0]] +user = vim.fn.expand('$USER') + +-- general +lvim.log.level = "warning" +lvim.format_on_save = false +lvim.colorscheme = "space-vim-dark" +vim.lsp.set_log_level("info") + +local tables = { "clangd" } +vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, tables, 1, #tables) +-- vim.list_extend(lvim.lsp.override, tables, 1, #tables) + +local clangd_bin = "clangd" +-- local clangd_flags = { +-- "--query-driver=/usr/bin/arm-none-eabi*", +-- "--background-index", "--pch-storage=memory", "-j=4", "--log=verbose", +-- -- "--path-mappings=/from=/to", +-- } +local clangd_flags = { + "--query-driver=/usr/bin/g++-12", + "--background-index", "--pch-storage=memory", "-j=4", "--log=verbose", + -- "--path-mappings=/from=/to", +} + + +-- Example +local custom_on_attach = function(client, bufnr) + require("lvim.lsp").common_on_attach(client, bufnr) + local opts = { noremap = true, silent = true } + vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "lh", "ClangdSwitchSourceHeader", opts) + vim.api.nvim_buf_create_user_command(bufnr, 'FormatRegion', function(_opts) + local format_opts = { async = false} + + if _opts.range > 0 then + format_opts.range = { + { _opts.line1, 0 }, + { _opts.line2, 0 }, + } + end + vim.lsp.buf.format(format_opts) + + end, { range = true }) + +end + +local opts = { + cmd = { clangd_bin, unpack(clangd_flags) }, + on_attach = custom_on_attach, +} + +require("lvim.lsp.manager").setup("clangd", opts) +-- keymappings [view all the defaults by pressing Lk] +lvim.leader = "space" +-- lvim.keys.normal_mode[""] = ":w" + +lvim.builtin.terminal.open_mapping = [[]] +lvim.builtin.terminal.direction = "horizontal" + +local keymap_opts = { noremap = true, silent = true } +vim.api.nvim_set_keymap("v", "p", '"_dP', keymap_opts) +-- unmap a default keymapping +-- lvim.keys.normal_mode[""] = false +-- edit a default keymapping +-- lvim.keys.normal_mode[""] = ":q" + +-- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode. +-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet. +-- local _, actions = pcall(require, "telescope.actions") +-- lvim.builtin.telescope.defaults.mappings = { +-- -- for input mode +-- i = { +-- [""] = actions.move_selection_next, +-- [""] = actions.move_selection_previous, +-- [""] = actions.cycle_history_next, +-- [""] = actions.cycle_history_prev, +-- }, +-- -- for normal mode +-- n = { +-- [""] = actions.move_selection_next, +-- [""] = actions.move_selection_previous, +-- }, +-- } + +lvim.builtin.which_key.mappings["G"] = { + "Glow", "Markdown Preview" +} + + +lvim.builtin.which_key.vmappings["f"] = { + "FormatRegion", "Format Region", +} +-- Telescope +lvim.builtin.which_key.mappings["f"] = { + name = "+Finder", + f = { "Telescope find_files", "Find files" }, + g = { "Telescope live_grep", "Live Grep" } +} + +lvim.builtin.which_key.mappings["t"] = { + name = "+Trouble", + r = { "Trouble lsp_references", "References" }, + f = { "Trouble lsp_definitions", "Definitions" }, + d = { "Trouble document_diagnostics", "Diagnostics" }, + q = { "Trouble quickfix", "QuickFix" }, + l = { "Trouble loclist", "LocationList" }, + w = { "Trouble workspace_diagnostics", "Wordspace Diagnostics" }, +} + +lvim.builtin.which_key.mappings["w"] = { + name = "+Window", + [""] = { "h", "Jump to Left Buffer" }, + [""] = { "j", "Jump to Below Buffer" }, + [""] = { "k", "Jump to Above Buffer" }, + [""] = { "l", "Jump to Right Buffer" }, + h = { ":bprevious", "Previous buffer tab" }, + l = { ":bnext", "Next buffer tab" }, + x = { "BufferKill", "Close Buffer" } +} + +-- TODO: User Config for predefined plugins +-- After changing plugin config exit and reopen LunarVim, Run :PackerInstall :PackerCompile +lvim.builtin.alpha.active = true +lvim.builtin.alpha.mode = "dashboard" +lvim.builtin.bufferline.options.close_command = ":BufDel %d" +lvim.builtin.terminal.active = true +lvim.builtin.nvimtree.setup.view.side = "left" +-- lvim.builtin.nvimtree.show_icons.git = 0 + +-- if you don't want all the parsers change this to a table of the ones you want +lvim.builtin.treesitter.ensure_installed = { + "bash", + "c", + "javascript", + "json", + "lua", + "python", + "typescript", + "tsx", + "css", + "rust", + "java", + "yaml", +} + +lvim.builtin.treesitter.ignore_install = { "haskell" } +lvim.builtin.treesitter.highlight.enabled = true +lvim.builtin.treesitter.rainbow.enable = true +lvim.builtin.treesitter.indent = false + +vim.diagnostic.config({virtual_text = false}) + + +-- generic LSP settings + +-- ---@usage disable automatic installation of servers +-- lvim.lsp.automatic_servers_installation = false + +-- ---@usage Select which servers should be configured manually. Requires `:LvimCacheReset` to take effect. +-- See the full default list `:lua print(vim.inspect(lvim.lsp.override))` +-- vim.list_extend(lvim.lsp.override, { "pylsp" }) + +-- ---@usage setup a server -- see: https://www.lunarvim.org/languages/#overriding-the-default-configuration +-- local opts = {} -- check the lspconfig documentation for a list of all possible options +-- require("lvim.lsp.manager").setup("pylsp", opts) + +-- -- you can set a custom on_attach function that will be used for all the language servers +-- -- See +-- lvim.lsp.on_attach_callback = function(client, bufnr) +-- local function buf_set_option(...) +-- vim.api.nvim_buf_set_option(bufnr, ...) +-- end +-- --Enable completion triggered by +-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") +-- end + +-- -- set a formatter, this will override the language server formatting capabilities (if it exists) +-- local formatters = require "lvim.lsp.null-ls.formatters" +-- formatters.setup { +-- { command = "black", filetypes = { "python" } }, +-- { command = "isort", filetypes = { "python" } }, +-- { +-- -- each formatter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration +-- command = "prettier", +-- ---@usage arguments to pass to the formatter +-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` +-- extra_args = { "--print-with", "100" }, +-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports. +-- filetypes = { "typescript", "typescriptreact" }, +-- }, +-- } + +-- -- set additional linters +-- local linters = require "lvim.lsp.null-ls.linters" +-- linters.setup { +-- { command = "flake8", filetypes = { "python" } }, +-- { +-- -- each linter accepts a list of options identical to https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#Configuration +-- command = "shellcheck", +-- ---@usage arguments to pass to the formatter +-- -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}` +-- extra_args = { "--severity", "warning" }, +-- }, +-- { +-- command = "codespell", +-- ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports. +-- filetypes = { "javascript", "python" }, +-- }, +-- } + + +-- Additional Plugins +lvim.plugins = { + { "liuchengxu/space-vim-dark" }, + { "p00f/nvim-ts-rainbow" }, + { + "folke/trouble.nvim", + cmd = "TroubleToggle", + }, + { "ellisonleao/glow.nvim", config = true, cmd = "Glow" }, + { + "sindrets/diffview.nvim", + dependencies = "nvim-lua/plenary.nvim", + }, +} + +-- lvim.plugins = { +-- {"folke/tokyonight.nvim"}, +-- { +-- "folke/trouble.nvim", +-- cmd = "TroubleToggle", +-- }, +-- } + +-- Autocommands (https://neovim.io/doc/user/autocmd.html) +-- lvim.autocommands.custom_groups = { +-- { "BufWinEnter", "*.lua", "setlocal ts=8 sw=8" }, +-- } + +local options = { + backup = true, -- creates a backup file + clipboard = "unnamedplus", -- allows neovim to access the system clipboard + cmdheight = 2, -- more space in the neovim command line for displaying messages + completeopt = { "menuone", "noselect" }, -- mostly just for cmp + conceallevel = 0, -- so that `` is visible in markdown files + fileencoding = "utf-8", -- the encoding written to a file + hlsearch = true, -- highlight all matches on previous search pattern + ignorecase = true, -- ignore case in search patterns + mouse = "a", -- allow the mouse to be used in neovim + pumheight = 10, -- pop up menu height + showmode = false, -- we don't need to see things like -- INSERT -- anymore + showtabline = 2, -- always show tabs + smartcase = true, -- smart case + smartindent = false, -- make indenting smarter again + splitbelow = true, -- force all horizontal splits to go below current window + splitright = true, -- force all vertical splits to go to the right of current window + swapfile = true, -- creates a swapfile + termguicolors = true, -- set term gui colors (most terminals support this) + timeoutlen = 1000, -- time to wait for a mapped sequence to complete (in milliseconds) + undofile = true, -- enable persistent undo + updatetime = 300, -- faster completion (4000ms default) + writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited + expandtab = false, -- convert tabs to spaces + shiftwidth = 4, -- the number of spaces inserted for each indentation + tabstop = 4, -- insert 2 spaces for a tab + cursorline = true, -- highlight the current line + number = true, -- set numbered lines + relativenumber = false, -- set relative numbered lines + numberwidth = 4, -- set number column width to 2 {default 4} + signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time + wrap = false, -- display lines as one long line + scrolloff = 8, -- is one of my fav + sidescrolloff = 8, + guifont = "monospace:h17", -- the font used in graphical neovim applications + backupdir = "/home/" .. user .. "/.vim/backup//", + directory = "/home/" .. user .. "/.vim/swap//", +} + +for k, v in pairs(options) do + vim.opt[k] = v +end + + + +vim.cmd [[ +augroup RestoreCursorShapeOnExit + autocmd! + autocmd VimSuspend,VimLeave * set guicursor=a:ver50 +augroup END]] + +vim.cmd [[ + augroup Markdown + autocmd! + autocmd FileType markdown setlocal wrap shiftwidth=2 tabstop=2 + augroup END +]] + +vim.cmd [[ + augroup Lua + autocmd! + autocmd FileType lua setlocal shiftwidth=2 tabstop=2 + augroup END +]] + +-- vim.opt.cinoptions:append("=0") diff --git a/.config/lvim/lazy-lock.json b/.config/lvim/lazy-lock.json new file mode 100644 index 0000000..bb56ffb --- /dev/null +++ b/.config/lvim/lazy-lock.json @@ -0,0 +1,49 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" }, + "LuaSnip": { "branch": "master", "commit": "e77fa9ad0b1f4fc6cddf54e51047e17e90c7d7ed" }, + "alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" }, + "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, + "bufferline.nvim": { "branch": "main", "commit": "a4bd44523316928a7c4a5c09a3407d02c30b6027" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "diffview.nvim": { "branch": "main", "commit": "b0cc22f5708f6b2b4f873b44fbc5eb93020f4e0c" }, + "friendly-snippets": { "branch": "main", "commit": "631f79e346b0b3203d2ce3eae619ca8d612e5463" }, + "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, + "glow.nvim": { "branch": "main", "commit": "bbd0473d72a45094495ee5600b5577823543eefe" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "d6a782c7002682f4a01b79fc3918c4584ad6e8fb" }, + "lir.nvim": { "branch": "master", "commit": "1aa871f20637eccc4e1e26b0fbcf9aafc9b6caf7" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7276ffffcf51a8304b5fd4b81293be4ee010ec47" }, + "mason.nvim": { "branch": "main", "commit": "057ac5ca159c83e302a55bd839a96ff1ea2396db" }, + "neodev.nvim": { "branch": "main", "commit": "0043cf91c18aeac8db5765eb86c6078e17ac9325" }, + "nlsp-settings.nvim": { "branch": "main", "commit": "32aa12da328258f2dccb15d327c26a8d21d9f4bd" }, + "null-ls.nvim": { "branch": "main", "commit": "33b853a3933eed3137cd055aac4e539e69832ad0" }, + "nvim-autopairs": { "branch": "master", "commit": "7566a86f44bb72ba2b1a609f528a27d93241502d" }, + "nvim-cmp": { "branch": "main", "commit": "11102d3db12c7f8b35265ad0e17a21511e5b1e68" }, + "nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" }, + "nvim-dap-ui": { "branch": "master", "commit": "286f682f366fbc652b38dff893569374e9433dd3" }, + "nvim-lspconfig": { "branch": "master", "commit": "427378a03ffc1e1bc023275583a49b1993e524d0" }, + "nvim-navic": { "branch": "master", "commit": "83dc174da915f9dbc9b51169e9b62a2e0d42b527" }, + "nvim-tree.lua": { "branch": "master", "commit": "bb375fb20327c49920c41d2b51c1ce2f4fe7deb3" }, + "nvim-treesitter": { "branch": "master", "commit": "2ce3c9080cfe4a39c7907e672edafd2a95244a7c" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, + "nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" }, + "nvim-web-devicons": { "branch": "master", "commit": "986875b7364095d6535e28bd4aac3a9357e91bbe" }, + "onedarker.nvim": { "branch": "freeze", "commit": "b00dd2189f264c5aeb4cf04c59439655ecd573ec" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, + "schemastore.nvim": { "branch": "main", "commit": "0b396f538f195c249f021a48c3d8988f0d3f86f7" }, + "space-vim-dark": { "branch": "master", "commit": "d24c6c27b49c1ab49416a47d96979481281f53b5" }, + "structlog.nvim": { "branch": "main", "commit": "45b26a2b1036bb93c0e83f4225e85ab3cee8f476" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "9de317bdea2bc393074651179c4fc7f93e9b2d56" }, + "toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" }, + "tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" }, + "trouble.nvim": { "branch": "main", "commit": "20d1b30d6925213abece21d35858a16e11d1e9fc" }, + "vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" }, + "which-key.nvim": { "branch": "main", "commit": "4acffc92953a90a790603bfdab7c92319ab167b1" } +} \ No newline at end of file diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100644 index 0000000..55a4278 --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1,43 @@ +# Compiled Lua sources +luac.out + +# luarocks build files +*.src.rock +*.zip +*.tar.gz + +# Object files +*.o +*.os +*.ko +*.obj +*.elf + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo +*.def +*.exp + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + + +plugin/packer_compiled.lua \ No newline at end of file diff --git a/.config/nvim/LICENSE b/.config/nvim/LICENSE new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/.config/nvim/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/.config/nvim/README.md b/.config/nvim/README.md new file mode 100644 index 0000000..8e66982 --- /dev/null +++ b/.config/nvim/README.md @@ -0,0 +1,58 @@ +# Neovim from scratch + +## Try out this config + +Make sure to remove or move your current `nvim` directory + +``` +git clone git@github.com:ChristianChiarulli/Neovim-from-scratch.git ~/.config/nvim +``` + +Run `nvim` and wait for the plugins to be installed + +**NOTE** (You will notice treesitter pulling in a bunch of parsers the next time you open Neovim) + + +each video will be associated with a branch so checkout the one you are interested in + +## Get healthy + +Open `nvim` and enter the following: + +``` +:checkhealth +``` + +You'll probably notice you don't have support for copy/paste also that python and node haven't been setup + +So let's fix that + +First we'll fix copy/paste + +- On mac `pbcopy` should be builtin + +- On Ubuntu + + ``` + sudo apt install xsel + ``` + +- On Arch Linux + + ``` + sudo pacman -S xsel + ``` + +Next we need to install python support (node is optional) + +- Neovim python support + + ``` + pip install pynvim + ``` + +- Neovim node support + + ``` + npm i -g neovim + ``` diff --git a/.config/nvim/diff.txt b/.config/nvim/diff.txt new file mode 100644 index 0000000..97a98aa --- /dev/null +++ b/.config/nvim/diff.txt @@ -0,0 +1,39 @@ +diff --git a/init.lua b/init.lua +index e1962c2..0c74521 100644 +--- a/init.lua ++++ b/init.lua +@@ -2,4 +2,8 @@ require "user.options" + require "user.keymaps" + require "user.plugins" + +- ++vim.cmd [[ ++augroup RestoreCursorShapeOnExit ++ autocmd! ++ autocmd VimSuspend,VimLeave * set guicursor=a:ver50 ++augroup END]] +diff --git a/lua/user/options.lua b/lua/user/options.lua +index 6b38e23..8f726f3 100644 +--- a/lua/user/options.lua ++++ b/lua/user/options.lua +@@ -16,7 +16,7 @@ local options = { + splitbelow = true, -- force all horizontal splits to go below current window + splitright = true, -- force all vertical splits to go to the right of current window + swapfile = false, -- creates a swapfile +- -- termguicolors = true, -- set term gui colors (most terminals support this) ++ termguicolors = true, -- set term gui colors (most terminals support this) + timeoutlen = 1000, -- time to wait for a mapped sequence to complete (in milliseconds) + undofile = true, -- enable persistent undo + updatetime = 300, -- faster completion (4000ms default) +diff --git a/lua/user/plugins.lua b/lua/user/plugins.lua +index 3d4499f..5d5200b 100644 +--- a/lua/user/plugins.lua ++++ b/lua/user/plugins.lua +@@ -44,6 +44,7 @@ return packer.startup(function(use) + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins ++ use {'dracula/vim', as ='dracula'} + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..aa4be12 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,43 @@ +require "penguin.options" +require "penguin.keymaps" +require "penguin.plugins" +require "penguin.colorscheme" +require "penguin.cmp" +require "penguin.lsp" +require "penguin.telescope" +require "penguin.treesitter" +require "penguin.autopairs" +require "penguin.comment" +require "penguin.gitsigns" +--require "penguin.nvim-tree" +require "penguin.bufferline" +require "penguin.toggleterm" + + + +vim.cmd [[ +augroup RestoreCursorShapeOnExit + autocmd! + autocmd VimSuspend,VimLeave * set guicursor=a:ver50 +augroup END]] + +vim.cmd [[ + augroup Markdown + autocmd! + autocmd FileType markdown setlocal wrap shiftwidth=2 tabstop=2 + augroup END +]] + +vim.cmd [[ + augroup Lua + autocmd! + autocmd FileType lua setlocal shiftwidth=2 tabstop=2 + augroup END +]] + +vim.cmd [[ + augroup Java + autocmd! + autocmd FileType java setlocal shiftwidth=2 tabstop=2 + augroup END +]] diff --git a/.config/nvim/lua/penguin/autopairs.lua b/.config/nvim/lua/penguin/autopairs.lua new file mode 100644 index 0000000..577e571 --- /dev/null +++ b/.config/nvim/lua/penguin/autopairs.lua @@ -0,0 +1,33 @@ +-- Setup nvim-cmp. +local status_ok, npairs = pcall(require, "nvim-autopairs") +if not status_ok then + return +end + +npairs.setup { + check_ts = true, + ts_config = { + lua = { "string", "source" }, + javascript = { "string", "template_string" }, + java = false, + }, + disable_filetype = { "TelescopePrompt", "spectre_panel" }, + fast_wrap = { + map = "", + chars = { "{", "[", "(", '"', "'" }, + pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""), + offset = 0, -- Offset from pattern match + end_key = "$", + keys = "qwertyuiopzxcvbnmasdfghjkl", + check_comma = true, + highlight = "PmenuSel", + highlight_grey = "LineNr", + }, +} + +local cmp_autopairs = require "nvim-autopairs.completion.cmp" +local cmp_status_ok, cmp = pcall(require, "cmp") +if not cmp_status_ok then + return +end +cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) diff --git a/.config/nvim/lua/penguin/bufferline.lua b/.config/nvim/lua/penguin/bufferline.lua new file mode 100644 index 0000000..7df131a --- /dev/null +++ b/.config/nvim/lua/penguin/bufferline.lua @@ -0,0 +1,167 @@ +local status_ok, bufferline = pcall(require, "bufferline") +if not status_ok then + return +end + +bufferline.setup { + options = { + numbers = "ordinal", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string, + close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions" + right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions" + left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions" + middle_mouse_command = nil, -- can be a string | function, see "Mouse actions" + -- NOTE: this plugin is designed with this icon in mind, + -- and so changing this is NOT recommended, this is intended + -- as an escape hatch for people who cannot bear it for whatever reason + indicator_icon = "▎", + buffer_close_icon = "", + -- buffer_close_icon = '', + modified_icon = "●", + close_icon = "", + -- close_icon = '', + left_trunc_marker = "", + right_trunc_marker = "", + --- name_formatter can be used to change the buffer's label in the bufferline. + --- Please note some names can/will break the + --- bufferline so use this at your discretion knowing that it has + --- some limitations that will *NOT* be fixed. + -- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr" + -- -- remove extension from markdown files for example + -- if buf.name:match('%.md') then + -- return vim.fn.fnamemodify(buf.name, ':t:r') + -- end + -- end, + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 21, + diagnostics = false, -- | "nvim_lsp" | "coc", + diagnostics_update_in_insert = false, + -- diagnostics_indicator = function(count, level, diagnostics_dict, context) + -- return "("..count..")" + -- end, + -- NOTE: this will be called a lot so don't do any heavy processing here + -- custom_filter = function(buf_number) + -- -- filter out filetypes you don't want to see + -- if vim.bo[buf_number].filetype ~= "" then + -- return true + -- end + -- -- filter out by buffer name + -- if vim.fn.bufname(buf_number) ~= "" then + -- return true + -- end + -- -- filter out based on arbitrary rules + -- -- e.g. filter out vim wiki buffer from tabline in your work repo + -- if vim.fn.getcwd() == "" and vim.bo[buf_number].filetype ~= "wiki" then + -- return true + -- end + -- end, + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + persist_buffer_sort = true, -- whether or not custom sorted buffers should persist + -- can also be a table containing 2 custom separators + -- [focused and unfocused]. eg: { '|', '|' } + separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' }, + enforce_regular_tabs = true, + always_show_bufferline = true, + -- sort_by = 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b) + -- -- add custom logic + -- return buffer_a.modified > buffer_b.modified + -- end + }, + highlights = { + fill = { + guifg = { attribute = "fg", highlight = "#ff0000" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + background = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + + -- buffer_selected = { + -- guifg = {attribute='fg',highlight='#ff0000'}, + -- guibg = {attribute='bg',highlight='#0000ff'}, + -- gui = 'none' + -- }, + buffer_visible = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + + close_button = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + close_button_visible = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + -- close_button_selected = { + -- guifg = {attribute='fg',highlight='TabLineSel'}, + -- guibg ={attribute='bg',highlight='TabLineSel'} + -- }, + + tab_selected = { + guifg = { attribute = "fg", highlight = "Normal" }, + guibg = { attribute = "bg", highlight = "Normal" }, + }, + tab = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + tab_close = { + -- guifg = {attribute='fg',highlight='LspDiagnosticsDefaultError'}, + guifg = { attribute = "fg", highlight = "TabLineSel" }, + guibg = { attribute = "bg", highlight = "Normal" }, + }, + + duplicate_selected = { + guifg = { attribute = "fg", highlight = "TabLineSel" }, + guibg = { attribute = "bg", highlight = "TabLineSel" }, + gui = "italic", + }, + duplicate_visible = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + gui = "italic", + }, + duplicate = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + gui = "italic", + }, + + modified = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + modified_selected = { + guifg = { attribute = "fg", highlight = "Normal" }, + guibg = { attribute = "bg", highlight = "Normal" }, + }, + modified_visible = { + guifg = { attribute = "fg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + + separator = { + guifg = { attribute = "bg", highlight = "TabLine" }, + guibg = { attribute = "bg", highlight = "TabLine" }, + }, + separator_selected = { + guifg = { attribute = "bg", highlight = "Normal" }, + guibg = { attribute = "bg", highlight = "Normal" }, + }, + -- separator_visible = { + -- guifg = {attribute='bg',highlight='TabLine'}, + -- guibg = {attribute='bg',highlight='TabLine'} + -- }, + indicator_selected = { + guifg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" }, + guibg = { attribute = "bg", highlight = "Normal" }, + }, + }, +} diff --git a/.config/nvim/lua/penguin/cmp.lua b/.config/nvim/lua/penguin/cmp.lua new file mode 100644 index 0000000..14c0183 --- /dev/null +++ b/.config/nvim/lua/penguin/cmp.lua @@ -0,0 +1,131 @@ +local cmp_status_ok, cmp = pcall(require, "cmp") +if not cmp_status_ok then + return +end + +local snip_status_ok, luasnip = pcall(require, "luasnip") +if not snip_status_ok then + return +end + +require("luasnip/loaders/from_vscode").lazy_load() + +local check_backspace = function() + local col = vim.fn.col "." - 1 + return col == 0 or vim.fn.getline("."):sub(col, col):match "%s" +end + +--   פּ ﯟ   some other good icons +local kind_icons = { + Text = "", + Method = "m", + Function = "", + Constructor = "", + Field = "", + Variable = "", + Class = "", + Interface = "", + Module = "", + Property = "", + Unit = "", + Value = "", + Enum = "", + Keyword = "", + Snippet = "", + Color = "", + File = "", + Reference = "", + Folder = "", + EnumMember = "", + Constant = "", + Struct = "", + Event = "", + Operator = "", + TypeParameter = "", +} +-- find more here: https://www.nerdfonts.com/cheat-sheet + +cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) -- For `luasnip` users. + end, + }, + mapping = { + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. + [""] = cmp.mapping { + i = cmp.mapping.abort(), + c = cmp.mapping.close(), + }, + -- Accept currently selected item. If none selected, `select` first item. + -- Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping.confirm { select = false }, + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expandable() then + luasnip.expand() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif check_backspace() then + fallback() + else + fallback() + end + end, { + "i", + "s", + }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { + "i", + "s", + }), + }, + formatting = { + fields = { "kind", "abbr", "menu" }, + format = function(entry, vim_item) + -- Kind icons + vim_item.kind = string.format("%s", kind_icons[vim_item.kind]) + -- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind + vim_item.menu = ({ + nvim_lsp = "[LSP]", + nvim_lua = "[NVIM_LUA]", + luasnip = "[Snippet]", + buffer = "[Buffer]", + path = "[Path]", + })[entry.source.name] + return vim_item + end, + }, + sources = { + { name = "nvim_lsp" }, + { name = "nvim_lua" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + }, + confirm_opts = { + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }, + window = { + documentation = cmp.config.window.bordered(), + }, + experimental = { + ghost_text = false, + native_menu = false, + }, +} diff --git a/.config/nvim/lua/penguin/colorscheme.lua b/.config/nvim/lua/penguin/colorscheme.lua new file mode 100644 index 0000000..c11c1e1 --- /dev/null +++ b/.config/nvim/lua/penguin/colorscheme.lua @@ -0,0 +1,7 @@ +local colorscheme = "space-vim-dark" + +local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not status_ok then + vim.notify("colorscheme " .. colorscheme .. " not found!") + return +end diff --git a/.config/nvim/lua/penguin/comment.lua b/.config/nvim/lua/penguin/comment.lua new file mode 100644 index 0000000..2fa4a56 --- /dev/null +++ b/.config/nvim/lua/penguin/comment.lua @@ -0,0 +1,22 @@ +local status_ok, comment = pcall(require, "Comment") +if not status_ok then + return +end + +comment.setup { + pre_hook = function(ctx) + local U = require "Comment.utils" + + local location = nil + if ctx.ctype == U.ctype.block then + location = require("ts_context_commentstring.utils").get_cursor_location() + elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then + location = require("ts_context_commentstring.utils").get_visual_start_location() + end + + return require("ts_context_commentstring.internal").calculate_commentstring { + key = ctx.ctype == U.ctype.line and "__default" or "__multiline", + location = location, + } + end, +} diff --git a/.config/nvim/lua/penguin/gitsigns.lua b/.config/nvim/lua/penguin/gitsigns.lua new file mode 100644 index 0000000..ff72b93 --- /dev/null +++ b/.config/nvim/lua/penguin/gitsigns.lua @@ -0,0 +1,48 @@ +local status_ok, gitsigns = pcall(require, "gitsigns") +if not status_ok then + return +end + +gitsigns.setup { + signs = { + add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, + delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + changedelete = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + interval = 1000, + follow_files = true, + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter_opts = { + relative_time = false, + }, + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, + preview_config = { + -- Options passed to nvim_open_win + border = "single", + style = "minimal", + relative = "cursor", + row = 0, + col = 1, + }, + yadm = { + enable = false, + }, +} diff --git a/.config/nvim/lua/penguin/keymaps.lua b/.config/nvim/lua/penguin/keymaps.lua new file mode 100644 index 0000000..31f191e --- /dev/null +++ b/.config/nvim/lua/penguin/keymaps.lua @@ -0,0 +1,115 @@ +local opts = { noremap = true, silent = true } + +local term_opts = { silent = true } + +-- Shorten function name +local keymap = vim.api.nvim_set_keymap + +--Remap space as leader key +keymap("", "", "", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- Modes +-- normal_mode = "n", +-- insert_mode = "i", +-- visual_mode = "v", +-- visual_block_mode = "x", +-- term_mode = "t", +-- command_mode = "c", + +-- Normal -- +-- Better window navigation +keymap("n", "", "h", opts) +keymap("n", "", "j", opts) +keymap("n", "", "k", opts) +keymap("n", "", "l", opts) + +-- Resize with arrows +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) + +-- Navigate buffers +keymap("n", "", ":bnext", opts) +keymap("n", "", ":bprevious", opts) + +-- Move text up and down +keymap("n", "", ":m .+1==gi", opts) +keymap("n", "", ":m .-2==gi", opts) + +-- Insert -- +-- Press jk fast to enter +keymap("i", "jk", "", opts) + +-- Visual -- +-- Stay in indent mode +keymap("v", "<", "", ">gv", opts) + +-- Move text up and down +keymap("v", "", ":m .+1==", opts) +keymap("v", "", ":m .-2==", opts) +keymap("v", "p", '"_dP', opts) + +-- Visual Block -- +-- Move text up and down +keymap("x", "J", ":move '>+1gv-gv", opts) +keymap("x", "K", ":move '<-2gv-gv", opts) +keymap("x", "", ":move '>+1gv-gv", opts) +keymap("x", "", ":move '<-2gv-gv", opts) + +-- Terminal -- +-- Better terminal navigation +keymap("t", "", "h", term_opts) +keymap("t", "", "j", term_opts) +keymap("t", "", "k", term_opts) +keymap("t", "", "l", term_opts) + +-- keymap("n", "f", "Telescope find_files", opts) +-- keymap("n", "f", "lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))", opts) +keymap("n", "", "Telescope live_grep", opts) + +-- Nvimtree +keymap("n", "e", ":NvimTreeToggle", opts) + + +local wk = require("which-key") +local wk_mappings = { + Q = {":wq", "Write and Quit"}, + w = {":w", "Write"}, + x = {":Bdelete", "Close Buffer"}, + t = { + name = "Telescope", + f = {"lua require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ previewer = false }))", "Find Files"}, + g = {"Telescope live_grep", "Live Grep"} + }, + c = {"set hlsearch!", "Clear search"}, + G = {"Glow", "Markdown Preview (Glow)"}, + -- debug menu + d = { + name = "Debug Menu", + b = { + name = "Breakpoint Menu", + t = {"lua require('dap').toggle_breakpoint()", "Toggle Breakpoint"}, + s = {"lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))", "Set Breakpoint"}, + d = {"", "Delete breakpoint (NI)"}, + c = {"lua require('dap').clear_breakpoints()", "Clear all breakpoints"}, + }, + c = {"lua require'dap'.continue()", "Continue"}, + r = {"lua require('penguin.nvim-dap').dap.run(require('penguin.nvim-dap').dap.configurations.c)", "Run Debugger"}, + s = { + name = "Step Menu", + i = {"lua require('dap').step_into()", "Step Into"}, + o = {"lua require('dap').step_over()", "Step Over"}, + u = {"lua require('dap').step_out()", "Step Out"}, + }, + } +} + +local wk_opts = {prefix = ''} + +wk.register(wk_mappings, wk_opts) + + diff --git a/.config/nvim/lua/penguin/lsp/handlers.lua b/.config/nvim/lua/penguin/lsp/handlers.lua new file mode 100644 index 0000000..b144f13 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/handlers.lua @@ -0,0 +1,112 @@ +local M = {} + +-- TODO: backfill this to template +M.setup = function() + local signs = { + { name = "DiagnosticSignError", text = "" }, + { name = "DiagnosticSignWarn", text = "" }, + { name = "DiagnosticSignHint", text = "" }, + { name = "DiagnosticSignInfo", text = "" }, + } + + for _, sign in ipairs(signs) do + vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" }) + end + + local config = { + -- disable virtual text + virtual_text = false, + -- show signs + signs = { + active = signs, + }, + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + focusable = false, + style = "minimal", + border = "rounded", + source = "always", + header = "", + prefix = "", + }, + } + + vim.diagnostic.config(config) + + vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = "rounded", + }) + + vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { + border = "rounded", + }) +end + +local function lsp_highlight_document(client) + -- Set autocommands conditional on server_capabilities + if client.resolved_capabilities.document_highlight then + vim.api.nvim_exec( + [[ + augroup lsp_document_highlight + autocmd! * + autocmd CursorHold lua vim.lsp.buf.document_highlight() + autocmd CursorMoved lua vim.lsp.buf.clear_references() + augroup END + ]], + false + ) + end +end + +local function lsp_keymaps(bufnr) + local opts = { noremap = true, silent = true } + vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) + -- vim.api.nvim_buf_set_keymap(bufnr, "n", "rn", "lua vim.lsp.buf.rename()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + -- vim.api.nvim_buf_set_keymap(bufnr, "n", "ca", "lua vim.lsp.buf.code_action()", opts) + -- vim.api.nvim_buf_set_keymap(bufnr, "n", "f", "lua vim.diagnostic.open_float()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "n", "[d", 'lua vim.diagnostic.goto_prev({ border = "rounded" })', opts) + vim.api.nvim_buf_set_keymap( + bufnr, + "n", + "gl", + 'lua vim.diagnostic.open_float(0, { scope = "line", border = "single" })', + opts + ) + vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", 'lua vim.diagnostic.goto_next({ border = "rounded" })', opts) + --vim.api.nvim_buf_set_keymap(bufnr, "n", "q", "lua vim.diagnostic.setloclist()", opts) + vim.cmd [[ command! Format execute 'lua vim.lsp.buf.formatting()' ]] +end + + +M.on_attach = function(client, bufnr) + if client.name == "tsserver" then + client.resolved_capabilities.document_formatting = false + end + + -- if client.name == "clangd" then + -- -- finally figured out how to get ROOT DIRECTORY LETS GO + -- -- print(vim.inspect(client.config.workspace_folders[1]["name"])) + -- local pdap = require("penguin.nvim-dap") + -- pdap.pdap_clangd_init(vim.inspect(client.config.workspace_folders[1]["name"])) + -- end + lsp_keymaps(bufnr) + lsp_highlight_document(client) +end + +local capabilities = vim.lsp.protocol.make_client_capabilities() + +local status_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") +if not status_ok then + return +end + +M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities) + +return M diff --git a/.config/nvim/lua/penguin/lsp/init.lua b/.config/nvim/lua/penguin/lsp/init.lua new file mode 100644 index 0000000..7380306 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/init.lua @@ -0,0 +1,7 @@ +local status_ok, _ = pcall(require, "lspconfig") +if not status_ok then + return +end + +require("penguin.lsp.lsp-installer") +require("penguin.lsp.handlers").setup() diff --git a/.config/nvim/lua/penguin/lsp/lsp-installer.lua b/.config/nvim/lua/penguin/lsp/lsp-installer.lua new file mode 100644 index 0000000..2e2f2d0 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/lsp-installer.lua @@ -0,0 +1,38 @@ +local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer") +if not status_ok then + return +end + +-- Register a handler that will be called for all installed servers. +-- Alternatively, you may also register handlers on specific server instances instead (see example below). +lsp_installer.on_server_ready(function(server) + local opts = { + on_attach = require("penguin.lsp.handlers").on_attach, + capabilities = require("penguin.lsp.handlers").capabilities, + } + + if server.name == "jsonls" then + local jsonls_opts = require("penguin.lsp.settings.jsonls") + opts = vim.tbl_deep_extend("force", jsonls_opts, opts) + end + + if server.name == "sumneko_lua" then + local sumneko_opts = require("penguin.lsp.settings.sumneko_lua") + opts = vim.tbl_deep_extend("force", sumneko_opts, opts) + end + + if server.name == "pyright" then + local pyright_opts = require("penguin.lsp.settings.pyright") + opts = vim.tbl_deep_extend("force", pyright_opts, opts) + end + + if server.name == "clangd" then + local clangd_opts = require("penguin.lsp.settings.clangd") + opts = vim.tbl_deep_extend("force", clangd_opts, opts) + end + + -- This setup() function is exactly the same as lspconfig's setup function. + -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md + server:setup(opts) +end) + diff --git a/.config/nvim/lua/penguin/lsp/null-ls.lua b/.config/nvim/lua/penguin/lsp/null-ls.lua new file mode 100644 index 0000000..ec79994 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/null-ls.lua @@ -0,0 +1,20 @@ +local null_ls_status_ok, null_ls = pcall(require, "null-ls") +if not null_ls_status_ok then + return +end + +-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting +local formatting = null_ls.builtins.formatting +-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics +local diagnostics = null_ls.builtins.diagnostics + +null_ls.setup { + debug = false, + sources = { + formatting.prettier.with { extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" } }, + formatting.black.with { extra_args = { "--fast" } }, + -- formatting.yapf, + formatting.stylua, + diagnostics.flake8, + }, +} diff --git a/.config/nvim/lua/penguin/lsp/settings/clangd.lua b/.config/nvim/lua/penguin/lsp/settings/clangd.lua new file mode 100644 index 0000000..f5f7c63 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/settings/clangd.lua @@ -0,0 +1,50 @@ +local decode_json_file = function(filename) + if vim.fn.filereadable(filename) == 0 then + return nil + end + + return vim.fn.json_decode(vim.fn.readfile(filename)) +end + +local opts = { + before_init = function(_, config) +-- local util = require("lspconfig/util") +-- local path = util.path +-- +-- local dot_clangd = path.join(vim.fn.getcwd(), ".pclangd") +-- local tbl = decode_json_file(dot_clangd) +-- +-- -- Example .pclangd config +-- -- { +-- -- "clangd_args": +-- -- { +-- -- "toolchain": "gcc", +-- -- "build_dir": "build" +-- -- }, +-- -- "dap_args": +-- -- { +-- -- "program_name": "udp_server", +-- -- "args": ["10010"], +-- -- "build_dir": "build" +-- -- } +-- -- +-- -- } +-- +-- local clangd_args = tbl["clangd_args"] +-- local toolchain = clangd_args.toolchain +-- local build_dir = clangd_args.build_dir +-- +-- config.root_dir = util.root_pattern(".pclangd") +-- -- vim.api.nvim_err_writeln(config.root_dir) +-- config.cmd = { "clangd", +-- "--query-driver=" .. toolchain, +-- "--compile-commands-dir=" .. path.join(vim.fn.getcwd(), build_dir), +-- "--pch-storage=memory", +-- "--background-index", +-- "-j=4", +-- "--header-insertion-decorators=0", +-- "--log=verbose" +-- } + end, +} +return opts diff --git a/.config/nvim/lua/penguin/lsp/settings/jsonls.lua b/.config/nvim/lua/penguin/lsp/settings/jsonls.lua new file mode 100644 index 0000000..be362c9 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/settings/jsonls.lua @@ -0,0 +1,183 @@ +-- Find more schemas here: https://www.schemastore.org/json/ +local schemas = { + { + description = "TypeScript compiler configuration file", + fileMatch = { + "tsconfig.json", + "tsconfig.*.json", + }, + url = "https://json.schemastore.org/tsconfig.json", + }, + { + description = "Lerna config", + fileMatch = { "lerna.json" }, + url = "https://json.schemastore.org/lerna.json", + }, + { + description = "Babel configuration", + fileMatch = { + ".babelrc.json", + ".babelrc", + "babel.config.json", + }, + url = "https://json.schemastore.org/babelrc.json", + }, + { + description = "ESLint config", + fileMatch = { + ".eslintrc.json", + ".eslintrc", + }, + url = "https://json.schemastore.org/eslintrc.json", + }, + { + description = "Bucklescript config", + fileMatch = { "bsconfig.json" }, + url = "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/8.2.0/docs/docson/build-schema.json", + }, + { + description = "Prettier config", + fileMatch = { + ".prettierrc", + ".prettierrc.json", + "prettier.config.json", + }, + url = "https://json.schemastore.org/prettierrc", + }, + { + description = "Vercel Now config", + fileMatch = { "now.json" }, + url = "https://json.schemastore.org/now", + }, + { + description = "Stylelint config", + fileMatch = { + ".stylelintrc", + ".stylelintrc.json", + "stylelint.config.json", + }, + url = "https://json.schemastore.org/stylelintrc", + }, + { + description = "A JSON schema for the ASP.NET LaunchSettings.json files", + fileMatch = { "launchsettings.json" }, + url = "https://json.schemastore.org/launchsettings.json", + }, + { + description = "Schema for CMake Presets", + fileMatch = { + "CMakePresets.json", + "CMakeUserPresets.json", + }, + url = "https://raw.githubusercontent.com/Kitware/CMake/master/Help/manual/presets/schema.json", + }, + { + description = "Configuration file as an alternative for configuring your repository in the settings page.", + fileMatch = { + ".codeclimate.json", + }, + url = "https://json.schemastore.org/codeclimate.json", + }, + { + description = "LLVM compilation database", + fileMatch = { + "compile_commands.json", + }, + url = "https://json.schemastore.org/compile-commands.json", + }, + { + description = "Config file for Command Task Runner", + fileMatch = { + "commands.json", + }, + url = "https://json.schemastore.org/commands.json", + }, + { + description = "AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.", + fileMatch = { + "*.cf.json", + "cloudformation.json", + }, + url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/cloudformation.schema.json", + }, + { + description = "The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.", + fileMatch = { + "serverless.template", + "*.sam.json", + "sam.json", + }, + url = "https://raw.githubusercontent.com/awslabs/goformation/v5.2.9/schema/sam.schema.json", + }, + { + description = "Json schema for properties json file for a GitHub Workflow template", + fileMatch = { + ".github/workflow-templates/**.properties.json", + }, + url = "https://json.schemastore.org/github-workflow-template-properties.json", + }, + { + description = "golangci-lint configuration file", + fileMatch = { + ".golangci.toml", + ".golangci.json", + }, + url = "https://json.schemastore.org/golangci-lint.json", + }, + { + description = "JSON schema for the JSON Feed format", + fileMatch = { + "feed.json", + }, + url = "https://json.schemastore.org/feed.json", + versions = { + ["1"] = "https://json.schemastore.org/feed-1.json", + ["1.1"] = "https://json.schemastore.org/feed.json", + }, + }, + { + description = "Packer template JSON configuration", + fileMatch = { + "packer.json", + }, + url = "https://json.schemastore.org/packer.json", + }, + { + description = "NPM configuration file", + fileMatch = { + "package.json", + }, + url = "https://json.schemastore.org/package.json", + }, + { + description = "JSON schema for Visual Studio component configuration files", + fileMatch = { + "*.vsconfig", + }, + url = "https://json.schemastore.org/vsconfig.json", + }, + { + description = "Resume json", + fileMatch = { "resume.json" }, + url = "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", + }, +} + +local opts = { + settings = { + json = { + schemas = schemas, + }, + }, + setup = { + commands = { + Format = { + function() + vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 }) + end, + }, + }, + }, +} + +return opts diff --git a/.config/nvim/lua/penguin/lsp/settings/pyright.lua b/.config/nvim/lua/penguin/lsp/settings/pyright.lua new file mode 100644 index 0000000..6354274 --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/settings/pyright.lua @@ -0,0 +1,10 @@ +return { + settings = { + + python = { + analysis = { + typeCheckingMode = "off" + } + } + }, +} diff --git a/.config/nvim/lua/penguin/lsp/settings/sumneko_lua.lua b/.config/nvim/lua/penguin/lsp/settings/sumneko_lua.lua new file mode 100644 index 0000000..0ac454a --- /dev/null +++ b/.config/nvim/lua/penguin/lsp/settings/sumneko_lua.lua @@ -0,0 +1,16 @@ +return { + settings = { + + Lua = { + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/penguin/nvim-dap.lua b/.config/nvim/lua/penguin/nvim-dap.lua new file mode 100644 index 0000000..ec0d00b --- /dev/null +++ b/.config/nvim/lua/penguin/nvim-dap.lua @@ -0,0 +1,107 @@ +local status_ok, dap = pcall(require, "dap") +if not status_ok then + return +end + +local decode_json_file = function(filename) + if vim.fn.filereadable(filename) == 0 then + return nil + end + + return vim.fn.json_decode(vim.fn.readfile(filename)) +end + +-- returns dap_args +local function pdap_clangd_init(root_dir) + root_dir = root_dir:gsub('"', '') + local pclangd_path = root_dir .. "/.pclangd" + local pclangd = decode_json_file(pclangd_path) -- tbl + local dap_args = pclangd["dap_args"] + dap.adapters.cppdbg = { + id = 'cppdbg', + type = 'executable', + command = '/storage/Shared/Documents/vscode-cpptools/extension/debugAdapters/bin/OpenDebugAD7', + } + dap.configurations.cpp = { + name = "Launch file", + type = "cppdbg", + request = "launch", + targetArchitecture = "arm", + miDebuggerPath = "/usr/bin/arm-none-eabi-gdb", + program = dap_args.build_dir .. "/" .. dap_args.program_name, + args = dap_args.args, + cwd = '${workspaceFolder}', + stopOnEntry = true, + } + + dap.configurations.c = dap.configurations.cpp + vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''}) +end + +-- +-- +-- local before_dap_setup = function() +-- -- need to get project root by finding ancestor containing .pclangd from cwd +-- local util = require("lspconfig/util") +-- local path = util.path +-- local dot_clangd = path.join(vim.fn.getcwd(), ".pclangd") +-- local tbl = decode_json_file(dot_clangd) +-- +-- +-- -- Example .pclangd config +-- -- { +-- -- "clangd_args": +-- -- { +-- -- "toolchain": "gcc", +-- -- "build_dir": "build" +-- -- }, +-- -- "dap_args": +-- -- { +-- -- "program_name": "udp_server", +-- -- "args": ["10010"], +-- -- "build_dir": "build" +-- -- } +-- -- +-- -- } +-- +-- local clients = vim.lsp.get_active_clients() +-- local thingy = clients[0].root_dir +-- vim.api.nvim_err_writeln("Here we go " .. thingy) +-- local dap_args = tbl["dap_args"] +-- return dap_args +-- end +-- +-- -- dap.adapters.cppdbg = { +-- -- id = 'cppdbg', +-- -- type = 'executable', +-- -- command = '/storage/Shared/Documents/vscode-cpptools/extension/debugAdapters/bin/OpenDebugAD7', +-- -- } +-- -- dap.configurations.cpp = { +-- -- name = "Launch file", +-- -- type = "cppdbg", +-- -- request = "launch", +-- -- -- program = function() +-- -- -- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') +-- -- -- end, +-- -- +-- -- -- dap_args.build_dir can be wrong sometimes. I need to be able to get the root directory from lspconfig +-- -- -- but idk how to do that +-- -- program = dap_args.build_dir .. "/" .. dap_args.program_name, +-- -- args = dap_args.args, +-- -- cwd = '${workspaceFolder}', +-- -- stopOnEntry = true, +-- -- } +-- -- +-- -- dap.configurations.c = dap.configurations.cpp +-- -- vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''}) +-- +-- +-- --return dap +-- +-- + +return +{ + pdap_clangd_init = pdap_clangd_init, + dap = dap +} diff --git a/.config/nvim/lua/penguin/nvim-tree.lua b/.config/nvim/lua/penguin/nvim-tree.lua new file mode 100644 index 0000000..298a2fe --- /dev/null +++ b/.config/nvim/lua/penguin/nvim-tree.lua @@ -0,0 +1,113 @@ +-- following options are the default +-- each of these are documented in `:help nvim-tree.OPTION_NAME` +vim.g.nvim_tree_icons = { + default = "", + symlink = "", + git = { + unstaged = "", + staged = "S", + unmerged = "", + renamed = "➜", + deleted = "", + untracked = "U", + ignored = "◌", + }, + folder = { + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + }, +} + +local status_ok, nvim_tree = pcall(require, "nvim-tree") +if not status_ok then + return +end + +local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config") +if not config_status_ok then + return +end + +local tree_cb = nvim_tree_config.nvim_tree_callback + +vim.g.nvim_tree_respect_buf_cwd = 1 +nvim_tree.setup { + disable_netrw = true, + hijack_netrw = true, + open_on_setup = false, + ignore_ft_on_setup = { + "startify", + "dashboard", + "alpha", + }, + auto_close = false, + open_on_tab = false, + hijack_cursor = true, + update_cwd = true, + update_to_buf_dir = { + enable = true, + auto_open = true, + }, + diagnostics = { + enable = true, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, + update_focused_file = { + enable = true, + update_cwd = true, + ignore_list = {}, + }, + git = { + enable = true, + ignore = true, + timeout = 500, + }, + view = { + width = 30, + height = 30, + hide_root_folder = false, + side = "left", + auto_resize = true, + mappings = { + custom_only = false, + list = { + { key = { "l", "", "o" }, cb = tree_cb "edit" }, + { key = "h", cb = tree_cb "close_node" }, + { key = "v", cb = tree_cb "vsplit" }, + }, + }, + number = false, + relativenumber = false, + }, + quit_on_open = 0, + git_hl = 1, + disable_window_picker = 0, + root_folder_modifier = ":t", + show_icons = { + git = 1, + folders = 1, + files = 1, + folder_arrows = 1, + tree_width = 30, + }, + system_open = { + cmd = nil, + args = {}, + }, + filters = { + dotfiles = false, + custom = {}, + }, + trash = { + cmd = "trash", + require_confirm = true, + } +} diff --git a/.config/nvim/lua/penguin/options.lua b/.config/nvim/lua/penguin/options.lua new file mode 100644 index 0000000..1b81a16 --- /dev/null +++ b/.config/nvim/lua/penguin/options.lua @@ -0,0 +1,48 @@ +local options = { + backup = true, -- creates a backup file + clipboard = "unnamedplus", -- allows neovim to access the system clipboard + cmdheight = 2, -- more space in the neovim command line for displaying messages + completeopt = { "menuone", "noselect" }, -- mostly just for cmp + conceallevel = 0, -- so that `` is visible in markdown files + fileencoding = "utf-8", -- the encoding written to a file + hlsearch = true, -- highlight all matches on previous search pattern + ignorecase = true, -- ignore case in search patterns + mouse = "a", -- allow the mouse to be used in neovim + pumheight = 10, -- pop up menu height + showmode = false, -- we don't need to see things like -- INSERT -- anymore + showtabline = 2, -- always show tabs + smartcase = true, -- smart case + smartindent = true, -- make indenting smarter again + splitbelow = true, -- force all horizontal splits to go below current window + splitright = true, -- force all vertical splits to go to the right of current window + swapfile = true, -- creates a swapfile + termguicolors = true, -- set term gui colors (most terminals support this) + timeoutlen = 1000, -- time to wait for a mapped sequence to complete (in milliseconds) + undofile = true, -- enable persistent undo + updatetime = 300, -- faster completion (4000ms default) + writebackup = false, -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited + expandtab = false, -- convert tabs to spaces + shiftwidth = 4, -- the number of spaces inserted for each indentation + tabstop = 4, -- insert 2 spaces for a tab + cursorline = true, -- highlight the current line + number = true, -- set numbered lines + relativenumber = false, -- set relative numbered lines + numberwidth = 4, -- set number column width to 2 {default 4} + signcolumn = "yes", -- always show the sign column, otherwise it would shift the text each time + wrap = false, -- display lines as one long line + scrolloff = 8, -- is one of my fav + sidescrolloff = 8, + guifont = "monospace:h17", -- the font used in graphical neovim applications + backupdir="/home/penguin/.vim/backup//", + directory="/home/penguin/.vim/swap//", +} + +vim.opt.shortmess:append "c" + +for k, v in pairs(options) do + vim.opt[k] = v +end + +vim.cmd "set whichwrap+=<,>,[,],h,l" +vim.cmd [[set iskeyword+=-]] +vim.cmd [[set formatoptions-=cro]] -- TODO: this doesn't seem to work diff --git a/.config/nvim/lua/penguin/plugins.lua b/.config/nvim/lua/penguin/plugins.lua new file mode 100644 index 0000000..17edfe9 --- /dev/null +++ b/.config/nvim/lua/penguin/plugins.lua @@ -0,0 +1,154 @@ +local fn = vim.fn + +-- Automatically install packer +local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_BOOTSTRAP = fn.system { + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + } + print "Installing packer close and reopen Neovim..." + vim.cmd [[packadd packer.nvim]] +end + +-- Autocommand that reloads neovim whenever you save the plugins.lua file +vim.cmd [[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerSync + augroup end +]] + +-- Use a protected call so we don't error out on first use +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +-- Install your plugins here +return packer.startup(function(use) + -- My plugins here + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins + use {'dracula/vim', as = 'dracula'} + + -- Colorschemes + -- use "lunarvim/colorschemes" -- A bunch of colorschemes you can try out + use "lunarvim/darkplus.nvim" + use {'colepeters/spacemacs-theme.vim', as = 'spacemacs'} + + -- cmp plugins + use "hrsh7th/nvim-cmp" -- The completion plugin + use "hrsh7th/cmp-buffer" -- The buffer completions + use "hrsh7th/cmp-path" -- path completions + use "hrsh7th/cmp-cmdline" -- cmdline completions + use "saadparwaiz1/cmp_luasnip" -- snippet completions + use "hrsh7th/cmp-nvim-lsp" -- LSP + use "hrsh7th/cmp-nvim-lua" -- LUA + + -- -- LSP + use 'mhartington/formatter.nvim' + use "neovim/nvim-lspconfig" -- enable lsp + use "williamboman/nvim-lsp-installer" -- simple to use language server installer + use "tamago324/nlsp-settings.nvim" -- language server settings defined in json + + -- snippets + use "L3MON4D3/LuaSnip" -- snippet engine + use "rafamadriz/friendly-snippets" -- a bunch of snippets to use + + -- Telescope + use "nvim-telescope/telescope.nvim" + use "nvim-telescope/telescope-media-files.nvim" + -- use "nvim-telescope/telescope-project.nvim" + + -- TreeSitter + use { + "nvim-treesitter/nvim-treesitter", + run = ":TSUpdate", + commit = "668de0951a36ef17016074f1120b6aacbe6c4515" + } + use "p00f/nvim-ts-rainbow" + use "nvim-treesitter/playground" + + -- Autopairs + use "windwp/nvim-autopairs" -- autopairs + + -- Comment + use "numToStr/Comment.nvim" -- easily comment stuff + use "JoosepAlviste/nvim-ts-context-commentstring" + + -- Git + use "lewis6991/gitsigns.nvim" + + -- Nvim Tree + use "kyazdani42/nvim-web-devicons" + use "kyazdani42/nvim-tree.lua" + + use "moll/vim-bbye" + use "akinsho/bufferline.nvim" + + use "akinsho/toggleterm.nvim" + + use "liuchengxu/space-vim-dark" + use "romgrk/nvim-treesitter-context" + require"treesitter-context".setup{ + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + throttle = true, -- Throttles plugin updates (may improve performance) + max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. + patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries. + -- For all filetypes + -- Note that setting an entry here replaces all other patterns for this entry. + -- By setting the 'default' entry below, you can control which nodes you want to + -- appear in the context window. + default = { + 'class', + 'function', + 'method', + -- 'for', -- These won't appear in the context + -- 'while', + -- 'if', + -- 'switch', + -- 'case', + }, + -- Example for a specific filetype. + -- If a pattern is missing, *open a PR* so everyone can benefit. + -- rust = { + -- 'impl_item', + -- }, + }, + exact_patterns = { + -- Example for a specific filetype with Lua patterns + -- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will + -- exactly match "impl_item" only) + -- rust = true, + } +} + + + -- whichkey + use "folke/which-key.nvim" + use {"ellisonleao/glow.nvim"} + vim.g.glow_binary_path = vim.env.HOME .. "/Documents/glow" + + use "mfussenegger/nvim-dap" + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins + if PACKER_BOOTSTRAP then + require("packer").sync() + end +end) diff --git a/.config/nvim/lua/penguin/telescope.lua b/.config/nvim/lua/penguin/telescope.lua new file mode 100644 index 0000000..04ac874 --- /dev/null +++ b/.config/nvim/lua/penguin/telescope.lua @@ -0,0 +1,104 @@ +local status_ok, telescope = pcall(require, "telescope") +if not status_ok then + return +end + +telescope.load_extension('media_files') + +local actions = require "telescope.actions" + +telescope.setup { + defaults = { + + prompt_prefix = " ", + selection_caret = " ", + path_display = { "smart" }, + + mappings = { + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.close, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + [""] = actions.complete_tag, + [""] = actions.which_key, -- keys from pressing + }, + + n = { + [""] = actions.close, + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + + [""] = actions.toggle_selection + actions.move_selection_worse, + [""] = actions.toggle_selection + actions.move_selection_better, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + + ["j"] = actions.move_selection_next, + ["k"] = actions.move_selection_previous, + ["H"] = actions.move_to_top, + ["M"] = actions.move_to_middle, + ["L"] = actions.move_to_bottom, + + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + ["gg"] = actions.move_to_top, + ["G"] = actions.move_to_bottom, + + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + + ["?"] = actions.which_key, + }, + }, + }, + pickers = { + -- Default configuration for builtin pickers goes here: + -- picker_name = { + -- picker_config_key = value, + -- ... + -- } + -- Now the picker_config_key will be applied every time you call this + -- builtin picker + }, + extensions = { + media_files = { + -- filetypes whitelist + -- defaults to {"png", "jpg", "mp4", "webm", "pdf"} + filetypes = {"png", "webp", "jpg", "jpeg"}, + find_cmd = "rg" -- find command (defaults to `fd`) + } + -- Your extension configuration goes here: + -- extension_name = { + -- extension_config_key = value, + -- } + -- please take a look at the readme of the extension you want to configure + }, +} diff --git a/.config/nvim/lua/penguin/toggleterm.lua b/.config/nvim/lua/penguin/toggleterm.lua new file mode 100644 index 0000000..cecbd99 --- /dev/null +++ b/.config/nvim/lua/penguin/toggleterm.lua @@ -0,0 +1,70 @@ +local status_ok, toggleterm = pcall(require, "toggleterm") +if not status_ok then + return +end + +toggleterm.setup({ + size = 20, + open_mapping = [[]], + hide_numbers = true, + shade_filetypes = {}, + shade_terminals = true, + shading_factor = 2, + start_in_insert = true, + insert_mappings = true, + persist_size = true, + direction = "float", + close_on_exit = true, + shell = vim.o.shell, + float_opts = { + border = "curved", + winblend = 0, + highlights = { + border = "Normal", + background = "Normal", + }, + }, +}) + +function _G.set_terminal_keymaps() + local opts = {noremap = true} + vim.api.nvim_buf_set_keymap(0, 't', '', [[]], opts) + vim.api.nvim_buf_set_keymap(0, 't', 'jk', [[]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[h]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[j]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[k]], opts) + vim.api.nvim_buf_set_keymap(0, 't', '', [[l]], opts) +end + +vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') + +local Terminal = require("toggleterm.terminal").Terminal +local lazygit = Terminal:new({ cmd = "lazygit", hidden = true }) + +function _LAZYGIT_TOGGLE() + lazygit:toggle() +end + +local node = Terminal:new({ cmd = "node", hidden = true }) + +function _NODE_TOGGLE() + node:toggle() +end + +local ncdu = Terminal:new({ cmd = "ncdu", hidden = true }) + +function _NCDU_TOGGLE() + ncdu:toggle() +end + +local htop = Terminal:new({ cmd = "htop", hidden = true }) + +function _HTOP_TOGGLE() + htop:toggle() +end + +local python = Terminal:new({ cmd = "python", hidden = true }) + +function _PYTHON_TOGGLE() + python:toggle() +end diff --git a/.config/nvim/lua/penguin/treesitter.lua b/.config/nvim/lua/penguin/treesitter.lua new file mode 100644 index 0000000..32d56f7 --- /dev/null +++ b/.config/nvim/lua/penguin/treesitter.lua @@ -0,0 +1,51 @@ +local configs = require("nvim-treesitter.configs") +configs.setup { + ensure_installed = "maintained", + sync_install = false, + ignore_install = { "haskell" }, -- List of parsers to ignore installing + highlight = { + enable = true, -- false will disable the whole extension + disable = { "" }, -- list of language that will be disabled + additional_vim_regex_highlighting = true, + + }, + indent = { enable = true, disable = { "yaml" } }, + require("nvim-treesitter.configs").setup { + highlight = { + -- ... + }, + -- ... + rainbow = { + enable = true, + -- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for + extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean + max_file_lines = nil, -- Do not enable for files with more than n lines, int + -- colors = {}, -- table of hex strings + -- termcolors = {} -- table of colour name strings + } + }, + require "nvim-treesitter.configs".setup { + playground = { + enable = true, + disable = {}, + updatetime = 25, -- Debounced time for highlighting nodes in the playground from source code + persist_queries = false, -- Whether the query persists across vim sessions + keybindings = { + toggle_query_editor = 'o', + toggle_hl_groups = 'i', + toggle_injected_languages = 't', + toggle_anonymous_nodes = 'a', + toggle_language_display = 'I', + focus_language = 'f', + unfocus_language = 'F', + update = 'R', + goto_node = '', + show_help = '?', + }, + } + }, + context_commentstring = { + enable = true, + enable_autocmd = false, + }, +} diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100644 index 0000000..be6a3c9 --- /dev/null +++ b/.config/picom/picom.conf @@ -0,0 +1,246 @@ +# Thank you code_nomad: http://9m.no/ꪯ鵞 +# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton + +################################# +# +# Backend +# +################################# + +# Backend to use: "xrender" or "glx". +# GLX backend is typically much faster but depends on a sane driver. +backend = "glx"; + +################################# +# +# GLX backend +# +################################# + +glx-no-stencil = true; + +# GLX backend: Copy unmodified regions from front buffer instead of redrawing them all. +# My tests with nvidia-drivers show a 10% decrease in performance when the whole screen is modified, +# but a 20% increase when only 1/4 is. +# My tests on nouveau show terrible slowdown. +glx-copy-from-front = false; + +# GLX backend: Use MESA_copy_sub_buffer to do partial screen update. +# My tests on nouveau shows a 200% performance boost when only 1/4 of the screen is updated. +# May break VSync and is not available on some drivers. +# Overrides --glx-copy-from-front. +# glx-use-copysubbuffermesa = true; + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe). +# Recommended if it works. +# glx-no-rebind-pixmap = true; + +# GLX backend: GLX buffer swap method we assume. +# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1). +# undefined is the slowest and the safest, and the default value. +# copy is fastest, but may fail on some drivers, +# 2-6 are gradually slower but safer (6 is still faster than 0). +# Usually, double buffer means 2, triple buffer means 3. +# buffer-age means auto-detect using GLX_EXT_buffer_age, supported by some drivers. +# Useless with --glx-use-copysubbuffermesa. +# Partially breaks --resize-damage. +# Defaults to undefined. +#glx-swap-method = "undefined"; + +################################# +# +# Shadows +# +################################# + +# Enabled client-side shadows on windows. +shadow = true; +# The blur radius for shadows. (default 12) +shadow-radius = 12; +# The left offset for shadows. (default -15) +shadow-offset-x = -8; +# The top offset for shadows. (default -15) +shadow-offset-y = -8; +# The translucency for shadows. (default .75) +shadow-opacity = 0.75; + +# Set if you want different colour shadows +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; + +# The shadow exclude options are helpful if you have shadows enabled. Due to the way picom draws its shadows, certain applications will have visual glitches +# (most applications are fine, only apps that do weird things with xshapes or argb are affected). +# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. +shadow-exclude = [ + "! name~=''", + "name = 'Notification'", + "name = 'Plank'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name = 'cpt_frame_window'", + "name *= 'VLC'", + "name *= 'compton'", + "name *= 'picom'", + "name *= 'Chromium'", + "name *= 'Chrome'", + # "window_type = 'dock'", + "class_g = 'Firefox' && argb", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c", + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; +# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) +shadow-ignore-shaped = false; +# Sets the radius of rounded window corners. When > 0, the compositor will +# round the corners of windows. Does not interact well with +# `transparent-clipping`. +# corner-radius = 8.0 + + +# Exclude conditions for rounded corners. +rounded-corners-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +################################# +# +# Opacity +# +################################# + +inactive-opacity = 0.95; +active-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = false; + +# Dim inactive windows. (0.0 - 1.0) +# inactive-dim = 0.2; +# Do not let dimness adjust based on window opacity. +# inactive-dim-fixed = true; +# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. +# blur-background = true; +# Blur background of opaque windows with transparent frames as well. +# blur-background-frame = true; +# Do not let blur radius adjust based on window opacity. +blur-background-fixed = false; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'" +]; + +################################# +# +# Fading +# +################################# + +# Fade windows during opacity changes. +fading = true; +# The time between steps in a fade in milliseconds. (default 10). +fade-delta = 4; +# Opacity change between steps while fading in. (default 0.028). +fade-in-step = 0.03; +# Opacity change between steps while fading out. (default 0.03). +fade-out-step = 0.03; +# Fade windows in/out when opening/closing +# no-fading-openclose = true; + +# Specify a list of conditions of windows that should not be faded. +fade-exclude = [ ]; + +################################# +# +# Other +# +################################# + +# Try to detect WM windows and mark them as active. +mark-wmwin-focused = true; +# Mark all non-WM but override-redirect windows active (e.g. menus). +mark-ovredir-focused = true; +# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events. +# Usually more reliable but depends on a EWMH-compliant WM. +use-ewmh-active-win = true; +# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on. +detect-rounded-corners = true; + +# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows. +# This prevents opacity being ignored for some apps. +# For example without this enabled my xfce4-notifyd is 100% opacity no matter what. +detect-client-opacity = true; + +# Specify refresh rate of the screen. +# If not specified or 0, picom will try detecting this with X RandR extension. +# refresh-rate = 0; + +# Vertical synchronization: match the refresh rate of the monitor +vsync = false; + +# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. +# Reported to have no effect, though. +dbe = false; + +# Limit picom to repaint at most once every 1 / refresh_rate second to boost performance. +# This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +#sw-opti = true; + +# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games. +# Known to cause flickering when redirecting/unredirecting windows. +unredir-if-possible = false; + +# Specify a list of conditions of windows that should always be considered focused. +focus-exclude = [ ]; + +# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time. +detect-transient = true; +# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time. +# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too. +detect-client-leader = true; + +################################# +# +# Window type settings +# +################################# + +wintypes: +{ + tooltip = + { + # fade: Fade the particular type of windows. + fade = true; + # shadow: Give those windows shadow + shadow = true; + # opacity: Default opacity for the type of windows. + opacity = 0.85; + # focus: Whether to always consider windows of this type focused. + focus = true; + }; +}; + +opacity-rule = [ + "100:class_g = 'vmd'", + "100:class_g = 'firefox-esr'", + "100:class_g = 'Hexchat'", + "100:class_g = 'discord'", + "100:class_g = 'Toontown Rewritten'"]; +###################### +# +# XSync +# See: https://github.com/yshui/picom/commit/b18d46bcbdc35a3b5620d817dd46fbc76485c20d +# +###################### + +# Use X Sync fence to sync clients' draw calls. Needed on nvidia-drivers with GLX backend for some users. +xrender-sync-fence = true; diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini new file mode 100644 index 0000000..622f5e2 --- /dev/null +++ b/.config/polybar/config.ini @@ -0,0 +1,300 @@ +############################################# +# vim:ft=dosini +# ____ ___ _ __ ______ _ ____ +# | _ \ / _ \| | \ \ / / __ ) / \ | _ \ +# | |_) | | | | | \ V /| _ \ / _ \ | |_) | +# | __/| |_| | |___| | | |_) / ___ \| _ < +# |_| \___/|_____|_| |____/_/ \_\_| \_\ +# +# Dembezum +############################################# + +[colors] +red = #eb6f92 +blue = #31748f +green = #9ccfd8 +yellow = #f6c177 +purple = #c4a7e7 +background = #171924 +foreground = #e0def4 +background-alt = #26233a +background-alt2 = #1c1e2b +foreground-alt = #6e6a86 +############################################# + +[bar/small] +pseudo-transparency = true +dpi-x = 96 +dpi-y = 96 +separator = +offset-y = 8 +width = 100%:-48px +height = 25pt +monitor = ${env:MONITOR:} +line-size = 4pt +enable-ipc = true +border-size = 4pt +padding-right = 1 +module-margin = 1 +padding-left = 1 +offset-x = 24 +wm-restack = i3 +cursor-click = pointer +# label-empty-padding = 0 +override-redirect = true +cursor-scroll = ns-resize +foreground = ${colors.foreground} +background = ${colors.background-alt2} +border-color = ${colors.background-alt} +separator-foreground = ${colors.yellow} +tray-position=right +tray-background = ${root.background} +############################################# +font-0 = JetBrainsMono Nerd Font:size=10;3 +font-N = ; +############################################# +modules-center = title +modules-left = i3 +modules-right = pulseaudio filesystem memory smalltime +############################################# + +[bar/top] +pseudo-transparency = true +dpi-x = 96 +dpi-y = 96 +separator = +offset-y = 8 +width = 100%:-48px +height = 25pt +monitor = ${env:MONITOR:} +line-size = 4pt +enable-ipc = true +border-size = 4pt +padding-right = 1 +module-margin = 1 +padding-left = 1 +offset-x = 24 +wm-restack = i3 +cursor-click = pointer +label-empty-padding = 0 +override-redirect = true +cursor-scroll = ns-resize +foreground = ${colors.foreground} +background = ${colors.background-alt2} +border-color = ${colors.background-alt} +separator-foreground = ${colors.yellow} +tray-position=right +tray-background = ${root.background} +############################################# +font-0 = JetBrainsMono Nerd Font:size=10;3 +font-N = ; +############################################# +modules-center = title +modules-left = i3 +modules-right = pulseaudio filesystem memory cpu time +############################################# + +[module/i3] +type = internal/i3 + +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; +############################################# +# pin-workspaces = true +format = +index-sort = true +wrapping-scroll = true +############################################# +label-mode = %mode% +label-mode-padding = 5 +label-mode-foreground = ${colors.foreground} +############################################# +label-unfocused = ${self.workspace-label} +label-unfocused-foreground = ${colors.foreground-alt} +label-unfocused-padding = 1 +############################################# +label-visible = ${self.workspace-label} +# label-visible-foreground = ${colors.foreground} +label-visible-padding = 1 +############################################# +label-focused = ${self.workspace-label} +label-focused-foreground = ${colors.foreground} +label-focused-background = ${colors.background-alt} +label-focused-padding = 1 +label-focused-underline = ${colors.background-alt} +############################################# +label-urgent = ${self.workspace-label} +label-urgent-padding = 1 +############################################# +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 1 +############################################# +label-occupied-padding = 1 +############################################# +label-dimmed-focused-background = ${colors.background} +############################################# +inline-mode = false +enable-click = true +# fuzzy-match = false +enable-scroll = true +reverse-scroll = false +show-urgent = true +############################################# + +[module/filesystem] +type = internal/fs +interval = 25 +mount-0 = / +label-mounted =  %percentage_used%% +label-mounted-foreground = ${colors.blue} +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground} + +############################################# + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "RAM " +label = %percentage_used:2%% +format-prefix-foreground = ${colors.purple} + +############################################# + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +label = %percentage:2%% +format-prefix-foreground = ${colors.blue} +format =