commit 58f9300f1e11274e75cc1c0bc796758cbda0674d Author: ksyasuda Date: Wed Jul 28 23:44:53 2021 -0700 move config files to new directory diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a73855 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Sudacode Dotfiles + +A collection of my Linux (Arch btw) dotfiles such as `.zshrc`, `.vimrc`, +and `.bash_aliases`. The configiration files for other software such as `cava`, +`alacritty`, and `polybar` can be found [here](https://github.com/ksyasuda/Sudacode-Rice) diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml new file mode 100644 index 0000000..9451d46 --- /dev/null +++ b/alacritty/alacritty.yml @@ -0,0 +1,785 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# These configuration files will be loaded in order, replacing values in files +# loaded earlier with those loaded later in the chain. The file itself will +# always be loaded last. +#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: + # TERM variable + # + # This value is used to set the `$TERM` environment variable for + # each instance of Alacritty. If it is not present, alacritty will + # check the local terminfo database and use `alacritty` if it is + # available, otherwise `xterm-256color` is used. + #TERM: alacritty + +window: + # Window dimensions (changes require restart) + # + # Number of lines/columns (not pixels) in the terminal. The number of columns + # must be at least `2`, while using a value of `0` for columns and lines will + # fall back to the window manager's recommended size. + #dimensions: + # columns: 0 + # lines: 0 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + padding: + x: 10 + y: 10 + + # Spread additional padding evenly around the terminal content. + dynamic_padding: true + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background and no title bar buttons + #decorations: full + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title +title: Alacritty + + # Allow terminal applications to change Alacritty's window title. +window.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: dark + +#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: "FiraCode Nerd Font" + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + family: "FiraCode Nerd Font" + + # The `style` can be specified to pick a specific face. + style: Bold + + # Italic font face + #italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + # family: "FiraCode Nerd Font" + + # The `style` can be specified to pick a specific face. + # style: Italic + + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + # family: "FiraCode Nerd Font" + + # The `style` can be specified to pick a specific face. + # style: Bold Italic + + # Point size + size: 11.0 + + # Offset is the extra space around each character. `offset.y` can be thought + # of as modifying the line spacing, and `offset.x` as modifying the letter + # spacing. + #offset: + # x: 0 + # y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increasing `x` moves the glyph to the + # right, increasing `y` moves the glyph upward. + #glyph_offset: + # x: 0 + # y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina screens + # it is recommended to set `use_thin_strokes` to `false`. + #use_thin_strokes: true + +# If `true`, bold text is drawn using the bright color variants. +draw_bold_text_with_bright_colors: true + +# Colors (Tomorrow Night) +#colors: + # Default colors + #primary: + # background: '#282c34' + # 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 and 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 and CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #vi_mode_cursor: + # text: CellBackground + # cursor: CellForeground + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground and CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #selection: + # text: CellBackground + # background: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + #search: + # Allowed values are CellForeground and CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + + #bar: + # background: '#c5c8c6' + # foreground: '#1d1f21' + + # Colors (One Dark) +colors: + primary: + background: '#282c34' + foreground: '#abb2bf' + cursor: + text: CellBackground + cursor: '#82aaff' # syntax-cursor-color + selection: + text: CellForeground + background: '#6d6d6d' # syntax-selection-color + normal: + black: '#464b55' + red: '#e06c75' + green: '#98c379' + yellow: '#e5c07b' + blue: '#296dff' + magenta: '#ff20ff' + cyan: '#56b6c2' + white: '#e6e6e6' + bright: + black: '#282c34' + red: '#ff5820' + green: '#b1e18b' + yellow: '#eee25a' + blue: '#2f71ff' + magenta: '#ff00ff' + cyan: '#63d4e0' + white: '#ffffff' + + # Colors (Material Theme) + # colors: + # # Default colors + # primary: + # background: '#263238' + # foreground: '#eeffff' + # + # # Normal colors + # normal: + # black: '#000000' # Arbitrary + # red: '#e53935' + # green: '#91b859' + # yellow: '#ffb62c' + # blue: '#6182b8' + # magenta: '#ff5370' # Dark pink of the original material theme + # cyan: '#39adb5' + # white: '#a0a0a0' # Arbitrary + # + # # Bright colors + # bright: + # black: '#4e4e4e' # Arbitrary + # red: '#ff5370' + # green: '#c3e88d' + # yellow: '#ffcb6b' + # blue: '#82aaff' + # magenta: '#f07178' # Pink of the original material theme + # cyan: '#89ddff' + # white: '#ffffff' # Arbitrary + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +# Background opacity +# +# Window opacity as a floating point number from `0.0` to `1.0`. +# The value `0.0` is completely transparent and `1.0` is opaque. +background_opacity: 1.0 + +#selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +#cursor: + # Cursor style + # + # Values for `style`: + # - ▇ Block + # - _ Underline + # - | Beam + #style: Block + + # 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 + + # 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 + +# WinPTY backend (Windows only) +# +# Alacritty defaults to using the newer ConPTY backend if it is available, +# since it resolves a lot of bugs and is quite a bit faster. If it is not +# available, the WinPTY backend will be used instead. +# +# Setting this option to `true` makes Alacritty use the legacy WinPTY backend, +# even if the ConPTY backend is available. +#winpty_backend: false + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +#mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + #hide_when_typing: false + + #url: + # URL launcher + # + # This program is executed when clicking on a text which is recognized as a + # URL. The URL is always added to the command as the last parameter. + # + # When set to `launcher: None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux/BSD) xdg-open + # - (Windows) explorer + #launcher: + # program: xdg-open + # args: [] + + # URL modifiers + # + # These are the modifiers that need to be held down for opening URLs when + # clicking on them. The available modifiers are documented in the key + # binding section. + #modifiers: None + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty +# captures the mouse, the `Shift` modifier is automatically added as a +# requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings) +# +# And optionally: +# +# - `mods` (see key bindings) +#mouse_bindings: +# - { mouse: Middle, action: PasteSelection } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - 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 +# Open URLs at the cursor location with the launcher configured in +# `url.launcher`. +# - 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. +# +# - 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 +# - 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, 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: Vi, action: ScrollToBottom } + #- { key: Space, mods: Shift|Control, action: ToggleViMode } + #- { key: Escape, mode: Vi, action: ClearSelection } + #- { key: I, mode: Vi, action: ScrollToBottom } + #- { key: I, mode: Vi, action: ToggleViMode } + #- { key: C, mods: Control, mode: Vi, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi, action: ScrollLineDown } + #- { key: G, mode: Vi, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi, action: Copy } + #- { key: Y, mode: Vi, action: ClearSelection } + #- { key: Copy, mode: Vi, action: ClearSelection } + #- { key: V, mode: Vi, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi, action: Open } + #- { key: K, mode: Vi, action: Up } + #- { key: J, mode: Vi, action: Down } + #- { key: H, mode: Vi, action: Left } + #- { key: L, mode: Vi, action: Right } + #- { key: Up, mode: Vi, action: Up } + #- { key: Down, mode: Vi, action: Down } + #- { key: Left, mode: Vi, action: Left } + #- { key: Right, mode: Vi, action: Right } + #- { key: Key0, mode: Vi, action: First } + #- { key: Key4, mods: Shift, mode: Vi, action: Last } + #- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi, action: High } + #- { key: M, mods: Shift, mode: Vi, action: Middle } + #- { key: L, mods: Shift, mode: Vi, action: Low } + #- { key: B, mode: Vi, action: SemanticLeft } + #- { key: W, mode: Vi, action: SemanticRight } + #- { key: E, mode: Vi, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi, action: WordRight } + #- { key: E, mods: Shift, mode: Vi, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi, action: Bracket } + #- { key: Slash, mode: Vi, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi, action: SearchBackward } + #- { key: N, mode: Vi, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi, action: SearchPrevious } + + # (Windows, Linux, and BSD only) + #- { key: V, mods: Control|Shift, action: Paste } + #- { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, action: SearchForward } + #- { key: B, mods: Control|Shift, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi, 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, chars: "\x0c" } + #- { 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: K, mods: Command, action: ClearHistory } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, action: SearchForward } + #- { key: B, mods: Command, 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`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false diff --git a/cava/cavaconfig b/cava/cavaconfig new file mode 100644 index 0000000..da77166 --- /dev/null +++ b/cava/cavaconfig @@ -0,0 +1,169 @@ +## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting. + + +[general] + +# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0 +mode = scientific + +# Accepts only non-negative values. +framerate = 60 + +# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off +# new as of 0.6.0 autosens of low values (dynamic range) +# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0 +; autosens = 1 +; overshoot = 20 + +# Manual sensitivity in %. Autosens must be turned off for this to take effect. +# 200 means double height. Accepts only non-negative values. +; sensitivity = 100 + +# The number of bars (0-200). 0 sets it to auto (fill up console). +# Bars' width and space between bars in number of characters. +bars = 0 +bar_width = 3 +bar_spacing = 1 + + +# Lower and higher cutoff frequencies for lowest and highest bars +# the bandwidth of the visualizer. +# Note: there is a minimum total bandwidth of 43Mhz x number of bars. +# Cava will automatically increase the higher cutoff if a too low band is specified. +; lower_cutoff_freq = 50 +; higher_cutoff_freq = 10000 + + +# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and +# only check for input once per second. Cava will wake up once input is detected. 0 = disable. +; sleep_timer = 0 + + +[input] + +# Audio capturing method. Possible methods are: 'pulse', 'alsa', 'fifo', 'sndio' or 'shmem' +# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with. +# +# All input methods uses the same config variable 'source' +# to define where it should get the audio. +# +# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink +# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them). +# +# For alsa 'source' will be the capture device. +# For fifo 'source' will be the path to fifo-file. +# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address +method = pulse +source = auto + +; method = alsa +; source = hw:Loopback,1 + +; method = fifo +; source = /tmp/mpd.fifo +; sample_rate = 44100 +; sample_bits = 16 + +; method = shmem +; source = /squeezelite-AA:BB:CC:DD:EE:FF + +; method = portaudio +; source = auto + + +[output] + +# Output method. Can be 'ncurses', 'noncurses' or 'raw'. +# 'noncurses' uses a custom framebuffer technique and draws only changes +# from frame to frame. 'ncurses' is default if supported +# +# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data +# stream of the bar heights that can be used to send to other applications. +# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above. +method = ncurses + +# Visual channels. Can be 'stereo' or 'mono'. +# 'stereo' mirrors both channels with low frequencies in center. +# 'mono' outputs left to right lowest to highest frequencies. +# 'mono_option' set mono to either take input from 'left', 'right' or 'average'. +; channels = stereo +; mono_option = average + +# Raw output target. A fifo will be created if target does not exist. +; raw_target = /dev/stdout + +# Raw data format. Can be 'binary' or 'ascii'. +data_format = binary + +# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530). +; bit_format = 16bit + +# Ascii max value. In 'ascii' mode range will run from 0 to value specified here +; ascii_max_range = 1000 + +# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters. +# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)). +; bar_delimiter = 59 +; frame_delimiter = 10 + + + +[color] + +# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow. +# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires +# ncurses output method and a terminal that can change color definitions such as Gnome-terminal or rxvt. +# if supported, ncurses mode will be forced on if user defined colors are used. +# default is to keep current terminal color +; foreground = blue +foreground = red + +# Gradient mode, only hex defined colors (and thereby ncurses mode) are supported, +# background must also be defined in hex or remain commented out. 1 = on, 0 = off. +# You can define as many as 8 different colors. They range from bottom to top of screen +gradient = 1 +gradient_count = 8 +gradient_color_1 = '#2d61d7' +gradient_color_2 = '#2878af' +gradient_color_3 = '#56a7b5' +gradient_color_4 = '#a4ce82' +gradient_color_5 = '#fc855a' +gradient_color_6 = '#ff5820' +gradient_color_7 = '#6b2144' +gradient_color_8 = '#692737' + + +[smoothing] + +# Percentage value for integral smoothing. Takes values from 0 - 100. +# Higher values means smoother, but less precise. 0 to disable. +; integral = 88 + +# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable. +; monstercat = 0 +; waves = 0 + +# Set gravity percentage for "drop off". Higher values means bars will drop faster. +# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off". +; gravity = 100 + + +# In bar height, bars that would have been lower that this will not be drawn. +; ignore = 0 + + +[eq] + +# This one is tricky. You can have as much keys as you want. +# Remember to uncomment more then one key! More keys = more precision. +# Look at readme.md on github for further explanations and examples. +; 1 = 1 # bass +; 2 = 1 +; 3 = 1 # midtone +; 4 = 1 +; 5 = 1 # treble +1=2 +2=2 +3=1 +4=1 +5=0.6 diff --git a/doom/config.el b/doom/config.el new file mode 100644 index 0000000..f575ace --- /dev/null +++ b/doom/config.el @@ -0,0 +1,74 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. +(setq user-full-name "Kyle Yasuda" + user-mail-address "ksyasuda@umich.edu") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) +(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 24)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'doom-material) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. +(use-package wakatime-mode :ensure t) + +(global-wakatime-mode) + +(require 'org-bullets) +(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) + +;; enable japanese input in emacs i think +;; (require 'mozc) +(setq default-input-method "japanese-mozc") +(setq mozc-candidate-style 'overlay) + +(use-package! lsp + :init + (setq lsp-pyls-plugins-pylint-enabled t) + (setq lsp-pyls-plugins-autopep8-enabled nil) + (setq lsp-pyls-plugins-yapf-enabled t) + (setq lsp-pyls-plugins-pyflakes-enabled nil) +) diff --git a/doom/custom.el b/doom/custom.el new file mode 100644 index 0000000..96bf3d3 --- /dev/null +++ b/doom/custom.el @@ -0,0 +1,12 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages '(w3m wakatime-mode))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/doom/init.el b/doom/init.el new file mode 100644 index 0000000..60c4604 --- /dev/null +++ b/doom/init.el @@ -0,0 +1,187 @@ +;;; init.el -*- lexical-binding: t; -*- + +;; This file controls what Doom modules are enabled and what order they load +;; in. Remember to run 'doom sync' after modifying it! + +;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's +;; documentation. There you'll find a "Module Index" link where you'll find +;; a comprehensive list of Doom's modules and what flags they support. + +;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or +;; 'C-c c k' for non-vim users) to view its documentation. This works on +;; flags as well (those symbols that start with a plus). +;; +;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its +;; directory (for easy access to its source code). + +(doom! :input + ;;chinese + japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ivy ; a search engine for love and life + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + ;;fill-column ; a `fill-column' indicator + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + ;;hydra + ;;indent-guides ; highlighted indent columns + ligatures ; ligatures and symbols to make your code pretty again + minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + ;;nav-flash ; blink cursor line after big motions + neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +onsave) ; automated prettiness + (global-wakatime-mode) + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + word-wrap ; soft wrapping with language-aware indent + + :emacs + dired ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ;;ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + ;;eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + spell ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + debugger ; FIXME stepping through code, to help you add bugs + ;;direnv + ;;docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + gist ; interacting with github gists + lookup ; navigate your code and its documentation + ;;lsp + magit ; a git porcelain for Emacs + make ; run make tasks from Emacs + ;;pass ; password manager for nerds + pdf ; pdf enhancements + ;;prodigy ; FIXME managing external services & code builders + rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + (:if IS-MAC macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + cc ; C/C++/Obj-C madness + ;;clojure ; java with a lisp + ;;common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + ;;data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;faust ; dsp, but you get to keep your soul + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + ;;gdscript ; the language you waited for + ;;(go +lsp) ; the hipster dialect + ;;(haskell +dante) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + json ; At least it ain't XML + (java +meghanada) ; the poster child for carpal tunnel syndrome + javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;(java +lsp) + ;;julia ; a better, faster MATLAB + ;;kotlin ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean + ;;factor + ;;ledger ; an accounting system in Emacs + lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + nix ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + org ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;scheme ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + web ; the tubes + ;;yaml ; JSON, but readable + + :email + (mu4e +gmail) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;irc ; how neckbeards socialize + ;;(rss +org) ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) + (python +lsp) diff --git a/doom/packages.el b/doom/packages.el new file mode 100644 index 0000000..9e61afb --- /dev/null +++ b/doom/packages.el @@ -0,0 +1,55 @@ +;; -*- no-byte-compile: t; -*- +;;; $DOOMDIR/packages.el + +;; To install a package with Doom you must declare them here and run 'doom sync' +;; on the command line, then restart Emacs for the changes to take effect -- or +;; use 'M-x doom/reload'. + + +;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror: +;(package! some-package) + +;; To install a package directly from a remote git repo, you must specify a +;; `:recipe'. You'll find documentation on what `:recipe' accepts here: +;; https://github.com/raxod502/straight.el#the-recipe-format +;(package! another-package +; :recipe (:host github :repo "username/repo")) + +;; If the package you are trying to install does not contain a PACKAGENAME.el +;; file, or is located in a subdirectory of the repo, you'll need to specify +;; `:files' in the `:recipe': +;(package! this-package +; :recipe (:host github :repo "username/repo" +; :files ("some-file.el" "src/lisp/*.el"))) + +;; If you'd like to disable a package included with Doom, you can do so here +;; with the `:disable' property: +;(package! builtin-package :disable t) + +;; You can override the recipe of a built in package without having to specify +;; all the properties for `:recipe'. These will inherit the rest of its recipe +;; from Doom or MELPA/ELPA/Emacsmirror: +;(package! builtin-package :recipe (:nonrecursive t)) +;(package! builtin-package-2 :recipe (:repo "myfork/package")) + +;; Specify a `:branch' to install a package from a particular branch or tag. +;; This is required for some packages whose default branch isn't 'master' (which +;; our package manager can't deal with; see raxod502/straight.el#279) +;(package! builtin-package :recipe (:branch "develop")) + +;; Use `:pin' to specify a particular commit to install. +;(package! builtin-package :pin "1a2b3c4d5e") + + +;; Doom's packages are pinned to a specific commit and updated from release to +;; release. The `unpin!' macro allows you to unpin single packages... +;(unpin! pinned-package) +;; ...or multiple packages +;(unpin! pinned-package another-pinned-package) +;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) +;(unpin! t) +(package! wakatime-mode) +(package! org-bullets) +(package! markdown-mode) +(package! auto-complete) +(package! mozc) diff --git a/dotfiles/.Xmodmap b/dotfiles/.Xmodmap new file mode 100644 index 0000000..c86b2c8 --- /dev/null +++ b/dotfiles/.Xmodmap @@ -0,0 +1,261 @@ +keycode 8 = +keycode 9 = Escape NoSymbol Escape NoSymbol Escape +keycode 10 = 1 exclam 1 exclam 1 exclam +keycode 11 = 2 at 2 at 2 at +keycode 12 = 3 numbersign 3 numbersign 3 numbersign +keycode 13 = 4 dollar 4 dollar 4 dollar +keycode 14 = 5 percent 5 percent 5 percent +keycode 15 = 6 asciicircum 6 asciicircum 6 asciicircum +keycode 16 = 7 ampersand 7 ampersand 7 ampersand +keycode 17 = 8 asterisk 8 asterisk 8 asterisk +keycode 18 = 9 parenleft 9 parenleft 9 parenleft +keycode 19 = 0 parenright 0 parenright 0 parenright +keycode 20 = minus underscore minus underscore minus underscore +keycode 21 = equal plus equal plus equal plus +keycode 22 = BackSpace BackSpace BackSpace BackSpace NoSymbol NoSymbol Terminate_Server +keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab Tab ISO_Left_Tab +keycode 24 = q Q q Q q Q +keycode 25 = w W w W w W +keycode 26 = e E e E e E +keycode 27 = r R r R r R +keycode 28 = t T t T t T +keycode 29 = y Y y Y y Y +keycode 30 = u U u U u U +keycode 31 = i I i I i I +keycode 32 = o O o O o O +keycode 33 = p P p P p P +keycode 34 = bracketleft braceleft bracketleft braceleft bracketleft braceleft +keycode 35 = bracketright braceright bracketright braceright bracketright braceright +keycode 36 = Return NoSymbol Return NoSymbol Return +keycode 37 = Caps_Lock NoSymbol Caps_Lock NoSymbol Caps_Lock +keycode 38 = a A a A a A +keycode 39 = s S s S s S +keycode 40 = d D d D d D +keycode 41 = f F f F f F +keycode 42 = g G g G g G +keycode 43 = h H h H h H +keycode 44 = j J j J j J +keycode 45 = k K k K k K +keycode 46 = l L l L l L +keycode 47 = semicolon colon semicolon colon semicolon colon +keycode 48 = apostrophe quotedbl apostrophe quotedbl apostrophe quotedbl +keycode 49 = grave asciitilde grave asciitilde grave asciitilde +keycode 50 = Shift_L NoSymbol Shift_L NoSymbol Shift_L +keycode 51 = backslash bar backslash bar backslash bar +keycode 52 = z Z z Z z Z +keycode 53 = x X x X x X +keycode 54 = c C c C c C +keycode 55 = v V v V v V +keycode 56 = b B b B b B +keycode 57 = n N n N n N +keycode 58 = m M m M m M +keycode 59 = comma less comma less comma less +keycode 60 = period greater period greater period greater +keycode 61 = slash question slash question slash question +keycode 62 = Shift_R NoSymbol Shift_R NoSymbol Shift_R +keycode 63 = KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply KP_Multiply XF86ClearGrab +keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L +keycode 65 = space NoSymbol space NoSymbol space +keycode 66 = Control_L NoSymbol Control_L NoSymbol Control_L +keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1 +keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2 +keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3 +keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4 +keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5 +keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6 +keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7 +keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8 +keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9 +keycode 76 = F10 F10 F10 F10 F10 F10 XF86Switch_VT_10 +keycode 77 = Num_Lock NoSymbol Num_Lock NoSymbol Num_Lock +keycode 78 = Scroll_Lock NoSymbol Scroll_Lock NoSymbol Scroll_Lock +keycode 79 = KP_Home KP_7 KP_Home KP_7 KP_Home KP_7 +keycode 80 = KP_Up KP_8 KP_Up KP_8 KP_Up KP_8 +keycode 81 = KP_Prior KP_9 KP_Prior KP_9 KP_Prior KP_9 +keycode 82 = KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract KP_Subtract XF86Prev_VMode +keycode 83 = KP_Left KP_4 KP_Left KP_4 KP_Left KP_4 +keycode 84 = KP_Begin KP_5 KP_Begin KP_5 KP_Begin KP_5 +keycode 85 = KP_Right KP_6 KP_Right KP_6 KP_Right KP_6 +keycode 86 = KP_Add KP_Add KP_Add KP_Add KP_Add KP_Add XF86Next_VMode +keycode 87 = KP_End KP_1 KP_End KP_1 KP_End KP_1 +keycode 88 = KP_Down KP_2 KP_Down KP_2 KP_Down KP_2 +keycode 89 = KP_Next KP_3 KP_Next KP_3 KP_Next KP_3 +keycode 90 = KP_Insert KP_0 KP_Insert KP_0 KP_Insert KP_0 +keycode 91 = KP_Delete KP_Decimal KP_Delete KP_Decimal KP_Delete KP_Decimal +keycode 92 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift NoSymbol ISO_Level3_Shift +keycode 93 = +keycode 94 = less greater less greater bar brokenbar bar +keycode 95 = F11 F11 F11 F11 F11 F11 XF86Switch_VT_11 +keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 +keycode 97 = +keycode 98 = Katakana NoSymbol Katakana NoSymbol Katakana +keycode 99 = Hiragana NoSymbol Hiragana NoSymbol Hiragana +keycode 100 = Henkan_Mode NoSymbol Henkan_Mode NoSymbol Henkan_Mode +keycode 101 = Hiragana_Katakana NoSymbol Hiragana_Katakana NoSymbol Hiragana_Katakana +keycode 102 = Muhenkan NoSymbol Muhenkan NoSymbol Muhenkan +keycode 103 = +keycode 104 = KP_Enter NoSymbol KP_Enter NoSymbol KP_Enter +keycode 105 = Control_R NoSymbol Control_R NoSymbol Control_R +keycode 106 = KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide KP_Divide XF86Ungrab +keycode 107 = Print Sys_Req Print Sys_Req Print Sys_Req +keycode 108 = Alt_R Meta_R Alt_R Meta_R Alt_R Meta_R +keycode 109 = Linefeed NoSymbol Linefeed NoSymbol Linefeed +keycode 110 = Home NoSymbol Home NoSymbol Home +keycode 111 = Up NoSymbol Up NoSymbol Up +keycode 112 = Prior NoSymbol Prior NoSymbol Prior +keycode 113 = Left NoSymbol Left NoSymbol Left +keycode 114 = Right NoSymbol Right NoSymbol Right +keycode 115 = End NoSymbol End NoSymbol End +keycode 116 = Down NoSymbol Down NoSymbol Down +keycode 117 = Next NoSymbol Next NoSymbol Next +keycode 118 = Insert NoSymbol Insert NoSymbol Insert +keycode 119 = Delete NoSymbol Delete NoSymbol Delete +keycode 120 = +keycode 121 = XF86AudioMute NoSymbol XF86AudioMute NoSymbol XF86AudioMute +keycode 122 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume +keycode 123 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume +keycode 124 = XF86PowerOff NoSymbol XF86PowerOff NoSymbol XF86PowerOff +keycode 125 = KP_Equal NoSymbol KP_Equal NoSymbol KP_Equal +keycode 126 = plusminus NoSymbol plusminus NoSymbol plusminus +keycode 127 = Pause Break Pause Break Pause Break +keycode 128 = XF86LaunchA NoSymbol XF86LaunchA NoSymbol XF86LaunchA +keycode 129 = KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal KP_Decimal +keycode 130 = Hangul NoSymbol Hangul NoSymbol Hangul +keycode 131 = Hangul_Hanja NoSymbol Hangul_Hanja NoSymbol Hangul_Hanja +keycode 133 = Super_L NoSymbol Super_L NoSymbol Super_L +keycode 134 = Super_R NoSymbol Super_R NoSymbol Super_R +keycode 135 = Menu NoSymbol Menu NoSymbol Menu +keycode 136 = Cancel NoSymbol Cancel NoSymbol Cancel +keycode 137 = Redo NoSymbol Redo NoSymbol Redo +keycode 138 = SunProps NoSymbol SunProps NoSymbol SunProps +keycode 139 = Undo NoSymbol Undo NoSymbol Undo +keycode 140 = SunFront NoSymbol SunFront NoSymbol SunFront +keycode 141 = XF86Copy NoSymbol XF86Copy NoSymbol XF86Copy +keycode 142 = XF86Open NoSymbol XF86Open NoSymbol XF86Open +keycode 143 = XF86Paste NoSymbol XF86Paste NoSymbol XF86Paste +keycode 144 = Find NoSymbol Find NoSymbol Find +keycode 145 = XF86Cut NoSymbol XF86Cut NoSymbol XF86Cut +keycode 146 = Help NoSymbol Help NoSymbol Help +keycode 147 = XF86MenuKB NoSymbol XF86MenuKB NoSymbol XF86MenuKB +keycode 148 = XF86Calculator NoSymbol XF86Calculator NoSymbol XF86Calculator +keycode 149 = +keycode 150 = XF86Sleep NoSymbol XF86Sleep NoSymbol XF86Sleep +keycode 151 = XF86WakeUp NoSymbol XF86WakeUp NoSymbol XF86WakeUp +keycode 152 = XF86Explorer NoSymbol XF86Explorer NoSymbol XF86Explorer +keycode 153 = XF86Send NoSymbol XF86Send NoSymbol XF86Send +keycode 154 = +keycode 155 = XF86Xfer NoSymbol XF86Xfer NoSymbol XF86Xfer +keycode 156 = XF86Launch1 NoSymbol XF86Launch1 NoSymbol XF86Launch1 +keycode 157 = XF86Launch2 NoSymbol XF86Launch2 NoSymbol XF86Launch2 +keycode 158 = XF86WWW NoSymbol XF86WWW NoSymbol XF86WWW +keycode 159 = XF86DOS NoSymbol XF86DOS NoSymbol XF86DOS +keycode 160 = XF86ScreenSaver NoSymbol XF86ScreenSaver NoSymbol XF86ScreenSaver +keycode 161 = XF86RotateWindows NoSymbol XF86RotateWindows NoSymbol XF86RotateWindows +keycode 162 = XF86TaskPane NoSymbol XF86TaskPane NoSymbol XF86TaskPane +keycode 163 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail +keycode 164 = XF86Favorites NoSymbol XF86Favorites NoSymbol XF86Favorites +keycode 165 = XF86MyComputer NoSymbol XF86MyComputer NoSymbol XF86MyComputer +keycode 166 = XF86Back NoSymbol XF86Back NoSymbol XF86Back +keycode 167 = XF86Forward NoSymbol XF86Forward NoSymbol XF86Forward +keycode 168 = +keycode 169 = XF86Eject NoSymbol XF86Eject NoSymbol XF86Eject +keycode 170 = XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject XF86Eject +keycode 171 = XF86AudioNext NoSymbol XF86AudioNext NoSymbol XF86AudioNext +keycode 172 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause +keycode 173 = XF86AudioPrev NoSymbol XF86AudioPrev NoSymbol XF86AudioPrev +keycode 174 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject XF86AudioStop XF86Eject +keycode 175 = XF86AudioRecord NoSymbol XF86AudioRecord NoSymbol XF86AudioRecord +keycode 176 = XF86AudioRewind NoSymbol XF86AudioRewind NoSymbol XF86AudioRewind +keycode 177 = XF86Phone NoSymbol XF86Phone NoSymbol XF86Phone +keycode 178 = +keycode 179 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools +keycode 180 = XF86HomePage NoSymbol XF86HomePage NoSymbol XF86HomePage +keycode 181 = XF86Reload NoSymbol XF86Reload NoSymbol XF86Reload +keycode 182 = XF86Close NoSymbol XF86Close NoSymbol XF86Close +keycode 183 = +keycode 184 = +keycode 185 = XF86ScrollUp NoSymbol XF86ScrollUp NoSymbol XF86ScrollUp +keycode 186 = XF86ScrollDown NoSymbol XF86ScrollDown NoSymbol XF86ScrollDown +keycode 187 = parenleft NoSymbol parenleft NoSymbol parenleft +keycode 188 = parenright NoSymbol parenright NoSymbol parenright +keycode 189 = XF86New NoSymbol XF86New NoSymbol XF86New +keycode 190 = Redo NoSymbol Redo NoSymbol Redo +keycode 191 = XF86Tools NoSymbol XF86Tools NoSymbol XF86Tools +keycode 192 = XF86Launch5 NoSymbol XF86Launch5 NoSymbol XF86Launch5 +keycode 193 = XF86Launch6 NoSymbol XF86Launch6 NoSymbol XF86Launch6 +keycode 194 = XF86Launch7 NoSymbol XF86Launch7 NoSymbol XF86Launch7 +keycode 195 = XF86Launch8 NoSymbol XF86Launch8 NoSymbol XF86Launch8 +keycode 196 = XF86Launch9 NoSymbol XF86Launch9 NoSymbol XF86Launch9 +keycode 197 = +keycode 198 = XF86AudioMicMute NoSymbol XF86AudioMicMute NoSymbol XF86AudioMicMute +keycode 199 = XF86TouchpadToggle NoSymbol XF86TouchpadToggle NoSymbol XF86TouchpadToggle +keycode 200 = XF86TouchpadOn NoSymbol XF86TouchpadOn NoSymbol XF86TouchpadOn +keycode 201 = XF86TouchpadOff NoSymbol XF86TouchpadOff NoSymbol XF86TouchpadOff +keycode 202 = +keycode 203 = Mode_switch NoSymbol Mode_switch NoSymbol Mode_switch +keycode 204 = NoSymbol Alt_L NoSymbol Alt_L NoSymbol Alt_L +keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_L +keycode 206 = NoSymbol Super_L NoSymbol Super_L NoSymbol Super_L +keycode 207 = NoSymbol Hyper_L NoSymbol Hyper_L NoSymbol Hyper_L +keycode 208 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay +keycode 209 = XF86AudioPause NoSymbol XF86AudioPause NoSymbol XF86AudioPause +keycode 210 = XF86Launch3 NoSymbol XF86Launch3 NoSymbol XF86Launch3 +keycode 211 = XF86Launch4 NoSymbol XF86Launch4 NoSymbol XF86Launch4 +keycode 212 = XF86LaunchB NoSymbol XF86LaunchB NoSymbol XF86LaunchB +keycode 213 = XF86Suspend NoSymbol XF86Suspend NoSymbol XF86Suspend +keycode 214 = XF86Close NoSymbol XF86Close NoSymbol XF86Close +keycode 215 = XF86AudioPlay NoSymbol XF86AudioPlay NoSymbol XF86AudioPlay +keycode 216 = XF86AudioForward NoSymbol XF86AudioForward NoSymbol XF86AudioForward +keycode 217 = +keycode 218 = Print NoSymbol Print NoSymbol Print +keycode 219 = +keycode 220 = XF86WebCam NoSymbol XF86WebCam NoSymbol XF86WebCam +keycode 221 = XF86AudioPreset NoSymbol XF86AudioPreset NoSymbol XF86AudioPreset +keycode 222 = +keycode 223 = XF86Mail NoSymbol XF86Mail NoSymbol XF86Mail +keycode 224 = XF86Messenger NoSymbol XF86Messenger NoSymbol XF86Messenger +keycode 225 = XF86Search NoSymbol XF86Search NoSymbol XF86Search +keycode 226 = XF86Go NoSymbol XF86Go NoSymbol XF86Go +keycode 227 = XF86Finance NoSymbol XF86Finance NoSymbol XF86Finance +keycode 228 = XF86Game NoSymbol XF86Game NoSymbol XF86Game +keycode 229 = XF86Shop NoSymbol XF86Shop NoSymbol XF86Shop +keycode 230 = +keycode 231 = Cancel NoSymbol Cancel NoSymbol Cancel +keycode 232 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown +keycode 233 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp +keycode 234 = XF86AudioMedia NoSymbol XF86AudioMedia NoSymbol XF86AudioMedia +keycode 235 = XF86Display NoSymbol XF86Display NoSymbol XF86Display +keycode 236 = XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff NoSymbol XF86KbdLightOnOff +keycode 237 = XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown NoSymbol XF86KbdBrightnessDown +keycode 238 = XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp NoSymbol XF86KbdBrightnessUp +keycode 239 = XF86Send NoSymbol XF86Send NoSymbol XF86Send +keycode 240 = XF86Reply NoSymbol XF86Reply NoSymbol XF86Reply +keycode 241 = XF86MailForward NoSymbol XF86MailForward NoSymbol XF86MailForward +keycode 242 = XF86Save NoSymbol XF86Save NoSymbol XF86Save +keycode 243 = XF86Documents NoSymbol XF86Documents NoSymbol XF86Documents +keycode 244 = XF86Battery NoSymbol XF86Battery NoSymbol XF86Battery +keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth NoSymbol XF86Bluetooth +keycode 246 = XF86WLAN NoSymbol XF86WLAN NoSymbol XF86WLAN +keycode 247 = +keycode 248 = +keycode 249 = +keycode 250 = +keycode 251 = XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle NoSymbol XF86MonBrightnessCycle +keycode 252 = +keycode 253 = +keycode 254 = XF86WWAN NoSymbol XF86WWAN NoSymbol XF86WWAN +keycode 255 = XF86RFKill NoSymbol XF86RFKill NoSymbol XF86RFKill + +!bind control to control +!bind caps lock to escape +!bind shift+caps to caps + +!for some reason ctrl and caps lock got switched again so switch keycode and +!order a bit +clear lock +clear control +keycode 37 = Escape Caps_Lock NoSymbol NoSymbol +keycode 66 = Control_L +add control = Control_L Control_R + +!keycode 133 = Super_L NoSymbol NoSymbol Super_L diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases new file mode 100644 index 0000000..e0fbdc2 --- /dev/null +++ b/dotfiles/.bash_aliases @@ -0,0 +1,75 @@ +alias suda='sudo' + +## Colorls +alias lca='colorls -A --sd -X' +alias lc='colorls --sd -X' +alias lcl='colorls --sd -Xl' +alias lcla='colorls -lA --sd -X' +alias lcal='colorls -lA --sd -X' + +## Pacman/Yay +# update without noconfirm +alias spu='sudo pacman -Syu' +# cleanup orphaned packages +alias cleanup='suda pacman -Rns $(pacman -Qtdq)' +# update everything +alias upall="paru -Syu --noconfirm" + +## Npm/Yarn +alias ns='npm start' +alias yb='yarn build' +alias ys='yarn start' +alias yi='yarn install' + +## Git +alias gs='git status' +alias gc='git commit' +alias gp='git push' + +## Helpful +alias count='ls -l | wc -l' +# use all cores +alias uac="sh ~/.bin/main/000*" +alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg" +alias update-fc="suda fc-cache -fv" +alias unlock-db='suda rm /var/lib/pacman/db.lck' +alias dn='deactivate_node' +alias logs='ksystemlog &' + +## youtube-dl +alias yta-best="youtube-dl --extract-audio --audio-format best" +alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 --config-location ~/.config/youtube-dl/config.audio" +alias ytv-best="youtube-dl -f bestvideo+bestaudio" +# get error message from journalctl +alias jctl='journalctl -p 3 -xb' + +## This is specific to WSL 2. If the WSL 2 VM goes rogue and decides not to free +## up memory, this command will free your memory after about 20-30 seconds. +## Details: https://github.com/microsoft/WSL/issues/4166#issuecomment-628493643 +alias drop_cache="sudo sh -c \"echo 3 >'/proc/sys/vm/drop_caches' && swapoff -a && swapon -a && printf '\n%s\n' 'Ram-cache and Swap Cleared'\"" + +# mkdir +alias mkdir='mkdir -p' + +## I'm Lazy +alias scripts='cd /home/sudacode/scripts' +alias freud='cd /home/sudacode/' +alias c=clear +alias btop=bpytop +alias fd='firebase deploy' +alias open='xdg-open' +alias glow='glow -p' +alias jn='jupyter-notebook' +alias blog='cd ~/projects/React/github/Sudacode-Blog-V3' +alias venv='source env/bin/activate' +alias eecs484='cd ~/projects/eecs484/project4' +alias music=ncmpcpp +alias reload='source ~/.zshrc' +alias golf='cd ~/projects/Python/SudacodeGolf/ && source env/bin/activate' +alias prolog=swipl +alias chess='cd ~/projects/React/github/sudacode-chess/' +alias temps='curl wttr.in' +alias whatsmyip='http ipinfo.io' +alias edit='sudoedit' +alias ports='sudo netstat -tupln' +alias ncdu='ncdu --color dark' diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..3a33088 --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,186 @@ +# Syntax hilighting +# Add this lines at the top of .bashrc: +#[[ $- == *i* ]] && source /home/ksyasuda/Downloads/ble.sh/out/ble.sh --noattach + + +export PATH="$HOME/scripts:$PATH" +export EDITOR=vim + +source ~/.bash_aliases + +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +# Add an "alert" alias for long running commands. Use like so: +# sleep 10; alert +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +gb() { + echo -n '[' && git branch 2>/dev/null | grep '^*' | colrm 1 2 | tr -d '\n' && echo -n '*]' +} + +git_branch() { + gb | sed 's/\[\*\]//' +} + +test_colors() { + read nice + if type $nice &> /dev/null; then + export PS1='\e[0;92m' + else + export PS1='\e[0;91m' + fi +} + + +#LS_COLORS="di=42;1;30:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;35:*.css=1;36:*.as=1;35:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94" + +LS_COLORS="di=42;1;95:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;35:*.css=1;36:*.as=1;35:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94" + + +export VISUAL=vim +PS2="\e[41;94m===>\e[0m \e[91m" + +# export PATH=$PATH:/home/ksyasuda/go/bin + + +PS1="\033[1;35m[ \d | \@ ]\033[0m\e[44;0;36m[\w]\e[1;92m\$(git_branch)\e[44;0;91m\n$: " + +##Powerline configuration +#if [ -f /usr/share/powerline/bindings/bash/powerline.sh ]; then +# powerline-daemon -q +# POWERLINE_BASH_CONTINUATION=1 +# POWERLINE_BASH_SELECT=1 +# source /usr/share/powerline/bindings/bash/powerline.sh +#fi + + +# for use with xserver... causes screenfetch and neofetch to not work unless xserver is running +#export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0 + +#sudo /etc/init.d/dbus start &> /dev/null + + +# Syntax hilighting +# Add this line at the end of .bashrc: +#((_ble_bash)) && ble-attach + +# export GTK_IM_MODULE=xim +# export XMODIFIERS=@im=ibus +# export QT_IM_MODULE=xim + + +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion diff --git a/dotfiles/.doom_help.org b/dotfiles/.doom_help.org new file mode 100644 index 0000000..85acf02 --- /dev/null +++ b/dotfiles/.doom_help.org @@ -0,0 +1,370 @@ +SPC +* SPC: find file + , switch buffer + . browse files + : MX + ; EX + < switch buffer + ` eval + u universal arg + x pop up scratch + ~ toggle last popup +* TAB workspace + TAB Display tab bar + . switch workspace + 0 last workspace + 1-9 : x workspace + L load session + S autosave current session + X delete sessions + [ previous workspace + ] next workspace + d delete workspace + l load workspace from file + n workspace + s save workspace to file + x kill all buffers' +* / search + i symbols + I symbols accr. buffers + b buffer + d directory + o Online providers + p project + +*** [ prev + S spelling corr + [ text size + b buffer + d diff + e error + h smart jump + s spelling error + t todo + w workspace +*** ] next + S spelling corr + [ text size + b buffer + d diff + e error + h smart jump + s spelling error + t todo + w workspace +*** SPC + SPC: find file + , switch buffer + . browse files + : MX + ; EX + < switch buffer + ` eval + u universal arg + x pop up scratch + ~ toggle last popup +*** TAB workspace + TAB Display tab bar + . switch workspace + 0 last workspace + 1-9 : x workspace + L load session + S autosave current session + X delete sessions + [ previous workspace + ] next workspace + d delete workspace + l load workspace from file + n workspace + s save workspace to file + x kill all buffers' +**** / search + i symbols + I symbols accr. buffers + b buffer + d directory + o Online providers + p project +**** [ prev + S spelling corr + [ text size + b buffer + d diff + e error + h smart jump + s spelling error + t todo + w workspace +**** ] next + S spelling corr + [ text size + b buffer + d diff + e error + h smart jump + s spelling error + t todo + w workspace +**** b buffer + B switch buffer + S sudo edit + [ prev + ] next + b switch ws buffer + k kill buffer + n new empty buffer + o kill other buffers + s save buffer + x pop scratch buffer + z burry buffer +**** c code + d jump to def + D jump to ref + e evaluate buffer + E evaluate and replace + b build + r repl + x list errors +**** f file + . find file + / find file in project + > sudo find file + ? find file from here + E Browse emacs.d + P browse private config + R recent project files + a find other file + c open project editor config + d find dir + e find file in emacs.d + p find file in private config + r recent files + y yank filename +**** g git + c magit commit + C magit clone + G list gists + L list reps + P magic pull popup + R git revert + S git stage + U git unstange hunk + [ previous + ] next + b magic blame + d magic dispatch + f magic find + g magit status + i init repo + l magit buffer log + p push popup + r git revert hunk + s git status + t git time matchine +**** o open + M mail + N neotree + O reveal proj finder + b browser + d debugger + n neotree + o reveal in finder + r repl + t terminal +*** p project + ! run cmd in project root + . browse + / find in project + c compile project + o find other file + p switch project + r recent project files + t list project tasks + x invalidate cache +*** q quit + q save and quit + Q quit +*** r remote + . browse remote files + > detect remote changes + D diff local and remote + U upload local + d download remote + u upload local +*** s snippets + S find snippet + i insert snippet + n new snippet + s find snippet for mode +*** t toggle + F frame fullscreen + I indente + b big mode + f flycheck + g evil goggles + h impatient modei indet guides + l line numbers + p org-tree-slide-mode + s flyspell +*** w window + + increase height + - descr height + < dec width + = balance windows + > incr width + H move left + J move down + K move up + L move right + R rotate up + S split + W prev + _ set height + b bottom right + c close window + h left + j down + k up + l right + n new + o enlargen + p mru + q quit + r rotate down + s split + t top left + u winner undo + v vsplit + w next + | set width b buffer + B switch buffer + S sudo edit + [ prev + ] next + b switch ws buffer + k kill buffer + n new empty buffer + o kill other buffers + s save buffer + x pop scratch buffer + z burry buffer +*** c code + d jump to def + D jump to ref + e evaluate buffer + E evaluate and replace + b build + r repl + x list errors +*** f file + . find file + / find file in project + > sudo find file + ? find file from here + E Browse emacs.d + P browse private config + R recent project files + a find other file + c open project editor config + d find dir + e find file in emacs.d + p find file in private config + r recent files + y yank filename +*** g git + c magit commit + C magit clone + G list gists + L list reps + P magic pull popup + R git revert + S git stage + U git unstange hunk + [ previous + ] next + b magic blame + d magic dispatch + f magic find + g magit status + i init repo + l magit buffer log + p push popup + r git revert hunk + s git status + t git time matchine +*** o open + M mail + N neotree + O reveal proj finder + b browser + d debugger + n neotree + o reveal in finder + r repl + t terminal +*** p project + ! run cmd in project root + . browse + / find in project + c compile project + o find other file + p switch project + r recent project files + t list project tasks + x invalidate cache + q quit + q save and quit + Q quit + r remote + . browse remote files + > detect remote changes + D diff local and remote + U upload local + d download remote + u upload local + s snippets + S find snippet + i insert snippet + n new snippet + s find snippet for mode + t toggle + F frame fullscreen + I indente + b big mode + f flycheck + g evil goggles + h impatient modei indet guides + l line numbers + p org-tree-slide-mode + s flyspell + w window + + increase height + - descr height + < dec width + = balance windows + > incr width + H move left + J move down + K move up + L move right + R rotate up + S split + W prev + _ set height + b bottom right + c close window + h left + j down + k up + l right + n new + o enlargen + p mru + q quit + r rotate down + s split + t top left + u winner undo + v vsplit + w next + | set width diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig new file mode 100644 index 0000000..e033dcf --- /dev/null +++ b/dotfiles/.gitconfig @@ -0,0 +1,3 @@ +[user] + name = ksyasuda + email = ksyasuda@umich.edu diff --git a/dotfiles/.gitignore b/dotfiles/.gitignore new file mode 100644 index 0000000..5d956a1 --- /dev/null +++ b/dotfiles/.gitignore @@ -0,0 +1,4 @@ +.git +.vscode +env/* +__pycache__/* diff --git a/dotfiles/.help.md b/dotfiles/.help.md new file mode 100644 index 0000000..cba9b4f --- /dev/null +++ b/dotfiles/.help.md @@ -0,0 +1,527 @@ +# Help / Useful commands + +## tmux + tmux new -s [name] # start new session named [name] + tmux a -t [name] # attatch to session named [name] + tmux ls # list tmux sessions + tmux kill-ses -t [name] # kill tmux session named [name] + +### tmux keybindings + C+b $ # rename session + C+b % # vertical split + C+b " # horizontal split + C+b d # detach from session + C+b c # create new tab + C+b n # next tab + +## sybmolic links + ln -s [file] [symbolic link] # creates a symbolic link for [file] + ln -sr [file] [path_to_sym_file] # creates symlink in a diff directory + +## yarn + yarn global add [package] # adds a package globally + yard add [package] # add a package + yarn create react-app [name] # create-react-app with yarn + +## firebase + firebase deploy # deploy code to firebase + firebase serve # run local server through firebase + firebase projects:list # list all projects + +## curl + curl [web_address] # dump a webpage to the terminal + curl -L [address] # follow a link and dump the results + curl --verbose probably also -v # run with verbose + +## nmap + nmap [web-address] # see what ports are open at address + sudo lsof -i -P -n | grep LISTEN # listen for stuff on ports + +## pip + pip list # list pip packages installed + +## python virtual env + python3 -m venv env # create the env directory + source env/bin/activate # activate the virtual environment + or . env/bin/activate + echo $VIRTUAL_ENV # prints the path to the virtual env + which -a python # lists the install locations of python + deactivate # when in a virtual session deactivates it + +## tar + tar [address] # download a file from address + +## vim + + :sp [filename] - Opens a new file and splits your screen horizontally to show more than one buffer + + :vsp [filename] - Opens a new file and splits your screen vertically to show more than one buffer + set nonumber # remove line numbers from file + Ctrl+w h # shift focus left pane + Ctrl+w l # shift fous right pane + :nohls # remove search hilighting until next search + cw # delete word and enter insert mode + ^u # go up half a page + ^d # go down half a page + s// # search and replace for pattern + V [select line] # Use visual line to select multiple lines + :g/^$/d # Remove all blank lines from a file + "xyy # Yank line to register x + "xp # Paste line from register x + "+y # yank into the system clipboard register + "+p # paste from the system clipboard register + zg # add word to local dictionary (spellcheck) + +## markdown + grip # open a live-server for markdown file + **<>** # bold + --- # line + [...](link) # inline-style link + [desc](link "hover title") # inline-style link with hover title + +## pacman + + pacman -Syu --ignore=[package name] # update/upgrade all but packages in ignore + pacman -Rs package_name # remove a package and all deps not needed + pacman -Rsu package_name # if above command does not work + pacman -Qtdq # check for orphaned packages + pacman -Rns $(pacman -Qtdq) # remove orphaned packages + rm /var/lib/pacman/db.lck # remove the lock file for pacman + pacman -U /var/cache/pacman/pkg/package-old_version.pkg.tar.type # downgrade package + +## ctags + + ctags -R . # index the current directory with ctags + +## ssh + + ssh -i eecs485deploy.pem ubuntu@ec2-3-137-139-85.us-east-2.compute.amazonaws.com + ssh -p [port] user@ip + ~/.ssh/config # file to change configuration for ssh + +## insta485 server-side + gunicorn -b localhost:8000 -w 2 -D insta485:app # Start the server + pgrep -af gunicorn # list running guinicorn jobs + pkill -f gunicorn # stop the gunicorn server + +## wget + + wget [address] # download a file/files + -P # specify a directory + -c # allow to save location on INT + +## unzip + + unzip (file) # unzips zip file + +## wine + + wine (file) # install a windows file + winefile # opens the windows file system + +## onedrive + + onedrive --synchronize # sync the onedrive folder to the cloud + +## text2pdf + + text2pdf [input file] > [output] # convert input file to pdf named output + +## netstat + + netstat -ltnp | grep -w ':PORT' # show process running on port PORT + l - only show lisening sockets + t - display tcp connections + n - show numerical addresses + p - show PID and process name + grep -w - matching of exact string + netstat -tupan + +## japanese keyboard + + ibus-setup # start daemon and launch config + Ctrl+Alt+Shift # switch between languages + +## httpie + + http [url] # send get request with pretty printing/colors + +## tcm - Typed CSS Modules # generate styles.css.d.ts file + + tsm [directory or file] # generate styles.d.ts for each file or specific file + +ranger + + ranger # open text-based file-manage + +## nmcli # netwrok manager command line interface + + nmcli device # lists all device + nmcli device wifi # list wifi networks + nmcli device connct wlp1s0 -ask # connect to wifi and enter password + +## picom # to blur stuff + + picom & # run picom in background + +## i3-gaps + + Alt+Shift+G # open up the gap manager + +## feg # set background image + + feh --bg-scale ~/OneDrive/Pictures/what\ are\ the\ chances.jpg + +## xprop # run xprops + + Click on window and get information from the Window Manager about it + +## Linux keybindings + + Alt+Shift+g to go into gap mode and press i for inner gap and + 4 times + +redirect stderr + + append 2>/dev/null to redirect filehandle 2 (STDERR) to /dev/null, which is + +## network-manager + + nmtui # launch network manager gui + nmcli # network manager cli + +## disown # remove a job from table of active jobs + + disown %[jobnumber] # removes active job [jobnumber] + +## jobs + + jobs -l # list all active jobs + +ps + ps -l # list active processes + +## doom emacs + Meta=SPACE + Meta+. # open file search + Meta+b # open buffer settings + Meta+b+m # set bookmark + Meta+Return # open bookmark selector + Meta+h # help + Meta+t # toggle menu + Meta+o+p # toggle nerdtree like thing + +## bpytop + New and improved bashtop written in python + +## w3m + w3m www.google.com # terminal web browswer + +## bluetoothctl + scan on # turn on scan + pair [device id] # connect to device + +## locate + locate [filename] # return path to file + locate -b [filename] # search for file/dir in basename + suda updatedb -v # update the db with new files + +## md2pdf + md2pdf # convert markdown file to pdf + +## glow + # Read from file + glow README.md + # Read from stdin + glow - + # Fetch README from GitHub / GitLab + glow github.com/charmbracelet/glow + # Fetch markdown from HTTP + glow https://host.tld/file.md + # stash document from cli + glow stash README.md + +## Notifications + /usr/share/dbus-1/services + +## crontab + crontab -e # edit the cronjobs for user + crontab -l # list all cronjobs + +## youtube-dl + youtube-dl [url] # download a video from youtube + +## pgrep + pgrep -af [name] # searches for all process with name [name] + pgrep -x [name] # searches for name with exact matching + pgrep -l [name] # return pid and process name + +## pidof + pidof [name] # gets the pid of the process with [name] + +## gparted +Use application gparted to format USB drive + +## getopts + while getopts "vk" arg; do + case $arg in + v) verbose=1;; + k) justKillIt=1;; + esac + done + +## tor + ahmia.fi # dark web search engine + +## github api + curl -i -u your_username:your_token https://api.github.com/user + curl -i -H "Authorization: token " \ + https://api.github.com/user/repos + +## conky + Ctrl+Mod(alt)+c # toggle conky + Ctrl+Mod+PgUp # next conky + Ctrl+Mod+PgDn # prev conky + # launch conky set up by Arcolinux team + conky -c /home/sudacode/.config/conky/AUR-ArcoLinux-Plasma.conkyrc + conky -c ~/.config/conky/AUR-Nemesis-Plasma.conkyrc + +## Chiaki +ps4 remtote play application for linux + +## Arch not booting +Ctrl+Alt+F5 to get to tty5 + may need to press FN key +check /var/log/pacman.log + +## systemctl +```sh +systemctl start [name] Starts service +systemctl stop [name] Stops service +systemctl enable [name] Enables service on startup +systemctl disable [name] Disables service on startup +systemctl status [name] Get status of service +``` + +## Fix Spotify Not Working Well +rm /usr/share/dbus-1/services/org.kde.plasma.Notifications.service + +## heroku +heroku git:remote -a [project name] Connect repository to the heroku remote + +## tokei +tokei show programming languages in use in current directory + +## ncmpcpp +audio player + +## pulsemixer +command line pulseaudio + +## psql +connect to a postgresql db on another machine +psql postgresql://[username]@[addr]:[port]/[DBname] + +## udisksctl +### mount/unmount sd card +udisksctl mount -b /dev/mmcblk0p1 +udisksctl unmount -b /dev/mmcblk0p1 + +## dunst +dunstify "notification" display a desktop notification +dunstify "Progress: " -h int:value:60 display progress bar starting at 60 + +## Jupyter Notebook + +### Add a Virtual Environment to JN +```bash +python -m ipykernel install --user --name=[env_name] +``` + +### Uninstall venv from JN +```bash +jupyter kernelspec uninstall [env_name] +``` + + +### sacad: download album artwork +```bash +sacad [artist] [album name] [size] [output_file_name] +``` + +### ifuse: connect to iphone filesystem +```bash +$ mkdir -p /tmp/phone/ +# mount the filesystem +$ fusermount -u /tmp/phone/ +# unmount the filesystem +$ ifuse /tmp/phone/ +``` + +### mdr: markdown render in the terminal +:MarkdownRender right + +### ipython: interactive python with history, dynamic object introsepction, easier configuration, command completion, access to system shell, and integration with numerical and sientific computing tools + +## nvtop +top for graphics card + +## rofi-mpd +```bash +rofi-mpd -h +``` + +## UMICH Caen + + rsync -rtv path_to_your_local_file_name your_uniqname@login.engin.umich.edu:path_to_your_remote_folder + +## Edit files as superuser (sudo) + + sudo -e or sudoedit + +## nftables: firewall + + nft -s list ruleset | tee [filename] + systemctl status nftables + + +## i3-help-log + + +## lscpu + + lscpu # display info about the CPU + + +## ps + + ps -aux # list stats about processes running including cpu and memory + ps -aux --sort=%mem/%cpu # sort by memory or cpu + ps -aux --sort=-%mem # sort by memory in ascending order + + +## kill + + kill -l # list all kill signals + +## ip + + ip a # show all + ip -4 addr # show ipv4 addresses + ip -6 addr # show ipv6 addresses + + +## sqlplus + + select * from user_sequences; # list user defined sequences + select table_name from user_tables; # list user defined tables + + +## qemu + + # create image + qemu-img create -f qcow2 Image.img 10G + # create vm with 4G of memory with X.iso and boots directly into dvd drive + qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot order=d -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on + # boots into menu + qemu-system-x86_64 -enable-kvm -cdrom manjaro-awesome-20.0-200428-linux56.iso -boot menu=on -drive file=Image.img -m 4G -cpu host -smp 4 -vga virtio -display sdl,gl=on + +## scp: secure cp + + # copy file to remote + scp -P 88 [file] user@host:path-to-file + # copy directory to remote + scp -rp -P 88 [directory] user@host:path-to-directory + # copy from remote to local + scp remote-user@remote-host:file path-to-file + + +## rsync + + # copied files in archive mode (recursively run on directories) + # add --delete option to have destination delete files when deleted in src + rsync -av --delete [source] [destiation] + # exclude files with --exclude='pattern' or --exclude-from='exclude_file' + + # rsync over the network + +## wget + + # add -c argument to allow to interrupt download and resume later with -c + # -P to set local download path + + +## send key to server + + ssh-copy-id user@host + +## CAEN VNC + + ssh -f -L 5951:localhost:5951 uniqname@login-course.engin.umich.edu "sleep 30" + vncviewer localhost:5951 + +## Anaconda + + source /opt/anaconda/bin/activate /home/sudacode/anaconda3 + anaconda-navigator + + PostgreSQL: postgresql://scott:tiger@localhost/mydatabase + MySQL: mysql://scott:tiger@localhost/foo + Oracle: oracle://scott:tiger@127.0.0.1:1521/sidname + SQL Server: mssql+pyodbc://scott:tiger@mydsn + SQLite: sqlite:///foo.db + +## Create new Application Entry + + /usr/share/applications/ + /usr/local/share/applications/ + ~/.local/share/applications/ + + create desktop entry like others + +## mysql + + sudo mysql # connect to mysql as root + create database [db_name]; + grant all privileges on mydb.* to user@localhost; + grant all privileges on mysql.* to user@localhost; + flush priviliges; + +## ncdu: disk usage + + +## baloo + + balooctl # control baloo + baloosewarch [search] #search for files/folders + +## nbfc: Fan Control + +## thermald: CPU Frequency Scaling + + +## Vim-Plug + + :PlugInstall # install plugins + :PlugClean # clean .vim/plugged directory + +## remoteit + + +# screen + + screen -S [session_name] start named screen session + screen -S [session_name/pid] reattach + screen -S [session_name] -d -m [command] run command in detached session + screen -ls list screens + ctrl+a d detach from session + +## mpc + + mpc add http://host:port add stream + mpc del [num] (0 indexed) delete from queue + mpc play play (lol) + mpc toggle + +## pdfjam + + pdfjam [files] --outfile [file] diff --git a/dotfiles/.markdown.help.md b/dotfiles/.markdown.help.md new file mode 100644 index 0000000..0b40b33 --- /dev/null +++ b/dotfiles/.markdown.help.md @@ -0,0 +1,217 @@ +# Advanced Markdown with [David Wells](https://twitter.com/DavidWells) + +[Slides -> github.com/DavidWells/advanced-markdown](https://github.com/DavidWells/advanced-markdown/) + +## Table of Contents + +
+"Click to expand" + +- [Why markdown?](#why-markdown) +- [Markdown basics](#markdown-basics) +- [Advanced Formatting tips](#advanced-formatting-tips) + * [`left` alignment](#left-alignment) + * [`right` alignment](#right-alignment) + * [`center` alignment example](#center-alignment-example) + * [`collapse` Sections](#collapse-sections) + * [`additional links`](#additional-links) + * [Badges](#badges) +- [Useful packages](#useful-packages) +- [Useful utilities](#useful-utilities) +- [How Serverless uses markdown](#how-serverless-uses-markdown) + * [DEMO](#demo) +- [Other Markdown Resources](#other-markdown-resources) + +
+ + +## Why markdown? + +Markdown is a universal doc format that is easy to write and easy to add to a version control system. + +- **Open** - Anyone can submit content, fix typos & update anything via pull requests +- **Version control** - Roll back & see the history of any given post +- **No CMS lock in** - We can easily port to any static site generator +- **It's just simple** - No user accounts to manage, no CMS software to upgrade, no plugins to install. + +--- + +## Markdown basics + +The basics of markdown can be found [here](https://guides.github.com/features/mastering-markdown/) & [here](https://daringfireball.net/projects/markdown/). Super easy! + +## Advanced Formatting tips + +### `left` alignment + + + +This is the code you need to align images to the left: +``` + +``` + +--- + +### `right` alignment + + + +This is the code you need to align images to the right: +``` + +``` + +--- + +### `center` alignment example + +

+ +

+ +``` +

+ +

+``` + +--- + +### `collapse` Sections + +Collapsing large blocks of text can make your markdown much easier to digest + +
+"Click to expand" +this is hidden block +
+ +``` +
+"Click to expand" +this is hidden +
+``` + +Collapsing large blocks of Markdown text + +
+To make sure markdown is rendered correctly in the collapsed section... + + 1. Put an **empty line** after the `` block. + 2. *Insert your markdown syntax* + 3. Put an **empty line** before the `
` tag + + + +``` +
+To make sure markdown is rendered correctly in the collapsed section... + + 1. Put an **empty line** after the `` block. + 2. *Insert your markdown syntax* + 3. Put an **empty line** before the `
` tag + + +``` + +--- + +### `additional links` + +[Website](http://www.serverless.com) • [Email Updates](http://eepurl.com/b8dv4P) • [Gitter](https://gitter.im/serverless/serverless) • [Forum](http://forum.serverless.com) • [Meetups](https://github.com/serverless-meetups/main) • [Twitter](https://twitter.com/goserverless) • [Facebook](https://www.facebook.com/serverless) • [Contact Us](mailto:hello@serverless.com) + +``` +[Website](http://www.serverless.com) • [Email Updates](http://eepurl.com/b8dv4P) • [Gitter](https://gitter.im/serverless/serverless) • [Forum](http://forum.serverless.com) • [Meetups](https://github.com/serverless-meetups/main) • [Twitter](https://twitter.com/goserverless) • [Facebook](https://www.facebook.com/serverless) • [Contact Us](mailto:hello@serverless.com) +``` + +--- + +### Badges + +I hate them so. Don't use badges. + +--- + +## Useful packages + +1. [gray-matter](https://www.npmjs.com/package/gray-matter) + + YAML front-matter is your friend. You can keep metadata in markdown files + + ``` + title: Serverless Framework Documentation + description: "Great F'in docs!" + menuText: Docs + layout: Doc + ``` + +2. [Remark](https://www.npmjs.com/package/remark) + + Useful for rendering markdown in HTML/React + +3. [Markdown Magic](https://github.com/DavidWells/markdown-magic) + + - [Repo](https://github.com/DavidWells/markdown-magic) + - [Plugins](https://github.com/DavidWells/markdown-magic#plugins) + - Show automatic doc generation. [Example 1](https://github.com/DavidWells/markdown-magic/blob/master/examples/generate-readme.js#L15-L23) | [Example 2](https://github.com/serverless/examples/blob/master/generate-readme.js#L71-L87) + +--- + +## Useful utilities + +1. [Schedule Posts](https://github.com/serverless/post-scheduler) - Post scheduler for static sites + + Show DEMO + +2. [Zero friction inline content editing](https://jekyll-anon.surge.sh/gods/2015/02/18/vesta.html) + + Show DEMO + +3. [Byword](https://bywordapp.com/) & [Typora](https://typora.io/) - Good Editors + +4. [Monodraw](https://monodraw.helftone.com/) - Flow charts for days + +6. [Kap](https://getkap.co/) - Make gifs + +4. [IDE markdown preview](https://atom.io/packages/markdown-preview) + +5. Stuck on WordPress? Try [easy-markdown plugin](https://github.com/DavidWells/easy-markdown) + +--- + +## How Serverless uses markdown + +Serverless.com is comprised of 3 separate repositories + +- https://github.com/serverless/blog +- https://github.com/serverless/serverless | Shoutout to [Phenomic.io](https://phenomic.io/) +- https://github.com/serverless/site + +**Why multiple repos?** + +1. We wanted documentation about the framework to live in the serverless github repo for easy access +2. We wanted our blog content to be easily portable to any static site generator separate from the implementation (site) +3. `prebuild` npm script pulls the content together & processes them for site build + +A single repo is easier to manage but harder for people to find/edit/PR content. + +--- + +### DEMO + +- Site structure +- Serverless build process +- [Validation](https://github.com/serverless/blog/blob/master/.travis.yml#L10) +- [Editing Flow](https://serverless.com/framework/docs/providers/aws/cli-reference/deploy/) +- Github optimizations + - [Link from top of each doc to live link on site](https://github.com/serverless/serverless/blob/master/docs/providers/aws/events/schedule.md) + - use markdown magic =) to [auto generate tables](https://github.com/serverless/examples) etc + - [Hide yaml frontmatter from github folks](https://github.com/serverless/serverless/blame/master/docs/providers/aws/events/schedule.md#L1-L7) + - consider linking everything to site + +## Other Markdown Resources + +- [Verb](https://www.npmjs.com/package/verb) - Documentation generator for GitHub projects +- [ACSII docs](http://asciidoctor.org/) - Markdown alternative diff --git a/dotfiles/.p10k.zsh b/dotfiles/.p10k.zsh new file mode 100644 index 0000000..e0b8490 --- /dev/null +++ b/dotfiles/.p10k.zsh @@ -0,0 +1,1567 @@ +# Generated by Powerlevel10k configuration wizard on 2021-01-06 at 01:22 PST. +# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 47471. +# Wizard options: nerdfont-complete + powerline, large icons, unicode, lean, 2 lines, +# disconnected, left frame, dark-ornaments, compact, many icons, concise, +# transient_prompt, instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate +# your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + os_icon # os identifier + dir # current directory + vcs # git status + # =========================[ Line #2 ]========================= + newline # \n + prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # =========================[ Line #1 ]========================= + status # exit code of the last command + command_execution_time # duration of the last command + background_jobs # presence of background jobs + direnv # direnv status (https://direnv.net/) + asdf # asdf version manager (https://github.com/asdf-vm/asdf) + virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + anaconda # conda environment (https://conda.io/) + pyenv # python environment (https://github.com/pyenv/pyenv) + goenv # go environment (https://github.com/syndbg/goenv) + nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # node_version # node.js version + # go_version # go version (https://golang.org) + # rust_version # rustc version (https://www.rust-lang.org) + # dotnet_version # .NET version (https://dotnet.microsoft.com) + # php_version # php version (https://www.php.net/) + # laravel_version # laravel php framework version (https://laravel.com/) + # java_version # java version (https://www.java.com/) + # package # name@version from package.json (https://docs.npmjs.com/files/package.json) + rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + rvm # ruby version from rvm (https://rvm.io) + fvm # flutter version management (https://github.com/leoafarias/fvm) + luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + jenv # java version from jenv (https://github.com/jenv/jenv) + plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) + haskell_stack # haskell version from stack (https://haskellstack.org/) + kubecontext # current kubernetes context (https://kubernetes.io/) + terraform # terraform workspace (https://www.terraform.io) + aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + gcloud # google cloud cli account and project (https://cloud.google.com/) + google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + context # user@hostname + nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + ranger # ranger shell (https://github.com/ranger/ranger) + nnn # nnn shell (https://github.com/jarun/nnn) + vim_shell # vim shell indicator (:sh) + midnight_commander # midnight commander shell (https://midnight-commander.org/) + nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + # vpn_ip # virtual private network indicator + # load # CPU load + # disk_usage # disk usage + # ram # free RAM + # swap # used swap + todo # todo items (https://github.com/todotxt/todo.txt-cli) + timewarrior # timewarrior tracking status (https://timewarrior.net/) + taskwarrior # taskwarrior task count (https://taskwarrior.org/) + # time # current time + # =========================[ Line #2 ]========================= + newline + # ip # ip address and bandwidth usage for a specified network interface + # public_ip # public IP address + # proxy # system-wide http/https/ftp proxy + # battery # internal battery + # wifi # wifi speed + # example # example user-defined segment (see prompt_example function below) + ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=nerdfont-complete + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=moderate + + # Basic style options that define the overall look of your prompt. You probably don't want to + # change them. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT=true + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Connect left prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%240F╭─' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%240F├─' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%240F╰─' + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX= + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX= + + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + # Ruler, a.k.a. the horizontal line before each prompt. If you set it to true, you'll + # probably want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false above and + # POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' below. + typeset -g POWERLEVEL9K_SHOW_RULER=false + typeset -g POWERLEVEL9K_RULER_CHAR='─' # reasonable alternative: '·' + typeset -g POWERLEVEL9K_RULER_FOREGROUND=240 + + # Filler between left and right prompt on the first prompt line. You can set it to '·' or '─' + # to make it easier to see the alignment between left and right prompt and to separate prompt + # from command output. It serves the same purpose as ruler (see above) without increasing + # the number of prompt lines. You'll probably want to set POWERLEVEL9K_SHOW_RULER=false + # if using this. You might also like POWERLEVEL9K_PROMPT_ADD_NEWLINE=false for more compact + # prompt. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=240 + # Add a space between the end of left prompt and the filler. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=' ' + # Add a space between the filler and the start of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=' ' + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND= + # Make the icon bold. + typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='${P9K_CONTENT}' + + ################################[ prompt_char: prompt symbol ]################################ + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + # typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='' + # Prompt symbol in command vi mode. + # typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='' + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + + ##################################[ dir: current directory ]################################## + # Default current directory color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=31 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=103 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=39 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-version + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and + # POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2 + + # The default icon shown next to non-writable directories when POWERLEVEL9K_DIR_SHOW_WRITABLE is + # set to v2. + # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v2 and the current directory is not writable, + # its class gets suffix _NOT_WRITABLE. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with class + # WORK or WORK_NOT_WRITABLE. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=31 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=103 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=39 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=() + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='%fin ' + + #####################################[ vcs: git status ]###################################### + # Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + + # Formatter for Git status. + # + # Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + if (( $1 )); then + # Styling for up-to-date Git status. + local meta='%f' # default foreground + local clean='%76F' # green foreground + local modified='%178F' # yellow foreground + local untracked='%39F' # blue foreground + local conflicted='%196F' # red foreground + else + # Styling for incomplete and stale Git status. + local meta='%244F' # grey foreground + local clean='%244F' # grey foreground + local modified='%244F' # grey foreground + local untracked='%244F' # grey foreground + local conflicted='%244F' # grey foreground + fi + + local res + local where # branch or tag + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}" + where=${(V)VCS_STATUS_LOCAL_BRANCH} + elif [[ -n $VCS_STATUS_TAG ]]; then + res+="${meta}#" + where=${(V)VCS_STATUS_TAG} + fi + + # If local branch name or tag is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#where > 32 )) && where[13,-13]="…" + + res+="${clean}${where//\%/%%}" # escape % + + # Display the current Git commit if there is no branch or tag. + # Tip: To always display the current Git commit, remove `[[ -z $where ]] &&` from the next line. + [[ -z $where ]] && res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" # escape % + fi + + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter(1)))+${my_git_format}}' + typeset -g POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION='${$((my_git_formatter(0)))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Icon color. + typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR=76 + typeset -g POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR=244 + # Custom icon. + # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='%fon ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg reposotiry. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + # These settings are used for repositories other than Git or when gitstatusd fails and + # Powerlevel10k has to fall back to using vcs_info. + typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=76 + typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=178 + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=false + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=70 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=false + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=160 + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=160 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + + ###################[ command_execution_time: duration of the last command ]################### + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=101 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%ftook ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=66 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent diretory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=168 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=37 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=134 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=32 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=67 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=125 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=129 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=31 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=99 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=172 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=70 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=39 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=72 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=34 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=178 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74 + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=220 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=160 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=66 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=96 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=66 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=178 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=166 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=110 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=110 + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=74 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=180 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=180 + + # Context format when running with privileges: bold user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%B%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%fwith ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=37 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=37 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=37 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION" if $P9K_PYENV_PYTHON_VERSION is not + # empty and unequal to $P9K_CONTENT. + # 2. Otherwise display just "$P9K_CONTENT". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_PYENV_PYTHON_VERSION:#$P9K_CONTENT}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=37 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=70 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=70 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=70 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=37 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=37 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=134 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=99 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=161 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=32 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=117 + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=168 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=168 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=38 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=32 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=32 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=67 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide php version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=160 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=172 + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134 + # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat ' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=208 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=70 + # Custom icon. + # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=32 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=81 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun))[0-9]*' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_FOREGROUND=38 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=160 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=70 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES='\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578' + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=68 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(68 68 68 68 68) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=66 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='%fat ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -f 208 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + # typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/dotfiles/.prettierrc b/dotfiles/.prettierrc new file mode 100644 index 0000000..f7548e3 --- /dev/null +++ b/dotfiles/.prettierrc @@ -0,0 +1,10 @@ +{ + "arrowParens": "avoid", + "semi": false, + "tabWidth": 4, + "useTabs": true, + "jsxSingleQuote": true, + "printWidth": 80, + "trailingComma": "es5", + "vueIndentScriptAndStyle": true +} diff --git a/dotfiles/.thanks.md b/dotfiles/.thanks.md new file mode 100644 index 0000000..ea772f4 --- /dev/null +++ b/dotfiles/.thanks.md @@ -0,0 +1,21 @@ +# Attribution links + +[Disable picom transparency on fullscreen](https://github.com/chjj/compton/issues/403#issuecomment-326798836) + +[Firefox homepage](https://github.com/dbuxy218/Prismatic-Night#Instructions) + +[Rofi tabswitcher](https://gist.github.com/thraizz/f106ead51a50d4cddf96d5d83d595014) + +[Markdown with glow](https://www.reddit.com/r/ranger/comments/dzq3fq/markdown_preview/fclxhla?utm_source=share&utm_medium=web2x&context=3) + +[Spotify acting slow](https://www.reddit.com/r/archlinux/comments/a7t079/spotify_having_slow_reaction_time/enbkhyl/) + +[Fix one side of headphones not outputting sound](https://superuser.com/a/1281418) + +[Polybar pacman/AUR update scrfipt](https://www.reddit.com/r/archlinux/comments/gwccb3/is_there_a_way_to_show_the_number_of_outdated/fsuquiy?utm_source=share&utm_medium=web2x&context=3) + +[Headset microphone not working](https://superuser.com/a/1423564) + +[zscroll with polybar](https://github.com/polybar/polybar/issues/353#issuecomment-273388042) + +[change user password in psql](https://www.postgresqltutorial.com/postgresql-change-password/) diff --git a/dotfiles/.tmux.conf b/dotfiles/.tmux.conf new file mode 100755 index 0000000..ebbaf38 --- /dev/null +++ b/dotfiles/.tmux.conf @@ -0,0 +1,1231 @@ +# cat << EOF > /dev/null +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). +# /!\ do not edit this file +# instead, override settings in ~/.tmux.conf.local, see README.md + + +# -- general ------------------------------------------------------------------- + +set -g default-terminal "screen-256color" # colors! +setw -g xterm-keys on +set -s escape-time 10 # faster command sequences +set -sg repeat-time 600 # increase repeat timeout +set -s focus-events on + +set -g prefix2 C-a # GNU-Screen compatible prefix +bind C-a send-prefix -2 + +set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2) +setw -q -g utf8 on + +set -g history-limit 5000 # boost history + +# edit configuration +bind e new-window -n "~/.tmux.conf.local" "sh -c '\${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'" + +# reload configuration +bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' + + +# -- display ------------------------------------------------------------------- + +set -g base-index 1 # start windows numbering at 1 +setw -g pane-base-index 1 # make pane numbering consistent with windows + +setw -g automatic-rename on # rename window to reflect current program +set -g renumber-windows on # renumber windows when a window is closed + +set -g set-titles on # set terminal title + +set -g display-panes-time 800 # slightly longer pane indicators display time +set -g display-time 1000 # slightly longer status messages display time + +set -g status-interval 10 # redraw status line every 10 seconds + +# clear both screen and history +bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history + +# activity +set -g monitor-activity on +set -g visual-activity off + + +# -- navigation ---------------------------------------------------------------- + +# create session +bind C-c new-session + +# find session +bind C-f command-prompt -p find-session 'switch-client -t %%' + +# split current window horizontally +bind - split-window -v +# split current window vertically +bind _ split-window -h + +# pane navigation +bind -r h select-pane -L # move left +bind -r j select-pane -D # move down +bind -r k select-pane -U # move up +bind -r l select-pane -R # move right +bind > swap-pane -D # swap current pane with the next one +bind < swap-pane -U # swap current pane with the previous one + +# maximize current pane +bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D' + +# pane resizing +bind -r H resize-pane -L 2 +bind -r J resize-pane -D 2 +bind -r K resize-pane -U 2 +bind -r L resize-pane -R 2 + +# window navigation +#unbind n +#unbind p +bind -r C-h previous-window # select previous window +bind -r C-l next-window # select next window +bind Tab last-window # move to last active window + +# toggle mouse +bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse" + + +# -- urlview ------------------------------------------------------------------- + +bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}" + + +# -- facebook pathpicker ------------------------------------------------------- + +bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id}" + + +# -- list choice (tmux < 2.4) -------------------------------------------------- + +# vi-choice is gone in tmux >= 2.4 +run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true' +run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true' +run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true' +run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true' +run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true' +run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true' +run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true' + + +# -- edit mode (tmux < 2.4) ---------------------------------------------------- + +# vi-edit is gone in tmux >= 2.4 +run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true' +run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true' + + +# -- copy mode ----------------------------------------------------------------- + +bind Enter copy-mode # enter copy mode + +run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true' +run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true' +run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true' +run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true' +run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true' +run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true' +run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true' + +# copy to macOS clipboard +if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"' +if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"' +# copy to X11 clipboard +if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"' +if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"' +# copy to Windows clipboard +if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"' +if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"' + + +# -- buffers ------------------------------------------------------------------- + +bind b list-buffers # list paste buffers +bind p paste-buffer # paste from the top paste buffer +bind P choose-buffer # choose which buffer to paste from + + +# -- user defined overrides ---------------------------------------------------- + +if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local' + + +# -- 8< ------------------------------------------------------------------------ + +run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' +run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-time 3000 \; display "This configuration will soon require tmux >= 2.4" \; set -u display-time || true' + + +# EOF +# +# # exit the script if any statement returns a non-true return value +# set -e +# +# unset GREP_OPTIONS +# export LC_NUMERIC=C +# +# if ! printf '' | sed -E 's///' 2>/dev/null; then +# if printf '' | sed -r 's///' 2>/dev/null; then +# sed () { +# n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done +# command sed "$@" +# } +# fi +# fi +# +# __newline=' +# ' +# +# _is_enabled() { +# ( ([ x"$1" = x"enabled" ] || [ x"$1" = x"true" ] || [ x"$1" = x"yes" ] || [ x"$1" = x"1" ]) && return 0 ) || return 1 +# } +# +# _circled() { +# circled_digits='⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳' +# if [ "$1" -le 20 ] 2>/dev/null; then +# i=$(( $1 + 1 )) +# eval set -- "$circled_digits" +# eval echo "\${$i}" +# else +# echo "$1" +# fi +# } +# +# _decode_unicode_escapes() { +# printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null +# } +# +# _maximize_pane() { +# current_session=${1:-$(tmux display -p '#{session_name}')} +# current_pane=${2:-$(tmux display -p '#{pane_id}')} +# +# dead_panes=$(tmux list-panes -s -t "$current_session" -F '#{pane_dead} #{pane_id} #{pane_start_command}' | grep -E -o '^1 %.+maximized.+$' || true) +# restore=$(echo "$dead_panes" | sed -n -E -e "s/^1 $current_pane .+maximized.+'(%[0-9]+)'$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t $current_pane/p" -e "s/^1 (%[0-9]+) .+maximized.+'$current_pane'$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t \1/p" ) +# +# if [ -z "$restore" ]; then +# [ "$(tmux list-panes -t "$current_session:" | wc -l | sed 's/^ *//g')" -eq 1 ] && tmux display "Can't maximize with only one pane" && return +# window=$(tmux new-window -t "$current_session:" -P "exec maximized... 2> /dev/null & tmux setw -t \"$current_session:\" remain-on-exit on; printf \"Pane has been maximized, press + to restore. %s\" '$current_pane'") +# window=${window%.*} +# +# retry=1000 +# while [ x"$(tmux list-panes -t "$window" -F '#{session_name}:#{window_index} #{pane_dead}' 2>/dev/null)" != x"$window 1" ] && [ "$retry" -ne 0 ]; do +# sleep 0.1 +# retry=$((retry - 1)) +# done +# if [ "$retry" -eq 0 ]; then +# tmux display 'Unable to maximize pane' +# fi +# +# new_pane=$(tmux display -t "$window" -p '#{pane_id}') +# tmux setw -t "$window" remain-on-exit off \; swap-pane -s "$current_pane" -t "$new_pane" +# else +# $restore || tmux kill-pane +# fi +# } +# +# _toggle_mouse() { +# old=$(tmux show -gv mouse) +# new="" +# +# if [ "$old" = "on" ]; then +# new="off" +# else +# new="on" +# fi +# +# tmux set -g mouse $new \;\ +# display "mouse: $new" +# } +# +# _battery() { +# count=0 +# charge=0 +# uname_s=$(uname -s) +# case "$uname_s" in +# *Darwin*) +# while IFS= read -r line; do +# if [ x"$discharging" != x"true" ]; then +# discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false") +# fi +# percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%') +# charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }') +# count=$((count + 1)) +# done << EOF +# $(pmset -g batt | grep 'InternalBattery') +# EOF +# ;; +# *Linux*) +# while IFS= read -r batpath; do +# grep -i -q device "$batpath/scope" 2> /dev/null && continue +# +# if [ x"$discharging" != x"true" ]; then +# discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false") +# fi +# bat_capacity="$batpath/capacity" +# if [ -r "$bat_capacity" ]; then +# charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + capacity / 100 }') +# else +# bat_energy_full="$batpath/energy_full" +# bat_energy_now="$batpath/energy_now" +# if [ -r "$bat_energy_full" ] && [ -r "$bat_energy_now" ]; then +# charge=$(awk -v charge="$charge" -v energy_now="$(cat "$bat_energy_now")" -v energy_full="$(cat "$bat_energy_full")" 'BEGIN { print charge + energy_now / energy_full }') +# fi +# fi +# count=$((count + 1)) +# done << EOF +# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*') +# EOF +# ;; +# *CYGWIN*|*MSYS*|*MINGW*) +# while IFS= read -r line; do +# [ -z "$line" ] && continue +# if [ x"$discharging" != x"true" ]; then +# discharging=$(printf '%s' "$line" | awk '{ s = ($1 == 1) ? "true" : "false"; print s }') +# fi +# charge=$(printf '%s' "$line" | awk -v charge="$charge" '{ print charge + $2 / 100 }') +# count=$((count + 1)) +# done << EOF +# $(wmic path Win32_Battery get BatteryStatus, EstimatedChargeRemaining | tr -d '\r' | tail -n +2) +# EOF +# ;; +# *OpenBSD*) +# for batid in 0 1 2; do +# sysctl -n "hw.sensors.acpibat$batid.raw0" 2>&1 | grep -q 'not found' && continue +# if [ x"$discharging" != x"true" ]; then +# discharging=$(sysctl -n "hw.sensors.acpibat$batid.raw0" | grep -q 1 && echo "true" || echo "false") +# fi +# if sysctl -n "hw.sensors.acpibat$batid" | grep -q amphour; then +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.amphour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.amphour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# else +# charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.watthour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.watthour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }') +# fi +# count=$((count + 1)) +# done +# ;; +# esac +# [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }') +# if [ "$charge" -eq 0 ]; then +# tmux set -ug '@battery_status' \;\ +# set -ug '@battery_bar' \;\ +# set -ug '@battery_hbar' \;\ +# set -ug '@battery_vbar' \;\ +# set -ug '@battery_percentage' +# return +# fi +# +# variables=$(tmux show -gqv '@battery_bar_symbol_full' \;\ +# show -gqv '@battery_bar_symbol_empty' \;\ +# show -gqv '@battery_bar_length' \;\ +# show -gqv '@battery_bar_palette' \;\ +# show -gqv '@battery_hbar_palette' \;\ +# show -gqv '@battery_vbar_palette' \;\ +# show -gqv '@battery_status_charging' \;\ +# show -gqv '@battery_status_discharging') +# # shellcheck disable=SC2086 +# { set -f; IFS="$__newline"; set -- $variables; unset IFS; set +f; } +# +# battery_bar_symbol_full=$1 +# battery_bar_symbol_empty=$2 +# battery_bar_length=$3 +# battery_bar_palette=$4 +# battery_hbar_palette=$5 +# battery_vbar_palette=$6 +# battery_status_charging=$7 +# battery_status_discharging=$8 +# +# if [ x"$battery_bar_length" = x"auto" ]; then +# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80) +# if [ "$columns" -ge 80 ]; then +# battery_bar_length=10 +# else +# battery_bar_length=5 +# fi +# fi +# +# if [ x"$discharging" = x"true" ]; then +# battery_status="$battery_status_discharging" +# else +# battery_status="$battery_status_charging" +# fi +# +# if echo "$battery_bar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# palette_style=$1 +# battery_bg=${2:-none} +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# battery_bar="#[bg=$battery_bg]" +# # shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_full" $(echo "$palette" | cut -d' ' -f1-"$full"))" +# # shellcheck disable=SC2046 +# empty=$((battery_bar_length - full)) +# # shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_empty" $(echo "$palette" | cut -d' ' -f$((full + 1))-$((full + empty))))" +# eval battery_bar="$battery_bar#[fg=colour\${$((full == 0 ? 1 : full))}]" +# elif echo "$battery_bar_palette" | grep -q -E '^(([#a-z0-9]{7,9}|none),?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; } +# battery_full_fg=$1 +# battery_empty_fg=$2 +# battery_bg=$3 +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# [ x"$battery_bg" != x"none" ] && \ +# battery_bar="#[bg=$battery_bg]" +# #shellcheck disable=SC2046 +# [ "$full" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_full_fg]$(printf "%0.s$battery_bar_symbol_full" $(seq 1 "$full"))" +# empty=$((battery_bar_length - full)) +# #shellcheck disable=SC2046 +# [ "$empty" -gt 0 ] && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]$(printf "%0.s$battery_bar_symbol_empty" $(seq 1 "$empty"))" && \ +# battery_bar="$battery_bar#[fg=$battery_empty_fg]" +# fi +# +# if echo "$battery_hbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_hbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_hbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▏ ▎ ▍ ▌ ▋ ▊ ▉ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_hbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_hbar="#[fg=${battery_hbar_fg?}]${battery_hbar_symbol?}" +# +# if echo "$battery_vbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# palette_style=$1 +# [ x"$palette_style" = x"gradient" ] && \ +# palette="196 202 208 214 220 226 190 154 118 82 46" +# [ x"$palette_style" = x"heat" ] && \ +# palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196" +# +# palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }') +# eval set -- "$palette" +# +# full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }") +# eval battery_vbar_fg="colour\${$((full == 0 ? 1 : full))}" +# elif echo "$battery_vbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then +# # shellcheck disable=SC2086 +# { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; } +# +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }") +# fi +# +# eval set -- "▁ ▂ ▃ ▄ ▅ ▆ ▇ █" +# # shellcheck disable=SC2046 +# eval $(awk "BEGIN { printf \"battery_vbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }") +# battery_vbar="#[fg=${battery_vbar_fg?}]${battery_vbar_symbol?}" +# +# battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")" +# +# tmux set -g '@battery_status' "$battery_status" \;\ +# set -g '@battery_bar' "$battery_bar" \;\ +# set -g '@battery_hbar' "$battery_hbar" \;\ +# set -g '@battery_vbar' "$battery_vbar" \;\ +# set -g '@battery_percentage' "$battery_percentage" +# } +# +# _tty_info() { +# tty="${1##/dev/}" +# uname -s | grep -q "CYGWIN" && cygwin=true +# +# if [ x"$cygwin" = x"true" ]; then +# ps -af | tail -n +2 | awk -v tty="$tty" ' +# ((/ssh/ && !/-W/) || !/ssh/) && $4 == tty { +# user[$2] = $1; parent[$2] = $3; child[$3] = $2 +# } +# END { +# for (i in parent) +# { +# j = i +# while (parent[j]) +# j = parent[j] +# +# if (!(i in child) && j != 1) +# { +# file = "/proc/" i "/cmdline"; getline command < file; close(file) +# gsub(/\0/, " ", command) +# print i, user[i], command +# exit +# } +# } +# } +# ' +# else +# ps -t "$tty" -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk ' +# NR > 1 && ((/ssh/ && !/-W/) || !/ssh/) { +# user[$2] = $1; parent[$2] = $3; child[$3] = $2; for (i = 4 ; i <= NF; ++i) command[$2] = i > 4 ? command[$2] FS $i : $i +# } +# END { +# for (i in parent) +# { +# j = i +# while (parent[j]) +# j = parent[j] +# +# if (!(i in child) && j != 1) +# { +# print i, user[i], command[i] +# exit +# } +# } +# } +# ' +# fi +# } +# +# _ssh_or_mosh_args() { +# args=$(printf '%s' "$1" | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1=""; print $0; exit }') +# if [ -z "$args" ]; then +# args=$(printf '%s' "$1" | grep 'mosh-client' | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g') +# fi +# +# printf '%s' "$args" +# } +# +# _username() { +# tty=${1:-$(tmux display -p '#{pane_tty}')} +# ssh_only=$2 +# +# tty_info=$(_tty_info "$tty") +# command=$(printf '%s' "$tty_info" | cut -d' ' -f3-) +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^user / { print $2 }') +# # shellcheck disable=SC2086 +# [ -z "$username" ] && username=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%username% / { print $2; exit }') +# else +# if ! _is_enabled "$ssh_only"; then +# username=$(printf '%s' "$tty_info" | cut -d' ' -f2) +# fi +# fi +# +# printf '%s' "$username" +# } +# +# _hostname() { +# tty=${1:-$(tmux display -p '#{pane_tty}')} +# ssh_only=$2 +# +# tty_info=$(_tty_info "$tty") +# command=$(printf '%s' "$tty_info" | cut -d' ' -f3-) +# +# ssh_or_mosh_args=$(_ssh_or_mosh_args "$command") +# if [ -n "$ssh_or_mosh_args" ]; then +# # shellcheck disable=SC2086 +# hostname=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^hostname / { print $2 }') +# # shellcheck disable=SC2086 +# [ -z "$hostname" ] && hostname=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%hostname%% %h >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%hostname% / { print $2; exit }') +# #shellcheck disable=SC1004 +# hostname=$(echo "$hostname" | awk '\ +# { \ +# if ($1~/^[0-9.:]+$/) \ +# print $1; \ +# else \ +# split($1, a, ".") ; print a[1] \ +# }') +# else +# if ! _is_enabled "$ssh_only"; then +# hostname=$(command hostname -s) +# fi +# fi +# +# printf '%s' "$hostname" +# } +# +# _root() { +# tty=${1:-$(tmux display -p '#{pane_tty}')} +# username=$(_username "$tty" false) +# +# if [ x"$username" = x"root" ]; then +# tmux show -gqv '@root' +# else +# echo "" +# fi +# } +# +# _uptime() { +# case $(uname -s) in +# *Darwin*) +# boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }') +# now=$(date +%s) +# ;; +# *Linux*|*CYGWIN*|*MSYS*|*MINGW*) +# boot=0 +# now=$(cut -d' ' -f1 < /proc/uptime) +# ;; +# *OpenBSD*) +# boot=$(sysctl -n kern.boottime) +# now=$(date +%s) +# esac +# # shellcheck disable=SC1004 +# awk -v boot="$boot" -v now="$now" ' +# BEGIN { +# uptime = now - boot +# y = int(uptime / 31536000) +# dy = int(uptime / 86400) % 365 +# d = int(uptime / 86400) +# h = int(uptime / 3600) % 24 +# m = int(uptime / 60) % 60 +# s = int(uptime) % 60 +# +# system("tmux set -g @uptime_y " y + 0 " \\; " \ +# "set -g @uptime_dy " dy + 0 " \\; " \ +# "set -g @uptime_d " d + 0 " \\; " \ +# "set -g @uptime_h " h + 0 " \\; " \ +# "set -g @uptime_m " m + 0 " \\; " \ +# "set -g @uptime_s " s + 0) +# }' +# } +# +# _loadavg() { +# case $(uname -s) in +# *Darwin*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)" +# ;; +# *Linux*) +# tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)" +# ;; +# *OpenBSD*) +# tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)" +# ;; +# esac +# } +# +# _split_window() { +# tty=${1:-$(tmux display -p '#{pane_tty}')} +# shift +# +# tty_info=$(_tty_info "$tty") +# command=$(printf '%s' "$tty_info" | cut -d' ' -f3-) +# +# case "$command" in +# *mosh-client*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" mosh $(echo "$command" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/') +# ;; +# *ssh*) +# # shellcheck disable=SC2046 +# tmux split-window "$@" $(echo "$command" | sed -e 's/;/\\;/g') +# ;; +# *) +# tmux split-window "$@" +# esac +# } +# +# _apply_overrides() { +# tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-false} +# if _is_enabled "$tmux_conf_theme_24b_colour"; then +# case "$TERM" in +# screen-*|tmux-*) +# ;; +# *) +# tmux set-option -ga terminal-overrides ",*256col*:Tc" +# ;; +# esac +# fi +# } +# +# _apply_bindings() { +# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# +# tmux list-keys | grep -vF 'tmux.conf.local' | grep -E '(new-window|split(-|_)window|new-session|copy-selection|copy-pipe)' > "$cfg" +# +# # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the +# # output of list-keys can be truncated +# perl -p -i -e "s/'#\{\?window_zoomed_flag,Unzoom,Zoom\}' 'z' \{resize-pane -$/'#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}\"/g" "$cfg" +# +# tmux_conf_new_window_retain_current_path=${tmux_conf_new_window_retain_current_path:-false} +# if _is_enabled "$tmux_conf_new_window_retain_current_path"; then +# perl -p -i \ +# -e "s/\b(new-window)\b(?!\s+-)/{$&}/g if /\bdisplay-menu\b/" \ +# -e ';' \ +# -e "s/\bnew-window\b(?!([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2))/new-window -c '#{pane_current_path}'/g" \ +# "$cfg" +# else +# perl -p -i -e "s/\bnew-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)/new-window\1/g" "$cfg" +# fi +# +# tmux_conf_new_pane_retain_current_path=${tmux_conf_new_pane_retain_current_path:-false} +# if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e "s/\bsplit-window\b(?!([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2))/split-window -c '#{pane_current_path}'/g" "$cfg" +# else +# perl -p -i -e "s/\bsplit-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)/split-window\1/g" "$cfg" +# fi +# +# tmux_conf_new_pane_reconnect_ssh=${tmux_conf_new_pane_reconnect_ssh:-false} +# if _is_enabled "$tmux_conf_new_pane_reconnect_ssh"; then +# if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i \ +# -e "s/\bsplit-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)([^;}\n\"]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1\3 -c #\{pane_current_path\}'/g" \ +# -e ';' \ +# -e "s/\b_split_window\b\s+#\{pane_tty\}(.*?)\s+-c\s+\\\\\"#\{pane_current_path\}\\\\\"\"/_split_window #{pane_tty}\1 -c \\\\\"#{pane_current_path}\\\\\"\"/g" \ +# "$cfg" +# else +# perl -p -i \ +# -e "s/\bsplit-window\b([^;}\n]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1'/g" \ +# -e ';' \ +# -e "s/\b_split_window\b\s+#\{pane_tty\}(.*?)\s+-c\s+\\\\\"#\{pane_current_path\}\\\\\"\"/_split_window #{pane_tty}\1\"/g" \ +# "$cfg" +# fi +# else +# if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then +# perl -p -i -e "s/\brun-shell\b(\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{pane_tty\})(.*?)\s+-c\s+#\{pane_current_path\}\2/split-window\3 -c '#{pane_current_path}'/g" "$cfg" +# else +# perl -p -i -e "s/\brun-shell\b(\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{pane_tty\})(.*)\2/split-window\3/g" "$cfg" +# fi +# fi +# +# tmux_conf_new_session_prompt=${tmux_conf_new_session_prompt:-false} +# if _is_enabled "$tmux_conf_new_session_prompt"; then +# perl -p -i \ +# -e "s/(? /dev/null 2>&1 && command='pbcopy' +# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy' +# command -v xsel > /dev/null 2>&1 && command='xsel -i -b' +# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1' +# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe' +# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard' +# +# if [ -n "$command" ]; then +# if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then +# perl -p -i -e "s/\bcopy-selection(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg" +# else +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2/copy-selection\1/g" "$cfg" +# fi +# fi +# +# # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings +# awk < "$cfg" \ +# '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg.in" +# +# # ignore bindings with errors +# if ! tmux source-file "$cfg.in"; then +# verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true) +# while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do +# line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2) +# perl -n -i -e "if ($. != $line) { print }" "$cfg.in" +# done +# fi +# } +# +# _apply_theme() { +# +# # -- panes ------------------------------------------------------------- +# +# tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default} +# tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default} +# tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false} +# tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-'default'} # default +# tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-'#0087d7'} # light blue +# +# # tmux 1.9 doesn't really like set -q +# if tmux show -g -w | grep -q window-style; then +# tmux setw -g window-style "fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg" +# +# if _is_enabled "$tmux_conf_theme_highlight_focused_pane"; then +# tmux setw -g window-active-style "fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg" +# else +# tmux setw -g window-active-style default +# fi +# fi +# +# tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin} +# tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-'#444444'} # light gray +# tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-'#00afff'} # light blue +# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border} +# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border} +# case "$tmux_conf_theme_pane_border_style" in +# fat) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg} +# ;; +# thin|*) +# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-'default'} +# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-'default'} +# ;; +# esac +# tmux setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg" +# +# tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-'#00afff'} # light blue +# tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-'#00afff'} # light blue +# +# tmux set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator" +# +# # -- status line ------------------------------------------------------- +# +# tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}") +# tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}") +# tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}") +# tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}") +# +# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-'#000000'} # black +# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-'#ffff00'} # yellow +# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-'bold'} +# tmux set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr" +# +# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-'#ffff00'} # yellow +# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-'#000000'} # black +# tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-'bold'} +# tmux set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr" +# +# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-'#000000'} # black +# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-'#ffff00'} # yellow +# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-'bold'} +# tmux setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr" +# +# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-'#8a8a8a'} # white +# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-'#080808'} # dark gray +# tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-'none'} +# tmux set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ +# set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" +# +# tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-'#h ❐ #S ● #I #W'} +# +# tmux_conf_theme_terminal_title=$(echo "$tmux_conf_theme_terminal_title" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g') +# tmux set -g set-titles-string "$(_decode_unicode_escapes "$tmux_conf_theme_terminal_title")" +# +# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-'#8a8a8a'} # white +# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-'#080808'} # dark gray +# tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-'none'} +# tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-'#I #W'} +# +# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-'#000000'} # black +# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-'#00afff'} # light blue +# tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-'bold'} +# tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-'#I #W'} +# if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then +# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_window_status_bg]$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main" +# else +# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_left_separator_main" +# fi +# +# tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g') +# tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed \ +# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \ +# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g') +# +# tmux setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\ +# setw -g window-status-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_format")" \;\ +# setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\ +# setw -g window-status-current-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_current_format")" +# +# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-'default'} +# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-'default'} +# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-'underscore'} +# tmux setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr" +# +# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-'#ffff00'} # yellow +# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-'default'} +# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-'blink,bold'} +# tmux setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr" +# +# tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-'#00afff'} # light blue +# tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-'default'} +# tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-'none'} +# tmux setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr" +# +# # -- indicators +# +# tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-'👓'} # U+1F453 +# tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-'#e4e4e4'} # white +# tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-'none'} +# tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-'none'} +# +# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-'⌨'} # U+2328 +# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-'#e4e4e4'} # white +# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-'none'} +# tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-'none'} +# +# tmux_conf_theme_root=${tmux_conf_theme_root:-'!'} +# tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-'none'} +# tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-'none'} +# tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-'bold,blink'} +# +# tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-'🔒'} # U+1F512 +# tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-'none'} +# tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-'none'} +# tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-'none'} +# +# # -- status left style +# +# tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S '} +# tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-'#000000,#e4e4e4,#e4e4e4'} # black, white , white +# tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-'#ffff00,#ff00af,#00afff'} # yellow, pink, white blue +# tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-'bold,none,none'} +# +# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing,}/g") +# +# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g") +# +# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} #D)#[inherit]%g") +# +# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g") +# +# if [ -n "$tmux_conf_theme_status_left" ]; then +# status_left=$(awk \ +# -v fg_="$tmux_conf_theme_status_left_fg" \ +# -v bg_="$tmux_conf_theme_status_left_bg" \ +# -v attr_="$tmux_conf_theme_status_left_attr" \ +# -v mainsep="$tmux_conf_theme_left_separator_main" \ +# -v subsep="$tmux_conf_theme_left_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open || open_ || open__) +# printf "|%s", subsplit($i) +# else +# { +# if (i > 1) +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# else +# printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i) +# } +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# printf "#[fg=%s,bg=%s,none]%s", bg[j_], "default", mainsep +# }' << EOF +# $tmux_conf_theme_status_left +# EOF +# ) +# fi +# +# status_left="$status_left " +# +# # -- status right style +# +# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-'#{pairing}#{prefix} #{battery_status} #{battery_bar} #{battery_percentage} , %R , %d %b | #{username} | #{hostname} '} +# tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-'#8a8a8a,#e4e4e4,#000000'} # light gray, white, black +# tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-'#080808,#d70000,#e4e4e4'} # dark gray, red, white +# tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-'none,none,bold'} +# +# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing,}/g") +# +# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g") +# +# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} #D)#[inherit]%g") +# +# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \ +# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g") +# +# if [ -n "$tmux_conf_theme_status_right" ]; then +# status_right=$(awk \ +# -v fg_="$tmux_conf_theme_status_right_fg" \ +# -v bg_="$tmux_conf_theme_status_right_bg" \ +# -v attr_="$tmux_conf_theme_status_right_attr" \ +# -v mainsep="$tmux_conf_theme_right_separator_main" \ +# -v subsep="$tmux_conf_theme_right_separator_sub" ' +# function subsplit(s, l, i, a, r) +# { +# l = split(s, a, ",") +# for (i = 1; i <= l; ++i) +# { +# o = split(a[i], _, "(") - 1 +# c = split(a[i], _, ")") - 1 +# open += o - c +# o_ = split(a[i], _, "{") - 1 +# c_ = split(a[i], _, "}") - 1 +# open_ += o_ - c_ +# o__ = split(a[i], _, "[") - 1 +# c__ = split(a[i], _, "]") - 1 +# open__ += o__ - c__ +# +# if (i == l) +# r = sprintf("%s%s", r, a[i]) +# else if (open || open_ || open__) +# r = sprintf("%s%s,", r, a[i]) +# else +# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep) +# } +# +# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r) +# return r +# } +# BEGIN { +# FS = "|" +# l1 = split(fg_, fg, ",") +# l2 = split(bg_, bg, ",") +# l3 = split(attr_, attr, ",") +# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3) +# } +# { +# for (i = j = 1; i <= NF; ++i) +# { +# if (open_ || open || open__) +# printf "|%s", subsplit($i) +# else +# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? "default" : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i) +# +# if (!open && !open_ && !open__) +# { +# j_ = j +# j = j % l + 1 +# } +# } +# }' << EOF +# $tmux_conf_theme_status_right +# EOF +# ) +# fi +# +# # -- variables +# +# tmux set -g '@root' "$tmux_conf_theme_root" +# +# tmux_conf_battery_bar_symbol_full=${tmux_conf_battery_bar_symbol_full:-'◼'} +# tmux_conf_battery_bar_symbol_empty=${tmux_conf_battery_bar_symbol_empty:-'◻'} +# tmux_conf_battery_bar_length=${tmux_conf_battery_bar_length:-'auto'} +# tmux_conf_battery_bar_palette=${tmux_conf_battery_bar_palette:-'gradient'} +# tmux_conf_battery_hbar_palette=${tmux_conf_battery_hbar_palette:-'gradient'} # red, orange, green +# tmux_conf_battery_vbar_palette=${tmux_conf_battery_vbar_palette:-'gradient'} # red, orange, green +# tmux_conf_battery_status_charging=${tmux_conf_battery_status_charging:-'↑'} # U+2191 +# tmux_conf_battery_status_discharging=${tmux_conf_battery_status_discharging:-'↓'} # U+2193 +# +# case "$status_left $status_right" in +# *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \ +# -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \ +# -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \ +# -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \ +# -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g') +# +# tmux set -g '@battery_bar_symbol_full' "$(_decode_unicode_escapes "$tmux_conf_battery_bar_symbol_full")" \;\ +# set -g '@battery_bar_symbol_empty' "$(_decode_unicode_escapes "$tmux_conf_battery_bar_symbol_empty")" \;\ +# set -g '@battery_bar_length' "$tmux_conf_battery_bar_length" \;\ +# set -g '@battery_bar_palette' "$tmux_conf_battery_bar_palette" \;\ +# set -g '@battery_hbar_palette' "$tmux_conf_battery_hbar_palette" \;\ +# set -g '@battery_vbar_palette' "$tmux_conf_battery_vbar_palette" \;\ +# set -g '@battery_status_charging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_charging")" \;\ +# set -g '@battery_status_discharging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_discharging")" +# status_right="#(cut -c3- ~/.tmux.conf | sh -s _battery)$status_right" +# ;; +# esac +# +# case "$status_left $status_right" in +# *'#{username}'*|*'#{hostname}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*) +# status_left=$(echo "$status_left" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g') +# status_right=$(echo "$status_right" | sed \ +# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \ +# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \ +# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \ +# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g') +# ;; +# esac +# +# case "$status_left $status_right" in +# *'#{uptime_d}'*|*'#{uptime_h}'*|*'#{uptime_m}'*|*'#{uptime_s}'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \ +# -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \ +# -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \ +# -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \ +# -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \ +# -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \ +# -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \ +# -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \ +# -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \ +# -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \ +# -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g') +# status_right="#(cut -c3- ~/.tmux.conf | sh -s _uptime)$status_right" +# ;; +# esac +# +# case "$status_left $status_right" in +# *'#{loadavg}'*) +# status_left=$(echo "$status_left" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# status_right=$(echo "$status_right" | sed -E \ +# -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g') +# status_right="#(cut -c3- ~/.tmux.conf | sh -s _loadavg)$status_right" +# ;; +# esac +# +# status_left=$(echo "$status_left" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g') +# status_right=$(echo "$status_right" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g') +# +# tmux set -g status-left-length 1000 \; set -g status-left "$(_decode_unicode_escapes "$status_left")" \;\ +# set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")" +# +# # -- clock ------------------------------------------------------------- +# +# tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-'#00afff'} # light blue +# tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-'24'} +# tmux setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\ +# setw -g clock-mode-style "$tmux_conf_theme_clock_style" +# } +# +# _apply_configuration() { +# +# if ! command -v perl > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires perl" \; set -u display-time' +# return +# fi +# if ! command -v sed > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires sed" \; set -u display-time' +# return +# fi +# if ! command -v awk > /dev/null 2>&1; then +# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time' +# return +# fi +# +# # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard +# if command -v reattach-to-user-namespace > /dev/null 2>&1; then +# default_shell="$(tmux show -gv default-shell)" +# case "$default_shell" in +# *fish) +# tmux set -g default-command "reattach-to-user-namespace -l $default_shell" +# ;; +# *sh) +# tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace -l $default_shell" +# ;; +# esac +# fi +# +# _apply_overrides +# _apply_bindings +# _apply_theme +# for name in $(printenv | grep -E -o '^tmux_conf_[^=]+'); do tmux setenv -gu "$name"; done; +# } +# +# _urlview() { +# tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1" +# tmux split-window "tmux show-buffer -b urlview-$1 | urlview || true; tmux delete-buffer -b urlview-$1" +# } +# +# _fpp() { +# tmux capture-pane -J -S - -E - -b "fpp-$1" -t "$1" +# tmux split-window "tmux show-buffer -b fpp-$1 | fpp || true; tmux delete-buffer -b fpp-$1" +# } +# +# "$@" diff --git a/dotfiles/.tmux.conf.local b/dotfiles/.tmux.conf.local new file mode 100644 index 0000000..c1b1656 --- /dev/null +++ b/dotfiles/.tmux.conf.local @@ -0,0 +1,306 @@ +# https://github.com/gpakosz/.tmux +# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license, +# without any warranty. +# Copyright 2012— Gregory Pakosz (@gpakosz). + + +# -- navigation ---------------------------------------------------------------- + +# if you're running tmux within iTerm2 +# - and tmux is 1.9 or 1.9a +# - and iTerm2 is configured to let option key act as +Esc +# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys +# then uncomment the following line to make Meta + arrow keys mapping work +#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D" + + +# -- windows & pane creation --------------------------------------------------- + +# new window retains current path, possible values are: +# - true +# - false (default) +tmux_conf_new_window_retain_current_path=false + +# new pane retains current path, possible values are: +# - true (default) +# - false +tmux_conf_new_pane_retain_current_path=true + +# new pane tries to reconnect ssh sessions (experimental), possible values are: +# - true +# - false (default) +tmux_conf_new_pane_reconnect_ssh=false + +# prompt for session name when creating a new session, possible values are: +# - true +# - false (default) +tmux_conf_new_session_prompt=false + + +# -- display ------------------------------------------------------------------- + +# RGB 24-bit colour support (tmux >= 2.2), possible values are: +# - true +# - false (default) +tmux_conf_theme_24b_colour=false + +# window style +tmux_conf_theme_window_fg='default' +tmux_conf_theme_window_bg='default' + +# highlight focused pane (tmux >= 2.1), possible values are: +# - true +# - false (default) +tmux_conf_theme_highlight_focused_pane=false + +# focused pane colours: +tmux_conf_theme_focused_pane_fg='default' +tmux_conf_theme_focused_pane_bg='#0087d7' # light blue + +# pane border style, possible values are: +# - thin (default) +# - fat +tmux_conf_theme_pane_border_style=thin + +# pane borders colours: +tmux_conf_theme_pane_border='#444444' # gray +tmux_conf_theme_pane_active_border='#00afff' # light blue + +# pane indicator colours +tmux_conf_theme_pane_indicator='#00afff' # light blue +tmux_conf_theme_pane_active_indicator='#00afff' # light blue + +# status line style +tmux_conf_theme_message_fg='#000000' # black +tmux_conf_theme_message_bg='#ffff00' # yellow +tmux_conf_theme_message_attr='bold' + +# status line command style ( : Escape) +tmux_conf_theme_message_command_fg='#ffff00' # yellow +tmux_conf_theme_message_command_bg='#000000' # black +tmux_conf_theme_message_command_attr='bold' + +# window modes style +tmux_conf_theme_mode_fg='#000000' # black +tmux_conf_theme_mode_bg='#ffff00' # yellow +tmux_conf_theme_mode_attr='bold' + +# status line style +tmux_conf_theme_status_fg='#8a8a8a' # light gray +tmux_conf_theme_status_bg='#080808' # dark gray +tmux_conf_theme_status_attr='none' + +# terminal title +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W' + +# window status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_fg='#8a8a8a' # light gray +tmux_conf_theme_window_status_bg='#080808' # dark gray +tmux_conf_theme_window_status_attr='none' +tmux_conf_theme_window_status_format='#I #W' +#tmux_conf_theme_window_status_format='#{circled_window_index} #W' +#tmux_conf_theme_window_status_format='#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}' + +# window current status style +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_window_status_current_fg='#000000' # black +tmux_conf_theme_window_status_current_bg='#00afff' # light blue +tmux_conf_theme_window_status_current_attr='bold' +tmux_conf_theme_window_status_current_format='#I #W' +#tmux_conf_theme_window_status_current_format='#{circled_window_index} #W' +#tmux_conf_theme_window_status_current_format='#I #W#{?window_zoomed_flag,🔍,}' + +# window activity status style +tmux_conf_theme_window_status_activity_fg='default' +tmux_conf_theme_window_status_activity_bg='default' +tmux_conf_theme_window_status_activity_attr='underscore' + +# window bell status style +tmux_conf_theme_window_status_bell_fg='#ffff00' # yellow +tmux_conf_theme_window_status_bell_bg='default' +tmux_conf_theme_window_status_bell_attr='blink,bold' + +# window last status style +tmux_conf_theme_window_status_last_fg='#00afff' # light blue +tmux_conf_theme_window_status_last_bg='default' +tmux_conf_theme_window_status_last_attr='none' + +# status left/right sections separators +#tmux_conf_theme_left_separator_main='' +#tmux_conf_theme_left_separator_sub='|' +#tmux_conf_theme_right_separator_main='' +#tmux_conf_theme_right_separator_sub='|' +tmux_conf_theme_left_separator_main='\uE0B0' +tmux_conf_theme_left_separator_sub='\uE0B1' +tmux_conf_theme_right_separator_main='\uE0B2' +tmux_conf_theme_right_separator_sub='\uE0B3' +#tmux_conf_theme_left_separator_main='\uE0B0' # /!\ you don't need to install Powerline +#tmux_conf_theme_left_separator_sub='\uE0B1' # you only need fonts patched with +#tmux_conf_theme_right_separator_main='\uE0B2' # Powerline symbols or the standalone +#tmux_conf_theme_right_separator_sub='\uE0B3' # PowerlineSymbols.otf font, see README.md + +# status left/right content: +# - separate main sections with '|' +# - separate subsections with ',' +# - built-in variables are: +# - #{battery_bar} +# - #{battery_hbar} +# - #{battery_percentage} +# - #{battery_status} +# - #{battery_vbar} +# - #{circled_session_name} +# - #{hostname_ssh} +# - #{hostname} +# - #{loadavg} +# - #{pairing} +# - #{prefix} +# - #{root} +# - #{synchronized} +# - #{uptime_y} +# - #{uptime_d} (modulo 365 when #{uptime_y} is used) +# - #{uptime_h} +# - #{uptime_m} +# - #{uptime_s} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_status_left='#{username}#{root} | #{hostname} | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} ' +tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} | #(curl wttr.in/Ann+Arbor?format="%%l:+%%c+%%t+%%f+%%o") , %R , %d %b | #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} ' + +# status left style +tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#000000' # black, white , black +tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff, #d70000' # yellow, pink, blue, red +tmux_conf_theme_status_left_attr='bold,bold,bold' + +# status right style +tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000' # light gray, white, black +tmux_conf_theme_status_right_bg='#000000,#ff00af,#8a8a8a' # dark gray, pink, light grey +tmux_conf_theme_status_right_attr='bold,bold,bold' + +# pairing indicator +tmux_conf_theme_pairing='👓 ' # U+1F453 +tmux_conf_theme_pairing_fg='none' +tmux_conf_theme_pairing_bg='none' +tmux_conf_theme_pairing_attr='none' + +# prefix indicator +tmux_conf_theme_prefix='⌨ ' # U+2328 +tmux_conf_theme_prefix_fg='none' +tmux_conf_theme_prefix_bg='none' +tmux_conf_theme_prefix_attr='none' + +# root indicator +tmux_conf_theme_root='!' +tmux_conf_theme_root_fg='none' +tmux_conf_theme_root_bg='none' +tmux_conf_theme_root_attr='bold,blink' + +# synchronized indicator +tmux_conf_theme_synchronized='🔒' # U+1F512 +tmux_conf_theme_synchronized_fg='none' +tmux_conf_theme_synchronized_bg='none' +tmux_conf_theme_synchronized_attr='none' + +# battery bar symbols +tmux_conf_battery_bar_symbol_full='◼' +tmux_conf_battery_bar_symbol_empty='◻' +#tmux_conf_battery_bar_symbol_full='♥' +#tmux_conf_battery_bar_symbol_empty='·' + +# battery bar length (in number of symbols), possible values are: +# - auto +# - a number, e.g. 5 +tmux_conf_battery_bar_length='auto' + +# battery bar palette, possible values are: +# - gradient (default) +# - heat +# - 'colour_full_fg,colour_empty_fg,colour_bg' +tmux_conf_battery_bar_palette='gradient' +#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000' # red, white, black + +# battery hbar palette, possible values are: +# - gradient (default) +# - heat +# - 'colour_low,colour_half,colour_full' +tmux_conf_battery_hbar_palette='gradient' +#tmux_conf_battery_hbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green + +# battery vbar palette, possible values are: +# - gradient (default) +# - heat +# - 'colour_low,colour_half,colour_full' +tmux_conf_battery_vbar_palette='gradient' +#tmux_conf_battery_vbar_palette='#d70000,#ff5f00,#5fff00' # red, orange, green + +# symbols used to indicate whether battery is charging or discharging +#tmux_conf_battery_status_charging='↑' # U+2191 +#tmux_conf_battery_status_discharging='↓' # U+2193 +tmux_conf_battery_status_charging='⚡ ' # U+26A1 +tmux_conf_battery_status_charging='🔌 ' # U+1F50C +tmux_conf_battery_status_discharging='🔋 ' # U+1F50B + +# clock style (when you hit + t) +# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right +tmux_conf_theme_clock_colour='#00afff' # light blue +tmux_conf_theme_clock_style='24' + + +# -- clipboard ----------------------------------------------------------------- + +# in copy mode, copying selection also copies to the OS clipboard +# - true +# - false (default) +# on macOS, this requires installing reattach-to-user-namespace, see README.md +# on Linux, this requires xsel or xclip +tmux_conf_copy_to_os_clipboard=false + + +# -- user customizations ------------------------------------------------------- +# this is the place to override or undo settings + +# increase history size +#set -g history-limit 10000 + +# start with mouse mode enabled +#set -g mouse on + +# force Vi mode +# really you should export VISUAL or EDITOR environment variable, see manual +#set -g status-keys vi +#set -g mode-keys vi + +# replace C-b by C-a instead of using both prefixes +# set -gu prefix2 +# unbind C-a +# unbind C-b +# set -g prefix C-a +# bind C-a send-prefix + +# move status line to top +#set -g status-position top +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run -b '~/.tmux/plugins/tpm/tpm' diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc new file mode 100644 index 0000000..ff8199d --- /dev/null +++ b/dotfiles/.vimrc @@ -0,0 +1,306 @@ +syntax on +set laststatus=2 "enable status bar +set number "turn on line numbers +set colorcolumn=80 "set color column on col 80 +set tw=80 +set shiftwidth=4 +set tabstop=4 +set autoindent "auto indents code +set smartindent "smart indents code +set hlsearch "highlight search +set smartcase "set search case based on search query +set noerrorbells "no error bells +set title "set title of vim based on file open +set mouse=a " enable mouse in vim +set spell "enable spell check in vim + +set encoding=UTF-8 +set guifont=FiraCode\ Nerd\ Font\ 18 + +autocmd BufNewFile *.py 0r ~/templates/skeleton.py +autocmd BufNewFile *.jsx 0r ~/templates/skeleton.jsx +autocmd BufNewFile *.tsx 0r ~/templates/skeleton.tsx + +call plug#begin('~/.vim/plugged') + +Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin' + +Plug 'valloric/youcompleteme' + +Plug 'sheerun/vim-polyglot' + +Plug 'vim-scripts/SQLUtilities' + +Plug 'ryanoasis/vim-devicons' + +Plug 'itchyny/vim-gitbranch' + +Plug 'ap/vim-css-color' + +Plug 'wakatime/vim-wakatime' + +Plug 'itchyny/lightline.vim' + +Plug 'prettier/vim-prettier', { 'do': 'yarn install' } + +Plug 'jiangmiao/auto-pairs' + +Plug 'mhinz/vim-startify' + +Plug 'alvan/vim-closetag' + +Plug 'MathSquared/vim-python-sql' + +Plug 'MaxMEllon/vim-jsx-pretty' + +Plug 'tpope/vim-commentary' + +Plug 'dense-analysis/ale' + +Plug 'shime/vim-livedown' + +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } + +Plug '~/.fzf' + +Plug 'morhetz/gruvbox' +Plug 'dracula/vim', { 'as': 'dracula' } +Plug 'ntk148v/vim-horizon' +Plug 'ghifarit53/tokyonight-vim' +Plug 'drewtempelmeyer/palenight.vim' +Plug 'tomasr/molokai' +Plug 'joshdick/onedark.vim' + +call plug#end() + + +"jump to remembered position in file if available +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif +endif + + +"fzf +" +" This is the default extra key bindings +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + +" An action can be a reference to a function that processes selected lines +function! s:build_quickfix_list(lines) + call setqflist(map(copy(a:lines), '{ "filename": v:val }')) + copen + cc +endfunction + +let g:fzf_action = { + \ 'ctrl-q': function('s:build_quickfix_list'), + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + +"Center of screen and popup +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } } + + +" Customize fzf colors to match your color scheme +" - fzf#wrap translates this to a set of `--color` options +let g:fzf_colors = +\ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Comment'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Statement'], + \ 'info': ['fg', 'PreProc'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Conditional'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'header': ['fg', 'Comment'] } + +" Enable per-command history +" - History files will be stored in the specified directory +" - When set, CTRL-N and CTRL-P will be bound to 'next-history' and +" 'previous-history' instead of 'down' and 'up'. +let g:fzf_history_dir = '~/.local/share/fzf-history' + + +"livedown +" should markdown preview get shown automatically upon opening markdown buffer +let g:livedown_autorun = 0 +" should the browser window pop-up upon previewing +let g:livedown_open = 1 +" the port on which Livedown server will run +let g:livedown_port = 3001 +" the browser to use, can also be firefox, chrome or other, depending on your executable +let g:livedown_browser = "firefox" + +"ale +let b:ale_linter_aliases = {'javascriptreact': ['css', 'javascript'], 'typescriptreact': ['css', 'javascript']} +" Fix files with prettier, and then ESLint. +let b:ale_fixers = {'javascript': ['prettier', 'eslint'], 'sh': ['shellcheck'], 'typescript': ['eslint'], 'python': ['pycodestyle', 'pylint']} + +"vim-closetag +" filenames like *.xml, *.html, *.xhtml, ... +" These are the file extensions where this plugin is enabled. +let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.js,*.ts,*.jsx,*.tsx' + +" filenames like *.xml, *.xhtml, ... +" This will make the list of non-closing tags self-closing in the specified files. +" +let g:closetag_xhtml_filenames = '*.xhtml,*.jsx,*.tsx,*.js,*.ts' + +" filetypes like xml, html, xhtml, ... +" These are the file types where this plugin is enabled. +" +let g:closetag_filetypes = 'html,xhtml,phtml' + +" filetypes like xml, xhtml, ... +" This will make the list of non-closing tags self-closing in the specified files. +" +let g:closetag_xhtml_filetypes = 'xhtml,jsx,tsx,js' + +" integer value [0|1] +" This will make the list of non-closing tags case-sensitive (e.g. `` will be closed while `` won't.) +" +let g:closetag_emptyTags_caseSensitive = 1 + +" Disables auto-close if not in a "valid" region (based on filetype) + +let g:closetag_regions = { + \ 'typescript.tsx': 'jsxRegion,tsxRegion', + \ 'javascript.jsx': 'jsxRegion', + \ } + + +let g:ycm_autoclose_preview_window_after_insertion = 1 "close ycm help window after accepting option +" let g:ycm_autoclose_preview_window_after_completion = 1 + +let g:wakatime_PythonBinary = '/usr/bin/python' " (Default: 'python') +let g:wakatime_OverrideCommandPrefix = '/usr/bin/wakatime' " (Default: '') + +"Markdown preview +let vim_markdown_preview_github=1 +let vim_markdown_preview_toggle=1 +let vim_markdown_preview_temp_file=0 + +"NERDTREE +"autocmd vimenter * NERDTree "launch nerdtree on vim start +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +let g:NERDTreeWinPos = "right" "open nerdtree on the right +let NERDTreeShowHidden=0 "show hidden files use capital 'I' to toggle +"autocmd VimEnter * wincmd p "put the cursor back into the editing pane on start + +let g:NERDTreeGitStatusIndicatorMapCustom = { + \ 'Modified' :'✹', + \ 'Staged' :'✚', + \ 'Untracked' :'✭', + \ 'Renamed' :'➜', + \ 'Unmerged' :'═', + \ 'Deleted' :'✖', + \ 'Dirty' :'✗', + \ 'Ignored' :'☒', + \ 'Clean' :'✔︎', + \ 'Unknown' :'?', + \ } +let g:NERDTreeGitStatusUseNerdFonts = 1 +" If more than one window and previous buffer was NERDTree, go back to it. +autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif +"avoid crashes when calling vim-plug functions while the cursor is on the NERDTree window +let g:plug_window = 'noautocmd vertical topleft new' + +" NERDTress File highlighting +function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg) + exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg + exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' +endfunction + + +"NERDTree hilight files by extension +call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#282c34') +call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#282c34') +call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('html', 'red', 'none', 'yellow', '#282c34') +call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#282c34') +call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#282c34') +call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#282c34') +call NERDTreeHighlightFile('js', 'yellow', 'none', '#ffa500', '#282c34') +call NERDTreeHighlightFile('jsx', 'yellow', 'none', '#ffa500', '#282c34') +call NERDTreeHighlightFile('tsx', 'yellow', 'none', '#ffa500', '#282c34') +call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#282c34') +call NERDTreeHighlightFile('cpp', 'blue', 'none', 'blue', '#282c34') +call NERDTreeHighlightFile('h', 'cyan', 'none', 'cyan', '#282c34') +call NERDTreeHighlightFile('txt', 'blue', 'none', 'red', '#282c34') + +let g:NERDTreeColorMapCustom = { + \ "Modified" : ["#528AB3", "NONE", "NONE", "NONE"], + \ "Staged" : ["#538B54", "NONE", "NONE", "NONE"], + \ "Untracked" : ["#BE5849", "NONE", "NONE", "NONE"], + \ "Dirty" : ["#299999", "NONE", "NONE", "NONE"], + \ "Clean" : ["#87939A", "NONE", "NONE", "NONE"] + \ } + +"PRETTIER +packloadall "enable prettier +let g:prettier#autoformat = 1 +let g:prettier#autoformat_require_pragma = 0 +let g:prettier#exec_cmd_path = "/usr/bin/prettier" + +"LIGHTLINE +" 'onedark', 'material', 'darcula' +let g:lightline = { + \ 'colorscheme': 'deus', + \ 'active': { + \ 'left': [ [ 'mode', 'paste', 'gitbranch' ], + \ [ 'readonly', 'filename', 'modified', ] ], + \ 'right': [ [ 'lineinfo' ], + \ [ 'percent' ], + \ [ 'charvaluehex', 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'gitbranch': 'gitbranch#name' + \ }, + \ 'component': { + \ 'charhexvalue': '0x%B' + \ }, + \ } + +"COLORSCHEME +if !has('gui_running') + set t_Co=256 +endif + +set termguicolors + +set noshowmode "disable default vim insert text at bottom +let g:onedark_termcolors=256 "enable 256 colors +packadd! onedark.vim "add onedark colorcheme may not work +colorscheme onedark "set colorsheme as onedark + +"Tokyo night conifg +let g:tokyonight_style='night' +let g:tokyonight_transparent_background=1 +let g:tokyonight_enable_italic=1 + +"let g:molokai_original = 1 +let g:rehash256 = 1 + +"KEYBINDINGS +map :nohls +map :NERDTreeToggle +map :NERDTreeToggle +map (Prettier) +map :nohls +map :! +map :ter++close +map :YcmShowDetailedDiagnostic +map :LivedownToggle +map :FZF ~ diff --git a/dotfiles/.xinitrc b/dotfiles/.xinitrc new file mode 100644 index 0000000..11ce6db --- /dev/null +++ b/dotfiles/.xinitrc @@ -0,0 +1,76 @@ +#!/bin/sh + +var=$1 + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + + + + + + + + xrdb -merge $sysresources + +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + + + + + + + + xrdb -merge "$userresources" + +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +# start some nice programs + +if [ -d /etc/X11/xinit/xinitrc.d ] ; then + for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do + [ -x "$f" ] && . "$f" + done + unset f +fi + +#twm & +#xclock -geometry 50x50-1+1 & +#xterm -geometry 80x50+494+51 & +#xterm -geometry 80x20+494-0 & +#exec xterm -geometry 80x66+0+0 -name login + +#export GTK_IM_MODULE=xim +#export XMODIFIERS=@im=ibus +#export QT_IM_MODULE=xim +#export ibus-daemon -drx + + +# start plasma session +export DESKTOP_SESSION=plasma +xscreensaver +exec startplasma-x11 +exec ~/.fehbg +# exec i3 +export GTK_IM_MODULE=xim +export XMODIFIERS=@im=ibus +export QT_IM_MODULE=xim +ibus-daemon -drx + +#exec cinnamon-session diff --git a/dotfiles/.ycm_extra_conf.py b/dotfiles/.ycm_extra_conf.py new file mode 100644 index 0000000..f5a5501 --- /dev/null +++ b/dotfiles/.ycm_extra_conf.py @@ -0,0 +1,101 @@ +# Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py +import os +import ycm_core + +# These are the compilation flags that will be used in case there's no +# compilation database set (by default, one is not set). +# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. +flags = [ + '-Wall', + '-Wextra', + '-Werror', + '-Wconversion', + '-pedantic', + '-Wno-long-long', + '-Wno-variadic-macros', + '-fexceptions', + # THIS IS IMPORTANT! Without a "-std=" flag, clang won't know which + # language to use when compiling headers. So it will guess. Badly. So C++ + # headers will be compiled as C headers. You don't want that so ALWAYS specify + # a "-std=". + # For a C project, you would set this to something like 'c99' instead of + # 'c++11'. + '-std=c++17', + # ...and the same thing goes for the magic -x option which specifies the + # language that the files to be compiled are written in. This is mostly + # relevant for c++ headers. + # For a C project, you would set this to 'c' instead of 'c++'. + '-x', 'c++', + # This path will only work on OS X, but extra paths that don't exist are not + # harmful + '-isystem', '/System/Library/Frameworks/Python.framework/Headers', + '-isystem', '/usr/local/include', + '-isystem', '/usr/local/include/eigen3', + '-I', 'include', + '-I.', +] + +# Set this to the absolute path to the folder (NOT the file!) containing the +# compile_commands.json file to use that instead of 'flags'. See here for +# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html +# +# Most projects will NOT need to set this to anything; you can just change the +# 'flags' list of compilation flags. Notice that YCM itself uses that approach. +compilation_database_folder = '' + +if compilation_database_folder: + database = ycm_core.CompilationDatabase( compilation_database_folder ) +else: + database = None + + +def DirectoryOfThisScript(): + return os.path.dirname( os.path.abspath( __file__ ) ) + + +def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): + if not working_directory: + return list( flags ) + new_flags = [] + make_next_absolute = False + path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] + for flag in flags: + new_flag = flag + + if make_next_absolute: + make_next_absolute = False + if not flag.startswith( '/' ): + new_flag = os.path.join( working_directory, flag ) + + for path_flag in path_flags: + if flag == path_flag: + make_next_absolute = True + break + + if flag.startswith( path_flag ): + path = flag[ len( path_flag ): ] + new_flag = path_flag + os.path.join( working_directory, path ) + break + + if new_flag: + new_flags.append( new_flag ) + return new_flags + + +def FlagsForFile( filename ): + if database: + # Bear in mind that compilation_info.compiler_flags_ does NOT return a + # python list, but a "list-like" StringVec object + compilation_info = database.GetCompilationInfoForFile( filename ) + final_flags = MakeRelativePathsInFlagsAbsolute( + compilation_info.compiler_flags_, + compilation_info.compiler_working_dir_ ) + else: + # relative_to = DirectoryOfThisScript() + relative_to = os.path.dirname(os.path.abspath(filename)) + final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) + + return { + 'flags': final_flags, + 'do_cache': True + } diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc new file mode 100644 index 0000000..92db86d --- /dev/null +++ b/dotfiles/.zshrc @@ -0,0 +1,359 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block, everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +#If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="/home/sudacode/.oh-my-zsh" +export PATH="$HOME/scripts:$PATH" +export PATH="$HOME/Work/scripts:$PATH" +export PATH="$HOME/projects/Python/get_song/src/:$PATH" +export EDITOR=vim +export VISUAL=vim + + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +if [ -f ~/.aliases ]; then + . ~/.aliases +fi + + +#POWERLEVEL9K_MODE='nerdfont' +#POWERLEVEL9K_MODE='awesome-fontconfig' +POWERLEVEL9K_MODE='nerdfont-complete' +#POWERLEVEL9K_MODE='awesome-patched, nerdfont-complete' + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +#ZSH_THEME="powerlevel9k/powerlevel9k" +ZSH_THEME="powerlevel10k/powerlevel10k" +#ZSH_THEME="random" +#ZSH_THEME="agnoster" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment the following line to disable bi-weekly auto-update checks. +# DISABLE_AUTO_UPDATE="true" + +# Uncomment the following line to automatically update without prompting. +# DISABLE_UPDATE_PROMPT="true" + +# Uncomment the following line to change how often to auto-update (in days). +# export UPDATE_ZSH_DAYS=13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS=true + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" +HISTSIZE=1000 +HISTFILESIZE=2000 +HISTCONTROL=ignoreboth + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + + +# Which plugins would you like to load? +# Standard plugins can be found in ~/.oh-my-zsh/plugins/* +# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(zsh-autosuggestions zsh-syntax-highlighting colored-man-pages zsh-256color vi-mode) + +source $ZSH/oh-my-zsh.sh +#source ~/.oh-my-zsh/plugins/git/git.plugin.zsh + + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='vim' +fi + +# Compilation flags +export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + + +export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin + +# ------------------------------------- POWERLINE CONFIG ---------------------- +#POWERLEVEL9K_OS_ICON_BACKGROUND="white" +#POWERLEVEL9K_OS_ICON_FOREGROUND="blue" +POWERLEVEL9K_PROMPT_ON_NEWLINE=true +POWERLEVEL9K_RPROMPT_ON_NEWLINE=false +#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon time battery context dir vcs newline) +#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon battery context newline dir vcs) +POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(time status root_indicator background_jobs history) +POWERLEVEL9K_DISABLE_RPROMPT=false +POWERLEVEL9K_TIME_BACKGROUND='117' +POWERLEVEL9K_SHORTEN_DIR_LENGTH=3 + +#POWERLEVEL9K_CUSTOM_NOW_PLAYING='~/.nowplaying' +#POWERLEVEL9K_CUSTOM_NOW_PLAYING_BACKGROUND='blue' +#POWERLEVEL9K_CUSTOM_NOW_PLAYING_FOREGROUND='black' + +# Icons +OS_ICON=' Yawnick boi: ﴑ' +POWERLEVEL9K_OS_ICON_BACKGROUND='208' +POWERLEVEL9K_OS_ICON_FOREGROUND='000' +POWERLEVEL9K_VCS_GIT_GITHUB_ICON=' ' +POWERLEVEL9K_USER_ICON="\uF415" #  +POWERLEVEL9K_USER_DEFAULT_BACKGROUND='199' + +zsh_wifi_signal(){ + local signal=$(nmcli device wifi | grep yes | awk '{print $8}') + local color='%F{yellow}' + [[ $signal -gt 75 ]] && color='%F{green}' + [[ $signal -lt 50 ]] && color='%F{red}' + echo -n "%{$color%}\uf230 $signal%{%f%}" # \uf230 is  +} +POWERLEVEL9K_CUSTOM_WIFI_SIGNAL="zsh_wifi_signal" +#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon time user dir vcs virtualenv) +POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(battery user dir vcs virtualenv) + +POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='↱' +POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='↳  Yawnick boi : ﴑ ' +POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX_BACKGROUND='208' +POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX_FOREGROUND='000' +#POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S \uE868 %d.%m.%y}" + + + +# set battery stages and colors +POWERLEVEL9K_BATTERY_STAGES=( + $'▏ ▏' $'▎ ▏' $'▍ ▏' $'▌ ▏' $'▋ ▏' $'▊ ▏' $'▉ ▏' $'█ ▏' + $'█▏ ▏' $'█▎ ▏' $'█▍ ▏' $'█▌ ▏' $'█▋ ▏' $'█▊ ▏' $'█▉ ▏' $'██ ▏' + $'██ ▏' $'██▎ ▏' $'██▍ ▏' $'██▌ ▏' $'██▋ ▏' $'██▊ ▏' $'██▉ ▏' $'███ ▏' + $'███ ▏' $'███▎ ▏' $'███▍ ▏' $'███▌ ▏' $'███▋ ▏' $'███▊ ▏' $'███▉ ▏' $'████ ▏' + $'████ ▏' $'████▎▏' $'████▍▏' $'████▌▏' $'████▋▏' $'████▊▏' $'████▉▏' $'█████▏' ) + +POWERLEVEL9K_BATTERY_LEVEL_BACKGROUND=(red3 darkorange3 darkgoldenrod gold3 yellow3 chartreuse2 mediumspringgreen green3 green3 green4 darkgreen) +POWERLEVEL9K_BATTERY_CHARGING_FOREGROUND=green3 +POWERLEVEL9K_BATTERY_LOW_FOREGROUND='226' +POWERLEVEL9K_BATTERY_CHARGED_FOREGROUND='021' +POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND='021' +POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 +POWERLEVEL9K_BATTERY_VERBOSE=true + + # Set 'context' segment colors +POWERLEVEL9K_CONTEXT_DEFAULT_FOREGROUND='010' +POWERLEVEL9K_CONTEXT_DEFAULT_BACKGROUND='128' + +# Set directory icons +POWERLEVEL9K_HOME_ICON='🏠' +POWERLEVEL9K_HOME_SUB_ICON='📂' + +# Set dir path colors +#POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true +POWERLEVEL9K_DIR_DEFAULT_BACKGROUND='033' +POWERLEVEL9K_DIR_DEFAULT_FOREGROUND='016' +POWERLEVEL9K_DIR_HOME_BACKGROUND='033' +POWERLEVEL9K_DIR_HOME_FOREGROUND='016' +POWERLEVEL9K_DIR_PATH_HILIGHT_FOREGROUND='000' +POWERLEVEL9K_DIR_HOME_SUBFOLDER_BACKGROUND='033' +POWERLEVEL9K_DIR_HOME_SUBFOLDER_FOREGROUND='016' +POWERLEVEL9K_DIR_NOT_WRITABLE_BACKGROUND='196' +POWERLEVEL9K_DIR_NOT_WRITABLE_FOREGROUND='016' + +# Git configurations +POWERLEVEL9K_SHOW_CHANGESET=true +POWERLEVEL9K_VCS_CLEAN_FOREGROUND='233' +#POWERLEVEL9K_VCS_CLEAN_BACKGROUND='black' +POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND='033' +#POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND='black' +POWERLEVEL9K_VCS_MODIFIED_FOREGROUND='197' +#POWERLEVEL9K_VCS_MODIFIED_BACKGROUND='black' +#! -----------------------------------END OF POWERLEVEL CONFIG------------------ + +#LS_COLORS="di=42;1;30:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;35:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94" + + +LS_COLORS="di=42;1;94:*.mp3=1;32;41:fi=0;91:*.c=1;96:*.js=1;93:*.h=1;35:ex=1;32:*.html=1;36:*.cpp=1;96:*.txt=1;91:*Makefile=1;95:*.css=1;36:*.as=1;36:ow=1;42;93:*.ttf=0;91:*.png=0;91:*README=4;31:*.jpg=0;91:*.md=4;31:*.json=1;94:*.as=0;35:*.obj=0;35:*.correct=1;94" + +# # ex = EXtractor for all kinds of archives +# # usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *.deb) ar x $1 ;; + *.tar.xz) tar xf $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +# Codi +# Usage: codi [filetype] [filename] +codi() { + local syntax="${1:-python}" + shift + vim -c \ + "let g:startify_disable_at_vimenter = 1 |\ + set bt=nofile ls=0 noru nonu nornu |\ + hi ColorColumn ctermbg=NONE |\ + hi VertSplit ctermbg=NONE |\ + Codi $syntax" "$@" +} + + +### for use with xserver... causes screenfetch and neofetch to not work unless xserver is running +#export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0 +# +#sudo /etc/init.d/dbus start &> /dev/null + +PS2="===>" + +# Add gem to PATH +export PATH=$PATH:/home/sudacode/.gem/ruby/2.7.0/bin + +# Add go to PATH +export PATH=$PATH:/home/sudacode/go/bin + +alias freud='cd /home/sudacode/' + +# Add yarn to PATH +export PATH="$PATH:`yarn global bin`" + +# set terminal color to 256 color +export TERM=xterm-256color + +export PATH=$PATH:/home/sudacode/.local/bin + +# add emacs to path +export PATH=$PATH:/home/sudacode/.emacs.d/bin + +#Enable tab completions for flags in colorls +source $(dirname $(gem which colorls))/tab_complete.sh + +# add pythno to PATH +export PATH="$PATH:/usr/bin/python" + +# add jdk-8 to path +export PATH="$PATH:/usr/lib/jvm/java-8-openjdk/bin" +export CLASSPATH="$CLASSPATH:/usr/share/java/mariadb-jdbc/mariadb-java-client.jar" + +## ibus config +export GTK_IM_MODULE=ibus +# will make libreoffice work +export XMODIFIERS=@im=ibus +export QT_IM_MODULE=ibus +export QT4_IM_MODULE=xim +ibus-daemon -drx + +export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules +export GTK_IM_MODULE_FILE=/usr/lib/gtk-3.0/3.0.0/immodules.cache + + +export VISUAL=vim + +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" +export ORACLE_HOME=/usr +export TNS_ADMIN=/etc/tnsnames.ora + + +export GDK_SCALE=2 + + +# rdesktop use cursor +# export XCURSOR_DISCOVER=1 rdesktop + +# set qt scale factor +export QT_AUTO_SCREEN_SCALE_FACTOR=1.5 +# export QT_FONT_DPI=196 vym + +# source the Xmodmap file to get custom keybindings +# [[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +# ~/scripts/random_starter.sh + +# >>> conda initialize >>> +# # !! Contents within this block are managed by 'conda init' !! +# __conda_setup="$('/home/sudacode/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +# if [ $? -eq 0 ]; then +# eval "$__conda_setup" +# else +# if [ -f "/home/sudacode/anaconda3/etc/profile.d/conda.sh" ]; then +# . "/home/sudacode/anaconda3/etc/profile.d/conda.sh" +# else +# export PATH="/home/sudacode/anaconda3/bin:$PATH" +# fi +# fi +# unset __conda_setup +# # <<< conda initialize <<< diff --git a/dunst/dunstrc b/dunst/dunstrc new file mode 100644 index 0000000..1fcc2ac --- /dev/null +++ b/dunst/dunstrc @@ -0,0 +1,470 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectively. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "0x6-41+106" + + # Turn on the progess bar + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 24 + + # Horizontal padding. + horizontal_padding = 15 + + # Padding between text and icon. + text_icon_padding = 25 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 7 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + idle_threshold = 120 + + ### Text ### + + font = Hack 14 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 45 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 200 + + # Paths to default icons. + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + # icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +# The internal keyboard shortcut support in dunst is now considered deprecated +# and should be replaced by dunstctl calls. You can use the configuration of your +# WM or DE to bind these to shortcuts of your choice. +# Check the dunstctl manual page for more info. +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. Equivalent dunstctl command: + # dunstctl close + close = ctrl+space + + # Close all notifications. Equivalent dunstctl command: + # dunstctl close-all + close_all = ctrl+shift+space + + # Redisplay last message(s). Equivalent dunstctl command: + # dunstctl history-pop + # history = ctrl+grave + + # Context menu. Equivalent dunstctl command: + # dunstctl context + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 5 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + # background = "#285577" + background = "#282c34" + # foreground = "#55aebb" + foreground = "#b26cc6" + frame_color = "#1eb75d" + timeout = 5 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/dunst/dunstrc.desktop b/dunst/dunstrc.desktop new file mode 100644 index 0000000..fac4dd8 --- /dev/null +++ b/dunst/dunstrc.desktop @@ -0,0 +1,470 @@ +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = mouse + + # The geometry of the window: + # [{width}]x{height}[+/-{x}+/-{y}] + # The geometry of the message window. + # The height is measured in number of notifications everything else + # in pixels. If the width is omitted but the height is given + # ("-geometry x2"), the message window expands over the whole screen + # (dmenu-like). If width is 0, the window expands to the longest + # message displayed. A positive x is measured from the left, a + # negative from the right side of the screen. Y is measured from + # the top and down respectively. + # The width can be negative. In this case the actual width is the + # screen width minus the width defined in within the geometry option. + geometry = "0x6-21+61" + + # Turn on the progess bar + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + + # Show how many messages are currently hidden (because of geometry). + indicate_hidden = yes + + # Shrink window if it's smaller than the width. Will be ignored if + # width is 0. + shrink = no + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). + transparency = 0 + + # The height of the entire notification. If the height is smaller + # than the font height and padding combined, it will be raised + # to the font height and padding. + notification_height = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 14 + + # Horizontal padding. + horizontal_padding =15 + + # Padding between text and icon. + text_icon_padding = 15 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 6 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + idle_threshold = 120 + + ### Text ### + + font = Hack 10 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Split notifications into multiple lines if they don't fit into + # geometry. + word_wrap = yes + + # When word_wrap is set to no, specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 50 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 80 + + # Paths to default icons. + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + # icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/firefox -new-tab + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Print a notification on startup. + # This is mainly for error detection, since dbus (re-)starts dunst + # automatically after a crash. + startup_notification = false + + # Manage dunst's desire for talking + # Can be one of the following values: + # crit: Critical features. Dunst aborts + # warn: Only non-fatal warnings + # mesg: Important Messages + # info: all unimportant stuff + # debug: all less than unimportant stuff + verbosity = mesg + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: If the notification has exactly one action, or one is marked as default, + # invoke it. If there are multiple and no default, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + +# The internal keyboard shortcut support in dunst is now considered deprecated +# and should be replaced by dunstctl calls. You can use the configuration of your +# WM or DE to bind these to shortcuts of your choice. +# Check the dunstctl manual page for more info. +[shortcuts] + + # Shortcuts are specified as [modifier+][modifier+]...key + # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", + # "mod3" and "mod4" (windows-key). + # Xev might be helpful to find names for keys. + + # Close notification. Equivalent dunstctl command: + # dunstctl close + close = ctrl+space + + # Close all notifications. Equivalent dunstctl command: + # dunstctl close-all + close_all = ctrl+shift+space + + # Redisplay last message(s). Equivalent dunstctl command: + # dunstctl history-pop + # history = ctrl+grave + + # Context menu. Equivalent dunstctl command: + # dunstctl context + context = ctrl+shift+period + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 5 + # Icon for notifications with low urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_normal] + # background = "#285577" + background = "#282c34" + # foreground = "#55aebb" + foreground = "#b26cc6" + frame_color = "#1eb75d" + timeout = 5 + # Icon for notifications with normal urgency, uncomment to enable + #icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# timeout +# urgency +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: if you don't want a notification to be displayed, set the format +# to "". +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# format = "" + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/firefox/userChrome.css b/firefox/userChrome.css new file mode 100644 index 0000000..3de8007 --- /dev/null +++ b/firefox/userChrome.css @@ -0,0 +1,353 @@ + :root { + + /* Minimal Functional Fox variables*/ + --mff-bg: #292f36; + --mff-icon-color: #e0fbfc; + --mff-nav-toolbar-padding: 8px; + --mff-sidebar-bg: var(--mff-bg); + --mff-sidebar-color: #e0fbfc; + --mff-tab-border-radius: 0px; + /* --mff-tab-color: #fefefa; */ + --mff-tab-color: #ffffff; + --mff-tab-font-family: "Cantarell", sans; + --mff-tab-font-size: 11pt; + --mff-tab-font-weight: 400; + --mff-tab-height: 32px; + --mff-tab-pinned-bg: #70c1b3; + /* --mff-tab-selected-bg: #ee6c4d; */ + --mff-tab-selected-bg: #99b679; + --mff-tab-soundplaying-bg: #9c89b8; + /* --mff-tab-soundplaying-bg: #55aebb; */ + --mff-urlbar-color: #98c1d9; + --mff-urlbar-focused-color: #e0fbfc; + --mff-urlbar-font-family: "Cantarell", serif; + --mff-urlbar-font-size: 12pt; + --mff-urlbar-font-weight: 700; + --mff-urlbar-results-color: #e0fbfc; + --mff-urlbar-results-font-family: "mononoki Nerd Font", serif; + --mff-urlbar-results-font-size: 12pt; + --mff-urlbar-results-font-weight: 700; + --mff-urlbar-results-url-color: #98c1d9; + /* --mff-tab-selected-bg: linear-gradient(90deg, rgba(232,74,95,1) 0%, rgba(255,132,124,1) 50%, rgba(254,206,168,1) 100%); */ + /* --mff-urlbar-font-weight: 600; */ + + /* Overriden Firefox variables*/ + --autocomplete-popup-background: var(--mff-bg) !important; + --default-arrowpanel-background: var(--mff-bg) !important; + --default-arrowpanel-color: #fefefa !important; + --lwt-toolbarbutton-icon-fill: var(--mff-icon-color) !important; + --panel-disabled-color: #f9f9fa80; + --toolbar-bgcolor: var(--mff-bg) !important; + --urlbar-separator-color: transparent !important; +} + +/* + _____ _ ___ ___ + |_ _/_\ | _ ) __| + | |/ _ \| _ \__ \ + |_/_/ \_\___/___/ + +*/ + +.tab-background[selected="true"] { + background: var(--mff-tab-selected-bg) !important; +} + +.tab-background:not[visuallyselected] { + background: var(--mff-tab-selected-bg) !important; + opacity: 0.5 !important; +} + +/* This positions the tabs under the navaigator container */ +#titlebar { + -moz-box-ordinal-group: 3 !important; +} + +.tabbrowser-tab::after, +.tabbrowser-tab::before { + border-left: none !important; +} + +.tab-background { + border: none !important; +} + +.tabbrowser-arrowscrollbox { + margin-inline-start: 4px !important; + margin-inline-end: 0px !important; +} + +.tab-close-button { + display: none !important; +} + +.tab-text { + font-family: var(--mff-tab-font-family); + font-weight: var(--mff-tab-font-weight); + font-size: var(--mff-tab-font-size) !important; + color: var(--mff-tab-color); +} + +/* Hide the favicon for tabs */ +hbox.tab-content .tab-icon-image { + display: none !important; +} + +/* Show the favicon for tabs that are pinned */ +hbox.tab-content[pinned=true] .tab-icon-image { + display: initial !important; +} + +hbox.tab-content[pinned=true] .tab-text { + display: none !important; +} + +#tabbrowser-tabs { + --tab-loading-fill: #033433 !important; + +} + +.tab-label-container:not([textoverflow]) { + display: flex; + overflow: hidden; + justify-content: center; +width: 50% !important; + max-width: 50% !important; + min-width: 50% !important; +} + +/* .tab-label-container::after { + content: "?" !important; + +} */ + +.tab-line { + display: none !important; +} + +.tabbrowser-tab { + border-radius: var(--mff-tab-border-radius) !important; + border-width: 0; + height: var(--mff-tab-height) !important; + margin-bottom: 4px !important; + margin-inline-end: 4px !important; + margin-top: 4px !important; + max-height: var(--mff-tab-height) !important; + min-height: var(--mff-tab-height) !important; +} + +.tabbrowser-tab[soundplaying="true"] { + background-color: var(--mff-tab-soundplaying-bg) !important; +} + +#tabs-newtab-button { + list-style-image: url("add.svg") !important; + opacity: 0.7; +} + +.tab-icon-sound { + display: none !important; +} + +/* + _____ ___ ___ _ ___ _ ___ +|_ _/ _ \ / _ \| | | _ ) /_\ | _ \ + | || (_) | (_) | |__| _ \/ _ \| / + |_| \___/ \___/|____|___/_/ \_\_|_\ +*/ + +.urlbar-icon > image { + fill: var(--mff-icon-color) !important; + color: var(--mff-icon-color) !important; +} + +.toolbarbutton-text { + color: var(--mff-icon-color) !important; +} +.urlbar-icon { + color: var(--mff-icon-color) !important; + +} + +.toolbarbutton-icon { +/* filter: drop-shadow(0 0 0.75rem crimson); */ +} + +#urlbar-results { + font-family: var(--mff-urlbar-results-font-family); + font-weight: var(--mff-urlbar-results-font-weight); + font-size: var(--mff-urlbar-results-font-size) !important; + color: var(--mff-urlbar-results-color) !important; +} + +.urlbarView-row[type="bookmark"] > span{ + color: green !important; +} + +.urlbarView-row[type="switchtab"] > span{ + color: orange !important; +} + +.urlbarView-url, .search-panel-one-offs-container { + color: var(--mff-urlbar-results-url-color) !important; + font-family: var(--mff-urlbar-font-family); + font-weight: var(--mff-urlbar-results-font-weight); + font-size: var(--mff-urlbar-font-size) !important; +} + +.urlbarView-favicon, .urlbarView-type-icon { + display: none !important; +} + +#urlbar-input { + font-size: var(--mff-urlbar-font-size) !important; + color: var(--mff-urlbar-color) !important; + font-family: var(--mff-urlbar-font-family) !important; + font-weight: var(--mff-urlbar-font-weight)!important; + text-align: center !important; +} + +#tracking-protection-icon-container, #identity-box { + display: none; +} + +#back-button > .toolbarbutton-icon{ + --backbutton-background: transparent !important; + border: none !important; +} + +#back-button { + list-style-image: url("left-arrow.svg") !important; +} + +#forward-button { + list-style-image: url("right-arrow.svg") !important; +} + +toolbar { + background-image: none !important; +} + +#urlbar-background { + opacity: .98 !important; +} + +#navigator-toolbox, toolbaritem { + border: none !important; +} + +#urlbar-background { + background-color: var(--mff-bg) !important; + border: none !important; +} + +.toolbar-items { + background-color: var(--mff-bg) !important; +} + +#sidebar-search-container { + background-color: var(--mff-sidebar-bg) !important; +} + +box.panel-arrowbox { + display: none; +} + +box.panel-arrowcontent { + border-radius: 8px !important; + border: none !important; +} + +tab.tabbrowser-tab { + overflow: hidden; +} + +tab.tabbrowser-tab:hover { + box-shadow: 0 1px 4px rgba(0,0,0,.05); +} + +image#star-button { + display: none; +} + +toolbar#nav-bar { + padding: var(--mff-nav-toolbar-padding) !important; +} + +toolbar#nav-bar { + padding: 4px !important; +} + +#urlbar { + max-width: 70% !important; + margin: 0 15% !important; + /* position: unset!important; */; +} + +#urlbar-input:focus { + color: var(--mff-urlbar-focused-color) !important; +} + + +.megabar[breakout-extend="true"]:not([open="true"]) > #urlbar-background { + box-shadow: none !important; + background-color: transparent !important; +} + +toolbarbutton { + box-shadow: none !important; +} + + +/* + ___ ___ ___ ___ ___ _ ___ + / __|_ _| \| __| _ ) /_\ | _ \ + \__ \| || |) | _|| _ \/ _ \| / + |___/___|___/|___|___/_/ \_\_|_\ +*/ + +.close-icon, .urlbar-icon { + fill: var(--mff-icon-color) !important; +} + +.sidebar-placesTree { + color: var(--mff-sidebar-color) !important; +} + +#sidebar-switcher-target { +/* color: white !important; */ +} + +#sidebar-box { + --sidebar-background-color: var(--mff-sidebar-bg) !important; +} + +splitter#sidebar-splitter { + opacity: 0 !important; +} + +splitter#sidebar-splitter { + border: none !important; + background-color: transparent !important; +} + +image#sidebar-icon { + display: none; +} + + +/* + _ ___ ___ _____ _____ _ _ _ ___ _ + /_\ | _ \ _ \/ _ \ \ / / _ \/_\ | \| | __| | + / _ \| / / (_) \ \/\/ /| _/ _ \| .` | _|| |__ + /_/ \_\_|_\_|_\\___/ \_/\_/ |_|/_/ \_\_|\_|___|____| + */ + +.panel-arrowcontent { + padding: 0px !important; + margin: 0px !important; +} + +toolbarseparator { + display: none; +} diff --git a/hooks/polybar.hook b/hooks/polybar.hook new file mode 100644 index 0000000..180a556 --- /dev/null +++ b/hooks/polybar.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Upgrade +Operation = Remove +Type = Package +Target = * + +[Action] +Description = Updating Polybar package count... +Depends = polybar +When = PostTransaction +Exec = /usr/bin/bash -c '/usr/bin/polybar-msg hook package-updates 1 &>/dev/null || true' diff --git a/hooks/polybar.hook.help b/hooks/polybar.hook.help new file mode 100644 index 0000000..d1c0cc1 --- /dev/null +++ b/hooks/polybar.hook.help @@ -0,0 +1 @@ +suda ln -sr polybar.hook /etc/pacman.d/hooks/polybar.hook diff --git a/i3-wm/config b/i3-wm/config new file mode 100644 index 0000000..6178859 --- /dev/null +++ b/i3-wm/config @@ -0,0 +1,467 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py increase +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py decrease +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py mute +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py mute + +set $up k +set $down j +set $left h +set $right l + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec alacritty + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec --no-startup-id dmenu_run +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec rofi -modi drun,run -show drun +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+g split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+Shift+s layout stacking +bindsym $mod+Shift+w layout tabbed +bindsym $mod+Shift+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws10 "0: ﭮ" +set $ws1 "1: " +set $ws2 "2: " +set $ws3 "3: ﬏" +set $ws4 "4: " +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9: " + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+x exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym j resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +# bar { +# status_command i3status +# } + + +## i3-gaps START + +set $mode_gaps Gaps: (o)uter, (i)nner, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft +set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_left Left Gaps: +|-|0 (local), Shift + +|-|0 (global) +bindsym Mod1+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym h mode "$mode_gaps_horiz" + bindsym v mode "$mode_gaps_verti" + bindsym t mode "$mode_gaps_top" + bindsym r mode "$mode_gaps_right" + bindsym b mode "$mode_gaps_bottom" + bindsym l mode "$mode_gaps_left" + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_horiz" { + bindsym plus gaps horizontal current plus 5 + bindsym minus gaps horizontal current minus 5 + bindsym 0 gaps horizontal current set 0 + + bindsym Shift+plus gaps horizontal all plus 5 + bindsym Shift+minus gaps horizontal all minus 5 + bindsym Shift+0 gaps horizontal all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_verti" { + bindsym plus gaps vertical current plus 5 + bindsym minus gaps vertical current minus 5 + bindsym 0 gaps vertical current set 0 + + bindsym Shift+plus gaps vertical all plus 5 + bindsym Shift+minus gaps vertical all minus 5 + bindsym Shift+0 gaps vertical all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_top" { + bindsym plus gaps top current plus 5 + bindsym minus gaps top current minus 5 + bindsym 0 gaps top current set 0 + + bindsym Shift+plus gaps top all plus 5 + bindsym Shift+minus gaps top all minus 5 + bindsym Shift+0 gaps top all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_right" { + bindsym plus gaps right current plus 5 + bindsym minus gaps right current minus 5 + bindsym 0 gaps right current set 0 + + bindsym Shift+plus gaps right all plus 5 + bindsym Shift+minus gaps right all minus 5 + bindsym Shift+0 gaps right all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_bottom" { + bindsym plus gaps bottom current plus 5 + bindsym minus gaps bottom current minus 5 + bindsym 0 gaps bottom current set 0 + + bindsym Shift+plus gaps bottom all plus 5 + bindsym Shift+minus gaps bottom all minus 5 + bindsym Shift+0 gaps bottom all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_left" { + bindsym plus gaps left current plus 5 + bindsym minus gaps left current minus 5 + bindsym 0 gaps left current set 0 + + bindsym Shift+plus gaps left all plus 5 + bindsym Shift+minus gaps left all minus 5 + bindsym Shift+0 gaps left all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +# set default gaps to 20 +gaps inner 20 + +## I3-GAPS END + +# BORDERS + +# make all windows have a 3 pixel border +for_window [class=".*"] border pixel 3 + +# make calendar, todo, and spotify always only have border 3 pixels +for_window[workspace="4: "] border pixel 3 +for_window[class="^Spotify$"] border none, gaps inner 60 +for_window[class="discord"] border none +for_window[title="ncmpcpp 0.9.2"] border none + +# if title, make the title center aligned +title_align center + +## client colors +# class border backgr text indicate child_border +# client.focused #56a7b5 #282c34 #ffffff #2e9ef4 #56a7b5 +client.focused #2878af #282c34 #ffffff #2e9ef4 #2878af +# client.focused #a8d385 #282c34 #ffffff #50b62c #a8d385 +client.unfocused #3d4450 #282c34 #ffffff #1e90ff #3d4450 + +## disable floating, borders +for_window [title="Desktop — Plasma"] kill; floating enable; border none +for_window [class="plasmashell"] floating enable; +for_window [class="Plasma"] floating enable; border none +for_window [title="plasma-desktop"] floating enable; border none +for_window [title="Plasma-desktop"] floating enable; border none +for_window [title="win7"] floating enable; border none +for_window [class="krunner"] floating enable; border none +for_window [class="Kmix"] floating enable; border none +for_window [class="Klipper"] floating enable; border none +for_window [class="Plasmoidviewer"] floating enable; border none +for_window [class="(?i)*nextcloud*"] floating disable +# for_window [class="plasmashell" window_type="notification"] floating enable, border none, move right 1600px, move down 450px +for_window [class="plasmashell" window_type="notification"] floating enable, border none, move position center, move down 908px, resize set 600 200 +# no_focus [class="plasmashell" window_type="notification"] +for_window [class="Steam"] floating enable + +## Keybindings +# Alt+: a, b, d, f, h, j, k, l, m, n, o, p, r, s, u, v, y, space, tab, windows, +# F5 +# Alt+Shift: s, w, e, q, r, h, j, k, l, n, p, space + +# bind Alt+Shift+n to next sonF5g +bindsym $mod+Shift+n exec --no-startup-id mpc next +# bind Alt+Shift+n to prev sonF5g +bindsym $mod+Shift+p exec --no-startup-id mpc prev + +# bind rofi-mpd ask mode to Alt+F7 +bindsym $mod+F7 exec --no-startup-id rofi-mpd -a +# bind rofi-mpd song mode to Alt+m +bindsym $mod+m exec --no-startup-id rofi-mpd -s + +# start rofi tabswitcher +bindsym Mod1+ISO_Left_Tab exec --no-startup-id $HOME/scripts/tabswitcher.sh +# changer borders +bindsym Mod1+y border pixel 3 +# bindsym Mod1+t border normal 3 +bindsym Mod1+u border none + +# set menu to the krunner +# set $menu --no-startup-id qdbus org.kde.krunner /App display +# bindsym Mod1+m exec $menu + +# run dmenu +bindsym Mod1+d exec --no-startup-id ~/scripts/dmenu.sh + +# launch rofi menu and menu full +bindsym Mod1+o exec --no-startup-id $HOME/scripts/menu_full +# bindsym Mod1+d exec --no-startup-id /home/sudacode/scripts/menu + +# bind the windows key to menu +bindsym Super_L exec --no-startup-id $HOME/scripts/menu + +# bind Alt s to flameshot_full script +bindsym Mod1+s exec --no-startup-id $HOME/scripts/flameshot_full.sh + +# launch pavucontrol with Alt+p +bindsym Mod1+p exec --no-startup-id $HOME/scripts/pavucontrol.sh + +## Spotify/Mpd controls +# Bind F4 to Next Song +bindsym XF86AudioPrev exec --no-startup-id $HOME/scripts/spotify-controls.sh -b;\ + exec --no-startup-id $HOME/i3/scripts/music-controls.sh -p +# Bind F6 to Pause/Play +bindsym XF86AudioPlay exec --no-startup-id $HOME/scripts/spotify-controls.sh -p;\ + exec --no-startup-id $HOME/i3/scripts/music-controls.sh -t +# Bind F5 to Next Song +bindsym XF86AudioNext exec --no-startup-id $HOME/scripts/spotify-controls.sh -n;\ + exec --no-startup-id $HOME/i3/scripts/music-controls.sh -n + +## Music Mpd/Ncmpcpp/Playerctl +# Bind Alt n to open ncmpcpp +bindsym Mod1+n exec --no-startup-id alacritty -e ncmpcpp + +# Bind Alt b to launch bpytop +bindsym Mod1+b exec --no-startup-id alacritty -e bpytop + +# get a new wallpaper +bindsym Control+Mod1+n exec --no-startup-id $HOME/scripts/new-wallpaper.sh + +bindsym Control+Mod1+f exec --no-startup-id firefox + +## ASSIGN TO WORKSPACES +assign [class="^firefox$"] "2: " +assign [class="^Code$"] "3: ﬏" +# assign [class="^plasmawindowed$" name="TodoList"] "4: " +# assign [class="^plasmawindowed$" name="Event Calendar"] "4: " + +# Assign and move mpd to workspace 9 +for_window [title="ncmpcpp 0.9.2"] move --no-auto-back-and-forth to workspace $ws9 + +# assign discord to workspace 10/0 +assign [class="^discord$"] workspace $ws10 + +# Unlock KWallet +# exec --no-startup-id /usr/lib/pam_kwallet_init + +## ON STARTUP +# launch polybar on startup +exec_always --no-startup-id /home/sudacode/i3/scripts/launch.sh + +# launch picom in the background +exec_always --no-startup-id /home/sudacode/scripts/picom.sh + +# run wallpaper script to set random wallpaper +exec_always --no-startup-id /home/sudacode/scripts/wallpaper.sh + +# start the calendar and todolist plasmoids +exec --no-startup-id ~/scripts/calendar.sh +exec --no-startup-id ~/scripts/todo.sh + +exec --no-startup-id alacritty -e ncmpcpp + +# Make the currently focused window a scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the first scratchpad window +bindsym $mod+minus scratchpad show + +for_window [title="System Tray"] floating enable, border none +for_window [title="System Tray" window_type="normal"] move scratchpad +bindsym Mod1+t [title="System Tray"] scratchpad show, resize set 250 260, move position center, move up 855px, move right 1740px +exec_always --no-startup-id "plasmawindowed org.kde.plasma.systemtray" + +for_window [class="plasmawindowed" title="TodoList"] resize set 1200 2000, border none, move --no-auto-back-and-forth to workspace "4: " +for_window [class="plasmawindowed" title="Event Calendar"] border none, move --no-auto-back-and-forth to workspace "4: " +for_window [class="eecs285-proj3-ksyasuda-WheelOfFortune"] floating enable +for_window [title="Android Emulator - Pixel_3a_API_30_x86:5554"] floating enable, border none diff --git a/i3-wm/config.desktop b/i3-wm/config.desktop new file mode 100644 index 0000000..59c345b --- /dev/null +++ b/i3-wm/config.desktop @@ -0,0 +1,455 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod1 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py increase +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py decrease +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status; exec --no-startup-id ~/i3/scripts/dunst_volume/dunst_volume.py mute +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3; exec --no-startup-id ~/i3/scripts/dunst_volume.py mute + +set $up k +set $down j +set $left h +set $right l + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec alacritty + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +# bindsym $mod+d exec --no-startup-id dmenu_run +# A more modern dmenu replacement is rofi: +# bindcode $mod+40 exec rofi -modi drun,run -show drun +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+g split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +# set $ws1 "1" +# set $ws2 "2" +# set $ws3 "3" +# set $ws4 "4" +set $ws1 "1: " +set $ws2 "2: " +set $ws3 "3: ﬏" +set $ws4 "4: " +set $ws5 "5: ﮷" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9: " +set $ws10 "0" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym h resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym j resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +# bar { +# status_command i3status +# } + + +## i3-gaps START + +set $mode_gaps Gaps: (o)uter, (i)nner, (h)orizontal, (v)ertical, (t)op, (r)ight, (b)ottom, (l)eft +set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_left Left Gaps: +|-|0 (local), Shift + +|-|0 (global) +bindsym Mod1+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym h mode "$mode_gaps_horiz" + bindsym v mode "$mode_gaps_verti" + bindsym t mode "$mode_gaps_top" + bindsym r mode "$mode_gaps_right" + bindsym b mode "$mode_gaps_bottom" + bindsym l mode "$mode_gaps_left" + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_horiz" { + bindsym plus gaps horizontal current plus 5 + bindsym minus gaps horizontal current minus 5 + bindsym 0 gaps horizontal current set 0 + + bindsym Shift+plus gaps horizontal all plus 5 + bindsym Shift+minus gaps horizontal all minus 5 + bindsym Shift+0 gaps horizontal all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_verti" { + bindsym plus gaps vertical current plus 5 + bindsym minus gaps vertical current minus 5 + bindsym 0 gaps vertical current set 0 + + bindsym Shift+plus gaps vertical all plus 5 + bindsym Shift+minus gaps vertical all minus 5 + bindsym Shift+0 gaps vertical all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_top" { + bindsym plus gaps top current plus 5 + bindsym minus gaps top current minus 5 + bindsym 0 gaps top current set 0 + + bindsym Shift+plus gaps top all plus 5 + bindsym Shift+minus gaps top all minus 5 + bindsym Shift+0 gaps top all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_right" { + bindsym plus gaps right current plus 5 + bindsym minus gaps right current minus 5 + bindsym 0 gaps right current set 0 + + bindsym Shift+plus gaps right all plus 5 + bindsym Shift+minus gaps right all minus 5 + bindsym Shift+0 gaps right all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_bottom" { + bindsym plus gaps bottom current plus 5 + bindsym minus gaps bottom current minus 5 + bindsym 0 gaps bottom current set 0 + + bindsym Shift+plus gaps bottom all plus 5 + bindsym Shift+minus gaps bottom all minus 5 + bindsym Shift+0 gaps bottom all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} +mode "$mode_gaps_left" { + bindsym plus gaps left current plus 5 + bindsym minus gaps left current minus 5 + bindsym 0 gaps left current set 0 + + bindsym Shift+plus gaps left all plus 5 + bindsym Shift+minus gaps left all minus 5 + bindsym Shift+0 gaps left all set 0 + + bindsym Return mode "$mode_gaps" + bindsym Escape mode "default" +} + +# set default gaps to 20 +gaps inner 20 + +## I3-GAPS END + +# BORDERS + +# make all windows have a 3 pixel border +for_window [class=".*"] border pixel 3 + +# make calendar, todo, and spotify always only have border 3 pixels +for_window[workspace="4: "] border pixel 3 +# for_window[class="^Spotify$"] border pixel 3, gaps inner 60 + +# if title, make the title center aligned +title_align center + +## client colors +# class border backgr text indicate child_border +# client.focused #56a7b5 #282c34 #ffffff #2e9ef4 #56a7b5 +client.focused #2878af #282c34 #ffffff #2e9ef4 #2878af +# client.focused #a8d385 #282c34 #ffffff #50b62c #a8d385 +client.unfocused #3d4450 #282c34 #ffffff #1e90ff #3d4450 + +## disable floating, borders +for_window [title="Desktop — Plasma"] kill; floating enable; border none +for_window [class="plasmashell"] floating enable; +for_window [class="Plasma"] floating enable; border none +for_window [title="plasma-desktop"] floating enable; border none +for_window [title="Plasma-desktop"] floating enable; border none +for_window [title="win7"] floating enable; border none +for_window [class="krunner"] floating enable; border none +for_window [class="Kmix"] floating enable; border none +for_window [class="Klipper"] floating enable; border none +for_window [class="Plasmoidviewer"] floating enable; border none +for_window [class="(?i)*nextcloud*"] floating disable +# for_window [class="plasmashell" window_type="notification"] floating enable, border none, move right 1600px, move down 450px +# for_window [class="plasmashell" window_type="notification"] floating enable, move down 100, move right 965, resize set 400 150, border none +for_window [class="plasmawindowed" window_type="notification"] floating enable, move position 1000 55, resize set 400 150; +# no_focus [class="plasmashell" window_type="notification"] +for_window [class="Steam"] floating enable; border none +for_window [class="plasmawindowed"] border none + +## CUSTOM KEYBINDS +# start rofi tabswitcher +bindsym Mod1+ISO_Left_Tab exec --no-startup-id $HOME/scripts/tabswitcher.sh +# changer borders +bindsym Mod1+y border pixel 3 +# bindsym Mod1+t border normal 3 +bindsym Mod1+u border none + +# set menu to the krunner +# set $menu --no-startup-id qdbus org.kde.krunner /App display +# bindsym Mod1+m exec $menu + +# run dmenu +bindsym Mod1+d exec --no-startup-id ~/scripts/dmenu-desktop.sh + +# launch rofi menu and menu full +bindsym Mod1+o exec --no-startup-id $HOME/i3/scripts/menu_full_desktop +# bindsym Mod1+d exec --no-startup-id /home/sudacode/scripts/menu + +# bind the windows key to menu +bindsym Super_L exec --no-startup-id $HOME/scripts/menu-desktop + +# Bind Alt+m to take screenshot with flameshot +bindsym Mod1+m exec --no-startup-id $HOME/scripts/flameshot_full.sh + +# bind Alt+p to run pavucontrol script +bindsym Mod1+p exec --no-startup-id $HOME/scripts/pavucontrol.sh + +# Bind F7 to Next Song +bindsym XF86AudioPrev exec --no-startup-id $HOME/scripts/spotify-controls.sh -b; exec --no-startup-id $HOME/i3/scripts/music-controls.sh -p +# Bind F8 to Pause/Play +bindsym XF86AudioPlay exec --no-startup-id $HOME/scripts/spotify-controls.sh -p; exec --no-startup-id $HOME/i3/scripts/music-controls.sh -t +# Bind F9 to Next Song +bindsym XF86AudioNext exec --no-startup-id $HOME/scripts/spotify-controls.sh -n; exec --no-startup-id $HOME/i3/scripts/music-controls.sh -n + +# bind alt b to bpytop +bindsym Mod1+b exec --no-startup-id alacritty -e bpytop + +# bind alt n to ncmpcpp +bindsym Mod1+n exec --no-startup-id alacritty -e ncmpcpp + +# get a new wallpaper +bindsym Control+Mod1+n exec --no-startup-id $HOME/scripts/new-wallpaper.sh + +bindsym Control+Mod1+f exec --no-startup-id firefox + +## ASSIGN TO WORKSPACES +# assign [class="^firefox$"] $ws6 +# assign [class="^Code$"] $ws7 +# assign [class="^plasmawindowed$"] $ws4 +# # Assign and move spotify to workspace 9 +# for_window [class="Spotify"] move --no-auto-back-and-forth to workspace $ws2 + +assign [class="^firefox$"] $ws2 +assign [class="^Code$"] $ws3 +assign [class="^plasmawindowed$"] $ws4 +assign [class="^discord$"] $ws10 +# Assign and move spotify to workspace 9 +# for_window [class="Spotify"] move --no-auto-back-and-forth to workspace $ws9 + +# Unlock KWallet +# exec --no-startup-id /usr/lib/pam_kwallet_init + +## ON STARTUP +# launch polybar on startup +exec_always --no-startup-id /home/sudacode/i3/scripts/launch_desktop.sh +# launch picom in the background +## Picom taking up too much cpu right now +exec_always --no-startup-id /home/sudacode/scripts/picom.sh +# run wallpaper script to set random wallpaper +exec_always --no-startup-id /home/sudacode/scripts/wallpaper.sh +# start the calendar and todolist plasmoids +exec --no-startup-id ~/scripts/calendar.sh +exec --no-startup-id ~/scripts/todo.sh + +# exec_always --no-startup-id /usr/share/knotifications5 +# exec_always --no-startup-id /usr/lib/notification-daemon-1.0/notification-daemon +exec --no-startup-id dunst + +# for_window [class='plasmawindowed' title='TodoList'] resize set 500 500 +for_window [class="plasmawindowed" title="TodoList"] resize set 600 +# Android emulator - eecs285 project4 +for_window [title="Android Emulator - Pixel_3a_API_30:5554"] floating enable, border none +for_window [class="rdesktop"] floating enable, border none; + +# workspaces for dual monitors +workspace $ws10 output HDMI-0 +workspace $ws1 output DP-2 +workspace $ws2 output DP-2 +workspace $ws3 output DP-2 +workspace $ws4 output HDMI-0 +workspace $ws5 output HDMI-0 +workspace $ws6 output HDMI-0 +workspace $ws7 output HDMI-0 +workspace $ws8 output HDMI-0 +workspace $ws9 output HDMI-0 diff --git a/include-modules.ini b/include-modules.ini new file mode 100644 index 0000000..1f32021 --- /dev/null +++ b/include-modules.ini @@ -0,0 +1,30 @@ +include-file = $HOME/i3/modules/memory.ini +include-file = $HOME/i3/modules/custom-mpd.ini +include-file = $HOME/i3/modules/playerctl.ini +include-file = $HOME/i3/modules/jdate.ini +include-file = $HOME/i3/modules/openweathermap-fullfeatured.ini +include-file = $HOME/i3/modules/color-picker.ini +include-file = $HOME/i3/modules/bluetooth.ini +include-file = $HOME/i3/modules/bluetooth.desktop.ini +include-file = $HOME/i3/modules/bluetooth2.ini +include-file = $HOME/i3/modules/battery.ini +include-file = $HOME/i3/modules/package-updates-trigger.ini +include-file = $HOME/i3/modules/package-updates.ini +include-file = $HOME/i3/modules/spotify-bar.ini +include-file = $HOME/i3/modules/spotify-bar-desktop.ini +include-file = $HOME/i3/modules/spotify-controls.ini +include-file = $HOME/i3/modules/cpu.ini +include-file = $HOME/i3/modules/vscode.ini +include-file = $HOME/i3/modules/settings.ini +include-file = $HOME/i3/modules/dolphin.ini +include-file = $HOME/i3/modules/flameshot.ini +include-file = $HOME/i3/modules/menu.ini +include-file = $HOME/i3/modules/pulseaudio.ini +include-file = $HOME/i3/modules/workspaces.ini +include-file = $HOME/i3/modules/network.ini +include-file = $HOME/i3/modules/network-desktop.ini +include-file = $HOME/i3/modules/reddit.ini +include-file = $HOME/i3/modules/github.ini +include-file = $HOME/i3/modules/volume.ini +include-file = $HOME/i3/modules/date.ini +include-file = $HOME/i3/modules/powermenu.ini diff --git a/mpd-notification/mpd-notification.conf b/mpd-notification/mpd-notification.conf new file mode 100644 index 0000000..9482a60 --- /dev/null +++ b/mpd-notification/mpd-notification.conf @@ -0,0 +1,6 @@ +host = localhost +port = 6600 +music-dir = /home/sudacode/Music/ +oneline = false +scale = 600 +timeout = 5 diff --git a/ncmpcpp/ncmpcpp.bindings b/ncmpcpp/ncmpcpp.bindings new file mode 100644 index 0000000..f2f368d --- /dev/null +++ b/ncmpcpp/ncmpcpp.bindings @@ -0,0 +1,559 @@ +def_key "j" + scroll_down + +def_key "k" + scroll_up + +def_key "l" + next_column + +def_key "h" + previous_column + +def_key "ctrl-l" + show_lyrics + +#def_key "mouse" +# mouse_event +# +#def_key "up" +# scroll_up +# +#def_key "shift-up" +# select_item +# scroll_up +# +#def_key "down" +# scroll_down +# +#def_key "shift-down" +# select_item +# scroll_down +# +#def_key "[" +# scroll_up_album +# +#def_key "]" +# scroll_down_album +# +#def_key "{" +# scroll_up_artist +# +#def_key "}" +# scroll_down_artist +# +#def_key "page_up" +# page_up +# +#def_key "page_down" +# page_down +# +#def_key "home" +# move_home +# +#def_key "end" +# move_end +# +#def_key "insert" +# select_item +# +#def_key "enter" +# enter_directory +# +#def_key "enter" +# toggle_output +# +#def_key "enter" +# run_action +# +#def_key "enter" +# play_item +# +#def_key "space" +# add_item_to_playlist +# +#def_key "space" +# toggle_lyrics_update_on_song_change +# +#def_key "space" +# toggle_visualization_type +# +#def_key "delete" +# delete_playlist_items +# +#def_key "delete" +# delete_browser_items +# +#def_key "delete" +# delete_stored_playlist +# +#def_key "right" +# next_column +# +#def_key "right" +# slave_screen +# +#def_key "right" +# volume_up +# +#def_key "+" +# volume_up +# +#def_key "left" +# previous_column +# +#def_key "left" +# master_screen +# +#def_key "left" +# volume_down +# +#def_key "-" +# volume_down +# +#def_key ":" +# execute_command +# +#def_key "tab" +# next_screen +# +#def_key "shift-tab" +# previous_screen +# +#def_key "f1" +# show_help +# +#def_key "1" +# show_playlist +# +#def_key "2" +# show_browser +# +#def_key "2" +# change_browse_mode +# +#def_key "3" +# show_search_engine +# +#def_key "3" +# reset_search_engine +# +#def_key "4" +# show_media_library +# +#def_key "4" +# toggle_media_library_columns_mode +# +#def_key "5" +# show_playlist_editor +# +#def_key "6" +# show_tag_editor +# +#def_key "7" +# show_outputs +# +#def_key "8" +# show_visualizer +# +#def_key "=" +# show_clock +# +#def_key "@" +# show_server_info +# +#def_key "s" +# stop +# +#def_key "p" +# pause +# +#def_key ">" +# next +# +#def_key "<" +# previous +# +#def_key "ctrl-h" +# jump_to_parent_directory +# +#def_key "ctrl-h" +# replay_song +# +#def_key "backspace" +# jump_to_parent_directory +# +#def_key "backspace" +# replay_song +# +#def_key "backspace" +# play +# +#def_key "f" +# seek_forward +# +#def_key "b" +# seek_backward +# +#def_key "r" +# toggle_repeat +# +#def_key "z" +# toggle_random +# +#def_key "y" +# save_tag_changes +# +#def_key "y" +# start_searching +# +#def_key "y" +# toggle_single +# +#def_key "R" +# toggle_consume +# +#def_key "Y" +# toggle_replay_gain_mode +# +#def_key "T" +# toggle_add_mode +# +#def_key "|" +# toggle_mouse +# +#def_key "#" +# toggle_bitrate_visibility +# +#def_key "Z" +# shuffle +# +#def_key "x" +# toggle_crossfade +# +#def_key "X" +# set_crossfade +# +#def_key "u" +# update_database +# +#def_key "ctrl-s" +# sort_playlist +# +#def_key "ctrl-s" +# toggle_browser_sort_mode +# +#def_key "ctrl-s" +# toggle_media_library_sort_mode +# +#def_key "ctrl-r" +# reverse_playlist +# +#def_key "ctrl-f" +# apply_filter +# +#def_key "ctrl-_" +# select_found_items +# +#def_key "/" +# find +# +#def_key "/" +# find_item_forward +# +#def_key "?" +# find +# +#def_key "?" +# find_item_backward +# +#def_key "." +# next_found_item +# +#def_key "," +# previous_found_item +# +#def_key "w" +# toggle_find_mode +# +#def_key "e" +# edit_song +# +#def_key "e" +# edit_library_tag +# +#def_key "e" +# edit_library_album +# +#def_key "e" +# edit_directory_name +# +#def_key "e" +# edit_playlist_name +# +#def_key "e" +# edit_lyrics +# +#def_key "i" +# show_song_info +# +#def_key "I" +# show_artist_info +# +#def_key "g" +# jump_to_position_in_song +# +#def_key "l" +# show_lyrics +# +#def_key "ctrl-v" +# select_range +# +#def_key "v" +# reverse_selection +# +#def_key "V" +# remove_selection +# +#def_key "B" +# select_album +# +#def_key "a" +# add_selected_items +# +#def_key "c" +# clear_playlist +# +#def_key "c" +# clear_main_playlist +# +#def_key "C" +# crop_playlist +# +#def_key "C" +# crop_main_playlist +# +#def_key "m" +# move_sort_order_up +# +#def_key "m" +# move_selected_items_up +# +#def_key "n" +# move_sort_order_down +# +#def_key "n" +# move_selected_items_down +# +#def_key "M" +# move_selected_items_to +# +#def_key "A" +# add +# +#def_key "S" +# save_playlist +# +#def_key "o" +# jump_to_playing_song +# +#def_key "G" +# jump_to_browser +# +#def_key "G" +# jump_to_playlist_editor +# +#def_key "~" +# jump_to_media_library +# +#def_key "E" +# jump_to_tag_editor +# +#def_key "U" +# toggle_playing_song_centering +# +#def_key "P" +# toggle_display_mode +# +#def_key "\\" +# toggle_interface +# +#def_key "!" +# toggle_separators_between_albums +# +#def_key "L" +# toggle_lyrics_fetcher +# +#def_key "F" +# fetch_lyrics_in_background +# +#def_key "alt-l" +# toggle_fetching_lyrics_in_background +# +#def_key "ctrl-l" +# toggle_screen_lock +# +#def_key "`" +# toggle_library_tag_type +# +#def_key "`" +# refetch_lyrics +# +#def_key "`" +# add_random_items +# +#def_key "ctrl-p" +# set_selected_items_priority +# +#def_key "q" +# quit +# +##### General rules ##### +## +## 1) Because each action has runtime checks whether it's +## ok to run it, a few actions can be bound to one key. +## Actions will be bound in order given in configuration +## file. When a key is pressed, first action in order +## will test itself whether it's possible to run it. If +## test succeeds, action is executed and other actions +## bound to this key are ignored. If it doesn't, next +## action in order tests itself etc. +## +## 2) It's possible to bind more that one action at once +## to a key. It can be done using the following syntax: +## +## def_key "key" +## action1 +## action2 +## ... +## +## This creates a chain of actions. When such chain is +## executed, each action in chain is run until the end of +## chain is reached or one of its actions fails to execute +## due to its requirements not being met. If multiple actions +## and/or chains are bound to the same key, they will be +## consecutively run until one of them gets fully executed. +## +## 3) When ncmpcpp starts, bindings configuration file is +## parsed and then ncmpcpp provides "missing pieces" +## of default keybindings. If you want to disable some +## bindings, there is a special action called 'dummy' +## for that purpose. Eg. if you want to disable ability +## to crop playlists, you need to put the following +## into configuration file: +## +## def_key "C" +## dummy +## +## After that ncmpcpp will not bind any default action +## to this key. +## +## 4) To let you write simple macros, the following special +## actions are provided: +## +## - push_character "character" - pushes given special +## character into input queue, so it will be immediately +## picked by ncmpcpp upon next call to readKey function. +## Accepted values: mouse, up, down, page_up, page_down, +## home, end, space, enter, insert, delete, left, right, +## tab, ctrl-a, ctrl-b, ..., ctrl-z, ctrl-[, ctrl-\\, +## ctrl-], ctrl-^, ctrl-_, f1, f2, ..., f12, backspace. +## In addition, most of these names can be prefixed with +## alt-/ctrl-/shift- to be recognized with the appropriate +## modifier key(s). +## +## - push_characters "string" - pushes given string into +## input queue. +## +## - require_runnable "action" - checks whether given action +## is runnable and fails if it isn't. This is especially +## useful when mixed with previous two functions. Consider +## the following macro definition: +## +## def_key "key" +## push_characters "custom_filter" +## apply_filter +## +## If apply_filter can't be currently run, we end up with +## sequence of characters in input queue which will be +## treated just as we typed them. This may lead to unexpected +## results (in this case 'c' will most likely clear current +## playlist, 'u' will trigger database update, 's' will stop +## playback etc.). To prevent such thing from happening, we +## need to change above definition to this one: +## +## def_key "key" +## require_runnable "apply_filter" +## push_characters "custom_filter" +## apply_filter +## +## Here, first we test whether apply_filter can be actually run +## before we stuff characters into input queue, so if condition +## is not met, whole chain is aborted and we're fine. +## +## - require_screen "screen" - checks whether given screen is +## currently active. accepted values: browser, clock, help, +## media_library, outputs, playlist, playlist_editor, +## search_engine, tag_editor, visualizer, last_fm, lyrics, +## selected_items_adder, server_info, song_info, +## sort_playlist_dialog, tiny_tag_editor. +## +## - run_external_command "command" - runs given command using +## system() function. +## +## - run_external_console_command "command" - runs given console +## command using system() function. +## +## +## 5) In addition to binding to a key, you can also bind actions +## or chains of actions to a command. If it comes to commands, +## syntax is very similar to defining keys. Here goes example +## definition of a command: +## +## def_command "quit" [deferred] +## stop +## quit +## +## If you execute the above command (which can be done by +## invoking action execute_command, typing 'quit' and pressing +## enter), ncmpcpp will stop the player and then quit. Note the +## presence of word 'deferred' enclosed in square brackets. It +## tells ncmpcpp to wait for confirmation (ie. pressing enter) +## after you typed quit. Instead of 'deferred', 'immediate' +## could be used. Then ncmpcpp will not wait for confirmation +## (enter) and will execute the command the moment it sees it. +## +## Note: while command chains are executed, internal environment +## update (which includes current window refresh and mpd status +## update) is not performed for performance reasons. However, it +## may be desirable to do so in some situration. Therefore it's +## possible to invoke by hand by performing 'update enviroment' +## action. +## +## Note: There is a difference between: +## +## def_key "key" +## action1 +## +## def_key "key" +## action2 +## +## and +## +## def_key "key" +## action1 +## action2 +## +## First one binds two single actions to the same kmpc updateey whilst +## second one defines a chain of actions. The behavior of +## these two is different and is described in (1) and (2). +## +## Note: Function def_key accepts non-ascii characters. +## +##### List of unbound actions ##### +## +## The following actions are not bound to any key/command: +## +## - set_volume +## - load +## diff --git a/ncmpcpp/ncmpcpp.config b/ncmpcpp/ncmpcpp.config new file mode 100644 index 0000000..9b0db21 --- /dev/null +++ b/ncmpcpp/ncmpcpp.config @@ -0,0 +1,608 @@ +############################################################## +## This is an example configuration file. Copy it to ## +## $XDG_CONFIG_HOME/ncmpcpp/config or $HOME/.ncmpcpp/config ## +## and set up your preferences. ## +############################################################## +# +##### directories ###### +## +## Directory for storing ncmpcpp related files. Changing it is useful if you +## want to store everything somewhere else and provide command line setting for +## alternative location to config file which defines that while launching +## ncmpcpp. +## +# +#ncmpcpp_directory = ~/.config/ncmpcpp +# +## +## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other +## MPD clients (eg. ncmpc) also use that location. +## +# +#lyrics_directory = ~/.lyrics +# +##### connection settings ##### +mpd_host = "localhost" +mpd_port = "6600" + +# connect to desktop +# mpd_host = "192.168.86.177" +# mpd_port = "6600" +# + +mpd_connection_timeout = 5 + + + +## Needed for tag editor and file operations to work. +## +mpd_music_dir = "~/Music" +# +#mpd_crossfade_time = 5 +# +# Exclude pattern for random song action +# http://www.boost.org/doc/libs/1_46_1/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html +#random_exclude_pattern = "^(temp|midi_songs).*" +# +##### music visualizer ##### +## +## In order to make music visualizer work with MPD you need to use the fifo +## output. Its format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. As an example here is +## the relevant section for mpd.conf: +## +## audio_output { +## type "fifo" +## name "Visualizer feed" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +## If the visualization on occasion diverges from the audio output, please set +## 'buffer_time' parameter of your audio output in mpd.conf to '100000' (100ms) +## or less to prevent that from happening. +## +## Note: If you're using Mopidy, an address of a udpsink gstreamer's output is +## also accepted. For example, the following section in mopidy.conf: +## +## [audio] +## output = tee name=t ! queue ! autoaudiosink t. +## ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE +## ! udpsink host=localhost port=5555 +## +## will make localhost:5555 available as a source of data for the stereo +## visualizer. +## +# +#visualizer_data_source = /tmp/mpd.fifo +# +## +## Note: Below parameter is needed for ncmpcpp to determine which output +## provides data for visualizer and reset it at the beginning of visualization +## to synchronize with audio. +## +# +#visualizer_output_name = Visualizer feed +# +## +## If you set format to 44100:16:2, make it 'yes'. +## +#visualizer_in_stereo = yes +# +## +## Note: set below to >=10 only if you have synchronization issues with +## visualization and audio. +## +# +#visualizer_sync_interval = 0 +# +## +## Note: To enable spectrum frequency visualization you need to compile ncmpcpp +## with fftw3 support. +## +# +## Available values: spectrum, wave, wave_filled, ellipse. +## +#visualizer_type = spectrum +# +#visualizer_fps = 60 +# +#visualizer_autoscale = no +# +#visualizer_look = ●▮ +# +#visualizer_color = blue, cyan, green, yellow, magenta, red +# +## Alternative subset of 256 colors for terminals that support it. +## +#visualizer_color = 47, 83, 119, 155, 191, 227, 221, 215, 209, 203, 197, 161 +# +## +## Note: The next few visualization options apply to the spectrum visualizer. +## +# +## Use unicode block characters for a smoother, more continuous look. +## This will override the visualizer_look option. With transparent terminals +## and visualizer_in_stereo set, artifacts may be visible on the bottom half of +## the visualization. +# +#visualizer_spectrum_smooth_look = yes +# +## A value between 1 and 5 inclusive. Specifying a larger value makes the +## visualizer look at a larger slice of time, which results in less jumpy +## visualizer output. +# +#visualizer_spectrum_dft_size = 2 +# +#visualizer_spectrum_gain = 10 +# +## Left-most frequency of visualizer in Hz, must be less than HZ MAX +# +#visualizer_spectrum_hz_min = 20 +# +## Right-most frequency of visualizer in Hz, must be greater than HZ MIN +# +#visualizer_spectrum_hz_max = 20000 +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding but if it failed to do so, you +## can specify charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build supports charset detection by +## checking output of `ncmpcpp --version`. +## +## Note: Since MPD uses UTF-8 by default, setting this option makes sense only +## if your encoding is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## Time of inactivity (in seconds) after playlist highlighting will be disabled +## (0 = always on). +## +#playlist_disable_highlight_delay = 5 +# +## Defines how long messages are supposed to be visible. +## +#message_delay_time = 5 +# +##### song format ##### +## +## For a song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - date +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## %P - priority +## $R - begin right alignment +## +## If you want to make sure that a part of the format is displayed only when +## certain tags are present, you can archieve it by grouping them with brackets, +## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are +## present or '' otherwise. It is also possible to define a list of +## alternatives by providing several groups and separating them with '|', +## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is +## not present. +## +## Note: If you want to set limit on maximal length of a tag, just put the +## appropriate number between % and character that defines tag type, e.g. to +## make album take max. 20 terminal cells, use '%20b'. +## +## In addition, formats support markers used for text attributes. They are +## followed by character '$'. After that you can put: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use a non-color attribute anymore, just put it again, +## but this time insert character '/' between '$' and attribute character, +## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with +## reversed colors. +## +## If you want to use 256 colors and/or background colors in formats (the naming +## scheme is described below in section about color definitions), it can be done +## with the syntax $(COLOR), e.g. to set the artist tag to one of the +## non-standard colors and make it have yellow background, you need to write +## $(197_yellow)%a$(end). Note that for standard colors this is interchangable +## with attributes listed above. +## +## Note: colors can be nested. +## +# +#song_list_format = {%a - }{%t}|{$8%f$9}$R{$3%l$9} +# +#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f} +# +#song_library_format = {%n - }{%t}|{%f} +# +#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +# +#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# +#current_item_prefix = $(yellow)$r +# +#current_item_suffix = $/r$(end) +# +#current_item_inactive_column_prefix = $(white)$r +# +#current_item_inactive_column_suffix = $/r$(end) +# +#now_playing_prefix = $b +# +#now_playing_suffix = $/b +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = $6 +# +#selected_item_suffix = $9 +# +#modified_item_prefix = $3> $9 +# +## +## Note: attributes are not supported for the following variables. +## +#song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. The sort mode +## determines how songs are sorted, and can be used in combination with a sort +## format to specify a custom sorting format. Available values for +## browser_sort_mode are "type", "name", "mtime", "format" and "none". +## +# +#browser_sort_mode = type +# +#browser_sort_format = {%a - }{%t}|{%f} {%l} +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of the column)[color of the column]{displayed tag} +## +## Note: Width is by default in %, if you want a column to have fixed size, add +## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of +## screen (so the real width will depend on actual screen size), whereas +## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen +## is. +## +## - color is optional (if you want the default one, leave the field empty). +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, separated with +## character ':', e.g. {lr:Length} gives you right aligned column of lengths +## named "Length". +## +## - define sequence of tags, that have to be displayed in case predecessor is +## empty in a way similar to the one in classic song format, i.e. using '|' +## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to +## display artist tag and then composer and performer if previous ones are not +## available. +## +# +#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each time song changes. Useful for +## notifications etc. +## +#execute_on_song_change = "" +# +## +## Note: Custom command that will be executed each time player state +## changes. The environment variable MPD_PLAYER_STATE is set to the current +## state (either unknown, play, pause, or stop) for its duration. +## +# +#execute_on_player_state_change = "" +# +#playlist_show_mpd_host = no +# +#playlist_show_remaining_time = no +# +#playlist_shorten_total_times = no +# +#playlist_separate_albums = no +# +## +## Note: Possible display modes: classic, columns. +## +#playlist_display_mode = columns +# +#browser_display_mode = classic +# +#search_engine_display_mode = classic +# +#playlist_editor_display_mode = classic +# +#discard_colors_if_item_is_selected = yes +# +#show_duplicate_tags = yes +# +#incremental_seeking = yes +# +#seek_time = 1 +# +#volume_change_step = 2 +# +#autocenter_mode = no +# +#centered_cursor = no +# +## +## Note: You can specify third character which will be used to build 'empty' +## part of progressbar. +## +#progressbar_look = => +# +## Available values: database, playlist. +## +#default_place_to_search_in = database +# +## Available values: classic, alternative. +## +#user_interface = classic +# +#data_fetching_delay = yes +# +## Available values: artist, album_artist, date, genre, composer, performer. +## +#media_library_primary_tag = artist +# +#media_library_albums_split_by_date = yes +# +#media_library_hide_album_dates = no +# +## Available values: wrapped, normal. +## +#default_find_mode = wrapped +# +#default_tag_editor_pattern = %n - %t +# +#header_visibility = yes +# +#statusbar_visibility = yes +# +## Show the "Connected to ..." message on startup +#connected_message_on_startup = yes +# +#titles_visibility = yes +# +#header_text_scrolling = yes +# +#cyclic_scrolling = no +# +#lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet +# +#follow_now_playing_lyrics = no +# +#fetch_lyrics_for_current_song_in_background = no +# +#store_lyrics_in_song_dir = no +# +#generate_win32_compatible_filenames = yes +# +allow_for_physical_item_deletion = yes +# +## +## Note: If you set this variable, ncmpcpp will try to get info from last.fm in +## language you set and if it fails, it will fall back to english. Otherwise it +## will use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = en +# +#space_add_mode = add_remove +# +#show_hidden_files_in_local_browser = no +# +## +## How shall screen switcher work? +## +## - "previous" - switch between the current and previous screen. +## - "screen1,...,screenN" - switch between given sequence of screens. +## +## Screens available for use: help, playlist, browser, search_engine, +## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, +## lyrics, last_fm. +## +#screen_switcher_mode = playlist, browser +# +## +## Note: You can define startup screen by choosing screen from the list above. +## +#startup_screen = playlist +# +## +## Note: You can define startup slave screen by choosing screen from the list +## above or an empty value for no slave screen. +## +#startup_slave_screen = "" +# +#startup_slave_screen_focus = no +# +## +## Default width of locked screen (in %). Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = 50 +# +#ask_for_locked_screen_width_part = yes +# +#jump_to_now_playing_song_at_start = yes +# +#ask_before_clearing_playlists = yes +# +#clock_display_seconds = no +# +#display_volume_level = yes +# +#display_bitrate = no +# +#display_remaining_time = no +# +## Available values: none, basic, extended, perl. +## +#regular_expressions = perl +# +## +## Note: if below is enabled, ncmpcpp will ignore leading "The" word while +## sorting items in browser, tags in media library, etc. +## +#ignore_leading_the = no +# +## +## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and +## filtering lists. This takes an effect only if boost was compiled with ICU +## support. +## +#ignore_diacritics = no +# +#block_search_constraints_change_if_items_found = yes +# +#mouse_support = yes +# +#mouse_list_scroll_whole_page = no +# +#lines_scrolled = 5 +# +#empty_tag_marker = +# +#tags_separator = " | " +# +#tag_editor_extended_numeration = no +# +#media_library_sort_by_mtime = no +# +#enable_window_title = yes +# +## +## Note: You can choose default search mode for search engine. Available modes +## are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but +## if your mpd is on a remote machine, downloading big database to process +## it can take a while +## +## - 3 - match only exact values (this mode uses mpd function for searching in +## database and local one for searching in current playlist) +## +# +#search_engine_default_search_mode = 1 +# +#external_editor = nano +# +## Note: set to yes if external editor is a console application. +## +#use_console_editor = yes +# +##### colors definitions ##### +## +## It is possible to set a background color by setting a color value +## "_", e.g. red_black will set foregound color to red +## and background color to black. +## +## In addition, for terminals that support 256 colors it is possible to set one +## of them by using a number in range [1, 256] instead of color name, +## e.g. numerical value corresponding to red_black is 2_1. To find out if the +## terminal supports 256 colors, run ncmpcpp and check out the bottom of the +## help screen for list of available colors and their numerical values. +## +## What is more, there are two special values for the background color: +## "transparent" and "current". The first one explicitly sets the background to +## be transparent, while the second one allows you to preserve current +## background color and change only the foreground one. It's used implicitly +## when background color is not specified. +## +## Moreover, it is possible to attach format information to selected color +## variables by appending to their end a colon followed by one or more format +## flags, e.g. black:b or red:ur. The following variables support this syntax: +## visualizer_color, color1, color2, empty_tag_color, volume_color, +## state_line_color, state_flags_color, progressbar_color, +## progressbar_elapsed_color, player_state_color, statusbar_time_color, +## alternative_ui_separator_color. +## +## Note: due to technical limitations of older ncurses version, if 256 colors +## are used there is a possibility that you'll be able to use only colors with +## transparent background. +# +#colors_enabled = yes +# +#empty_tag_color = cyan +# +#header_window_color = default +# +#volume_color = default +# +#state_line_color = default +# +#state_flags_color = default:b +# +#main_window_color = yellow +# +#color1 = white +# +#color2 = green +# +#progressbar_color = black:b +# +#progressbar_elapsed_color = green:b +# +#statusbar_color = default +# +#statusbar_time_color = default:b +# +#player_state_color = default:b +# +#alternative_ui_separator_color = black:b +# +#window_border_color = green +# +#active_window_border = red +# +visualizer_data_source = "/tmp/mpd.fifo" +visualizer_output_name = "my_fifo" +visualizer_in_stereo = "yes" +visualizer_type = "spectrum" +visualizer_look = "+|" diff --git a/picom/picom.conf b/picom/picom.conf new file mode 100644 index 0000000..c1c2399 --- /dev/null +++ b/picom/picom.conf @@ -0,0 +1,457 @@ +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +# shadow-radius = 12 +shadow-radius = 24; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +# shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# fade-exclude = [] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 0.9; +active-opacity = 0.98; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 0.8; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +# active-opacity = 1.0 + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +inactive-dim = 0.1 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ "class_g = 'Cairo-clock'" ]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +opacity-rule = [ + "99:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'", + "99:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'", + "99:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'", + "99:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'", + "99:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'", +] + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +blur-size = 10 +# +# blur-deviation = false + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +blur-background = false + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false + + +# Use fixed blur strength rather than adjusting according to window opacity. +blur-background-fixed = false + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = '' +blur-kern = "3x3box"; + + +# Exclude conditions for background blur. +# blur-background-exclude = [] +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "_GTK_FRAME_EXTENTS@:c" +]; + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +# backend = 'glx' +# backend = "xrender"; +backend = "glx"; +# Enable/disable VSync. +# vsync = false +vsync = false + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0 + +# Limit picom to repaint at most once every 1 / 'refresh_rate' second to +# boost performance. This should not be used with +# vsync drm/opengl/opengl-oml +# as they essentially does sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +# +# sw-opti = + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +use-damage = true + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +# xrender-sync-fence = false + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = '' + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "warn"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = '/path/to/your/log/file' + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = '/path/to/your/log/file' + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# + +#stop tearing on fullscreen windows +unredir-if-possible = false; + + +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.85; } + dropdown_menu = { opacity = 0.85; } +}; + +# ------------ +# ibhagwan +# corner-radius = 12; +corner-radius = 15; +rounded-corner-exclude = [ + #"window_type = 'normal'" + "class_g = 'Plasma'" + "class_g = 'plsama-desktop'" + "class_g = 'win7'" + "class_g = 'krunner'" + "class_g = 'plasmashell' window_type = 'notification'" +] + +blur: { + # method = "dual_kawase"; + method = "kawase"; + strength = 7; + background = false; + background-frame = false; + background-fixed = false; +} + diff --git a/picom/picom.conf.jonaburg b/picom/picom.conf.jonaburg new file mode 100644 index 0000000..3e02b2d --- /dev/null +++ b/picom/picom.conf.jonaburg @@ -0,0 +1,503 @@ +################################# +# Animations # +################################# +# requires https://github.com/jonaburg/picom +# (These are also the default values) +transition-length = 300 +transition-pow-x = 0.1 +transition-pow-y = 0.1 +transition-pow-w = 0.1 +transition-pow-h = 0.1 +size-transition = true + + +################################# +# Corners # +################################# +# requires: https://github.com/sdhand/compton or https://github.com/jonaburg/picom +corner-radius = 10.0; +rounded-corners-exclude = [ + #"window_type = 'normal'", + "class_g = 'polybar'", + #"class_g = 'TelegramDesktop'", +]; +round-borders = 1; +round-borders-exclude = [ + #"class_g = 'TelegramDesktop'", +]; + +################################# +# Shadows # +################################# + + +# Enabled client-side shadows on windows. Note desktop windows +# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, +# unless explicitly requested using the wintypes option. +# +# shadow = false +shadow = true; + +# The blur radius for shadows, in pixels. (defaults to 12) +shadow-radius = 12 +# shadow-radius = 7; + +# The opacity of shadows. (0.0 - 1.0, defaults to 0.75) +shadow-opacity = .75 + +# The left offset for shadows, in pixels. (defaults to -15) +# shadow-offset-x = -15 +shadow-offset-x = -7; + +# The top offset for shadows, in pixels. (defaults to -15) +# shadow-offset-y = -15 +shadow-offset-y = -7; + +# Avoid drawing shadows on dock/panel windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dock-shadow = false + +# Don't draw shadows on drag-and-drop windows. This option is deprecated, +# you should use the *wintypes* option in your config file instead. +# +# no-dnd-shadow = false + +# Red color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-red = 0 + +# Green color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-green = 0 + +# Blue color value of shadow (0.0 - 1.0, defaults to 0). +# shadow-blue = 0 + +# Do not paint shadows on shaped windows. Note shaped windows +# here means windows setting its shape through X Shape extension. +# Those using ARGB background is beyond our control. +# Deprecated, use +# shadow-exclude = 'bounding_shaped' +# or +# shadow-exclude = 'bounding_shaped && !rounded_corners' +# instead. +# +# shadow-ignore-shaped = '' + +# Specify a list of conditions of windows that should have no shadow. +# +# examples: +# shadow-exclude = "n:e:Notification"; +# +# shadow-exclude = [] +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "class_g = 'slop'", + "class_g = 'Polybar'", + "_GTK_FRAME_EXTENTS@:c" +]; + +# Specify a X geometry that describes the region in which shadow should not +# be painted in, such as a dock window region. Use +# shadow-exclude-reg = "x10+0+0" +# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. +# +# shadow-exclude-reg = "" + +# Crop shadow of a window fully on a particular Xinerama screen to the screen. +# xinerama-shadow-crop = false + + +################################# +# Fading # +################################# + + +# Fade windows in/out when opening/closing and when opacity changes, +# unless no-fading-openclose is used. +# fading = false +fading = true; + +# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) +# fade-in-step = 0.028 +fade-in-step = 0.03; + +# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) +# fade-out-step = 0.03 +fade-out-step = 0.03; + +# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) +# fade-delta = 10 + +# Specify a list of conditions of windows that should not be faded. +# don't need this, we disable fading for all normal windows with wintypes: {} +fade-exclude = [ + "class_g = 'slop'" # maim +] + +# Do not fade on window open/close. +# no-fading-openclose = false + +# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. +# no-fading-destroyed-argb = false + + +################################# +# Transparency / Opacity # +################################# + + +# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) +# inactive-opacity = 1 +inactive-opacity = 0.85; + +# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) +# frame-opacity = 1.0 +frame-opacity = 0.7; + +# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) +# menu-opacity = 1.0 +# menu-opacity is depreciated use dropdown-menu and popup-menu instead. + +#If using these 2 below change their values in line 510 & 511 aswell +popup_menu = { opacity = 0.8; } +dropdown_menu = { opacity = 0.8; } + + +# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. +# inactive-opacity-override = true +inactive-opacity-override = false; + +# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) +active-opacity = .9; + +# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) +inactive-dim = 0.1 + +# Specify a list of conditions of windows that should always be considered focused. +# focus-exclude = [] +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'" # maim +]; + +# Use fixed inactive dim value, instead of adjusting according to window opacity. +# inactive-dim-fixed = 1.0 + +# Specify a list of opacity rules, in the format `PERCENT:PATTERN`, +# like `50:name *= "Firefox"`. picom-trans is recommended over this. +# Note we don't make any guarantee about possible conflicts with other +# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. +# example: +# opacity-rule = [ "80:class_g = 'URxvt'" ]; +# +# opacity-rule = [] +opacity-rule = [ + "96:class_g = 'Alacritty'", + "100:class_g = 'Polybar'", + "100:class_g = 'code-oss'", + "100:class_g = 'Code'", + "100:class_g = 'jetbrains-studio'", + "100:class_g = 'firefox'", + "100:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'", + "100:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'", + "100:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'", + "100:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'", + "100:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'", +]; + + +################################# +# Background-Blurring # +################################# + + +# Parameters for background blurring, see the *BLUR* section for more information. +# blur-method = +# blur-size = 12 +# +# blur-deviation = false + +# Blur background of semi-transparent / ARGB windows. +# Bad in performance, with driver-dependent behavior. +# The name of the switch may change without prior notifications. +# +# blur-background = true; + +# Blur background of windows when the window frame is not opaque. +# Implies: +# blur-background +# Bad in performance, with driver-dependent behavior. The name may change. +# +# blur-background-frame = false; + + +# Use fixed blur strength rather than adjusting according to window opacity. +# blur-background-fixed = false; + + +# Specify the blur convolution kernel, with the following format: +# example: +# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; +# +# blur-kern = '' +# blur-kern = "3x3box"; + +blur: { + # requires: https://github.com/ibhagwan/picom + method = "kawase"; + #method = "kernel"; + strength = 7; + # deviation = 1.0; + # kernel = "11x11gaussian"; + background = false; + background-frame = false; + background-fixed = false; + kern = "3x3box"; +} + +# Exclude conditions for background blur. +blur-background-exclude = [ + #"window_type = 'dock'", + #"window_type = 'desktop'", + #"class_g = 'URxvt'", + # + # prevents picom from blurring the background + # when taking selection screenshot with `main` + # https://github.com/naelstrof/maim/issues/130 + "class_g = 'slop'", + "_GTK_FRAME_EXTENTS@:c" +]; + + +################################# +# General Settings # +################################# + +# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. +# daemon = false + +# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. +# `xrender` is the default one. +# +experimental-backends = true; +backend = "glx"; +# backend = "xrender"; + + +# Enable/disable VSync. +# vsync = false +vsync = false + +# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. +# dbus = false + +# Try to detect WM windows (a non-override-redirect window with no +# child that has 'WM_STATE') and mark them as active. +# +# mark-wmwin-focused = false +mark-wmwin-focused = true; + +# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. +# mark-ovredir-focused = false +mark-ovredir-focused = true; + +# Try to detect windows with rounded corners and don't consider them +# shaped windows. The accuracy is not very high, unfortunately. +# +# detect-rounded-corners = false +detect-rounded-corners = true; + +# Detect '_NET_WM_OPACITY' on client windows, useful for window managers +# not passing '_NET_WM_OPACITY' of client windows to frame windows. +# +# detect-client-opacity = false +detect-client-opacity = true; + +# Specify refresh rate of the screen. If not specified or 0, picom will +# try detecting this with X RandR extension. +# +# refresh-rate = 60 +refresh-rate = 0 + +# Limit picom to repaint at most once every 1 / 'refresh_rate' second to +# boost performance. This should not be used with +# vsync drm/opengl/opengl-oml +# as they essentially does sw-opti's job already, +# unless you wish to specify a lower refresh rate than the actual value. +# +# sw-opti = + +# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, +# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, +# provided that the WM supports it. +# +# use-ewmh-active-win = false + +# Unredirect all windows if a full-screen opaque window is detected, +# to maximize performance for full-screen windows. Known to cause flickering +# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious. +# +# unredir-if-possible = false + +# Delay before unredirecting the window, in milliseconds. Defaults to 0. +# unredir-if-possible-delay = 0 + +# Conditions of windows that shouldn't be considered full-screen for unredirecting screen. +# unredir-if-possible-exclude = [] + +# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows +# in the same group focused at the same time. +# +# detect-transient = false +detect-transient = true + +# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same +# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if +# detect-transient is enabled, too. +# +# detect-client-leader = false +detect-client-leader = true + +# Resize damaged region by a specific number of pixels. +# A positive value enlarges it while a negative one shrinks it. +# If the value is positive, those additional pixels will not be actually painted +# to screen, only used in blur calculation, and such. (Due to technical limitations, +# with use-damage, those pixels will still be incorrectly painted to screen.) +# Primarily used to fix the line corruption issues of blur, +# in which case you should use the blur radius value here +# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, +# with a 5x5 one you use `--resize-damage 2`, and so on). +# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. +# +# resize-damage = 1 + +# Specify a list of conditions of windows that should be painted with inverted color. +# Resource-hogging, and is not well tested. +# +# invert-color-include = [] + +# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. +# Might cause incorrect opacity when rendering transparent content (but never +# practically happened) and may not work with blur-background. +# My tests show a 15% performance boost. Recommended. +# +# glx-no-stencil = false + +# GLX backend: Avoid rebinding pixmap on window damage. +# Probably could improve performance on rapid window content changes, +# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). +# Recommended if it works. +# +# glx-no-rebind-pixmap = false + +# Disable the use of damage information. +# This cause the whole screen to be redrawn everytime, instead of the part of the screen +# has actually changed. Potentially degrades the performance, but might fix some artifacts. +# The opposing option is use-damage +# +# no-use-damage = false +#use-damage = true (Causing Weird Black semi opaque rectangles when terminal is opened) +#Changing use-damage to false fixes the problem +use-damage = false + +# Use X Sync fence to sync clients' draw calls, to make sure all draw +# calls are finished before picom starts drawing. Needed on nvidia-drivers +# with GLX backend for some users. +# +xrender-sync-fence = true + +# GLX backend: Use specified GLSL fragment shader for rendering window contents. +# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` +# in the source tree for examples. +# +# glx-fshader-win = '' + +# Force all windows to be painted with blending. Useful if you +# have a glx-fshader-win that could turn opaque pixels transparent. +# +# force-win-blend = false + +# Do not use EWMH to detect fullscreen windows. +# Reverts to checking if a window is fullscreen based only on its size and coordinates. +# +# no-ewmh-fullscreen = false + +# Dimming bright windows so their brightness doesn't exceed this set value. +# Brightness of a window is estimated by averaging all pixels in the window, +# so this could comes with a performance hit. +# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) +# +# max-brightness = 1.0 + +# Make transparent windows clip other windows like non-transparent windows do, +# instead of blending on top of them. +# +# transparent-clipping = false + +# Set the log level. Possible values are: +# "trace", "debug", "info", "warn", "error" +# in increasing level of importance. Case doesn't matter. +# If using the "TRACE" log level, it's better to log into a file +# using *--log-file*, since it can generate a huge stream of logs. +# +# log-level = "debug" +log-level = "info"; + +# Set the log file. +# If *--log-file* is never specified, logs will be written to stderr. +# Otherwise, logs will to written to the given file, though some of the early +# logs might still be written to the stderr. +# When setting this option from the config file, it is recommended to use an absolute path. +# +# log-file = '~/.picom.log' + +# Show all X errors (for debugging) +# show-all-xerrors = false + +# Write process ID to a file. +# write-pid-path = '/path/to/your/log/file' + +# Window type settings +# +# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: +# "unknown", "desktop", "dock", "toolbar", "menu", "utility", +# "splash", "dialog", "normal", "dropdown_menu", "popup_menu", +# "tooltip", "notification", "combo", and "dnd". +# +# Following per window-type options are available: :: +# +# fade, shadow::: +# Controls window-type-specific shadow and fade settings. +# +# opacity::: +# Controls default opacity of the window type. +# +# focus::: +# Controls whether the window of this type is to be always considered focused. +# (By default, all window types except "normal" and "dialog" has this on.) +# +# full-shadow::: +# Controls whether shadow is drawn under the parts of the window that you +# normally won't be able to see. Useful when the window has parts of it +# transparent, and you want shadows in those areas. +# +# redir-ignore::: +# Controls whether this type of windows should cause screen to become +# redirected again after been unredirected. If you have unredir-if-possible +# set, and doesn't want certain window to cause unnecessary screen redirection, +# you can set this to `true`. +# +wintypes: +{ + normal = { fade = false; shadow = false; } + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; + diff --git a/polybar-modules/battery.ini b/polybar-modules/battery.ini new file mode 100644 index 0000000..ed03499 --- /dev/null +++ b/polybar-modules/battery.ini @@ -0,0 +1,54 @@ +[module/battery] +type = internal/battery +full-at = 99 +time-format = %H:%M +battery = BAT0 +adapter = AC0 +format-charging = +format-charging-foreground = #a8d385 +format-charging-padding = 1 +label-charging = %{F#a8d385}%percentage%%%{F-} +label-charging-foreground = #a8d385 +format-discharging = +format-discharging-foreground = #F9825A +format-discharging-padding = 1 +label-discharging =%{F#F9825A}%percentage%%%{F-} +format-full = +format-full-foreground = #a8d385 + +format-full-prefix = "" +format-full-prefix-foreground = #a8d385 +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +ramp-capacity-5 =  +ramp-capacity-6 =  +ramp-capacity-7 =  +ramp-capacity-8 =  +ramp-capacity-9 =  + +ramp-capacity-0-foreground = ${color.red} +ramp-capacity-1-foreground = ${color.red} +ramp-capacity-2-foreground = ${color.red} +ramp-capacity-3-foreground = ${color.yellow} +ramp-capacity-4-foreground = ${color.yellow} +ramp-capacity-5-foreground = ${color.yellow} +ramp-capacity-6-foreground = #a8d385 +ramp-capacity-7-foreground = #a8d385 +ramp-capacity-8-foreground = #a8d385 +ramp-capacity-9-foreground = #a8d385 +#ramp-capacity-foreground = ${color.fg} +# ramp-capacity-foreground = #a8d385 +bar-capacity-width = 2 + +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-3 =  +animation-charging-4 =  +animation-charging-5 =  +animation-charging-6 =  + +animation-charging-framerate = 750 diff --git a/polybar-modules/bluetooth.desktop.ini b/polybar-modules/bluetooth.desktop.ini new file mode 100644 index 0000000..b950f52 --- /dev/null +++ b/polybar-modules/bluetooth.desktop.ini @@ -0,0 +1,9 @@ +[module/bluetooth-desktop] +type = custom/script +exec = rofi-bluetooth --status +interval = 2 +click-left = ~/scripts/rofi-bluetooth.desktop +click-right = blueman-manager +# format-foreground = #fc8353 +format-foreground = #A8D385 +format-padding = 1 diff --git a/polybar-modules/bluetooth.ini b/polybar-modules/bluetooth.ini new file mode 100644 index 0000000..7de0b21 --- /dev/null +++ b/polybar-modules/bluetooth.ini @@ -0,0 +1,8 @@ +[module/system-bluetooth-bluetoothctl] +type = custom/script +exec = ~/i3/scripts/system-bluetooth-bluetoothctl.sh +tail = true +click-left = ~/i3/scripts/system-bluetooth-bluetoothctl.sh --toggle & +click-right = blueman-manager +label-foreground = #fc855a +label-padding = 1 diff --git a/polybar-modules/bluetooth2.ini b/polybar-modules/bluetooth2.ini new file mode 100644 index 0000000..a53b2ac --- /dev/null +++ b/polybar-modules/bluetooth2.ini @@ -0,0 +1,9 @@ +[module/bluetooth2] +type = custom/script +exec = rofi-bluetooth --status +interval = 2 +click-left = ~/scripts/rofi-bluetooth +click-right = blueman-manager +# format-foreground = #fc8353 +format-foreground = #A8D385 +format-padding = 1 diff --git a/polybar-modules/color-picker.ini b/polybar-modules/color-picker.ini new file mode 100644 index 0000000..475b72c --- /dev/null +++ b/polybar-modules/color-picker.ini @@ -0,0 +1,6 @@ +[module/color-picker] +type = custom/text +content =  +content-padding = 1 +content-foreground = #C1BF10 +click-left = kcolorchooser diff --git a/polybar-modules/cpu.ini b/polybar-modules/cpu.ini new file mode 100644 index 0000000..29f20f8 --- /dev/null +++ b/polybar-modules/cpu.ini @@ -0,0 +1,20 @@ +[module/cpu] +type = internal/cpu +interval = 0.5 +# format =