diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml old mode 100755 new mode 100644 index 8ee82b4..2270f48 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -1,865 +1,19 @@ -#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: -# - /path/to/alacritty.yml - -# Any items in the `env` entry below will be added as -# environment variables. Some entries may override variables -# set by alacritty itself. +# Env env: - # TERM variable - # - # This value is used to set the `$TERM` environment variable for - # each instance of Alacritty. If it is not present, alacritty will - # check the local terminfo database and use `alacritty` if it is - # available, otherwise `xterm-256color` is used. TERM: xterm-256color - - #window: - # Window dimensions (changes require restart) - # - # 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 - - # 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. - - # 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 (roman) font face normal: - # Font family - # - # Default: - # - (macOS) Menlo - # - (Linux/BSD) monospace - # - (Windows) Consolas family: inconsolata - - # 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: inconsolata - - # 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: inconsolata - - # 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: inconsolata - - # The `style` can be specified to pick a specific face. style: Bold Italic - - # Point size size: 16 - - # 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: [] - - # 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: true - -# 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 - - # 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/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 - -# 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 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: 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/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: 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/stumpwm/config b/.config/stumpwm/config index 0e46ccf..4304c3c 100644 --- a/.config/stumpwm/config +++ b/.config/stumpwm/config @@ -1,3 +1,4 @@ +;;; -*- mode: lisp; -*- (in-package :stumpwm) ;; (defvar *sbcl-path* "~/.guix-home/profile/share/common-lisp/sbcl/") @@ -15,15 +16,21 @@ "gnewbg V" "gnewbg-float F") -;; (set-prefix-key (kbd "s-d")) +(set-prefix-key (kbd "s-ESC")) -;; (setf *mouse-focus-policy* :click) +(setf *mouse-focus-policy* :click) -;; (setq *message-window-gravity* :top) -;; (setq *message-window-padding* 10) -;; (setq *message-window-y-padding 10) +(setf *message-window-gravity* :center + *input-window-gravity* :center + *window-border-style* :thin + *message-window-padding* 3 + *maxsize-border-width* 2 + *normal-border-width* 2 + *transient-border-width* 2 + stumpwm::*float-window-border* 1 + stumpwm::*float-window-title-height* 1) -;; (setq *input-window-gravity* :center) +(setq *input-window-gravity* :center) ;; (load-module "kbd-layouts") @@ -45,7 +52,6 @@ (define-key *top-map* (kbd "s-Q") "delete") (define-key *top-map* (kbd "s-SPC") "run-shell-command emacsclient -e \"(call-interactively #'app-launcher-run-app)\"") (define-key *top-map* (kbd "s-L") "run-shell-command slock") -(define-key *top-map* (kbd "s-RET") "run-shell-command alacritty") (define-key *top-map* (kbd "s-E") "run-shell-command emacs") (define-key *top-map* (kbd "s-W") "run-shell-command firefox") @@ -72,10 +78,21 @@ ;; (define-key *top-map* (kbd "XF86AudioMute") "run-shell-command amixer set Master toggle") ;; Set UI colors -(set-border-color "#c792ea") -(set-bg-color "#232635") -(set-fg-color "#A6Accd") -;; (set-msg-border-width 2) +(setf *colors* + '("#000000" ;black + "#BF6262" ;red + "#a1bf78" ;green + "#dbb774" ;yellow + "#7D8FA3" ;blue + "#ff99ff" ;magenta + "#53cdbd" ;cyan + "#b7bec9")) ;white + +(setf *default-bg-color* "#e699cc") + +(update-color-map (current-screen)) + +(setf *window-format* "%m%s%50t") ;; (load-module "swm-gaps") ;; (setf swm-gaps:*inner-gaps-size* 3) @@ -89,16 +106,9 @@ ;; (set-font (make-instance 'xft:font :family "Fira Mono" :subfamily "Regular" :size 16)) -;; ;; Set mode line colors -;; (setf *mode-line-background-color* "#232635") -;; (setf *mode-line-foreground-color* "#A6Accd") - -;; ;; Set the mode line format -;; (setf *screen-mode-line-format* "[^B%n^b] %W ^>%d") -;; (run-commands "mode-line" "mode-line") - -;; ;; Start the mode line -;; (run-commands "mode-line") +(setf *mode-line-background-color* (car *colors*) + *mode-line-foreground-color* (car (last *colors*)) + *mode-line-timeout* 1) ;; ;; Add the system tray module ;; (load-module "stumptray") @@ -109,7 +119,7 @@ ;; (run-shell-command "nm-applet") ;; (run-shell-command "syncthing-gtk --minimized") ;; (run-shell-command "redshift -l 37.983810:23.727539 -t 6500:3500") -;; (run-shell-command "emacs") +(run-shell-command "emacs") -(require :slynk) -(slynk:create-server :dont-close t) +;; (require :slynk) +;; (slynk:create-server :dont-close t) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index dd9ff6d..48dfed3 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -6,10 +6,10 @@ # Only vars needed by external commands should be exported. # Note that you can export vars w/out assigning a value to them. -export XDG_CONFIG_HOME +export XDG_CONFIG_HOME=~/.config export XDG_CACHE_HOME=~/.cache export XDG_DATA_HOME=~/.local/share export XDG_STATE_HOME=~/.config/zsh export EDITOR=nvim export VISUAL=nvim -export GUIX_PROFILE="/home/ry/.config/guix/current" . "$GUIX_PROFILE/etc/profile" +export GUIX_PROFILE="$HOME/.config/guix/current" . "$GUIX_PROFILE/etc/profile" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index c2266d2..5444dec 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -19,7 +19,6 @@ export PATH=/home/ry/scripts/cron-scripts:$PATH export PATH=~/.config/emacs/bin:$PATH # GNU Guix path export PATH=/home/ry/.guix-profile/bin:$PATH - # --- locale --- # export LANG=en_US.UTF-8 diff --git a/.gitignore b/.gitignore index e1d38aa..44e81ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -./* +.* !Emacs.org !StumpWM.org !Guix.org diff --git a/.zshenv b/.zshenv index 8de9b3d..27a88e2 100644 --- a/.zshenv +++ b/.zshenv @@ -7,4 +7,3 @@ if [[ -d "$XDG_CONFIG_HOME/zsh" ]] then export ZDOTDIR="$XDG_CONFIG_HOME/zsh" fi -. "$HOME/.cargo/env" diff --git a/Desktop.org b/Desktop.org index c2ca43a..d740b9a 100644 --- a/Desktop.org +++ b/Desktop.org @@ -2,8 +2,9 @@ This =.org= document is where I store all of my user-level application configuration including shells, terminal emulators, browsers etc. -* Nyxt +I prefer to use programs that I can extend the functionality of via configuration files and source code. +* Nyxt Nyxt is a browser written in Common Lisp that follows the same philosophy of extensibility as Emacs. This makes it a perfect companion to an Emacs centered eco-system when you need a browser with more features than Eww. #+begin_src lisp :tangle ~/Dotfiles/.config/nyxt/init.lisp :mkdirp yes @@ -38,8 +39,7 @@ Nyxt is a browser written in Common Lisp that follows the same philosophy of ext #+end_src * Shell - -Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory. The entry-poignado +Aside from using e-shell for quick command line usage, I mainly use vterm with Zsh. It's a bit of a complicated setup but allows for the maximum number of files possible to live in .config instead of littering my home directory. ** zshrc #+begin_src shell :tangle ~/Dotfiles/.config/zsh/.zshrc :mkdirp yes @@ -64,7 +64,6 @@ export PATH=/home/ry/scripts/cron-scripts:$PATH export PATH=~/.config/emacs/bin:$PATH # GNU Guix path export PATH=/home/ry/.guix-profile/bin:$PATH - # --- locale --- # export LANG=en_US.UTF-8 @@ -113,3 +112,58 @@ alias fcmd="firewall-cmd" #+end_src ** +** zprofile +#+begin_src shell :tangle ~/Dotfiles/.config/zsh/.zprofile :mkdirp yes +# Each new shell auto-imports all environment variables. +# Hence exporting needs to be done only once. +# Also, all non-login shells are descendants of a login shell. +# Ergo, exports need to be done in the login shell only. +# Hence, we put exports in .zprofile + +# Only vars needed by external commands should be exported. +# Note that you can export vars w/out assigning a value to them. +export XDG_CONFIG_HOME=~/.config +export XDG_CACHE_HOME=~/.cache +export XDG_DATA_HOME=~/.local/share +export XDG_STATE_HOME=~/.config/zsh +export EDITOR=nvim +export VISUAL=nvim +export GUIX_PROFILE="$HOME/.config/guix/current" . "$GUIX_PROFILE/etc/profile" +#+end_src +** zshenv +#+begin_src shell :tangle ~/Dotfiles/.zshenv :mkdirp yes +if [[ -z "$XDG_CONFIG_HOME" ]] +then + export XDG_CONFIG_HOME="$HOME/.config" +fi + +if [[ -d "$XDG_CONFIG_HOME/zsh" ]] +then + export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +fi +#+end_src + +#+RESULTS: + +* Terminal +#+begin_src yaml :tangle ~/Dotfiles/.config/alacritty/alacritty.yml :mkdirp yes +# Env +env: + TERM: xterm-256color + +# Font configuration +font: + normal: + family: inconsolata + style: Regular + bold: + family: inconsolata + style: Bold + italic: + family: inconsolata + style: Italic + bold_italic: + family: inconsolata + style: Bold Italic + size: 16 +#+end_src diff --git a/Emacs.org b/Emacs.org index 55547c8..aecfb7a 100644 --- a/Emacs.org +++ b/Emacs.org @@ -1,95 +1,130 @@ -#+title: Emacs Custom Configuration File -#+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/doom/config.el :mkdirp yes :lexical yes +#+TITLE: Emacs Configuration +#+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/emacs/init.el :mkdirp yes :lexical yes * Configuration :PROPERTIES: -:VISITBILITY: children -:END: -** Table of Contents :TOC_4_gh: -- [[#configuration][Configuration]] - - [[#general][General]] - - [[#load-paths][Load Paths]] - - [[#user-info][User Info]] - - [[#visual][Visual]] - - [[#misc][Misc]] - - [[#theme][Theme]] - - [[#fonts][Fonts]] - - [[#org][Org]] - - [[#fonts-and-symbols][Fonts and Symbols]] - - [[#general-1][General]] - - [[#better-heading-bullets][Better Heading Bullets]] - - [[#center-org-buffers][Center Org Buffers]] - - [[#org-babel][Org Babel]] - - [[#racket-specific-language][Racket Specific Language]] - - [[#babel-languages][Babel Languages]] - - [[#soure-block-creation-shortcuts][Soure Block Creation Shortcuts]] - - [[#babel-configuration-file-automation-hook][Babel Configuration File Automation Hook]] - - [[#programming-languages][Programming Languages]] - - [[#common-lisp][Common Lisp]] - - [[#mu4e-e-mail][Mu4e (E-mail)]] - - [[#erc-irc][ERC (IRC)]] +:VISIBILITY: children +:END: +** Package Management +I use [[https://github.com/raxod502/straight.el][straight.el]] for managing packages as it's fairly simple and robust. At some point I'd like to move to primarily using Guix for Emacs package management. + +*** Bootstraping straight.el +#+begin_src emacs-lisp +(setq package-enable-at-startup nil) + +;; * Package Management with straight.el +(unless (featurep 'straight) + ;; Bootstrap straight.el + (defvar bootstrap-version) + (let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage))) + +;; Use straight.el for use-package expressions +(straight-use-package 'use-package) +#+end_src ** General -*** Load Paths +*** User Interface #+begin_src emacs-lisp -(add-to-list 'load-path "~/.guix-profile/bin/guile") -(add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp") +(scroll-bar-mode -1) ;; Disable scroll bar +(tool-bar-mode -1) ;; Disable tool bar menu +(tooltip-mode -1) ;; Disable tooltips +(set-fringe-mode 10) ;; Disable fringe mode +(menu-bar-mode -1) ;; Disable menu bar +(global-display-line-numbers-mode t) ;; Display line numbers +(set-default 'truncate-lines nil) ;; Wrap lines at end of screen +(setq visible-bell t) ;; Visible flash to represent a bell +(setq x-select-enable-clipboard t) ;; Enable clipboard +(global-tab-line-mode 1) +(setq inhibit-startup-message t) -;; Match Emacs program path to be the same as user shell -(defun set-exec-path-from-shell-PATH () - "Set up Emacs' `exec-path' and PATH environment variable to match -that used by the user's shell." - (interactive) - (let ((path-from-shell (replace-regexp-in-string - "[ \t\n]*$" "" (shell-command-to-string - "$SHELL --login -c 'echo $PATH'")))) - (setenv "PATH" path-from-shell) - (setq exec-path (split-string path-from-shell path-separator)))) - -(set-exec-path-from-shell-PATH) -#+end_src - -*** User Info -#+begin_src emacs-lisp -;; Setting general info -(setq user-full-name "Ry" - user-mail-address "ry@opal.sh") -#+end_src - -*** Visual -#+begin_src emacs-lisp - -;; Set line number -(setq display-line-numbers-type t) - -;; Keeps text lines from going off screen. -(set-default 'truncate-lines nil) -;; Add this hook to ERC if I run into trouble with truncated lines in other modes. -;; (add-hook 'erc-mode-hook (lambda () (setq-default truncate-lines nil))) - - -;; Only enable line numbers for certain modes -(dolist (mode '(org-mode-hook - term-mode-hook - shell-mode-hook - eshell-mode-hook)) +;; Disable line mode for specific major/minor modes. +(dolist (mode '(org-mode-hook)) + 'term-mode-hook + 'shell-mode-hook + 'eshell-mode-hook (add-hook mode (lambda () (display-line-numbers-mode 0)))) #+end_src -*** Misc - +*** Modeline +Doom's modeline is excellent, and much less cluttered than the default Emacs modeline. #+begin_src emacs-lisp -;; Enable clipboard -(setq x-select-enable-clipboard t) +(use-package doom-modeline + :straight t + :init (doom-modeline-mode 1) + :custom ((doom-modeline-height 15))) #+end_src -** Theme -#+begin_src emacs-lisp -;; load theme -(setq doom-theme 'modus-operandi) +*** Keybinding display +Which-key is a package that displays the available commands granted that it's incomplete. For instance, if I type "SPC", I will see all of the commands available to the leader key. -;; Configure Modus theme +#+begin_src emacs-lisp +(use-package which-key + :straight t + :defer 0 + :diminish which-key-mode + :config + (which-key-mode) + (setq which-key-idle-delay 0.3)) +#+end_src + +*** Notifications +**** Alerts +Minimal alerts so I can see notifications from various programs in Emacs. + +#+begin_src emacs-lisp +(use-package alert + :straight t + :config + (setq alert-default-style 'notification)) +#+end_src +**** Disable Warnings +#+begin_src emacs-lisp +(setq large-file-warning-threshold nil) ;; Disables warnings for large files +(setq vc-follow-symlinks t) ;; Disables warnings for symlinks +#+end_src +*** Helpful Describe Functionality +Helpful.el is a package that reformats the describe-X functions to be much more informative. + +#+begin_src emacs-lisp +(use-package helpful + :straight t + :commands (helpful-callable helpful-variable helpful-command helpful-key) + :custom + (counsel-describe-function-function #'helpful-callable) + (counsel-describe-variable-function #'helpful-variable) + :bind + ([remap describe-function] . counsel-describe-function) + ([remap describe-command] . helpful-command) + ([remap describe-variable] . counsel-describe-variable) + ([remap describe-key] . helpful-key)) +#+end_src +*** Autosaves +#+begin_src emacs-lisp +(use-package super-save + :straight t + :config + (super-save-mode +1)) + +;; Auto reverting Changed Files +(setq global-auto-revert-non-file-buffers nil) +(global-auto-revert-mode -1) +#+end_src +** Theme +I really enjoy [[https://protesilaos.com/emacs/modus-themes][Modus Themes]] by Protesilaos Stavrou. They are minimal, high contrast, and easy on the eyes. + +#+begin_src emacs-lisp (use-package modus-themes + :straight t :init (setq modus-themes-italic-constructs t modus-themes-bold-constructs nil @@ -97,35 +132,168 @@ that used by the user's shell." modus-themes-org-blocks 'greyscale modus-themes-paren-match 'intense modus-themes-mixed-fonts t) - - ;; Load the theme files before enabling a theme (modus-themes-load-themes) :config - - (modus-themes-load-vivendi) ;; OR (modus-themes-load-operandi) - :bind ("" . modus-themes-toggle)) - + (modus-themes-load-vivendi) + :bind + ("" . modus-themes-toggle)) #+end_src ** Fonts -Using [[https://github.com/tonsky/FiraCode][Fira Code]] + Fira Code Retina. +Mozilla's Fira fonts are pretty, and the Sans and Code types look excellent with the corresponding mode. #+begin_src emacs-lisp - -;; Set fonts (set-face-attribute 'default nil :font "Fira Code" :height 125 :weight 'medium) (set-face-attribute 'variable-pitch nil :font "Fira Sans" :height 1.0 :weight 'regular) (set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 1.0 :weight 'medium) +#+end_src +** Keybinding +I came from vim, so naturally I use Evil keybindings. I also used to use Doom Emacs before rolling my own configuration so I've borrowed some ideas from my time spent there as well. Between the two paradigms I rarely leave the home row which is ideal for typing for extended periods of time. + +*** General.el (leader-key keybindings) +I really enjoy having a leader key and eschewing the Control and Alt keys entirely. Doom had far too many leader keybindings that I never used so I've boiled them down to the essentials that I used the most. + +#+begin_src emacs-lisp +(global-set-key (kbd "") 'keyboard-escape-quit) ;; Escape exits out of prompts + + ;; Define Leader Key +(use-package general + :straight t + :config + (general-evil-setup t) + (general-create-definer opal/leader-keys + :keymaps '(normal insert visual emacs) + :prefix "SPC" + :global-prefix "C-SPC") + ;; Define Keybindings (potentially move into own file) + (opal/leader-keys + ;; Leader-map + ";" #'pp-eval-expression ;; Eval expression + ":" #'execute-extended-command ;; Eq to M-x + "u" #'universal-argument ;; Universal argument + "w" #'evil-window-map ;; Window functions + "." #'find-file ;; Find file (opens in mini-buffer) + "," #'persp-switch-to-buffer ;; Switch to perspective.el minibuffer + "<" #'switch-to-buffer ;; Switch to non-perspective.el minibuffer + "s" #'swiper ;; Search in current buffer + + ;; Magit + "gg" #'magit-status + "gi" #'magit-init + "gc" #'magit-clone + + ;; Buffers + "bd" #'kill-buffer + + ;; Org + ; Babel + "obt" #'org-babel-tangle + ; Gen + "ol" #'org-insert-link + "or" #'org-reload + ; Agenda + "oa" #'org-agenda + + ;; Eval + "eb" #'eval-buffer + "er" #'eval-region + "ef" #'eval-defun + "el" #'eval-last-sexp + + ;; Describe + "df" #'describe-function + "dv" #'describe-variable + "ds" #'describe-symbol + "dk" #'describe-key + "dp" #'describe-package)) + +#+end_src + +*** Evil +#+begin_src emacs-lisp +(use-package evil + :straight t + :init + (setq evil-want-integration t) + (setq evil-want-keybinding nil) + (setq evil-want-C-u-scroll t) + (setq evil-want-C-i-jump nil) + (setq evil-respect-visual-line-mode t) + :config + (evil-mode 1) + (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state) + (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join) + + ;; Use visual line motions even outside of visual-line-mode buffers + (evil-global-set-key 'motion "j" 'evil-next-visual-line) + (evil-global-set-key 'motion "k" 'evil-previous-visual-line) + + (evil-set-initial-state 'messages-buffer-mode 'normal) + (evil-set-initial-state 'dashboard-mode 'normal)) + +(use-package evil-collection + :straight t + :after evil + :config + (evil-collection-init)) +#+end_src + +** Completion Frameworks +At the moment, I'm trying out Ivy and counsel but I've used Vertico and liked it as well. +*** Ivy +#+begin_src emacs-lisp +(use-package ivy + :straight t + :diminish + :bind (("C-s" . 'swiper) + :map ivy-minibuffer-map + ("TAB" . ivy-alt-done) + ("C-l" . ivy-alt-done) + ("C-j" . ivy-next-line) + ("C-k" . ivy-previous-line) + :map ivy-switch-buffer-map + ("C-k" . ivy-previous-line) + ("C-l" . ivy-done) + ("C-d" . ivy-reverse-i-search-kill)) + :config + (ivy-mode 1)) + +(use-package ivy-rich + :straight t + :after ivy + :init (ivy-rich-mode 1)) +#+end_src + +*** Counsel +#+begin_src emacs-lisp +(use-package counsel + :straight t + :bind + (("C-M-j" . 'counsel-switch-buffer) + :map minibuffer-local-map + ("C-r" . 'counsel-minibuffer-history)) + + :custom + (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only) + :config + (counsel-mode 1)) #+end_src ** Org -*** Fonts and Symbols -Here we are setting general font configuration in order to make editing in org mode a bit more streamlined to look at. - +*** General Configuration #+begin_src emacs-lisp +;; Set org agenda dir +(setq org-directory "~/Org/") -(defun rymacs/org-font-setup () +;; Tell Org to stop indenting inside of org source blocks. +(setq org-edit-src-content-indentation 0) + +;; Open links in browser +(setq browse-url-browser-function 'browse-url-generic + browse-url-generic-program "firefox") + +(defun opal/org-font-setup () ;; Replace list hyphen with dot (font-lock-add-keywords 'org-mode '(("^ *\\([-]\\) " @@ -156,25 +324,17 @@ Here we are setting general font configuration in order to make editing in org (set-face-attribute 'line-number nil :inherit 'fixed-pitch) (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) -#+end_src -*** General - -Main Org/Agenda configuration. - -#+begin_src emacs-lisp -;; Set org agenda dir -(setq org-directory "~/org/") - -(defun rymacs/org-mode-setup () +(defun opal/org-mode-setup () (org-indent-mode) (variable-pitch-mode 1) (visual-line-mode 1) (setq org-startup-folded t)) (use-package org + :straight t :commands (org-capture org-agenda) - :hook (org-mode . rymacs/org-mode-setup) + :hook (org-mode . opal/org-mode-setup) :config (setq org-ellipsis " ▾") (setq org-agenda-start-with-log-mode t) @@ -182,142 +342,110 @@ Main Org/Agenda configuration. (setq org-log-into-drawer t) (setq org-agenda-files - '("~/org/projects/" - "~/org/tasks/" - )) + '("~/Org/projects/" + "~/Org/tasks/")) + (require 'org-habit) (add-to-list 'org-modules 'org-habit) (setq org-habit-graph-column 60) (setq org-todo-keywords - '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") - (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)"))) + '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") + (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)"))) (setq org-refile-targets - '(("archive.org" :maxlevel . 1) - ("planner.org" :maxlevel . 1))) + '(("archive.org" :maxlevel . 1) + ("planner.org" :maxlevel . 1))) ;; Save Org buffers after refiling! (advice-add 'org-refile :after 'org-save-all-org-buffers) (setq org-tag-alist - '((:startgroup) - ; Put mutually exclusive tags here - (:endgroup) - ("@errand" . ?E) - ("@home" . ?H) - ("@work" . ?W) - ("agenda" . ?a) - ("planning" . ?p) - ("publish" . ?P) - ("batch" . ?b) - ("note" . ?n) - ("idea" . ?i))) + '((:startgroup) + ; Put mutually exclusive tags here + (:endgroup) + ("@errand" . ?E) + ("@home" . ?H) + ("@work" . ?W) + ("agenda" . ?a) + ("planning" . ?p) + ("publish" . ?P) + ("batch" . ?b) + ("note" . ?n) + ("idea" . ?i))) ;; Configure custom agenda views (setq org-agenda-custom-commands - '(("d" "Dashboard" - ((agenda "" ((org-deadline-warning-days 7))) - (todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))) - (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) + '(("d" "Dashboard" + ((agenda "" ((org-deadline-warning-days 7))) + (todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))) + (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) - ("n" "Next Tasks" - ((todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))))) + ("n" "Next Tasks" + ((todo "NEXT" + ((org-agenda-overriding-header "Next Tasks"))))) - ;; Low-effort next actions - ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" - ((org-agenda-overriding-header "Low Effort Tasks") - (org-agenda-max-todos 20) - (org-agenda-files org-agenda-files))))) + ;; Low-effort next actions + ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" + ((org-agenda-overriding-header "Low Effort Tasks") + (org-agenda-max-todos 20) + (org-agenda-files org-agenda-files))))) ;; Create capture templates (setq org-capture-templates - `(("t" "Tasks") - ("tt" "Task" entry (file+olp "~/org/planner/tasks.org" "Inbox") - "* TODO %?\n %U\n %a\n %i" :empty-lines 1) + `(("t" "Tasks") + ("tt" "Task" entry (file+olp "~/org/planner/tasks.org" "Inbox") + "* TODO %?\n %U\n %a\n %i" :empty-lines 1) - ("p" "Projects") - ("pp" "Project File" entry (file+olp "~/org/projects/auto-infra-overview.org" "Inbox") - "* TODO %?\n %U\n %a\n %i" :empty-lines 1))) - ;; Init font setup - (rymacs/org-font-setup)) + ("p" "Projects") + ("pp" "Project File" entry (file+olp "~/org/projects/auto-infra-overview.org" "Inbox") + "* TODO %?\n %U\n %a\n %i" :empty-lines 1))) + ;; Init org font setup + (opal/org-font-setup)) #+end_src -*** Better Heading Bullets - +*** Pretty Bullets +Creates nicer (-) bullets. #+begin_src emacs-lisp - -;; Change default pretty bullets to circles (use-package org-bullets + :straight t :after org :hook (org-mode . org-bullets-mode) :custom (org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●"))) - #+end_src -*** Center Org Buffers - +*** Visual Fill Mode +Creates margins in Org mode to make it more pleasant to look at. #+begin_src emacs-lisp -;; Creates margins, and centerrs content in org mode. -(defun rymacs/org-mode-visual-fill () +(defun opal/org-mode-visual-fill () (setq visual-fill-column-width 100 - visual-fill-column-center-text t) + visual-fill-column-center-text t) (visual-fill-column-mode 1)) (use-package visual-fill-column - :hook (org-mode . rymacs/org-mode-visual-fill)) + :straight t + :hook (org-mode . opal/org-mode-visual-fill)) #+end_src *** Org Babel -Org Babel allows us to evaluate source code blocks within org mode. With this functionality, we can tell org babel to insert the content of the source block codes into any file specified by using the org-babel-tangle function. -**** Racket Specific Language - #+begin_src emacs-lisp -(use-package ob-racket - :after org - :config - (add-hook 'ob-racket-pre-runtime-library-load-hook - #'ob-racket-raco-make-runtime-library)) -#+end_src - -**** Babel Languages - -#+begin_src emacs-lisp - ;; Load languages for babel code blocks. (with-eval-after-load 'org (org-babel-do-load-languages 'org-babel-load-languages - '((emacs-lisp . t) - (racket . t) - (python . t) - (scheme . t) - (javascript . t) - (html . t) - (css . t) - (lisp . t))) + '((emacs-lisp . t))) (push '("conf-unix" . conf-unix) org-src-lang-modes)) +;; Set geiser default language (setq geiser-default-implementation '(guile)) -#+end_src -#+RESULTS: -| guile | - -**** Soure Block Creation Shortcuts -Here we use a package called org-tempo. - -#+begin_src emacs-lisp - -;; Make shortcuts to easily create babel source code blocks. (with-eval-after-load 'org (require 'org-tempo) @@ -329,178 +457,98 @@ Here we use a package called org-tempo. (add-to-list 'org-structure-template-alist '("js" . "src javascript")) (add-to-list 'org-structure-template-alist '("html" . "src html")) (add-to-list 'org-structure-template-alist '("css" . "src css")) - (add-to-list 'org-structure-template-alist '("rt" . "src racket")) (add-to-list 'org-structure-template-alist '("cl" . "src lisp"))) #+end_src - -**** Babel Configuration File Automation Hook - -TODO: This needs to be fixed, or find an equiv. -Since we don't want to have to manually use the org-babel-tangle function everytime we make changes to the corresponding .org file, we create an automation hook that executes the function every time we save. +** Programming/Editor +*** General +**** Syntax (Flycheck) +#+begin_src emacs-lisp +(use-package flycheck :straight t) +#+end_src +**** Rainbow Delimiters +#+begin_src emacs-lisp +(use-package rainbow-delimiters + :straight t + :init + (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) + (add-hook 'org-mode-hook #'rainbow-delimiters-mode)) +#+end_src +**** Rainbow Mode +Sets HTML strings to have the background of the color they represent. +#+begin_src emacs-lisp +(use-package rainbow-mode :straight t) +#+end_src +*** Lisp +#+begin_src emacs-lisp +(use-package parinfer + :straight t + :init + (progn + (setq parinfer-extensions + '(defaults + pretty-parens + evil)) + (add-hook 'prog-mode-hook #'parinfer-mode))) +#+end_src +** Magit +#+begin_src emacs-lisp +(use-package magit + :straight t) +#+end_src +** E-Mail +I've been using IceDove/Thunderbird for e-mail until I get around to making this a comparable solutions. #+begin_src emacs-lisp +;; (use-package mu4e +;; :straight t +;; :config +;; ;; This is set to 't' to avoid mail syncing issues when using mbsync +;; (setq mu4e-change-filenames-when-moving t) -;; ;; Define a function that automatically executes rymacs/org-babel-tangle-config (a wrapper around org-babel-tangle) when saving this file. -;; (defun rymacs/org-babel-tangle-config () -;; (when (string-equal (file-name-directory (buffer-file-name)) -;; (expand-file-name "~/.dotfiles/.config/doom")) +;; ;; Refresh mail using isync every 5 minutes +;; (setq mu4e-update-interval (* 5 60)) +;; (setq mu4e-get-mail-command "mbsync -a -c ~/Dotfiles/.config/mbsync/mbsyncrc") +;; (setq mu4e-maildir "~/Mail") -;; (let ((org-confirm-babel-evaluate nil)) -;; (org-babel-tangle)))) +;; (setq mu4e-contexts +;; (list +;; ;; Opal.sh +;; (make-mu4e-context +;; :name "Ry P." +;; :match-func +;; (lambda (msg) +;; (when msg +;; (string-prefix-p "/opal.sh" (mu4e-message-field msg :maildir)))) -;; (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'rymacs/org-babel-tangle-config))) +;; :vars '((user-mail-address . "ry@opal.sh") +;; (user-full-name . "Ry P.") +;; (mu4e-drafts-folder . "/opal.sh/Drafts") +;; (mu4e-sent-folder . "/opal.sh/Sent") +;; (mu4e-trash-folder . "/opal.sh/Trash"))))) +;; (setq mu4e-maildir-shortcuts +;; '(("/opal.sh/Inbox" . ?i) +;; ("/opal.sh/Sent" . ?s) +;; ("/opal.sh/Trash" . ?t) +;; ("/opal.sh/Drafts" . ?d)))) #+end_src - -# *** Org Roam -# I use Org Roam as an alternative to writing traditional notes. Instead of long sprawling .org files, each note in Org roam is a excerpt of a specific idea or topic that has links to other notes made with Org Roam. Roam also allows you to pull up a buffer to look at which notes are linked in other notes. This creates a spawling network of information that is useful, quick to draw information from, and can create a notetaking experience that is interactive and seamless. - -# #+begin_src emacs-lisp - -# (use-package org-roam -# :init -# (setq org-roam-v2-ack t) -# :custom -# (org-roam-directory "~/roam/notes/") -# (org-roam-completion-everywhere t) -# (org-roam-capture-templates -# '(("d" "default" plain -# "%?" -# :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") -# :unnarrowed t) -# ("r" "resources" plain -# (file "~/roam/templates/resource-template.org") -# :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") -# :unnarrowed t) -# ("f" "files" plain -# (file "~/roam/templates/res-file-note-temp.org") -# :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") -# :unnarrowed t) -# ("c" "cli" plain -# (file "~/roam/templates/commands-template.org") -# :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") -# :unnarrowed t))) -# :bind (("C-c n l" . org-roam-buffer-toggle) -# ("C-c n f" . org-roam-node-find) -# ("C-c n i" . org-roam-node-insert) -# ("C-c n I" . org-roam-node-insert-immediate) -# ("C-c n p" . my/org-roam-find-project) -# :map org-mode-map -# ("C-M-i" . completion-at-point) -# :map org-roam-dailies-map -# ("Y" . org-roam-dailies-capture-yesterday) -# ("T" . org-roam-dailies-capture-tomorrow)) -# :bind-keymap -# ("C-c n d" . org-roam-dailies-map) -# :config -# (require 'org-roam-dailies) ;; Ensure the keymap is available -# (org-roam-db-autosync-mode)) - -# ;; Function to enable the ability to quickly insert a link without -# ;; opening a capture buffer. -# (defun org-roam-node-insert-immediate (arg &rest args) -# (interactive "P") -# (let ((args (cons arg args)) -# (org-roam-capture-templates (list (append (car org-roam-capture-templates) -# '(:immediate-finish t))))) -# (apply #'org-roam-node-insert args))) - -# #+end_src - -# *** Deft Configuration - -# Deft is a package that helps browse and filter plain text files. I use it to search through org-roam notes. - -# #+begin_src emacs-lisp - -# (use-package deft -# :after org -# :bind -# ("C-c n d" . deft) -# :custom -# (deft-recursive t) -# (deft-use-filter-string-for-filename t) -# (deft-default-extension "org") -# (deft-directory org-roam-directory)) - -# #+end_src -** Programming Languages -*** Common Lisp -#+begin_src emacs-lisp -(after! sly - (load "/home/ry/quicklisp/clhs-use-local.el" t) - (setq sly-lisp-implementations - '((sbcl ("/bin/sbcl" "-L" "sbcl" "-Q" "run") :coding-system utf-8-unix) - (ccl ("/usr/local/bin/ccl64" :coding-system utf-8-unix))))) - -(defmacro define-sly-lisp (name) - `(defun ,name () (interactive) (let ((sly-default-lisp ',name)) (sly)))) - -(define-sly-lisp sbcl) -(define-sly-lisp ccl) -#+end_src - -** Mu4e (E-mail) - -Account Information: - - IMAP: imap.opal.sh -- 993 - - SMTP smtp.opal.sh -- 587 +** IRC +Right now I'm pretty happy with Matrix bridging into IRC rooms so this will stay commented out for now. I might try out the Emacs Matrix client at some point soon. #+begin_src emacs-lisp - -(use-package mu4e - :config - ;; This is set to 't' to avoid mail syncing issues when using mbsync - (setq mu4e-change-filenames-when-moving t) - - ;; Refresh mail using isync every 5 minutes - (setq mu4e-update-interval (* 5 60)) - (setq mu4e-get-mail-command "mbsync -a -c ~/Dotfiles/.config/mbsync/mbsyncrc") - (setq mu4e-maildir "~/Mail") - - (setq mu4e-contexts - (list - ;; Opal.sh - (make-mu4e-context - :name "Ry P." - :match-func - (lambda (msg) - (when msg - (string-prefix-p "/opal.sh" (mu4e-message-field msg :maildir)))) - - :vars '((user-mail-address . "ry@opal.sh") - (user-full-name . "Ry P.") - (mu4e-drafts-folder . "/opal.sh/Drafts") - (mu4e-sent-folder . "/opal.sh/Sent") - (mu4e-trash-folder . "/opal.sh/Trash"))))) - - (setq mu4e-maildir-shortcuts - '(("/opal.sh/Inbox" . ?i) - ("/opal.sh/Sent" . ?s) - ("/opal.sh/Trash" . ?t) - ("/opal.sh/Drafts" . ?d)))) - +;; (use-package erc +;; :straight t +;; (setq erc-server "irc.libera.chat" ;sets default server +;; erc-nick "opalvaults" ; Sets nick +;; erc-user-full-name "opalvaults" +;; erc-track-shorten-start 8 +;; erc-kill-buffer-on-part t +;; erc-auto-query 'bury +;; erc-fill-column 90 +;; erc-fill-function 'erc-fill-static +;; erc-fill-static-center 20 +;; erc-track-visibility nil +;; erc-interpret-mirc-color t +;; erc-rename-buffers t +;; erc-track-exclude-server-buffer t)) #+end_src - -** ERC (IRC) - -#+begin_src emacs-lisp - -(setq erc-server "irc.libera.chat" ;sets default server - erc-nick "opalvaults" ; Sets nick - erc-user-full-name "opalvaults" - erc-track-shorten-start 8 - erc-kill-buffer-on-part t - erc-auto-query 'bury - erc-fill-column 90 - erc-fill-function 'erc-fill-static - erc-fill-static-center 20 - erc-track-visibility nil - erc-interpret-mirc-color t - erc-rename-buffers t - erc-track-exclude-server-buffer t) -#+end_src - -#+RESULTS: -: t - diff --git a/New-Emacs.org b/New-Emacs.org deleted file mode 100644 index 4b8e2c5..0000000 --- a/New-Emacs.org +++ /dev/null @@ -1,558 +0,0 @@ -#+PROPERTY: header-args:emacs-lisp :tangle ~/Dotfiles/.config/emacs/init.el :mkdirp yes :lexical yes -#+TITLE: Emacs Configuration - -Todo: -- Yassnippet -- Get Email Working again -- Get IRC working - -:PROPERTIES: -:VISIBILITY: children -:END: -* Table of Contents :TOC_4_gh: -* Package Management -I use [[https://github.com/raxod502/straight.el][straight.el]] for managing packages as it's fairly simple and robust. At some point I'd like to move to primarily using Guix for Emacs package management. - -** Bootstraping straight.el -#+begin_src emacs-lisp -(setq package-enable-at-startup nil) - -;; * Package Management with straight.el -(unless (featurep 'straight) - ;; Bootstrap straight.el - (defvar bootstrap-version) - (let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage))) - -;; Use straight.el for use-package expressions -(straight-use-package 'use-package) -#+end_src - -* General -** User Interface -#+begin_src emacs-lisp -(scroll-bar-mode -1) ;; Disable scroll bar -(tool-bar-mode -1) ;; Disable tool bar menu -(tooltip-mode -1) ;; Disable tooltips -(set-fringe-mode 10) ;; Disable fringe mode -(menu-bar-mode -1) ;; Disable menu bar -(global-display-line-numbers-mode t) ;; Display line numbers -(set-default 'truncate-lines nil) ;; Wrap lines at end of screen -(setq visible-bell t) ;; Visible flash to represent a bell -(setq x-select-enable-clipboard t) ;; Enable clipboard -(global-tab-line-mode 1) -(setq inhibit-startup-message t) - -;; Disable line mode for specific major/minor modes. -(dolist (mode '(org-mode-hook)) - 'term-mode-hook - 'shell-mode-hook - 'eshell-mode-hook - (add-hook mode (lambda () (display-line-numbers-mode 0)))) -#+end_src - -** Modeline -Doom's modeline is excellent, and much less cluttered than the default Emacs modeline. -#+begin_src emacs-lisp -(use-package doom-modeline - :straight t - :init (doom-modeline-mode 1) - :custom ((doom-modeline-height 15))) -#+end_src - -** Keybinding display -Which-key is a package that displays the available commands granted that it's incomplete. For instance, if I type "SPC", I will see all of the commands available to the leader key. - -#+begin_src emacs-lisp -(use-package which-key - :straight t - :defer 0 - :diminish which-key-mode - :config - (which-key-mode) - (setq which-key-idle-delay 0.3)) -#+end_src - -** Notifications -*** Alerts -Minimal alerts so I can see notifications from various programs in Emacs. - -#+begin_src emacs-lisp -(use-package alert - :straight t - :config - (setq alert-default-style 'notification)) -#+end_src -*** Disable Warnings -#+begin_src emacs-lisp -(setq large-file-warning-threshold nil) ;; Disables warnings for large files -(setq vc-follow-symlinks t) ;; Disables warnings for symlinks -#+end_src -** Helpful Describe Functionality -Helpful.el is a package that reformats the describe-X functions to be much more informative. - -#+begin_src emacs-lisp -(use-package helpful - :straight t - :commands (helpful-callable helpful-variable helpful-command helpful-key) - :custom - (counsel-describe-function-function #'helpful-callable) - (counsel-describe-variable-function #'helpful-variable) - :bind - ([remap describe-function] . counsel-describe-function) - ([remap describe-command] . helpful-command) - ([remap describe-variable] . counsel-describe-variable) - ([remap describe-key] . helpful-key)) -#+end_src -** Autosaves -#+begin_src emacs-lisp -(use-package super-save - :straight t - :config - (super-save-mode +1)) - -;; Auto reverting Changed Files -(setq global-auto-revert-non-file-buffers nil) -(global-auto-revert-mode -1) -#+end_src -* Theme -I really enjoy [[https://protesilaos.com/emacs/modus-themes][Modus Themes]] by Protesilaos Stavrou. They are minimal, high contrast, and easy on the eyes. - -#+begin_src emacs-lisp -(use-package modus-themes - :straight t - :init - (setq modus-themes-italic-constructs t - modus-themes-bold-constructs nil - modus-themes-region '(accented bg-only no-extend) - modus-themes-org-blocks 'greyscale - modus-themes-paren-match 'intense - modus-themes-mixed-fonts t) - (modus-themes-load-themes) - :config - (modus-themes-load-vivendi) - :bind - ("" . modus-themes-toggle)) -#+end_src - -* Fonts -Mozilla's Fira fonts are pretty, and the Sans and Code types look excellent with the corresponding mode. - -#+begin_src emacs-lisp -(set-face-attribute 'default nil :font "Fira Code" :height 125 :weight 'medium) -(set-face-attribute 'variable-pitch nil :font "Fira Sans" :height 1.0 :weight 'regular) -(set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 1.0 :weight 'medium) -#+end_src - -* Keybinding -I came from vim, so naturally I use Evil keybindings. I also used to use Doom Emacs before rolling my own configuration so I've borrowed some ideas from my time spent there as well. Between the two paradigms I rarely leave the home row which is ideal for typing for extended periods of time. - -** General.el (leader-key keybindings) -I really enjoy having a leader key and eschewing the Control and Alt keys entirely. Doom had far too many leader keybindings that I never used so I've boiled them down to the essentials that I used the most. - -#+begin_src emacs-lisp -(global-set-key (kbd "") 'keyboard-escape-quit) ;; Escape exits out of prompts - - ;; Define Leader Key -(use-package general - :straight t - :config - (general-evil-setup t) - (general-create-definer opal/leader-keys - :keymaps '(normal insert visual emacs) - :prefix "SPC" - :global-prefix "C-SPC") - ;; Define Keybindings (potentially move into own file) - (opal/leader-keys - ;; Leader-map - ";" #'pp-eval-expression ;; Eval expression - ":" #'execute-extended-command ;; Eq to M-x - "u" #'universal-argument ;; Universal argument - "w" #'evil-window-map ;; Window functions - "." #'find-file ;; Find file (opens in mini-buffer) - "," #'persp-switch-to-buffer ;; Switch to perspective.el minibuffer - "<" #'switch-to-buffer ;; Switch to non-perspective.el minibuffer - "s" #'swiper ;; Search in current buffer - - ;; Magit - "gg" #'magit-status - "gi" #'magit-init - "gc" #'magit-clone - - ;; Buffers - "bd" #'kill-buffer - - ;; Org - ; Babel - "obt" #'org-babel-tangle - ; Gen - "ol" #'org-insert-link - "or" #'org-reload - ; Agenda - "oa" #'org-agenda - - ;; Eval - "eb" #'eval-buffer - "er" #'eval-region - "ef" #'eval-defun - "el" #'eval-last-sexp - - ;; Describe - "df" #'describe-function - "dv" #'describe-variable - "ds" #'describe-symbol - "dk" #'describe-key - "dp" #'describe-package)) - -#+end_src - -** Evil -#+begin_src emacs-lisp -(use-package evil - :straight t - :init - (setq evil-want-integration t) - (setq evil-want-keybinding nil) - (setq evil-want-C-u-scroll t) - (setq evil-want-C-i-jump nil) - (setq evil-respect-visual-line-mode t) - :config - (evil-mode 1) - (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state) - (define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join) - - ;; Use visual line motions even outside of visual-line-mode buffers - (evil-global-set-key 'motion "j" 'evil-next-visual-line) - (evil-global-set-key 'motion "k" 'evil-previous-visual-line) - - (evil-set-initial-state 'messages-buffer-mode 'normal) - (evil-set-initial-state 'dashboard-mode 'normal)) - -(use-package evil-collection - :straight t - :after evil - :config - (evil-collection-init)) -#+end_src - -* Completion Frameworks -At the moment, I'm trying out Ivy and counsel but I've used Vertico and liked it as well. -** Ivy -#+begin_src emacs-lisp -(use-package ivy - :straight t - :diminish - :bind (("C-s" . 'swiper) - :map ivy-minibuffer-map - ("TAB" . ivy-alt-done) - ("C-l" . ivy-alt-done) - ("C-j" . ivy-next-line) - ("C-k" . ivy-previous-line) - :map ivy-switch-buffer-map - ("C-k" . ivy-previous-line) - ("C-l" . ivy-done) - ("C-d" . ivy-reverse-i-search-kill)) - :config - (ivy-mode 1)) - -(use-package ivy-rich - :straight t - :after ivy - :init (ivy-rich-mode 1)) -#+end_src - -** Counsel -#+begin_src emacs-lisp -(use-package counsel - :straight t - :bind - (("C-M-j" . 'counsel-switch-buffer) - :map minibuffer-local-map - ("C-r" . 'counsel-minibuffer-history)) - - :custom - (counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only) - :config - (counsel-mode 1)) -#+end_src - -* Org -#+begin_src emacs-lisp -;; Set org agenda dir -(setq org-directory "~/Org/") - -;; Tell Org to stop indenting inside of org source blocks. -(setq org-edit-src-content-indentation 0) - -;; Open links in browser -(setq browse-url-browser-function 'browse-url-generic - browse-url-generic-program "firefox") - -(defun opal/org-font-setup () - ;; Replace list hyphen with dot - (font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) - "•")))))) - - ;; Set faces for heading levels - (dolist (face '((org-level-1 . 1.2) - (org-level-2 . 1.1) - (org-level-3 . 1.05) - (org-level-4 . 1.0) - (org-level-5 . 1.1) - (org-level-6 . 1.1) - (org-level-7 . 1.1) - (org-level-8 . 1.1))) - (set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))) - - ;; Ensure that anything that should be fixed-pitch in Org files appears that way - (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch) - (set-face-attribute 'org-table nil :inherit 'fixed-pitch) - (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) - (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) - (set-face-attribute 'line-number nil :inherit 'fixed-pitch) - (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) - - -(defun opal/org-mode-setup () - (org-indent-mode) - (variable-pitch-mode 1) - (visual-line-mode 1) - (setq org-startup-folded t)) - -(use-package org - :straight t - :commands (org-capture org-agenda) - :hook (org-mode . opal/org-mode-setup) - :config - (setq org-ellipsis " ▾") - (setq org-agenda-start-with-log-mode t) - (setq org-log-done 'time) - (setq org-log-into-drawer t) - - (setq org-agenda-files - '("~/Org/projects/" - "~/Org/tasks/")) - - - (require 'org-habit) - (add-to-list 'org-modules 'org-habit) - (setq org-habit-graph-column 60) - - (setq org-todo-keywords - '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") - (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)"))) - - (setq org-refile-targets - '(("archive.org" :maxlevel . 1) - ("planner.org" :maxlevel . 1))) - - ;; Save Org buffers after refiling! - (advice-add 'org-refile :after 'org-save-all-org-buffers) - - (setq org-tag-alist - '((:startgroup) - ; Put mutually exclusive tags here - (:endgroup) - ("@errand" . ?E) - ("@home" . ?H) - ("@work" . ?W) - ("agenda" . ?a) - ("planning" . ?p) - ("publish" . ?P) - ("batch" . ?b) - ("note" . ?n) - ("idea" . ?i))) - - ;; Configure custom agenda views - (setq org-agenda-custom-commands - '(("d" "Dashboard" - ((agenda "" ((org-deadline-warning-days 7))) - (todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))) - (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects"))))) - - ("n" "Next Tasks" - ((todo "NEXT" - ((org-agenda-overriding-header "Next Tasks"))))) - - ;; Low-effort next actions - ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" - ((org-agenda-overriding-header "Low Effort Tasks") - (org-agenda-max-todos 20) - (org-agenda-files org-agenda-files))))) - - ;; Create capture templates - (setq org-capture-templates - `(("t" "Tasks") - ("tt" "Task" entry (file+olp "~/org/planner/tasks.org" "Inbox") - "* TODO %?\n %U\n %a\n %i" :empty-lines 1) - - ("p" "Projects") - ("pp" "Project File" entry (file+olp "~/org/projects/auto-infra-overview.org" "Inbox") - "* TODO %?\n %U\n %a\n %i" :empty-lines 1))) - - ;; Init org font setup - (opal/org-font-setup)) -#+end_src - -** Pretty Bullets -Creates nicer (-) bullets. -#+begin_src emacs-lisp -(use-package org-bullets - :straight t - :after org - :hook (org-mode . org-bullets-mode) - :custom - (org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●"))) -#+end_src - -** Visual Fill Mode -Creates margins in Org mode to make it more pleasant to look at. -#+begin_src emacs-lisp - -(defun opal/org-mode-visual-fill () - (setq visual-fill-column-width 100 - visual-fill-column-center-text t) - (visual-fill-column-mode 1)) - -(use-package visual-fill-column - :straight t - :hook (org-mode . opal/org-mode-visual-fill)) - -#+end_src - -** Org Babel -#+begin_src emacs-lisp -;; Load languages for babel code blocks. -(with-eval-after-load 'org - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t))) - - (push '("conf-unix" . conf-unix) org-src-lang-modes)) - -;; Set geiser default language -(setq geiser-default-implementation '(guile)) - -(with-eval-after-load 'org - (require 'org-tempo) - - (add-to-list 'org-structure-template-alist '("sh" . "src shell")) - (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) - (add-to-list 'org-structure-template-alist '("py" . "src python")) - (add-to-list 'org-structure-template-alist '("yml" . "src yaml")) - (add-to-list 'org-structure-template-alist '("scm" . "src scheme")) - (add-to-list 'org-structure-template-alist '("js" . "src javascript")) - (add-to-list 'org-structure-template-alist '("html" . "src html")) - (add-to-list 'org-structure-template-alist '("css" . "src css")) - (add-to-list 'org-structure-template-alist '("cl" . "src lisp"))) -#+end_src -* Programming/Editor -** General -*** Syntax (Flycheck) -#+begin_src emacs-lisp -(use-package flycheck :straight t) -#+end_src -*** Rainbow Delimiters -#+begin_src emacs-lisp -(use-package rainbow-delimiters - :straight t - :init - (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) - (add-hook 'org-mode-hook #'rainbow-delimiters-mode)) -#+end_src -*** Rainbow Mode -Sets HTML strings to have the background of the color they represent. -#+begin_src emacs-lisp -(use-package rainbow-mode :straight t) -#+end_src -** Lisp -#+begin_src emacs-lisp -(use-package parinfer - :straight t - :init - (progn - (setq parinfer-extensions - '(defaults - pretty-parens - evil)) - (add-hook 'prog-mode-hook #'parinfer-mode))) -#+end_src -* Magit -#+begin_src emacs-lisp -(use-package magit - :straight t) -#+end_src -* E-Mail -I've been using IceDove/Thunderbird for e-mail until I get around to making this a comparable solutions. - -#+begin_src emacs-lisp -;; (use-package mu4e -;; :straight t -;; :config -;; ;; This is set to 't' to avoid mail syncing issues when using mbsync -;; (setq mu4e-change-filenames-when-moving t) - -;; ;; Refresh mail using isync every 5 minutes -;; (setq mu4e-update-interval (* 5 60)) -;; (setq mu4e-get-mail-command "mbsync -a -c ~/Dotfiles/.config/mbsync/mbsyncrc") -;; (setq mu4e-maildir "~/Mail") - -;; (setq mu4e-contexts -;; (list -;; ;; Opal.sh -;; (make-mu4e-context -;; :name "Ry P." -;; :match-func -;; (lambda (msg) -;; (when msg -;; (string-prefix-p "/opal.sh" (mu4e-message-field msg :maildir)))) - -;; :vars '((user-mail-address . "ry@opal.sh") -;; (user-full-name . "Ry P.") -;; (mu4e-drafts-folder . "/opal.sh/Drafts") -;; (mu4e-sent-folder . "/opal.sh/Sent") -;; (mu4e-trash-folder . "/opal.sh/Trash"))))) - -;; (setq mu4e-maildir-shortcuts -;; '(("/opal.sh/Inbox" . ?i) -;; ("/opal.sh/Sent" . ?s) -;; ("/opal.sh/Trash" . ?t) -;; ("/opal.sh/Drafts" . ?d)))) -#+end_src -* IRC -Right now I'm pretty happy with Matrix bridging into IRC rooms so this will stay commented out for now. I might try out the Emacs Matrix client at some point soon. - -#+begin_src emacs-lisp -;; (use-package erc -;; :straight t -;; (setq erc-server "irc.libera.chat" ;sets default server -;; erc-nick "opalvaults" ; Sets nick -;; erc-user-full-name "opalvaults" -;; erc-track-shorten-start 8 -;; erc-kill-buffer-on-part t -;; erc-auto-query 'bury -;; erc-fill-column 90 -;; erc-fill-function 'erc-fill-static -;; erc-fill-static-center 20 -;; erc-track-visibility nil -;; erc-interpret-mirc-color t -;; erc-rename-buffers t -;; erc-track-exclude-server-buffer t)) -#+end_src diff --git a/StumpWM.org b/StumpWM.org index f263d57..8114b99 100644 --- a/StumpWM.org +++ b/StumpWM.org @@ -1,10 +1,11 @@ #+TITLE: StumpWM Configuration -#+PROPERTY: header-args:lisp :tangle ~/Dotfiles/.config/stumpwm/config :mkdirp yes +#+PROPERTY: :tangle ~/Dotfiles/.config/stumpwm/config :mkdirp yes In my quest to make my computer a Lisp machine in its own right, I am using StumpWM as my window manager. * Init #+begin_src lisp +;;; -*- mode: lisp; -*- (in-package :stumpwm) ;; (defvar *sbcl-path* "~/.guix-home/profile/share/common-lisp/sbcl/") @@ -29,24 +30,30 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum ** Set Prefix #+begin_src lisp -;; (set-prefix-key (kbd "s-d")) +(set-prefix-key (kbd "s-ESC")) #+end_src ** Focus window with mouth #+begin_src lisp -;; (setf *mouse-focus-policy* :click) +(setf *mouse-focus-policy* :click) #+end_src ** Messages #+begin_src lisp -(setq *message-window-gravity* :top) -(setq *message-window-padding* 10) -: (setq *message-window-y-padding 10) +(setf *message-window-gravity* :center + *input-window-gravity* :center + *window-border-style* :thin + *message-window-padding* 3 + *maxsize-border-width* 2 + *normal-border-width* 2 + *transient-border-width* 2 + stumpwm::*float-window-border* 1 + stumpwm::*float-window-title-height* 1) #+end_src ** Command Window #+begin_src lisp -;; (setq *input-window-gravity* :center) +(setq *input-window-gravity* :center) #+end_src * Keyboard ** Load Keyboard Layout Module @@ -55,7 +62,7 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum #+end_src ** Remap Caps Lock #+begin_src lisp :tangle yes - ;; (setf kbd-layouts:*caps-lock-behavior* :esc) +;; (setf kbd-layouts:*caps-lock-behavior* :esc) #+end_src ** Xmodmap #+begin_src lisp @@ -80,7 +87,6 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum (define-key *top-map* (kbd "s-Q") "delete") (define-key *top-map* (kbd "s-SPC") "run-shell-command emacsclient -e \"(call-interactively #'app-launcher-run-app)\"") (define-key *top-map* (kbd "s-L") "run-shell-command slock") -(define-key *top-map* (kbd "s-RET") "run-shell-command alacritty") (define-key *top-map* (kbd "s-E") "run-shell-command emacs") (define-key *top-map* (kbd "s-W") "run-shell-command firefox") @@ -111,10 +117,21 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum ** Colors #+begin_src lisp ;; Set UI colors -(set-border-color "#c792ea") -(set-bg-color "#232635") -(set-fg-color "#A6Accd") -;; (set-msg-border-width 2) +(setf *colors* + '("#000000" ;black + "#BF6262" ;red + "#a1bf78" ;green + "#dbb774" ;yellow + "#7D8FA3" ;blue + "#ff99ff" ;magenta + "#53cdbd" ;cyan + "#b7bec9")) ;white + +(setf *default-bg-color* "#e699cc") + +(update-color-map (current-screen)) + +(setf *window-format* "%m%s%50t") #+end_src ** Gaps #+begin_src lisp @@ -135,16 +152,9 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum #+end_src ** Mode-Line #+begin_src lisp - ;; ;; Set mode line colors - ;; (setf *mode-line-background-color* "#232635") - ;; (setf *mode-line-foreground-color* "#A6Accd") - - ;; ;; Set the mode line format - ;; (setf *screen-mode-line-format* "[^B%n^b] %W ^>%d") - ;; (run-commands "mode-line" "mode-line") - - ;; ;; Start the mode line - ;; (run-commands "mode-line") +(setf *mode-line-background-color* (car *colors*) + *mode-line-foreground-color* (car (last *colors*)) + *mode-line-timeout* 1) #+end_src ** System tray @@ -156,7 +166,7 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum * Applications #+begin_src lisp -(run-shell-command "feh --bg-scale ~/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg") +;; (run-shell-command "feh --bg-scale ~/.dotfiles/backgrounds/samuel-ferrara-uOi3lg8fGl4-unsplash.jpg") ;; (run-shell-command "dunst") ;; (run-shell-command "nm-applet") ;; (run-shell-command "syncthing-gtk --minimized") @@ -166,8 +176,8 @@ In my quest to make my computer a Lisp machine in its own right, I am using Stum * Repl Start #+begin_src lisp -(require :slynk) -(slynk:create-server :dont-close t) +;; (require :slynk) +;; (slynk:create-server :dont-close t) #+end_src * Reference