New Taskbar, Window Manager & Neovim config

This commit is contained in:
2024-06-04 23:04:34 +02:00
parent 5535757e4f
commit 7158963529
42 changed files with 2501 additions and 1956 deletions

View File

@@ -0,0 +1,18 @@
import = [
"~/.config/alacritty/themes/dracula.toml"
]
[env]
TERM="xterm-256color"
[font]
size = 13.0
[font.normal]
family = "MesloLGL Nerd Font"
style = "Regular"
[window]
decorations = "Buttonless"
opacity = 0.8
blur = true

View File

@@ -1,907 +0,0 @@
# 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/themes/themes/dracula.yaml
# 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. Both lines and columns
# must be non-zero for this to take effect. 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
# 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.
#opacity: 1.0
# 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
# Decorations theme variant
#
# Override the variant of the System theme/GTK theme/Wayland client side
# decorations. Commonly supported values are `Dark`, `Light`, and `None` for
# auto pick-up. Set this to `None` to use the default theme variant.
#decorations_theme_variant: None
# Resize increments
#
# Prefer resizing window by discrete steps equal to cell dimensions.
#resize_increments: false
# Make `Option` key behave as `Alt` (macOS only):
# - OnlyLeft
# - OnlyRight
# - Both
# - None (default)
#option_as_alt: 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 (roman) font face
normal:
# Font family
#
# Default:
# - (macOS) Menlo
# - (Linux/BSD) monospace
# - (Windows) Consolas
family: MesloLGS NF
# 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: 13.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
# Use built-in font for box drawing characters.
#
# If `true`, Alacritty will use a custom built-in font for box drawing
# characters (Unicode points 2500 - 259f).
#
#builtin_box_drawing: 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'
# Keyboard 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
# Footer bar
#
# Color used for the footer bar on the bottom, used by search regex input,
# hyperlink URI preview, etc.
#
#footer_bar:
# background: '#c5c8c6'
# foreground: '#1d1f21'
# 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: []
# Transparent cell backgrounds
#
# Whether or not `window.opacity` applies to all cell backgrounds or only to
# the default background. When set to `true` all cells will be transparent
# regardless of their background color.
#transparent_background_colors: false
# 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
#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:
# 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
# Time after which cursor stops blinking, in seconds.
#
# Specifying '0' will disable timeout for blinking.
#blink_timeout: 5
# 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:
# - (Linux/BSD/macOS) `$SHELL` or the user's login shell, if `$SHELL` is unset
# - (Windows) powershell
#shell:
# program: /bin/bash
# args:
# - --login
# Startup directory
#
# Directory the shell is started in. If this is unset, or `None`, the working
# directory of the parent process will be used.
#working_directory: None
# Offer IPC using `alacritty msg` (unix only)
#ipc_socket: 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
# Hints
#
# Terminal hints can be used to find text or hyperlink 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 any of `regex` or `hyperlinks` field and either an
# `action` or a `command` field. The fields `mouse`, `binding` and
# `post_processing` are optional.
#
# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be
# highlighted.
#
# 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 and applies only to
# `regex` matches.
#
# 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{-}\\^⟨⟩`]+"
# hyperlinks: true
# 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 for actions not exclusive to mouse mode)
#
# - Mouse exclusive actions:
#
# - ExpandSelection
# Expand the selection to the current mouse cursor location.
#
# And optionally:
#
# - `mods` (see key bindings)
#mouse_bindings:
# - { mouse: Right, action: ExpandSelection }
# - { mouse: Right, mods: Control, action: ExpandSelection }
# - { mouse: Middle, mode: ~Vi, 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/winit/*/winit/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
# - ToggleMaximized
# - SpawnNewInstance
# Spawn a new instance of Alacritty.
# - CreateNewWindow
# Create a new Alacritty window from the current process.
# - 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`.
# - CenterAroundViCursor
# Center view around vi mode cursor
#
# - 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: 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: Z, mode: Vi|~Search, action: CenterAroundViCursor }
#- { 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: CreateNewWindow }
#- { 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
# Renderer override.
# - glsl3
# - gles2
# - gles2_pure
#renderer: None
# Print all received window events.
#print_events: false
# Highlight window damage information.
#highlight_damage: false

View File

@@ -1,44 +1,47 @@
{
"LuaSnip": { "branch": "master", "commit": "1def35377854535bb3b0f4cc7a33c083cdb12571" },
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
"ReplaceWithRegister": { "branch": "master", "commit": "832efc23111d19591d495dc72286de2fb0b09345" },
"alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" },
"bufferline.nvim": { "branch": "main", "commit": "1a3397556d194bb1f2cc530b07124ccc512c5501" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"dracula.nvim": { "branch": "main", "commit": "7200e64c589f899d29f8963aad7543856d1c2545" },
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
"gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "41674c9d50f23cfa3e11f0ca964eb9100c2a8922" },
"mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "e4f34741daa9cf95de68a603d3e7a6844a69fdf0" },
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
"neorg": { "branch": "main", "commit": "f4466457396717d10d2d235d019e0a80e1770087" },
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
"none-ls.nvim": { "branch": "main", "commit": "3a4826687da4310af379515086d71faca4d21288" },
"nui.nvim": { "branch": "main", "commit": "257dccc43b4badc735978f0791d216f7d665b75a" },
"nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" },
"nvim-bufdel": { "branch": "main", "commit": "96c4f7ab053ddab0025bebe5f7c71e4795430e47" },
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-lint": { "branch": "master", "commit": "6f589cb93560581dc2a3b9693658afe865e5649e" },
"nvim-lspconfig": { "branch": "master", "commit": "fcf153fbbf1facd16a71d46b92be8be495123a9f" },
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
"nvim-surround": { "branch": "main", "commit": "0855a89e00a5822c3a482a82e5223fcf2e9ede13" },
"nvim-tree.lua": { "branch": "master", "commit": "05f55c1fd6470b31627655c528245794e3cd4b2c" },
"nvim-treesitter": { "branch": "master", "commit": "36f81e698ee67cba76f698a5a86fb7c6ecdeb7b0" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "c71406807b545f4a2c17310197a8c88b976f338d" },
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
"dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" },
"friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" },
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"lazy.nvim": { "branch": "main", "commit": "c717ab88ff47830845a1e422a1d6495c764fac1d" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c1fbdcb0d8d1295314f1612c4a247253e70299d9" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"noice.nvim": { "branch": "main", "commit": "4a691f630c75966397f7a67c6860c03ae5da643f" },
"none-ls-extras.nvim": { "branch": "main", "commit": "336e84b9e43c0effb735b08798ffac382920053b" },
"none-ls.nvim": { "branch": "main", "commit": "37671797d6e5f9bd0ee3ab965ab2e6de251e1930" },
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
"nvim-autopairs": { "branch": "master", "commit": "b0b79e42a28f09719a7da9534c3731fa37319d9b" },
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-lint": { "branch": "master", "commit": "1f98d6c863f91706369d74aeb2eb3f02b2e96861" },
"nvim-lspconfig": { "branch": "master", "commit": "6d2ae9fdc3111a6e8fd5db2467aca11737195a30" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-surround": { "branch": "main", "commit": "79aaa42da1f698ed31bcbe7f83081f69dca7ba17" },
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
"nvim-treesitter": { "branch": "master", "commit": "1eabe69bfa8f78e14fcf5d42a2b3881babaca30a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" },
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" },
"telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"vim-fugitive": { "branch": "master", "commit": "5a9bd42dd8dd127779f3cd8982a0419b7ca9c7f5" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" },
"vimtex": { "branch": "master", "commit": "941485f8b046ac00763dad2546f0701e85e5e02c" },
"vim-tmux-navigator": { "branch": "master", "commit": "a26954a585b02a2ac02f87145e204f8798a7cbc2" },
"vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" },
"vimwiki": { "branch": "dev", "commit": "69318e74c88ef7677e2496fd0a836446ceac61e8" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
}

View File

@@ -11,6 +11,14 @@ opt.autoindent = true
opt.ignorecase = true
opt.smartcase = true
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
opt.undofile = true
opt.hlsearch = false
opt.incsearch = true
opt.scrolloff = 999
opt.termguicolors = true
opt.background = "dark"
opt.signcolumn = "yes"

View File

@@ -0,0 +1,8 @@
return {
"AckslD/nvim-FeMaco.lua",
config = function()
local femaco = require("femaco")
femaco.setup({})
end,
}

View File

@@ -24,7 +24,7 @@ return {
mason_tool_installer.setup({
ensure_installed = {
"mypy",
"ruff",
"ruff_lsp",
"black",
"clang-format",
"stylua",

View File

@@ -2,6 +2,7 @@ return {
"nvimtools/none-ls.nvim",
dependencies = {
"jay-babu/mason-null-ls.nvim",
"nvimtools/none-ls-extras.nvim",
},
config = function()
local mason_null_ls = require("mason-null-ls")
@@ -25,7 +26,7 @@ return {
return { "--python-executable", virtual .. "/bin/python3" }
end,
}),
diagnostics.ruff,
-- diagnostics.ruff_lsp,
diagnostics.vale,
},
on_attach = function(current_client, bufnr)

View File

@@ -1,29 +0,0 @@
return {
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
local neorg = require("neorg")
neorg.setup({
load = {
["core.defaults"] = {},
["core.completion"] = {
config = {
engine = "nvim-cmp",
},
},
["core.integrations.treesitter"] = {},
["core.concealer"] = {},
["core.dirman"] = {
config = {
workspaces = {
code = "~/Projects/Private/neorg_code",
edu = "~/Projects/Private/neorg_edu",
},
},
},
},
})
end,
}

View File

@@ -7,6 +7,10 @@ return {
config = function()
local noice = require("noice")
noice.setup()
noice.setup({
presets = {
long_message_to_split = true,
},
})
end,
}

View File

@@ -4,9 +4,9 @@ return {
dependencies = {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
"L3MON4D3/LuaSnip", -- snippet engine
"saadparwaiz1/cmp_luasnip", -- for autocompletion
"rafamadriz/friendly-snippets", -- useful snippets
"onsails/lspkind.nvim",
},
config = function()
@@ -15,6 +15,9 @@ return {
local lspkind = require("lspkind")
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets/" })
luasnip.filetype_extend("vimwiki", { "markdown" })
cmp.setup({
completion = {
@@ -31,12 +34,16 @@ return {
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(), -- close completion window
["<C-s>"] = cmp.mapping.abort(), -- close completion window
["<CR>"] = cmp.mapping.confirm({ select = false }),
["<C-n>"] = cmp.config.disable,
["<C-p>"] = cmp.config.disable,
["<C-h>"] = cmp.config.disable,
["<C-e>"] = cmp.config.disable,
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- snippets
{ name = "nvim_lsp" }, -- LSP
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
}),
@@ -47,5 +54,26 @@ return {
}),
},
})
luasnip.config.set_config({
history = true,
updateevents = "TextChanged, TextChangedI",
enable_autosnippets = true,
})
vim.keymap.set({ "i" }, "<C-e>", function()
luasnip.expand()
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-l>", function()
luasnip.jump(1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-h>", function()
luasnip.jump(-1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-n>", function()
luasnip.change_choice(1)
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-p>", function()
luasnip.change_choice(-1)
end, { silent = true })
end,
}

View File

@@ -5,6 +5,7 @@ return {
"nvim-lua/plenary.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
"nvim-tree/nvim-web-devicons",
"nvim-telescope/telescope-live-grep-args.nvim",
},
config = function()
local telescope = require("telescope")

View File

@@ -7,6 +7,34 @@ return {
select = {
enable = true,
lookahead = true,
keymaps = {
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
["am"] = {
query = "@function.outer",
desc = "Select outer part of a method or function definition",
},
["im"] = {
query = "@function.inner",
desc = "Select inner part of a method or function definition",
},
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
},
},
},
})

View File

@@ -1,11 +1,40 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
local treesitter = require("nvim-treesitter.configs")
treesitter.setup({})
treesitter.setup({
highlight = {
enable = true,
additional_vim_regex_highlighting = { "latex" },
},
indent = {
enable = true,
},
ensure_installed = {
"python",
"cpp",
"lua",
"markdown_inline",
"html",
"css",
"bash",
"latex",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
})
end,
}

View File

@@ -1,3 +1,23 @@
return {
"lervag/vimtex",
config = function()
local wk = require("which-key")
vim.g.tex_flavor = "latex"
vim.g.vimtex_view_method = "zathura"
vim.g.vimtex_quickfix_mode = 0
vim.g.vimtex_compiler_latexmk = {
options = {
"-pdf",
},
}
wk.register({
v = {
name = "vimtex",
c = { ":VimtexCompile", "Compile LaTex File" },
v = { ":!zathura main.pdf &>/dev/null &", "Open compiled PDF in Zathura" },
},
}, { prefix = "<leader>" })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"vimwiki/vimwiki",
init = function()
vim.g.vimwiki_list = {
{ path = "/Users/jirayu/Projects/Private/vimwiki_code/", syntax = "markdown", ext = ".md" },
{ path = "/Users/jirayu/Projects/Private/vimwiki_edu/", syntax = "markdown", ext = ".md" },
}
end,
}

View File

@@ -8,13 +8,6 @@ return {
config = function()
local wk = require("which-key")
wk.setup({
opts = {
defaults = {
["<leader>t"] = { name = "+vimtex" },
},
},
})
wk.register({
n = {
name = "vim",

View File

@@ -0,0 +1,20 @@
local ls = require("luasnip") --{{{
local s = ls.s
local i = ls.i
local t = ls.t
local d = ls.dynamic_node
local c = ls.choice_node
local f = ls.function_node
local sn = ls.snippet_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
local snippets, autosnippets = {}, {} --}}}
-- Start Snippets --
-- End Snippets --
return snippets, autosnippets

View File

@@ -0,0 +1,54 @@
local ls = require("luasnip") --{{{
local s = ls.s
local i = ls.i
local t = ls.t
local d = ls.dynamic_node
local c = ls.choice_node
local f = ls.function_node
local sn = ls.snippet_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
local snippets, autosnippets = {}, {} --}}}
-- Start Snippets --
local snip = s(
{ trig = "snip", desc = "Snippet for LuaSnip" },
fmt(
[=[
local {} = s(
{{ trig = "{}", {}desc = "{}"}},
fmt(
[[
{}
]],
{{
{}
}}
){}
)
table.insert({}, {})
{}
]=],
{
i(1, "Name of Snippet"),
i(2, "Trigger"),
c(3, { t(""), t("regTrig = true, ") }),
i(4, "Description"),
i(5, "Snippet"),
i(6, "Nodes"),
c(7, { t(""), t({ ",", " {", " condition = math,", " show_condition=math,", " }" }) }),
c(8, { t("snippets"), t("autosnippets") }),
rep(1),
i(0),
}
)
)
table.insert(snippets, snip)
-- End Snippets --
return snippets, autosnippets

View File

@@ -0,0 +1,35 @@
local ls = require("luasnip") --{{{
local s = ls.s
local i = ls.i
local t = ls.t
local d = ls.dynamic_node
local c = ls.choice_node
local f = ls.function_node
local sn = ls.snippet_node
local fmt = require("luasnip.extras.fmt").fmt
local rep = require("luasnip.extras").rep
local snippets, autosnippets = {}, {} --}}}
-- Start Snippets --
local code = s(
{ trig = "code", desc = "Code Section" },
fmt(
[[
```{}
```
]],
{
i(1, "Language"),
}
)
)
table.insert(autosnippets, code)
-- End Snippets --
return snippets, autosnippets

File diff suppressed because it is too large Load Diff

44
.config/sketchybar/colors.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/bash
export WHITE=0xffeeeeee
# -- Dracula Scheme --
export BAR_COLOR=0xff262626
export ITEM_BG_COLOR=0xff4e4e4e
export ACCENT_COLOR=0xffa582f0
# -- Gray Scheme --
# export BAR_COLOR=0xff101314
# export ITEM_BG_COLOR=0xff353c3f
# export ACCENT_COLOR=0xffffffff
# -- Purple Scheme --
# export BAR_COLOR=0xff140c42
# export ITEM_BG_COLOR=0xff2b1c84
# export ACCENT_COLOR=0xffeb46f9
# -- Red Scheme ---
# export BAR_COLOR=0xff23090e
# export ITEM_BG_COLOR=0xff591221
# export ACCENT_COLOR=0xffff2453
# -- Blue Scheme ---
# export BAR_COLOR=0xff021254
# export ITEM_BG_COLOR=0xff093aa8
# export ACCENT_COLOR=0xff15bdf9
# -- Green Scheme --
# export BAR_COLOR=0xff003315
# export ITEM_BG_COLOR=0xff008c39
# export ACCENT_COLOR=0xff1dfca1
# -- Orange Scheme --
# export BAR_COLOR=0xff381c02
# export ITEM_BG_COLOR=0xff99440a
# export ACCENT_COLOR=0xfff97716
# -- Yellow Scheme --
# export BAR_COLOR=0xff2d2b02
# export ITEM_BG_COLOR=0xff8e7e0a
# export ACCENT_COLOR=0xfff7fc17

View File

@@ -0,0 +1,6 @@
#!/bin/bash
sketchybar --add item battery right \
--set battery update-freq=120 \
script="$PLUGIN_DIR/battery.sh" \
--subscribe battery system_woke power_source_change

View File

@@ -0,0 +1,8 @@
#!/bin/bash
sketchybar --add item calendar right \
--set calendar icon=󰃰 \
update_freq=1 \
script="$PLUGIN_DIR/calendar.sh"

View File

@@ -0,0 +1,9 @@
#!/bin/bash
sketchybar --add item front_app left \
--set front_app background.color=$ACCENT_COLOR \
icon.color=$BAR_COLOR \
icon.font="sketchybar-app-font:Regular:16.0" \
label.color=$BAR_COLOR \
script="$PLUGIN_DIR/front_app.sh" \
--subscribe front_app front_app_switched

View File

@@ -0,0 +1,12 @@
#!/bin/bash
sketchybar --add item media e \
--set media label.color=$ACCENT_COLOR \
label.max_chars=20 \
icon.padding_left=0 \
scroll_texts=on \
icon=\
icon.color=$ACCENT_COLOR \
background.drawing=off \
script="$PLUGIN_DIR/media.sh" \
--subscribe media media_change

View File

@@ -0,0 +1,23 @@
#!/bin/bash
SPACE_SIDS=(1 2 3 4 5 6 7 8 9 10)
for sid in "${SPACE_SIDS[@]}"
do
sketchybar --add space space.$sid left \
--set space.$sid space=$sid \
icon=$sid \
label.font="sketchybar-app-font:Regular:16.0" \
label.padding_right=20 \
label.y_offset=-1 \
script="$PLUGIN_DIR/space.sh"
done
sketchybar --add item space_separator left \
--set space_separator icon"" \
icon.color=$ACCENT_COLOR \
icon.padding_left=4 \
label.drawing=off \
background.drawing=off \
script="$PLUGIN_DIR/space_windows.sh" \
--subscribe space_separator space_windows_change

View File

@@ -0,0 +1,5 @@
#!/bin/bash
sketchybar --add item volume right \
--set volume script="$PLUGIN_DIR/volume.sh" \
--subscribe volume volume_change \

View File

@@ -0,0 +1,28 @@
#!/bin/sh
PERCENTAGE="$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)"
CHARGING="$(pmset -g batt | grep 'AC Power')"
if [ "$PERCENTAGE" = "" ]; then
exit 0
fi
case "${PERCENTAGE}" in
9[0-9]|100) ICON=""
;;
[6-8][0-9]) ICON=""
;;
[3-5][0-9]) ICON=""
;;
[1-2][0-9]) ICON=""
;;
*) ICON=""
esac
if [[ "$CHARGING" != "" ]]; then
ICON=""
fi
# The item invoking this script (name $NAME) will get its icon and label
# updated with the current battery status
sketchybar --set "$NAME" icon="$ICON" label="${PERCENTAGE}%"

View File

@@ -0,0 +1,3 @@
#!/bin/bash
sketchybar --set $NAME label="$(date +'%a %d %b %H:%M:%S')"

View File

@@ -0,0 +1,10 @@
#!/bin/sh
# Some events send additional information specific to the event in the $INFO
# variable. E.g. the front_app_switched event sends the name of the newly
# focused application in the $INFO variable:
# https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
if [ "$SENDER" = "front_app_switched" ]; then
sketchybar --set $NAME label=$INFO icon="$($CONFIG_DIR/plugins/icon_map_fn.sh $INFO)"
fi

View File

@@ -0,0 +1,436 @@
#!/bin/bash
function icon_map() {
case "$1" in
"Keynote" | "Keynote 讲演")
icon_result=":keynote:"
;;
"Figma")
icon_result=":figma:"
;;
"VMware Fusion")
icon_result=":vmware_fusion:"
;;
"Alacritty" | "Hyper" | "iTerm2" | "kitty" | "Terminal" | "终端" | "WezTerm")
icon_result=":terminal:"
;;
"Microsoft To Do" | "Things")
icon_result=":things:"
;;
"Keyboard Maestro")
icon_result=":keyboard_maestro:"
;;
"App Store")
icon_result=":app_store:"
;;
"CleanMyMac X")
icon_result=":desktop:"
;;
"Android Messages")
icon_result=":android_messages:"
;;
"Reeder")
icon_result=":reeder5:"
;;
"Joplin")
icon_result=":joplin:"
;;
"Discord" | "Discord Canary" | "Discord PTB")
icon_result=":discord:"
;;
"Logseq")
icon_result=":logseq:"
;;
"Microsoft Excel")
icon_result=":microsoft_excel:"
;;
"Microsoft PowerPoint")
icon_result=":microsoft_power_point:"
;;
"Telegram")
icon_result=":telegram:"
;;
"Transmit")
icon_result=":transmit:"
;;
"Pi-hole Remote")
icon_result=":pihole:"
;;
"League of Legends")
icon_result=":league_of_legends:"
;;
"Element")
icon_result=":element:"
;;
"Zulip")
icon_result=":zulip:"
;;
"Sequel Ace")
icon_result=":sequel_ace:"
;;
"Zed")
icon_result=":zed:"
;;
"TeamSpeak 3")
icon_result=":team_speak:"
;;
"1Password")
icon_result=":one_password:"
;;
"Caprine")
icon_result=":caprine:"
;;
"카카오톡")
icon_result=":kakaotalk:"
;;
"Dropbox")
icon_result=":dropbox:"
;;
"Kakoune")
icon_result=":kakoune:"
;;
"Rider" | "JetBrains Rider")
icon_result=":rider:"
;;
"Godot")
icon_result=":godot:"
;;
"qutebrowser")
icon_result=":qute_browser:"
;;
"Typora")
icon_result=":text:"
;;
"Sequel Pro")
icon_result=":sequel_pro:"
;;
"Reminders" | "提醒事项")
icon_result=":reminders:"
;;
"Setapp")
icon_result=":setapp:"
;;
"Finder" | "访达")
icon_result=":finder:"
;;
"Matlab")
icon_result=":matlab:"
;;
"LibreWolf")
icon_result=":libre_wolf:"
;;
"Notes" | "备忘录")
icon_result=":notes:"
;;
"Notion")
icon_result=":notion:"
;;
"Brave Browser")
icon_result=":brave_browser:"
;;
"Spotlight")
icon_result=":spotlight:"
;;
"Iris")
icon_result=":iris:"
;;
"Tower")
icon_result=":tower:"
;;
"Jellyfin Media Player")
icon_result=":jellyfin:"
;;
"Code" | "Code - Insiders")
icon_result=":code:"
;;
"Linear")
icon_result=":linear:"
;;
"Live")
icon_result=":ableton:"
;;
"Parallels Desktop")
icon_result=":parallels:"
;;
"Final Cut Pro")
icon_result=":final_cut_pro:"
;;
"Chromium" | "Google Chrome" | "Google Chrome Canary")
icon_result=":google_chrome:"
;;
"GitHub Desktop")
icon_result=":git_hub:"
;;
"Firefox")
icon_result=":firefox:"
;;
"Slack")
icon_result=":slack:"
;;
"Spotify")
icon_result=":spotify:"
;;
"Neovide" | "MacVim" | "Vim" | "VimR")
icon_result=":vim:"
;;
"KeePassXC")
icon_result=":kee_pass_x_c:"
;;
"PomoDone App")
icon_result=":pomodone:"
;;
"DEVONthink 3")
icon_result=":devonthink3:"
;;
"Color Picker" | "数码测色计")
icon_result=":color_picker:"
;;
"Tweetbot" | "Twitter")
icon_result=":twitter:"
;;
"Default")
icon_result=":default:"
;;
"Pages" | "Pages 文稿")
icon_result=":pages:"
;;
"Emacs")
icon_result=":emacs:"
;;
"MAMP" | "MAMP PRO")
icon_result=":mamp:"
;;
"Canary Mail" | "HEY" | "Mail" | "Mailspring" | "MailMate" | "邮件")
icon_result=":mail:"
;;
"WebStorm")
icon_result=":web_storm:"
;;
"TickTick")
icon_result=":tick_tick:"
;;
"TIDAL")
icon_result=":tidal:"
;;
"VLC")
icon_result=":vlc:"
;;
"Blender")
icon_result=":blender:"
;;
"Music" | "音乐")
icon_result=":music:"
;;
"Calendar" | "日历" | "Fantastical" | "Cron" | "Amie")
icon_result=":calendar:"
;;
"Evernote Legacy")
icon_result=":evernote_legacy:"
;;
"Microsoft Word")
icon_result=":microsoft_word:"
;;
"Safari" | "Safari浏览器" | "Safari Technology Preview")
icon_result=":safari:"
;;
"MoneyMoney")
icon_result=":bank:"
;;
"Xcode")
icon_result=":xcode:"
;;
"Numbers" | "Numbers 表格")
icon_result=":numbers:"
;;
"ClickUp")
icon_result=":click_up:"
;;
"Arc")
icon_result=":arc:"
;;
"Zeplin")
icon_result=":zeplin:"
;;
"Trello")
icon_result=":trello:"
;;
"Vivaldi")
icon_result=":vivaldi:"
;;
"Calibre")
icon_result=":book:"
;;
"Min")
icon_result=":min_browser:"
;;
"网易云音乐")
icon_result=":netease_music:"
;;
"GrandTotal" | "Receipts")
icon_result=":dollar:"
;;
"zoom.us")
icon_result=":zoom:"
;;
"Folx")
icon_result=":folx:"
;;
"微信")
icon_result=":wechat:"
;;
"Orion" | "Orion RC")
icon_result=":orion:"
;;
"Notability")
icon_result=":notability:"
;;
"Todoist")
icon_result=":todoist:"
;;
"Replit")
icon_result=":replit:"
;;
"Tor Browser")
icon_result=":tor_browser:"
;;
"Drafts")
icon_result=":drafts:"
;;
"Preview" | "预览" | "Skim" | "zathura")
icon_result=":pdf:"
;;
"PyCharm")
icon_result=":pycharm:"
;;
"Audacity")
icon_result=":audacity:"
;;
"Cypress")
icon_result=":cypress:"
;;
"VSCodium")
icon_result=":vscodium:"
;;
"Podcasts" | "播客")
icon_result=":podcasts:"
;;
"DingTalk" | "钉钉" | "阿里钉")
icon_result=":dingtalk:"
;;
"OBS")
icon_result=":obsstudio:"
;;
"Firefox Developer Edition" | "Firefox Nightly")
icon_result=":firefox_developer_edition:"
;;
"Alfred")
icon_result=":alfred:"
;;
"OmniFocus")
icon_result=":omni_focus:"
;;
"Skype")
icon_result=":skype:"
;;
"Spark Desktop")
icon_result=":spark:"
;;
"Docker" | "Docker Desktop")
icon_result=":docker:"
;;
"Signal")
icon_result=":signal:"
;;
"Pine")
icon_result=":pine:"
;;
"Insomnia")
icon_result=":insomnia:"
;;
"Microsoft Edge")
icon_result=":microsoft_edge:"
;;
"Affinity Photo")
icon_result=":affinity_photo:"
;;
"Sketch")
icon_result=":sketch:"
;;
"Android Studio")
icon_result=":android_studio:"
;;
"Bitwarden")
icon_result=":bit_warden:"
;;
"Affinity Publisher")
icon_result=":affinity_publisher:"
;;
"Zotero")
icon_result=":zotero:"
;;
"Sublime Text")
icon_result=":sublime_text:"
;;
"Warp")
icon_result=":warp:"
;;
"Messages" | "信息" | "Nachrichten")
icon_result=":messages:"
;;
"Obsidian")
icon_result=":obsidian:"
;;
"IntelliJ IDEA")
icon_result=":idea:"
;;
"Atom")
icon_result=":atom:"
;;
"FaceTime" | "FaceTime 通话")
icon_result=":face_time:"
;;
"Yuque" | "语雀")
icon_result=":yuque:"
;;
"Grammarly Editor")
icon_result=":grammarly:"
;;
"Mattermost")
icon_result=":mattermost:"
;;
"Affinity Designer")
icon_result=":affinity_designer:"
;;
"mpv")
icon_result=":mpv:"
;;
"Thunderbird")
icon_result=":thunderbird:"
;;
"Airmail")
icon_result=":airmail:"
;;
"Microsoft Teams")
icon_result=":microsoft_teams:"
;;
"Bear")
icon_result=":bear:"
;;
"System Preferences" | "System Settings" | "系统设置")
icon_result=":gear:"
;;
"Nova")
icon_result=":nova:"
;;
"WhatsApp")
icon_result=":whats_app:"
;;
*)
icon_result=":default:"
;;
esac
}
icon_map "$1"
echo "$icon_result"

View File

@@ -0,0 +1,9 @@
#!/bin/bash
STATE="$(echo "$INFO" | jq -r '.state')"
if [ "$STATE" = "playing" ]; then
MEDIA="$(echo "$INFO" | jq -r '.title + " - " + .artist')"
sketchybar --set $NAME label="$MEDIA" drawing=on
else
sketchybar --set $NAME drawing=off
fi

View File

@@ -0,0 +1,18 @@
#!/bin/sh
# The $SELECTED variable is available for space components and indicates if
# the space invoking this script (with name: $NAME) is currently selected:
# https://felixkratz.github.io/SketchyBar/config/components#space----associate-mission-control-spaces-with-an-item
source "$CONFIG_DIR/colors.sh"
if [ $SELECTED = true ]; then
sketchybar --set $NAME background.drawing=on \
background.color=$ACCENT_COLOR \
label.color=$BAR_COLOR \
icon.color=$BAR_COLOR
else
sketchybar --set $NAME background.color=off \
label.color=$ACCENT_COLOR \
icon.color=$ACCENT_COLOR
fi

View File

@@ -0,0 +1,18 @@
#!/bin/bash
if [ "$SENDER" = "space_windows_change" ]; then
space="$(echo "$INFO" | jq -r '.space')"
apps="$(echo "$INFO" | jq -r '.apps | keys[]')"
icon_strip=" "
if [ "${apps}" != "" ]; then
while read -r app
do
icon_strip+=" $($CONFIG_DIR/plugins/icon_map_fn.sh "$app")"
done <<< "${apps}"
else
icon_strip=" —"
fi
sketchybar --set space.$space label="$icon_strip"
fi

View File

@@ -0,0 +1,20 @@
#!/bin/sh
# The volume_change event supplies a $INFO variable in which the current volume
# percentage is passed to the script.
if [ "$SENDER" = "volume_change" ]; then
VOLUME="$INFO"
case "$VOLUME" in
[6-9][0-9]|100) ICON="󰕾"
;;
[3-5][0-9]) ICON="󰖀"
;;
[1-9]|[1-2][0-9]) ICON="󰕿"
;;
*) ICON="󰖁"
esac
sketchybar --set "$NAME" icon="$ICON" label="$VOLUME%"
fi

60
.config/sketchybar/sketchybarrc Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/bash
source "$CONFIG_DIR/colors.sh"
# This is a demo config to showcase some of the most important commands.
# It is meant to be changed and configured, as it is intentionally kept sparse.
# For a (much) more advanced configuration example see my dotfiles:
# https://github.com/FelixKratz/dotfiles
PLUGIN_DIR="$CONFIG_DIR/plugins"
ITEM_DIR="$CONFIG_DIR/items"
##### Bar Appearance #####
# Configuring the general appearance of the bar.
# These are only some of the options available. For all options see:
# https://felixkratz.github.io/SketchyBar/config/bar
# If you are looking for other colors, see the color picker:
# https://felixkratz.github.io/SketchyBar/config/tricks#color-picker
sketchybar --bar position=top height=40 blur_radius=30 color=$BAR_COLOR
##### Changing Defaults #####
# We now change some default values, which are applied to all further items.
# For a full list of all available item properties see:
# https://felixkratz.github.io/SketchyBar/config/items
default=(
padding_left=5
padding_right=5
icon.font="MesloLGS Nerd Font:Bold:17.0"
label.font="MesloLGS Nerd Font:Bold:14.0"
icon.color=$WHITE
label.color=$WHITE
background.color=$ITEM_BG_COLOR
background.corner_radius=5
background.height=24
icon.padding_left=4
icon.padding_right=4
label.padding_left=4
label.padding_right=4
)
sketchybar --default "${default[@]}"
# --Left Side Items --
source $ITEM_DIR/spaces.sh
source $ITEM_DIR/front_app.sh
# --Middle Items --
source $ITEM_DIR/media.sh
# --Right Side Items --
source $ITEM_DIR/calendar.sh
source $ITEM_DIR/volume.sh
source $ITEM_DIR/battery.sh
##### Force all scripts to run the first time (never do this in a script) #####
sketchybar --update

76
.config/skhd/skhdrc Normal file
View File

@@ -0,0 +1,76 @@
# -- Changing Window Focus --
# change window focus within space
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - h : yabai -m window --focus west
alt - l : yabai -m window --focus east
#change focus between external displays (left and right)
alt - s: yabai -m display --focus west
alt - g: yabai -m display --focus east
# -- Modifying the Layout --
# rotate layout clockwise
shift + alt - r : yabai -m space --rotate 270
# flip along y-axis
shift + alt - y : yabai -m space --mirror y-axis
# flip along x-axis
shift + alt - x : yabai -m space --mirror x-axis
# toggle window float
shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2
# -- Modifying Window Size --
# maximize a window
shift + alt - m : yabai -m window --toggle zoom-fullscreen
# balance out tree of windows (resize to occupy same area)
shift + alt - e : yabai -m space --balance
# -- Moving Windows Around --
# swap windows
shift + alt - j : yabai -m window --swap south
shift + alt - k : yabai -m window --swap north
shift + alt - h : yabai -m window --swap west
shift + alt - l : yabai -m window --swap east
# move window and split
ctrl + alt - j : yabai -m window --warp south
ctrl + alt - k : yabai -m window --warp north
ctrl + alt - h : yabai -m window --warp west
ctrl + alt - l : yabai -m window --warp east
# move window to display left and right
shift + alt - s : yabai -m window --display west; yabai -m display --focus west;
shift + alt - g : yabai -m window --display east; yabai -m display --focus east;
# move window to prev and next space
shift + alt - p : yabai -m window --space prev;
shift + alt - n : yabai -m window --space next;
# move window to space #
shift + alt - 1 : yabai -m window --space 1;
shift + alt - 2 : yabai -m window --space 2;
shift + alt - 3 : yabai -m window --space 3;
shift + alt - 4 : yabai -m window --space 4;
shift + alt - 5 : yabai -m window --space 5;
shift + alt - 6 : yabai -m window --space 6;
shift + alt - 7 : yabai -m window --space 7;
shift + alt - 8 : yabai -m window --space 8;
shift + alt - 9 : yabai -m window --space 9;
shift + alt - 0 : yabai -m window --space 10;
# -- Starting/Stopping/Restarting Yabai --
# stop/start/restart yabai
ctrl + alt - q : brew services stop yabai
ctrl + alt - s : brew services start yabai
ctrl + alt - r : brew services restart yabai

34
.config/yabai/yabairc Normal file
View File

@@ -0,0 +1,34 @@
# default layout (can be bsp, stack or float)
yabai -m config layout bsp
# new window spawns to the right if vertical split, or bottom if horizontal split
yabai -m config window_placement second_child
# padding set to 12px
yabai -m config top_padding 52
yabai -m config bottom_padding 12
yabai -m config left_padding 12
yabai -m config right_padding 12
yabai -m config window_gap 12
# -- mouse settings --
# center mouse on window with focus
yabai -m config mouse_follows_focus on
# modifier for clicking and dragging with mouse
yabai -m config mouse_modifier alt
# set modifier + left-click drag to move window
yabai -m config mouse_action1 move
# set modifier + right-click drag to resize window
yabai -m config mouse_action2 resize
# when window is dropped in center of another window, swap them (on edges it will split it)
yabai -m mouse_drop_action swap
# disable specific apps
yabai -m rule --add app="^System Settings$" manage=off
yabai -m rule --add app="^Calculator$" manage=off
yabai -m rule --add app="^Karabiner-Elements$" manage=off
yabai -m rule --add app="^QuickTime Player$" manage=off