commit 2e712bca89b9672118d1fa6bbdb80824c90c479d Author: TriMill Date: Tue Mar 7 13:15:21 2023 -0500 initial commit diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..b9d854c --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,77 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +#env: + #TERM: alacritty + +window: + padding: + x: 5 + y: 5 + decorations: full + dynamic_title: true + opacity: 0.90 + +font: + normal: + family: Fira Mono + style: Regular + bold: + style: Bold + italic: + style: Italic + bold_italic: + style: Bold Italic + size: 11.5 + offset: + x: 0 + y: 0 + +draw_bold_text_with_bright_colors: false + +colors: + primary: + background: '0x14171d' + foreground: '0xc7c6c3' + + normal: + black: '0x14171d' + red: '0xa63a3a' + green: '0x759438' + yellow: '0xde7e54' + blue: '0x3d67a2' + magenta: '0x7b5687' + cyan: '0x578c7c' + white: '0xada0a8' + + bright: + black: '0x4d4754' + red: '0xcc5c5c' + green: '0x97bd5e' + yellow: '0xf0c767' + blue: '0x789ebf' + magenta: '0xa97fb3' + cyan: '0x82bfb3' + white: '0xc7c6c3' + + selection: + text: CellBackground + background: CellForeground + + cursor: + text: CellBackground + background: CellForeground +hints: + enabled: + - regex: "(magnet|mailto|gemini|gopher|https|http|news|file|git|ssh|ftp):\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: None + binding: + key: U + mods: Control|Shift + +key_bindings: + - { key: Return, mods: Control|Super, action: SpawnNewInstance } diff --git a/.config/alacritty/alacritty.yml.tty b/.config/alacritty/alacritty.yml.tty new file mode 100644 index 0000000..cf6e343 --- /dev/null +++ b/.config/alacritty/alacritty.yml.tty @@ -0,0 +1,337 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +#env: + #TERM: alacritty + +window: + #dimensions: + # columns: 0 + # lines: 0 + #position: + # x: 0 + # y: 0 + padding: + x: 5 + y: 5 + #dynamic_padding: true + decorations: full + #startup_mode: Windowed + #title: Alacritty + dynamic_title: true + #class: + #instance: Alacritty + #general: Alacritty + #gtk_theme_variant: None + opacity: 1 + +#scrolling: + #history: 10000 + #multiplier: 3 + +font: + normal: + family: Perfect DOS VGA 437 + style: Regular + bold: + style: Bold + italic: + style: Italic + bold_italic: + style: Bold Italic + size: 11 + offset: + x: 0 + y: 0 + #glyph_offset: + # x: 0 + # y: 0 + +draw_bold_text_with_bright_colors: false + +colors: + primary: + background: '0x000000' + foreground: '0xaaaaaa' + + normal: + black: '0x000000' + red: '0xaa0000' + green: '0x759438' + yellow: '0xde7e54' + blue: '0x3d67a2' + magenta: '0x7b5687' + cyan: '0x578c7c' + white: '0xaaaaaa' + + bright: + black: '0x555555' + red: '0xff5555' + green: '0x97bd5e' + yellow: '0xf0c767' + blue: '0x789ebf' + magenta: '0xa97fb3' + cyan: '0x82bfb3' + white: '0xffffff' + + selection: + text: CellBackground + background: CellForeground + + cursor: + text: CellBackground + background: CellForeground + +# Colors (Tomorrow Night) +#colors: + # Default colors + #primary: + # background: '#1d1f21' + # foreground: '#c5c8c6' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not present. + # If the bright foreground color is not set, or `draw_bold_text_with_bright_colors` + # is `false`, the normal foreground color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground 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. + # + # Allowed values are CellForeground and CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #search: + # matches: + # foreground: '#000000' + # background: '#ffffff' + # + # bar: + # background: CellForeground + # foreground: CellBackground + + # Normal colors + #normal: + # black: '#1d1f21' + # red: '#cc6666' + # green: '#b5bd68' + # yellow: '#f0c674' + # blue: '#81a2be' + # magenta: '#b294bb' + # cyan: '#8abeb7' + # white: '#c5c8c6' + + # Bright colors + #bright: + # black: '#666666' + # red: '#d54e53' + # green: '#b9ca4a' + # yellow: '#e7c547' + # blue: '#7aa6da' + # magenta: '#c397d8' + # cyan: '#70c0b1' + # white: '#eaeaea' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#131415' + # red: '#864343' + # green: '#777c44' + # yellow: '#9e824c' + # blue: '#556a7d' + # magenta: '#75617b' + # cyan: '#5b7d78' + # white: '#828482' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + +#bell: + #animation: EaseOutExpo + #duration: 50 + #color: '#000000' + #command: None + +#selection: + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + #save_to_clipboard: false + +# Allow terminal applications to change Alacritty's window title. +# dynamic_title: true + +#cursor: + #style: Block + #vi_mode_style: None + #unfocused_hollow: true + #thickness: 0.15 + +#live_config_reload: true + +#shell: +# program: /bin/bash +# args: +# - --login + +#working_directory: None + +#alt_send_esc: true + +hints: + #alphabet: "jfkdls;ahgurieowpq" + enabled: + - regex: "(magnet|mailto|gemini|gopher|https|http|news|file|git|ssh|ftp):\ + [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + command: xdg-open + post_processing: true + mouse: + enabled: true + mods: None + binding: + key: U + mods: Control|Shift + +#mouse: + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + #hide_when_typing: false + +key_bindings: + - { key: Return, mods: Control|Super, action: SpawnNewInstance } + #- { 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: 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: Add, mods: Control, action: IncreaseFontSize } + #- { key: Subtract, mods: Control, action: DecreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Add, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: K, mods: Command, action: ClearHistory } + #- { key: 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: + #render_timer: false + #persistent_logging: false + #log_level: Warn + #print_events: false diff --git a/.config/nvim/autoload/lightline/README.md b/.config/nvim/autoload/lightline/README.md new file mode 100644 index 0000000..2f15292 --- /dev/null +++ b/.config/nvim/autoload/lightline/README.md @@ -0,0 +1,6 @@ +Lightline colorschemes +====================== + +These are the color schemes for the Lightline plugin which sets the status +line. The light and dark one are pretty much the same except the `baseX` and +`base0X` colors are each swapped. diff --git a/.config/nvim/autoload/lightline/colorscheme/gruvbox.vim b/.config/nvim/autoload/lightline/colorscheme/gruvbox.vim new file mode 100644 index 0000000..4730c09 --- /dev/null +++ b/.config/nvim/autoload/lightline/colorscheme/gruvbox.vim @@ -0,0 +1,57 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox.vim +" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim) +" Author: gmoe +" Source: https://github.com/morhetz/gruvbox +" Last Modified: 20 Sep 2017 +" ----------------------------------------------------------------------------- + +function! s:getGruvColor(group) + let guiColor = synIDattr(hlID(a:group), "fg", "gui") + let termColor = synIDattr(hlID(a:group), "fg", "cterm") + return [ guiColor, termColor ] +endfunction + +if exists('g:lightline') + + let s:bg0 = s:getGruvColor('GruvboxBg0') + let s:bg1 = s:getGruvColor('GruvboxBg1') + let s:bg2 = s:getGruvColor('GruvboxBg2') + let s:bg4 = s:getGruvColor('GruvboxBg4') + let s:fg1 = s:getGruvColor('GruvboxFg1') + let s:fg4 = s:getGruvColor('GruvboxFg4') + + let s:yellow = s:getGruvColor('GruvboxYellow') + let s:blue = s:getGruvColor('GruvboxBlue') + let s:aqua = s:getGruvColor('GruvboxAqua') + let s:orange = s:getGruvColor('GruvboxOrange') + let s:green = s:getGruvColor('GruvboxGreen') + + let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}} + let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ] + let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ] + let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ] + let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ] + let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ] + let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ] + let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ] + let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ] + let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ] + let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ] + let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ] + let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ] + let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ] + let s:p.tabline.right = [ [ s:bg0, s:orange ] ] + let s:p.normal.error = [ [ s:bg0, s:orange ] ] + let s:p.normal.warning = [ [ s:bg2, s:yellow ] ] + + let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p) +endif diff --git a/.config/nvim/autoload/lightline/colorscheme/gruvbox_custom.vim b/.config/nvim/autoload/lightline/colorscheme/gruvbox_custom.vim new file mode 100644 index 0000000..da1f70d --- /dev/null +++ b/.config/nvim/autoload/lightline/colorscheme/gruvbox_custom.vim @@ -0,0 +1,55 @@ +" ----------------------------------------------------------------------------- +" File: gruvbox_custom.vim +" ----------------------------------------------------------------------------- + +function! s:getGruvColor(group) + let guiColor = synIDattr(hlID(a:group), "fg", "gui") + let termColor = synIDattr(hlID(a:group), "fg", "cterm") + return [ guiColor, termColor ] +endfunction + +if exists('g:lightline') + + let s:bg0 = s:getGruvColor('GruvboxBg0') + let s:bg1 = s:getGruvColor('GruvboxBg1') + let s:bg2 = s:getGruvColor('GruvboxBg2') + let s:bg4 = s:getGruvColor('GruvboxBg4') + let s:fg1 = s:getGruvColor('GruvboxFg1') + let s:fg2 = s:getGruvColor('GruvboxFg2') + let s:fg4 = s:getGruvColor('GruvboxFg4') + + let s:yellow = s:getGruvColor('GruvboxYellow') + let s:blue = s:getGruvColor('GruvboxBlue') + let s:aqua = s:getGruvColor('GruvboxAqua') + let s:orange = s:getGruvColor('GruvboxOrange') + let s:red = s:getGruvColor('GruvboxRed') + let s:green = s:getGruvColor('GruvboxGreen') + + let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}} + let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg2, s:bg2 ] ] + let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg2, s:bg2 ] ] + let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ] + let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ] + let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg2, s:bg2 ] ] + let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg2, s:bg2 ] ] + let s:p.insert.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg2, s:bg2 ] ] + let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg2, s:bg2 ] ] + let s:p.terminal.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg2, s:bg2 ] ] + let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg2, s:bg2 ] ] + let s:p.replace.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.visual.left = [ [ s:bg0, s:yellow, 'bold' ], [ s:bg0, s:bg4 ] ] + let s:p.visual.right = [ [ s:bg0, s:yellow ], [ s:bg0, s:bg4 ] ] + let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ] + let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ] + let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ] + let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ] + let s:p.tabline.right = [ [ s:bg0, s:orange ] ] + let s:p.normal.error = [ [ s:bg0, s:red ] ] + let s:p.normal.warning = [ [ s:bg2, s:orange ] ] + + let g:lightline#colorscheme#gruvbox_custom#palette = lightline#colorscheme#flatten(s:p) +endif diff --git a/.config/nvim/autoload/lightline/colorscheme/onedark.vim b/.config/nvim/autoload/lightline/colorscheme/onedark.vim new file mode 100644 index 0000000..72ae763 --- /dev/null +++ b/.config/nvim/autoload/lightline/colorscheme/onedark.vim @@ -0,0 +1,59 @@ +" [onedark.vim](https://github.com/joshdick/onedark.vim/) + +" This is a [lightline.vim](https://github.com/itchyny/lightline.vim) colorscheme for use with +" the [onedark.vim](https://github.com/joshdick/onedark.vim) colorscheme. + +let s:colors = onedark#GetColors() + +if get(g:, 'onedark_termcolors', 256) == 16 + let s:term_red = s:colors.red.cterm16 + let s:term_green = s:colors.green.cterm16 + let s:term_yellow = s:colors.yellow.cterm16 + let s:term_blue = s:colors.blue.cterm16 + let s:term_purple = s:colors.purple.cterm16 + let s:term_white = s:colors.white.cterm16 + let s:term_black = s:colors.black.cterm16 + let s:term_grey = s:colors.cursor_grey.cterm16 +else + let s:term_red = s:colors.red.cterm + let s:term_green = s:colors.green.cterm + let s:term_yellow = s:colors.yellow.cterm + let s:term_blue = s:colors.blue.cterm + let s:term_purple = s:colors.purple.cterm + let s:term_white = s:colors.white.cterm + let s:term_black = s:colors.black.cterm + let s:term_grey = s:colors.cursor_grey.cterm +endif + +let s:red = [ s:colors.red.gui, s:term_red ] +let s:green = [ s:colors.green.gui, s:term_green ] +let s:yellow = [ s:colors.yellow.gui, s:term_yellow ] +let s:blue = [ s:colors.blue.gui, s:term_blue ] +let s:purple = [ s:colors.purple.gui, s:term_purple ] +let s:white = [ s:colors.white.gui, s:term_white ] +let s:black = [ s:colors.black.gui, s:term_black ] +let s:grey = [ s:colors.visual_grey.gui, s:term_grey ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} +let s:p.normal.left = [ [ s:black, s:green ], [ s:white, s:grey ] ] +let s:p.normal.right = [ [ s:black, s:green ], [ s:white, s:grey ] ] +let s:p.inactive.left = [ [ s:white, s:grey ], [ s:white, s:grey ] ] +let s:p.inactive.right = [ [ s:black, s:white ], [ s:black, s:white ] ] +let s:p.insert.left = [ [ s:black, s:blue ], [ s:white, s:grey ] ] +let s:p.insert.right = [ [ s:black, s:blue ], [ s:white, s:grey ] ] +let s:p.replace.left = [ [ s:black, s:red ], [ s:white, s:grey ] ] +let s:p.replace.right = [ [ s:black, s:red ], [ s:white, s:grey ] ] +let s:p.visual.left = [ [ s:black, s:purple ], [ s:white, s:grey ] ] +let s:p.visual.right = [ [ s:black, s:purple ], [ s:white, s:grey ] ] +let s:p.normal.middle = [ [ s:white, s:black ] ] +let s:p.inactive.middle = [ [ s:white, s:grey ] ] +let s:p.tabline.left = [ [ s:white, s:grey ] ] +let s:p.tabline.tabsel = [ [ s:black, s:white ] ] +let s:p.tabline.middle = [ [ s:white, s:black ] ] +let s:p.tabline.right = [ [ s:white, s:grey ] ] +let s:p.normal.error = [ [ s:black, s:red ] ] +let s:p.normal.warning = [ [ s:black, s:yellow ] ] + +let g:lightline#colorscheme#onedark#palette = lightline#colorscheme#flatten(s:p) + + diff --git a/.config/nvim/autoload/lightline/colorscheme/termcolors.vim b/.config/nvim/autoload/lightline/colorscheme/termcolors.vim new file mode 100644 index 0000000..9c27643 --- /dev/null +++ b/.config/nvim/autoload/lightline/colorscheme/termcolors.vim @@ -0,0 +1,47 @@ +" ============================================================================= +" Filename: autoload/lightline/colorscheme/termcolors.vim +" ============================================================================= + +let s:mono0 = [ '#14171d', 236 ] +let s:mono1 = [ '#4d4754', 238 ] +let s:mono2 = [ '#ada0a8', 243 ] +let s:mono3 = [ '#c7c6c3', 255 ] + +let s:yellow = [ '#f0c767', 180 ] +let s:red = [ '#cc5c5c', 168 ] +let s:magenta = [ '#a97fb3', 176 ] +let s:blue = [ '#789ebf', 75 ] +let s:cyan = [ '#82bfb3', 73 ] +let s:green = [ '#97bd5e', 114 ] + +let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} + +let s:p.normal.left = [ [ s:mono0, s:green ], [ s:mono3, s:mono2 ] ] +let s:p.normal.middle = [ [ s:green, s:mono1 ] ] +let s:p.normal.right = [ [ s:mono0, s:green ], [ s:mono3, s:mono2 ] ] + +let s:p.normal.error = [ [ s:mono0, s:red ] ] +let s:p.normal.warning = [ [ s:mono0, s:yellow ] ] + +let s:p.inactive.left = [ [ s:mono3, s:mono2 ], [ s:mono3, s:mono2 ] ] +let s:p.inactive.middle = [ [ s:mono3, s:mono1 ] ] +let s:p.inactive.right = [ [ s:mono0, s:mono3 ], [ s:mono3, s:mono2 ] ] + +let s:p.insert.left = [ [ s:mono0, s:blue ], [ s:mono3, s:mono2 ] ] +let s:p.insert.middle = [ [ s:blue, s:mono1 ] ] +let s:p.insert.right = [ [ s:mono0, s:blue ], [ s:mono3, s:mono2 ] ] + +let s:p.replace.left = [ [ s:mono0, s:red ], [ s:mono3, s:mono2 ] ] +let s:p.replace.middle = [ [ s:red, s:mono1 ] ] +let s:p.replace.right = [ [ s:mono0, s:red ], [ s:mono3, s:mono2 ] ] + +let s:p.visual.left = [ [ s:mono0, s:yellow ], [ s:mono3, s:mono2 ] ] +let s:p.visual.middle = [ [ s:yellow, s:mono1 ] ] +let s:p.visual.right = [ [ s:mono0, s:yellow ], [ s:mono3, s:mono2 ] ] + +let s:p.tabline.left = [ [ s:mono2, s:mono1] ] +let s:p.tabline.tabsel = [ [ s:mono3, s:mono2 ] ] +let s:p.tabline.middle = [ [ s:mono2, s:mono1] ] +let s:p.tabline.right = [ [ s:mono0, s:mono3 ] ] + +let g:lightline#colorscheme#termcolors#palette = lightline#colorscheme#flatten(s:p) diff --git a/.config/nvim/autoload/pathogen.vim b/.config/nvim/autoload/pathogen.vim new file mode 100644 index 0000000..3582fbf --- /dev/null +++ b/.config/nvim/autoload/pathogen.vim @@ -0,0 +1,264 @@ +" pathogen.vim - path option manipulation +" Maintainer: Tim Pope +" Version: 2.4 + +" Install in ~/.vim/autoload (or ~\vimfiles\autoload). +" +" For management of individually installed plugins in ~/.vim/bundle (or +" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. +" +" The API is documented inline below. + +if exists("g:loaded_pathogen") || &cp + finish +endif +let g:loaded_pathogen = 1 + +" Point of entry for basic default usage. Give a relative path to invoke +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. +function! pathogen#infect(...) abort + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' + call pathogen#surround(path) + else + call pathogen#interpose(path) + endif + endfor + call pathogen#cycle_filetype() + if pathogen#is_disabled($MYVIMRC) + return 'finish' + endif + return '' +endfunction + +" Split a path into a list. +function! pathogen#split(path) abort + if type(a:path) == type([]) | return a:path | endif + if empty(a:path) | return [] | endif + let split = split(a:path,'\\\@]','\\&','') + endif +endfunction + +" Like findfile(), but hardcoded to use the runtimepath. +function! pathogen#runtime_findfile(file,count) abort + let rtp = pathogen#join(1,pathogen#split(&rtp)) + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif +endfunction + +" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': diff --git a/.config/nvim/bundle/LanguageClient-neovim b/.config/nvim/bundle/LanguageClient-neovim new file mode 160000 index 0000000..cf6dd11 --- /dev/null +++ b/.config/nvim/bundle/LanguageClient-neovim @@ -0,0 +1 @@ +Subproject commit cf6dd11baf62fb6ce18308e96c0ab43428b7c686 diff --git a/.config/nvim/bundle/Vundle.vim b/.config/nvim/bundle/Vundle.vim new file mode 160000 index 0000000..b255382 --- /dev/null +++ b/.config/nvim/bundle/Vundle.vim @@ -0,0 +1 @@ +Subproject commit b255382d6242d7ea3877bf059d2934125e0c4d95 diff --git a/.config/nvim/bundle/haskell-vim b/.config/nvim/bundle/haskell-vim new file mode 160000 index 0000000..f35d022 --- /dev/null +++ b/.config/nvim/bundle/haskell-vim @@ -0,0 +1 @@ +Subproject commit f35d02204b4813d1dbe8b0e98cc39701a4b8e15e diff --git a/.config/nvim/bundle/hexHighlight b/.config/nvim/bundle/hexHighlight new file mode 160000 index 0000000..c7abd78 --- /dev/null +++ b/.config/nvim/bundle/hexHighlight @@ -0,0 +1 @@ +Subproject commit c7abd7827f41056b134002eea986518d90215a67 diff --git a/.config/nvim/bundle/lightline.vim b/.config/nvim/bundle/lightline.vim new file mode 160000 index 0000000..b1e91b4 --- /dev/null +++ b/.config/nvim/bundle/lightline.vim @@ -0,0 +1 @@ +Subproject commit b1e91b41f5028d65fa3d31a425ff21591d5d957f diff --git a/.config/nvim/bundle/nerdtree b/.config/nvim/bundle/nerdtree new file mode 160000 index 0000000..fc85a6f --- /dev/null +++ b/.config/nvim/bundle/nerdtree @@ -0,0 +1 @@ +Subproject commit fc85a6f07c2cd694be93496ffad75be126240068 diff --git a/.config/nvim/bundle/python-syntax b/.config/nvim/bundle/python-syntax new file mode 160000 index 0000000..2cc00ba --- /dev/null +++ b/.config/nvim/bundle/python-syntax @@ -0,0 +1 @@ +Subproject commit 2cc00ba72929ea5f9456a26782db57fb4cc56a65 diff --git a/.config/nvim/bundle/tabular b/.config/nvim/bundle/tabular new file mode 160000 index 0000000..339091a --- /dev/null +++ b/.config/nvim/bundle/tabular @@ -0,0 +1 @@ +Subproject commit 339091ac4dd1f17e225fe7d57b48aff55f99b23a diff --git a/.config/nvim/bundle/vim-box-draw b/.config/nvim/bundle/vim-box-draw new file mode 160000 index 0000000..0afd434 --- /dev/null +++ b/.config/nvim/bundle/vim-box-draw @@ -0,0 +1 @@ +Subproject commit 0afd43425bc54a13ef59c0ac902c48a4eae399c2 diff --git a/.config/nvim/bundle/vim-closetag b/.config/nvim/bundle/vim-closetag new file mode 160000 index 0000000..d0a562f --- /dev/null +++ b/.config/nvim/bundle/vim-closetag @@ -0,0 +1 @@ +Subproject commit d0a562f8bdb107a50595aefe53b1a690460c3822 diff --git a/.config/nvim/bundle/vim-glsl b/.config/nvim/bundle/vim-glsl new file mode 160000 index 0000000..bfd330a --- /dev/null +++ b/.config/nvim/bundle/vim-glsl @@ -0,0 +1 @@ +Subproject commit bfd330a271933c3372fcfa8ce052970746c8e9dd diff --git a/.config/nvim/bundle/vim-markdown b/.config/nvim/bundle/vim-markdown new file mode 160000 index 0000000..5d3d1b6 --- /dev/null +++ b/.config/nvim/bundle/vim-markdown @@ -0,0 +1 @@ +Subproject commit 5d3d1b6cbdc4be0b4c6105c1ab1f769d76d3c68f diff --git a/.config/nvim/bundle/vim-opencl b/.config/nvim/bundle/vim-opencl new file mode 160000 index 0000000..7668b01 --- /dev/null +++ b/.config/nvim/bundle/vim-opencl @@ -0,0 +1 @@ +Subproject commit 7668b018fe9461c6b51e0b736ed84aa84d6bafce diff --git a/.config/nvim/bundle/vim-sensible b/.config/nvim/bundle/vim-sensible new file mode 160000 index 0000000..a7eea09 --- /dev/null +++ b/.config/nvim/bundle/vim-sensible @@ -0,0 +1 @@ +Subproject commit a7eea09ba654a371a90ca77186bf10930b897e80 diff --git a/.config/nvim/bundle/vim-table-mode b/.config/nvim/bundle/vim-table-mode new file mode 160000 index 0000000..9555a3e --- /dev/null +++ b/.config/nvim/bundle/vim-table-mode @@ -0,0 +1 @@ +Subproject commit 9555a3e6e5bcf285ec181b7fc983eea90500feb4 diff --git a/.config/nvim/bundle/vim-toml b/.config/nvim/bundle/vim-toml new file mode 160000 index 0000000..d36caa6 --- /dev/null +++ b/.config/nvim/bundle/vim-toml @@ -0,0 +1 @@ +Subproject commit d36caa6b1cf508a4df1c691f915572fc02143258 diff --git a/.config/nvim/bundle/vimwiki b/.config/nvim/bundle/vimwiki new file mode 160000 index 0000000..63af6e7 --- /dev/null +++ b/.config/nvim/bundle/vimwiki @@ -0,0 +1 @@ +Subproject commit 63af6e72dd3fa840bffb3ebcb8c96970c02e0913 diff --git a/.config/nvim/colors/termcolors.vim b/.config/nvim/colors/termcolors.vim new file mode 100644 index 0000000..ee8a52e --- /dev/null +++ b/.config/nvim/colors/termcolors.vim @@ -0,0 +1,218 @@ +" ============================================================================== +" Name: Termcolors +" +" Based on OneHalf +" ============================================================================== + +set background=dark +highlight clear +syntax reset + +let g:colors_name="termcolors" +let colors_name="termcolors" + + +let s:red = { "gui": "#cc5c5c", "cterm": "167" } +let s:green = { "gui": "#97bd5e", "cterm": "107" } +let s:yellow = { "gui": "#f0c767", "cterm": "222" } +let s:blue = { "gui": "#789ebf", "cterm": "110" } +let s:purple = { "gui": "#a97fb3", "cterm": "139" } +let s:cyan = { "gui": "#82bfb3", "cterm": "109" } +let s:black = { "gui": "0", "cterm": "0" } +let s:darkgray = { "gui": "#2c2b3b", "cterm": "236" } +let s:gray = { "gui": "#4d4754", "cterm": "239" } +let s:lightgray = { "gui": "#ada0a8", "cterm": "248" } +let s:white = { "gui": "#c7c6c3", "cterm": "251" } + +let s:fg = s:white +let s:bg = s:black + +let s:comment_fg = s:gray +let s:gutter_bg = s:darkgray +let s:gutter_fg = s:lightgray + +let s:cursor_line = s:lightgray +let s:color_col = s:lightgray + +let s:selection = s:lightgray +let s:vertsplit = s:lightgray + + +function! s:h(group, fg, bg, attr) + if type(a:fg) == type({}) + exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . a:fg.cterm + else + exec "hi " . a:group . " guifg=NONE cterm=NONE" + endif + if type(a:bg) == type({}) + exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . a:bg.cterm + else + exec "hi " . a:group . " guibg=NONE ctermbg=NONE" + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + else + exec "hi " . a:group . " gui=NONE cterm=NONE" + endif +endfun + + +" User interface colors { +call s:h("Normal", s:fg, s:bg, "") +call s:h("NonText", s:fg, "", "") + +call s:h("Cursor", s:bg, s:blue, "") +call s:h("CursorColumn", "", s:cursor_line, "") +call s:h("CursorLine", "", s:cursor_line, "") + +call s:h("LineNr", s:gutter_fg, s:gutter_bg, "") +call s:h("CursorLineNr", s:fg, "", "") + +call s:h("DiffAdd", s:green, "", "") +call s:h("DiffChange", s:yellow, "", "") +call s:h("DiffDelete", s:red, "", "") +call s:h("DiffText", s:blue, "", "") + +call s:h("IncSearch", s:bg, s:yellow, "") +call s:h("Search", s:bg, s:yellow, "") + +call s:h("ErrorMsg", s:fg, "", "") +call s:h("ModeMsg", s:fg, "", "") +call s:h("MoreMsg", s:fg, "", "") +call s:h("WarningMsg", s:red, "", "") +call s:h("Question", s:purple, "", "") + +call s:h("Pmenu", s:bg, s:fg, "") +call s:h("PmenuSel", s:fg, s:blue, "") +call s:h("PmenuSbar", "", s:selection, "") +call s:h("PmenuThumb", "", s:fg, "") + +call s:h("SpellBad", s:red, "", "") +call s:h("SpellCap", s:yellow, "", "") +call s:h("SpellLocal", s:yellow, "", "") +call s:h("SpellRare", s:yellow, "", "") + +call s:h("StatusLine", s:blue, s:cursor_line, "") +call s:h("StatusLineNC", s:comment_fg, s:cursor_line, "") +call s:h("TabLine", s:comment_fg, s:cursor_line, "") +call s:h("TabLineFill", s:comment_fg, s:cursor_line, "") +call s:h("TabLineSel", s:fg, s:bg, "") + +call s:h("Visual", "", s:selection, "") +call s:h("VisualNOS", "", s:selection, "") + +call s:h("ColorColumn", "", s:color_col, "") +call s:h("Conceal", s:fg, "", "") +call s:h("Directory", s:blue, "", "") +call s:h("VertSplit", s:vertsplit, s:vertsplit, "") +call s:h("Folded", s:fg, "", "") +call s:h("FoldColumn", s:fg, "", "") +call s:h("SignColumn", s:fg, "", "") + +call s:h("MatchParen", s:blue, "", "underline") +call s:h("SpecialKey", s:fg, "", "") +call s:h("Title", s:green, "", "") +call s:h("WildMenu", s:fg, "", "") +" } + + +" Syntax colors { +call s:h("Comment", s:comment_fg, "", "italic") +call s:h("Constant", s:cyan, "", "") +call s:h("String", s:green, "", "") +call s:h("Character", s:green, "", "") +call s:h("Number", s:yellow, "", "") +call s:h("Boolean", s:yellow, "", "") +call s:h("Float", s:yellow, "", "") + +call s:h("Identifier", s:red, "", "italic") +call s:h("Function", s:blue, "", "") +call s:h("Statement", s:purple, "", "") + +call s:h("Conditional", s:purple, "", "") +call s:h("Repeat", s:purple, "", "") +call s:h("Label", s:purple, "", "") +call s:h("Operator", s:fg, "", "") +call s:h("Keyword", s:red, "", "") +call s:h("Exception", s:purple, "", "") + +call s:h("PreProc", s:yellow, "", "") +call s:h("Include", s:blue, "", "") +call s:h("Define", s:purple, "", "") +call s:h("Macro", s:purple, "", "") +call s:h("PreCondit", s:yellow, "", "") + +call s:h("Type", s:yellow, "", "") +call s:h("StorageClass", s:yellow, "", "") +call s:h("Structure", s:yellow, "", "") +call s:h("Typedef", s:yellow, "", "") + +call s:h("Special", s:yellow, "", "") +call s:h("SpecialChar", s:fg, "", "") +call s:h("Tag", s:fg, "", "") +call s:h("Delimiter", s:fg, "", "") +call s:h("SpecialComment", s:fg, "", "italic") +call s:h("Debug", s:fg, "", "") +call s:h("Underlined", s:fg, "", "underline") +call s:h("Ignore", s:lightgray, "", "") +call s:h("Error", s:red, s:gutter_bg, "") +call s:h("Todo", s:purple, "", "") +" } + + +" Plugins { +" GitGutter +call s:h("GitGutterAdd", s:green, s:gutter_bg, "") +call s:h("GitGutterDelete", s:red, s:gutter_bg, "") +call s:h("GitGutterChange", s:yellow, s:gutter_bg, "") +call s:h("GitGutterChangeDelete", s:red, s:gutter_bg, "") +" Fugitive +call s:h("diffAdded", s:green, "", "") +call s:h("diffRemoved", s:red, "", "") +" } + + +" Git { +call s:h("gitcommitComment", s:comment_fg, "", "") +call s:h("gitcommitUnmerged", s:red, "", "") +call s:h("gitcommitOnBranch", s:fg, "", "") +call s:h("gitcommitBranch", s:purple, "", "") +call s:h("gitcommitDiscardedType", s:red, "", "") +call s:h("gitcommitSelectedType", s:green, "", "") +call s:h("gitcommitHeader", s:fg, "", "") +call s:h("gitcommitUntrackedFile", s:cyan, "", "") +call s:h("gitcommitDiscardedFile", s:red, "", "") +call s:h("gitcommitSelectedFile", s:green, "", "") +call s:h("gitcommitUnmergedFile", s:yellow, "", "") +call s:h("gitcommitFile", s:fg, "", "") +hi link gitcommitNoBranch gitcommitBranch +hi link gitcommitUntracked gitcommitComment +hi link gitcommitDiscarded gitcommitComment +hi link gitcommitSelected gitcommitComment +hi link gitcommitDiscardedArrow gitcommitDiscardedFile +hi link gitcommitSelectedArrow gitcommitSelectedFile +hi link gitcommitUnmergedArrow gitcommitUnmergedFile +" } + +" Fix colors in neovim terminal buffers { + if has('nvim') + let g:terminal_color_0 = s:black.gui + let g:terminal_color_1 = s:red.gui + let g:terminal_color_2 = s:green.gui + let g:terminal_color_3 = s:yellow.gui + let g:terminal_color_4 = s:blue.gui + let g:terminal_color_5 = s:purple.gui + let g:terminal_color_6 = s:cyan.gui + let g:terminal_color_7 = s:white.gui + let g:terminal_color_8 = s:black.gui + let g:terminal_color_9 = s:red.gui + let g:terminal_color_10 = s:green.gui + let g:terminal_color_11 = s:yellow.gui + let g:terminal_color_12 = s:blue.gui + let g:terminal_color_13 = s:purple.gui + let g:terminal_color_14 = s:cyan.gui + let g:terminal_color_15 = s:white.gui + let g:terminal_color_background = s:bg.gui + let g:terminal_color_foreground = s:fg.gui + endif +" } diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100755 index 0000000..1ff637d --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,112 @@ +let mapleader ="," + +set nocompatible +filetype off + +execute pathogen#infect() + +set rtp+=~/.config/nvim/bundle/Vundle.vim +call vundle#begin() +Plugin 'VundleVim/Vundle.vim' + +let $NVIM_TUI_ENABLE_TRUE_COLOR=1 +let &t_8f = "\[38:2:%lu:%lu:%lum" +let &t_8b = "\[48:2:%lu:%lu:%lum" +set termguicolors + +colo termcolors + +let g:python_highlight_all = 1 + + +syntax on +filetype plugin indent on +autocmd BufNewFile,BufRead,BufWritePost *.zsh-theme set syntax=zsh +autocmd BufNewFile,BufRead,BufWritePost *.lalrpop set syntax=rust +autocmd BufNewFile,BufRead,BufWritePost *.cxpr set syntax=complexpr + +nnoremap B :call box#Draw() + +" settings +set autoindent +set hlsearch +set tabstop=4 +set shiftwidth=0 +set expandtab +set number relativenumber +set encoding=utf-8 +set nofoldenable +set laststatus=2 +set noshowmode +set modeline +set mouse=a + +let g:lightline = { + \ 'colorscheme': 'termcolors', + \ } + +let g:LanguageClient_serverCommands = { + \ 'rust': ['rust-analyzer'], + \ } + +" Custom bindings for system copy-paste +nmap "+yy +nmap "+cc +nmap "+p +vmap "+y +vmap "+c +vmap "+p + +" Switching tabs +nmap :tabedit +nmap 1gt +nmap 2gt +nmap 3gt +nmap 4gt +nmap 5gt +nmap 6gt +nmap 7gt +nmap 8gt +nmap 9gt +nmap 10gt +nmap H gT +nmap L gt + +" Split navigation +set splitbelow +set splitright +nmap h +nmap j +nmap k +nmap l + +" hexHighlight plugin +nmap h ToggleHexHighlight +nmap H ToggleSchemeHighlight + +" Remove arrow key functionality +noremap +noremap +noremap +noremap +inoremap +inoremap +inoremap +inoremap + +" remove ex mode shortcut +map Q + +" Run file from shell +nnoremap r :w:!%:p + +" Map to stop highlighting matches +map :noh + +" VimWiki bindings +map t :VimwikiTabnewLink +map s :VimwikiSplitLink + +" resize automatically +autocmd VimEnter * :silent exec "!kill -s SIGWINCH $PPID" + diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..915138d --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,178 @@ +# +# Copy this to ~/.config/sway/config and edit it to your liking. +# +# Read `man 5 sway` for a complete reference. + +set $mod Mod4 + +set $left h +set $down j +set $up k +set $right l + +set $term alacritty +set $browser librewolf +# Note: pass the final command to swaymsg so that the resulting window can be opened +set $menu wofi -S run | xargs swaymsg exec -- + +exec --no-startup-id ydotoold +exec --no-startup-id dunst -b +exec --no-startup-id rand-wallpaper +exec --no-startup-id webcord.sh +exec --no-startup-id autotiling +exec --no-startup-id nm-applet --indicator +exec --no-startup-id mqtt_notify.lua >/tmp/mqtt_notify.log +exec --no-startup-id element-desktop +exec --no-startup-id "sleep 1; nextcloud" + +assign [class="Element"] workspace number 8 +assign [app_id="WebCord"] workspace number 9 + +workspace 1 output DP-1 +workspace 9 output eDP-1 + +for_window [app_id="scratch_term"] move scratchpad, resize set 960 640 +for_window [app_id="scratch_calc"] move scratchpad, resize set 960 640 +for_window [app_id="scratch_cmus"] move scratchpad, resize set 960 640 +for_window [app_id="scratch_htop"] move scratchpad, resize set 960 640 + +# gnome time +set $gnome-schema org.gnome.desktop.interface +exec_always { + gsettings set $gnome-schema gtk-theme 'Adwaita-dark' + gsettings set $gnome-schema icon-theme 'Adwaita' + gsettings set $gnome-schema font-name 'Cantarell 11' + gsettings set org.gnome.desktop.default-applications.terminal exec $term +} + +# swaymsg -t get_outputs +output eDP-1 resolution 3840x2400 position 2133,0 +output DP-1 resolution 2560x1440 position 0,0 scale 1.2 +#output eDP-1 resolution 3840x2400 position 1920,0 +#output DP-1 resolution 1920x1080 position 0,0 + +input "type:keyboard" { + xkb_layout us + xkb_options compose:menu,caps:escape +} + +# Idle configuration +exec swayidle -w \ + timeout 300 'swaylock -f -c 14171d' \ + timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 14171d' + +floating_modifier $mod normal +gaps inner 16 +default_border pixel 2 +default_floating_border pixel 2 + +# Key bindings +bindsym $mod+Shift+Escape exit +bindsym Print exec screenshot +bindsym Shift+Print exec slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy +bindsym $mod+Return exec $term +bindsym $mod+space focus mode_toggle + +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- +bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous +bindsym XF86Search exec $menu + +bindsym $mod+F5 reload +bindsym $mod+F2 exec mpv ~/videos/soviet.webm + +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 +bindsym $mod+Shift+1 move container to workspace number 1 +bindsym $mod+Shift+2 move container to workspace number 2 +bindsym $mod+Shift+3 move container to workspace number 3 +bindsym $mod+Shift+4 move container to workspace number 4 +bindsym $mod+Shift+5 move container to workspace number 5 +bindsym $mod+Shift+6 move container to workspace number 6 +bindsym $mod+Shift+7 move container to workspace number 7 +bindsym $mod+Shift+8 move container to workspace number 8 +bindsym $mod+Shift+9 move container to workspace number 9 + +# Kill focused window +bindsym $mod+q kill +bindsym $mod+Shift+q exec xkill + +bindsym $mod+w exec $browser + +bindsym $mod+e move workspace to output left +bindsym $mod+r move workspace to output right +bindsym $mod+t floating toggle + +bindsym $mod+y exec ~/.config/sway/scratchpads.sh scratch_term zsh +bindsym $mod+u exec dmenu_specialchars +bindsym $mod+Shift+u exec dmenu_unicode +bindsym $mod+i exec ~/.config/sway/scratchpads.sh scratch_calc ~/.cargo/bin/complexpr +bindsym $mod+o exec ~/.config/sway/scratchpads.sh scratch_cmus cmus +bindsym $mod+p exec ~/.config/sway/scratchpads.sh scratch_htop htop + +# Move focus to the parent container +bindsym $mod+a focus parent +bindsym $mod+s exec prismlauncher + +# Start your launcher +bindsym $mod+d exec $menu +bindsym $mod+Shift+d exec dmenu_editconfig +bindsym $mod+f fullscreen +bindsym $mod+g exec vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland + +bindsym $mod+h focus left +bindsym $mod+Shift+h move left +bindsym $mod+Ctrl+h resize shrink width 10px + +bindsym $mod+j focus down +bindsym $mod+Shift+j move down +bindsym $mod+Ctrl+j resize grow height 10px + +bindsym $mod+k focus up +bindsym $mod+Shift+k move up +bindsym $mod+Ctrl+k resize shrink height 10px + +bindsym $mod+l focus right +bindsym $mod+Shift+l move right +bindsym $mod+Ctrl+l resize grow width 10px + +bindsym $mod+c exec dmenu_kblayout +bindsym $mod+b splith +bindsym $mod+v splitv + +bindsym $mod+n exec pkill -USR1 gammastep || gammastep -O 4000 +bindsym $mod+Shift+n exec pkill -USR1 gammastep || gammastep -O 2500 + +bindgesture swipe:right workspace next +bindgesture swipe:left workspace prev + + +# class border backgr. text indicator child_border +client.focused #4d4754 #14171d #ffffff #ada0a8 #4d4754 +client.focused_inactive #14171d #14171d #ffffff #4d4754 #14171d +client.unfocused #14171d #14171d #ffffff #4d4754 #14171d +client.urgent #a63a3a #a63a3a #ffffff #cc5c5c #a63a3a +client.placeholder #14171d #14171d #ffffff #14171d #14171d + +client.background #14171d + +# Status Bar: +bar { + swaybar_command waybar +} + +include /etc/sway/config.d/* diff --git a/.config/sway/scratchpads.sh b/.config/sway/scratchpads.sh new file mode 100755 index 0000000..bb8e361 --- /dev/null +++ b/.config/sway/scratchpads.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +( swaymsg -t get_tree | /bin/grep '"app_id": "'$1'"' ) || ( ( $TERMINAL --class=$1 -e $2 & ) && sleep 0.2 ) +swaymsg "[app_id=\"$1\"]" scratchpad show diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..dd0fbff --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,64 @@ +{ + "height": 24, + "spacing": 4, + "modules-left": [ + "sway/workspaces", + "sway/window" + ], + "modules-center": [], + "modules-right": [ + "custom/cmus", + "custom/newsboat", + "cpu", + "memory", + "temperature", + "battery", + "clock", + "tray" + ], + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "tray": { + "spacing": 10 + }, + "clock": { + "format": "{:%Y-%m-%d %a %H:%M}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "format": " {}%", + "tooltip": false + }, + "temperature": { + "thermal-zone": 10, + "critical-threshold": 80, + "format": " {temperatureC}°" + }, + "battery": { + "states": { + "warning": 30, + "critical": 15 + }, + "format": " {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-full": " {capacity}%", + "format-warning": " {capacity}%", + "format-critical": " {capacity}%" + }, + "custom/cmus": { + "return-type": "json", + "exec": "$HOME/.config/waybar/custom_cmus.lua 2> /dev/null" + }, + "custom/newsboat": { + "format": " {}", + "exec": "$HOME/.config/waybar/custom_newsboat.sh 2> /dev/null", + "on-click": "alacritty -e newsboat -r" + } +} diff --git a/.config/waybar/custom_cmus.lua b/.config/waybar/custom_cmus.lua new file mode 100755 index 0000000..d03eb9c --- /dev/null +++ b/.config/waybar/custom_cmus.lua @@ -0,0 +1,58 @@ +#!/usr/bin/lua + +json = require("dkjson") +posix = require("posix") + +function htmlescape(s) + s = string.gsub(s, "&", "&") + s = string.gsub(s, "<", "<") + s = string.gsub(s, ">", ">") + return s +end + +function timefmt(n) + local s = n % 60 + local m = math.floor(n / 60) + return string.format("%d:%02d", m, s) +end + +function output(text, tooltip) + text = htmlescape(text) + tooltip = htmlescape(tooltip) + print(json.encode{text=text, tooltip=tooltip, class="custom-cmus"}) +end + +function getstat(status, name) + for _, line in ipairs(status) do + if string.match(line, "^" .. name) then + return string.sub(line, string.len(name)+2) + end + end +end + +while true do + local pipe = io.popen("cmus-remote -Q") + local status = {} + for line in pipe:lines() do + table.insert(status, line) + end + local success = pipe:close() + if not success then + output(" Not running", "Not running") + elseif getstat(status, "status") == "stopped" then + output(" Not running", "Not running") + else + local playing = getstat(status, "status") + local symbol = ({playing="", paused=""})[playing] + local title = getstat(status, "tag title") + local artist = getstat(status, "tag artist") + local duration = getstat(status, "duration") + local position = getstat(status, "position") + local text = string.format("%s %s (%s)", symbol, title, timefmt(position)) + local tooltip = string.format("%s - %s (%s / %s)", + artist, title, timefmt(position), timefmt(duration) + ) + output(text, tooltip) + end + posix.sleep(1) +end diff --git a/.config/waybar/custom_newsboat.sh b/.config/waybar/custom_newsboat.sh new file mode 100755 index 0000000..1ac8428 --- /dev/null +++ b/.config/waybar/custom_newsboat.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +while :; do + until newsboat -x reload >/dev/null; do + sleep 1; + done + until unread="$(newsboat -x print-unread)"; do + sleep 1; + done + echo "$unread" | awk '{ print $1 }' + sleep 300 +done diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..efdd4bc --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,117 @@ +* { + font-family: "Fira Mono", "Font Awesome 6 Pro", monospace; + font-size: 13.5px; + transition: none; +} + +#waybar { + background-color: rgba(20, 23, 29, 0.85); + color: #c7c6c3; +} + +button { + border: none; + border-radius: 0; +} + +#workspaces button { + padding: 0 5px; + color: #c7c6c3; + background-color: rgba(0, 0, 0, 0); +} + +#workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; +} + +#workspaces button.focused { + background-color: #789ebf; + color: #14171d; + box-shadow: inherit; + text-shadow: inherit; +} + +#workspaces button.urgent { + background-color: #cc5c5c; + box-shadow: inherit; + text-shadow: inherit; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#custom-cmus, +#custom-newsboat, +#mpd { + padding: 0 10px; + border-right: 1px solid #4d4754; + color: #c7c6c3; +} + +#tray { + border: none; +} + +#window { + padding: 0 10px; + border-left: 1px solid #4d4754; + color: #c7c6c3; +} + +#window, +#workspaces { + margin: 0 4px; +} + + +#battery { + color: #97bd5e; +} + +#battery.warning:not(.charging) { + color: #f0c767; +} + +#battery.critical:not(.charging) { + color: #cc5c5c; +} + +#cpu { + color: #789ebf; +} + +#memory { + color: #a97fb3; +} + +#temperature { + color: #97bd5e; +} + +#temperature.critical { + color: #cc5c5c; +} + +#custom-newsboat { + color: #de7e54; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; +}