From 2564138cff1d0f51c147928ba83741cb10ad07ea Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Tue, 15 Feb 2022 14:07:11 -0700 Subject: [PATCH] initial commit --- README.md | 1 + common/.XCompose | 96 ++ common/.eslintignore | 14 + common/.eslintrc.js | 30 + common/.prettierrc | 5 + common/.zshrc | 136 +++ common/alacritty/alacritty.yml | 865 ++++++++++++++++++ common/glualint.json | 26 + common/nvim/init.vim | 310 +++++++ linux/.Xresources | 32 + linux/.config/bspwm/bspwmrc | 23 + linux/.config/polybar/config | 160 ++++ .../polybar/scripts/binaryclock-polybar.sh | 46 + linux/.config/polybar/scripts/cmus-polybar.sh | 47 + linux/.config/polybar/scripts/polywins.sh | 242 +++++ linux/.config/rofi/amora.rasi | 66 ++ linux/.config/rofi/config.rasi | 148 +++ linux/.config/sxhkd/sxhkdrc | 108 +++ linux/.local/bin/binaryclock.sh | 18 + linux/.local/bin/polybar.sh | 7 + windows/bug.n/Config.ini | 262 ++++++ windows/fonts/SijiNGWindows-1.ttf | Bin 0 -> 59364 bytes 22 files changed, 2642 insertions(+) create mode 100644 README.md create mode 100644 common/.XCompose create mode 100644 common/.eslintignore create mode 100644 common/.eslintrc.js create mode 100644 common/.prettierrc create mode 100644 common/.zshrc create mode 100644 common/alacritty/alacritty.yml create mode 100644 common/glualint.json create mode 100644 common/nvim/init.vim create mode 100644 linux/.Xresources create mode 100644 linux/.config/bspwm/bspwmrc create mode 100644 linux/.config/polybar/config create mode 100644 linux/.config/polybar/scripts/binaryclock-polybar.sh create mode 100644 linux/.config/polybar/scripts/cmus-polybar.sh create mode 100644 linux/.config/polybar/scripts/polywins.sh create mode 100644 linux/.config/rofi/amora.rasi create mode 100644 linux/.config/rofi/config.rasi create mode 100644 linux/.config/sxhkd/sxhkdrc create mode 100644 linux/.local/bin/binaryclock.sh create mode 100644 linux/.local/bin/polybar.sh create mode 100644 windows/bug.n/Config.ini create mode 100644 windows/fonts/SijiNGWindows-1.ttf diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d1ec33 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# dotfiles but public \ No newline at end of file diff --git a/common/.XCompose b/common/.XCompose new file mode 100644 index 0000000..de582c2 --- /dev/null +++ b/common/.XCompose @@ -0,0 +1,96 @@ + + <^> <^> : "🥕" +

: "​" + < > < > < > : "​" + <3> <3> : "Ɛ" + : "ඞ" + <^> <^> : "( ^•ω•^)" + +#### + +# chine + <1> : "政府在追我" + <2> : "所有的希望都破灭了" + <3> : "我的灵魂没了" + <4> : "这些坚果" + <5> : "我的生命即将结束" + <6> : "动态网自由门 天安門 天安门 法輪功 李洪志 Free Tibet 六四天安門事件 The Tiananmen Square protests of 1989 天安門大屠殺 The Tiananmen Square Massacre 反右派鬥爭 The Anti-Rightist Struggle 大躍進政策 The Great Leap Forward 文化大革命 The Great Proletarian Cultural Revolution 人權 Human Rights 民運 Democratization 自由 Freedom 獨立 Independence 多黨制 Multi-party system 台灣 臺灣 Taiwan Formosa 中華民國 Republic of China 西藏 土伯特 唐古特 Tibet 達賴喇嘛 Dalai Lama 法輪功 Falun Dafa 新疆維吾爾自治區 The Xinjiang Uyghur Autonomous Region 諾貝爾和平獎 Nobel Peace Prize 劉暁波 Liu Xiaobo 民主 言論 思想 反共 反革命 抗議 運動 騷亂 暴亂 騷擾 擾亂 抗暴 平反 維權 示威游行 李洪志 法輪大法 大法弟子 強制斷種 強制堕胎 民族淨化 人體實驗 肅清 胡耀邦 趙紫陽 魏京生 王丹 還政於民 和平演變 激流中國 北京之春 大紀元時報 九評論共産黨 獨裁 專制 壓制 統一 監視 鎮壓 迫害 侵略 掠奪 破壞 拷問 屠殺 活摘器官 誘拐 買賣人口 遊進 走私 毒品 賣淫 春畫 賭博 六合彩 天安門 天安门 法輪功 李洪志 Winnie the Pooh 劉曉波动态网自由门" + <7> : "腾讯控股有限公司(英語:Tencent Holdings Limited),简称腾讯,是中华人民共和国一家跨国企业控股公司,为中國大陸规模最大的互联网公司,1998年11月由马化腾" + <8> : "暴雪娱乐(英語:Blizzard Entertainment, Inc.)是美国游戏开发商和发行商" + +#### + +# the unicode shenanigans pack for XCompose, by zoeWhy (smooch.computer) +# for when you need obfuscation + +# Please use these wisely, using them for everything everywhere is dumb and causes accessibility issues. +# If that for some reason isn't a good enough reason for you: using these excessively will cause them to lose their power. +# Don't be a dumbass. + +# breakers + +# used to break up text when lookalikes can't be used + + : "؜" # arabic letter mark (U+061C) (never is a space, but can cause RTL) + : "ㅤ" # hangul filler (U+3164) (sometimes is a space and causes translation issues, but can't cause RTL) + : "ᅠ" # half-width hangul filler (U+FFA0) (dubious, untested) + +# lookalikes + +# lookalikeness is not guaranteed, though: +# anything labeled "Cyrillic lookalike" is guaranteed to show up on basically anything that isn't WinXP, and usually looks like the imitated character +# Armenian and Cherokee lookalikes are more dubious +# Latin lookalikes probably work but may look weird +# Full-width lookalikes will always look weird, and are usually a last-resort + + : "А" # Cyrillic lookalike U+0410 + : "В" # Cyrillic lookalike U+0412 + : "С" # Cyrillic lookalike U+0421 + : "Ꭰ" # Cherokee lookalike U+13a0 + : "Е" # Cyrillic lookalike U+0415 + : "Ϝ" # Greek lookalike U+03dc + : "Ԍ" # Cyrillic (supplement) lookalike U+050c + : "Н" # Cyrillic lookalike U+041d + : "І" # Cyrillic lookalike U+0406 + : "Ј" # Cyrillic lookalike U+0408 + : "К" # Cyrillic lookalike U+041a + : "Ꮮ" # Cherokee lookalike U+13de + : "М" # Cyrillic lookalike U+041c + : "О" # Cyrillic lookalike U+041e +

: "Р" # Cyrillic lookalike U+0420 + : "Q" # Full-width lookalike U+ff31 (nothing else has this) + : "Ꭱ" # Cherokee lookalike U+13a1 + : "Ѕ" # Cyrillic lookalike U+0405 + : "Т" # Cyrillic lookalike U+0422 + : "Ս" # Armenian lookalike U+054d + : "Ѵ" # Cyrillic lookalike U+0474 + : "Ԝ" # Cyrillic (supplement) lookalike U+051c + : "Х" # Cyrillic lookalike U+0425 + : "Ү" # Cyrillic lookalike U+04ae + : "Ζ" # Greek lookalike U+0396 + : "а" # Cyrillic lookalike U+0430 + : "ᖯ" # Canadian syllabic lookalike U+15af + : "с" # Cyrillic lookalike U+0441 + : "ԁ" # Cyrillic (supplement) lookalike U+0501 + : "е" # Cyrillic lookalike U+0435 + : "ſ" # Latin lookalike U+017f + : "ɡ" # Latin smallcaps lookalike U+0261 + : "հ" # Armenian lookalike U+0570 + : "і" # Cyrillic lookalike U+0456 + : "ј" # Cyrillic lookalike U+0458 + : "k" # Full-width lookalike U+ff4b (everything else looked like a capital letter) + : "Ɩ" # Latin lookalike U+0196 (only one that looks like an l in fonts that show the bars on capital I) + : "m" # Full-width lookalike U+ff4d + : "ո" # Armenian lookalike U+0578 + : "о" # Cyrillic lookalike U+043e +

: "р" # Cyrillic lookalike U+0440 + : "ԛ" # Cyrillic (supplement) lookalike U+051b + : "г" # Cyrillic lookalike U+0433 (only one that looks rounded is full-width) + : "ѕ" # Cyrillic lookalike U+0455 + : "t" # Full-width lookalike U+ff54 (everything else looked like a capital letter) + : "ս" # Armenian lookalike U+057d + : "ѵ" # Cyrillic lookalike U+0475 + : "ᴡ" # Latin smallcaps lookalike U+1d21 + : "х" # Cyrillic lookalike U+0445 + : "у" # Cyrillic lookalike U+0443 + : "ᴢ" # Latin smallcaps lookalike U+1d22 \ No newline at end of file diff --git a/common/.eslintignore b/common/.eslintignore new file mode 100644 index 0000000..9cff508 --- /dev/null +++ b/common/.eslintignore @@ -0,0 +1,14 @@ +pnpm-debug.log +dist +.cache +.tern-port +config.json +package-lock.json +README.html +*~ +\#*\# +node_modules +yarn-error.log +npm-error.log +/.vscode +/.idea diff --git a/common/.eslintrc.js b/common/.eslintrc.js new file mode 100644 index 0000000..78b1de4 --- /dev/null +++ b/common/.eslintrc.js @@ -0,0 +1,30 @@ +const OFF = 0; +// const WARN = 1; +const ERROR = 2; + +module.exports = { + extends: ["eslint:recommended"], + parserOptions: { + ecmaVersion: 2020, + }, + env: { + browser: true, + es6: true, + node: true, + }, + rules: { + indent: OFF, + semi: ERROR, + quotes: [ERROR, "double", {avoidEscape: true, allowTemplateLiterals: true}], + "no-empty": ERROR, + "array-callback-return": ERROR, + "consistent-return": ERROR, + eqeqeq: OFF, + "prefer-const": ERROR, + "no-unused-vars": [ERROR, {args: "none", varsIgnorePattern: "^_"}], + "no-console": OFF, + "no-debugger": OFF, + "require-atomic-updates": OFF, + }, + globals: {}, +}; diff --git a/common/.prettierrc b/common/.prettierrc new file mode 100644 index 0000000..15520fe --- /dev/null +++ b/common/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": true, + "bracketSpacing": false, + "endOfLine": "lf" +} diff --git a/common/.zshrc b/common/.zshrc new file mode 100644 index 0000000..fa68a41 --- /dev/null +++ b/common/.zshrc @@ -0,0 +1,136 @@ +fpath=(~/.zsh $fpath) + +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +# End of lines configured by zsh-newuser-install + +#### + +#autoload -Uz vcs_info +#precmd_vcs_info() { +# vcs_info +# local STATUS=$(git status --porcelain 2> /dev/null | tail -1) +# if [[ -n $STATUS ]]; then +# zstyle ':vcs_info:git:*' formats '%F{cyan}%b%f %F{yellow}▲%f ' +# else +# zstyle ':vcs_info:git:*' formats '%F{cyan}%b%f %F{green}▲%f ' +# fi +#} +#precmd_functions+=( precmd_vcs_info ) +# +#zstyle ':vcs_info:*' enable git + +setopt prompt_subst + +get_git_branch() { + git symbolic-ref --short HEAD 2> /dev/null +} + +get_git_status() { + local STATUS=$(git status --porcelain 2> /dev/null | tail -1) + local BRANCH=$(get_git_branch) + if [[ -n $BRANCH ]]; then + if [[ -n $STATUS ]]; then + echo "%F{cyan}$BRANCH%f %F{yellow}▲%f " + else + echo "%F{cyan}$BRANCH%f %F{green}▲%f " + fi + fi +} + +timer=0 +timer_show=0 +preexec_time() { + timer=${timer:-$SECONDS} +} +precmd_time() { + if [ $timer ]; then + timer_show=$(($SECONDS-$timer)) + + unset timer + fi +} +preexec_functions+=(preexec_time) +precmd_functions+=(precmd_time) + +prompt_time() { + local out="" + + if [ $timer_show -lt 3 ]; then + timer_display=$out + return + fi + + if [ $timer_show -ge 3600 ]; then + out+="$(printf '%d' $(($timer_show/3600)))h" + fi + + if [ $timer_show -ge 60 ]; then + out+="$(printf '%d' $(($timer_show%3600/60)))m" + fi + + out+="$(printf '%d' $(($timer_show%60)))s" + + timer_display=$out +} +precmd_functions+=(prompt_time) + +binary_clock() { + local row0=("⠀" "⠈" "⠐" "⠘" "⠠" "⠨" "⠰" "⠸" "⢀" "⢈") + local row1=("⠁" "⠉" "⠑" "⠙" "⠡" "⠩" "⠱" "⠹" "⢁" "⢉") + local row2=("⠂" "⠊" "⠒" "⠚" "⠢" "⠪" "⠲" "⠺" "⢂" "⢊") + local row3=("⠃" "⠋" "⠓" "⠛" "⠣" "⠫" "⠳" "⠻" "⢃" "⢋") + local row4=("⠄" "⠌" "⠔" "⠜" "⠤" "⠬" "⠴" "⠼" "⢄" "⢌") + local row5=("⠅" "⠍" "⠕" "⠝" "⠥" "⠭" "⠵" "⠽" "⢅" "⢍") + local chars=("${row0[@]}" "${row1[@]}" "${row2[@]}" "${row3[@]}" "${row4[@]}" "${row5[@]}") + + local hour=$(date +"%H") + local minute=$(date +"%M") + local second=$(date +"%S") + [[ $hour = 0* ]] && hour=${hour:1:1} + [[ $minute = 0* ]] && minute=${minute:1:1} + [[ $second = 0* ]] && second=${second:1:1} + + bclock="${chars[$hour+1]} ${chars[$minute+1]} ${chars[$second+1]}" +} +precmd_functions+=(binary_clock) + +PROMPT=' %(?.%F{magenta}.%F{red})λ%f %1~ $(get_git_status) ' +RPROMPT='%F{yellow}$timer_display%f %(?..%F{red}%?%f )%F{white}$bclock%f' + +#### + +# keys +autoload -Uz up-line-or-beginning-search +autoload -Uz down-line-or-beginning-search +zle -N up-line-or-beginning-search +zle -N down-line-or-beginning-search + +bindkey '^?' backward-delete-char # bs delete one char backward +bindkey '^[[3~' delete-char # delete delete one char forward +bindkey '^[[H' beginning-of-line # home go to the beginning of line +bindkey '^[[F' end-of-line # end go to the end of line +bindkey '^[[1~' beginning-of-line # home (2) go to the beginning of line +bindkey '^[[4~' end-of-line # end (2) go to the end of line +bindkey '^[[1;5C' forward-word # ctrl+right go forward one word +bindkey '^[[1;5D' backward-word # ctrl+left go backward one word +bindkey '^H' backward-kill-word # ctrl+bs delete previous word +bindkey '^[[3;5~' kill-word # ctrl+del delete next word +bindkey '^J' backward-kill-line # ctrl+j delete everything before cursor +bindkey '^[[D' backward-char # left move cursor one char backward +bindkey '^[[C' forward-char # right move cursor one char forward +bindkey '^[[A' up-line-or-beginning-search # up prev command in history +bindkey '^[[B' down-line-or-beginning-search # down next command in history +bindkey '^[[5~' history-search-backward # pgup prev in history no search +bindkey '^[[6~' history-search-forward # pgdn next in history no search + +#### + +# hast =) +hast() { a=$(cat); curl -X POST -s -d "$a" https://haste.soulja-boy-told.me/documents | awk -F '"' '{print "https://haste.soulja-boy-told.me/"$4}'; } + +#### + +export PATH=$PATH:$HOME/.local/bin diff --git a/common/alacritty/alacritty.yml b/common/alacritty/alacritty.yml new file mode 100644 index 0000000..eff33f4 --- /dev/null +++ b/common/alacritty/alacritty.yml @@ -0,0 +1,865 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator. + +# Import additional configuration files +# +# Imports are loaded in order, skipping all missing files, with the importing +# file being loaded last. If a field is already present in a previous import, it +# will be replaced. +# +# All imports must either be absolute paths starting with `/`, or paths relative +# to the user's home directory starting with `~/`. +#import: +# - /path/to/alacritty.yml + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty itself. +#env: + # 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: 84 + lines: 24 + + # Window position (changes require restart) + # + # Specified in number of pixels. + # If the position is not set, the window manager will handle the placement. + #position: + # x: 0 + # y: 0 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is scaled + # by DPI and the specified value is always added at both opposing sides. + #padding: + # x: 0 + # y: 0 + + # Spread additional padding evenly around the terminal content. + #dynamic_padding: false + + # Window decorations + # + # Values for `decorations`: + # - full: Borders and title bar + # - none: Neither borders nor title bar + # + # Values for `decorations` (macOS only): + # - transparent: Title bar, transparent background and title bar buttons + # - buttonless: Title bar, transparent background and no title bar buttons + #decorations: full + + # Background opacity + # + # Window opacity as a floating point number from `0.0` to `1.0`. + # The value `0.0` is completely transparent and `1.0` is opaque. + #opacity: 1.0 + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + #startup_mode: Windowed + + # Window title + #title: Alacritty + + # Allow terminal applications to change Alacritty's window title. + #dynamic_title: true + + # Window class (Linux/BSD only): + #class: + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty + + # GTK theme variant (Linux/BSD only) + # + # Override the variant of the GTK theme. Commonly supported values are `dark` + # and `light`. Set this to `None` to use the default theme variant. + #gtk_theme_variant: None + +#scrolling: + # Maximum number of lines in the scrollback buffer. + # Specifying '0' will disable scrolling. + #history: 10000 + + # Scrolling distance multiplier. + #multiplier: 3 + +# Font configuration +font: + # Normal (roman) font face + normal: + # Font family + # + # Default: + # - (macOS) Menlo + # - (Linux/BSD) monospace + # - (Windows) Consolas + family: Terminus + + # The `style` can be specified to pick a specific face. + style: Regular + + # Bold font face + #bold: + # Font family + # + # If the bold family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Regular + + # Italic font face + #italic: + # Font family + # + # If the italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Bold italic font face + #bold_italic: + # Font family + # + # If the bold italic family is not specified, it will fall back to the + # value specified for the normal font. + #family: monospace + + # The `style` can be specified to pick a specific face. + #style: Italic + + # Point size + size: 9.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: '#2a2331' + foreground: '#dedbeb' + + # Bright and dim foreground colors + # + # The dimmed foreground color is calculated automatically if it is not + # present. If the bright foreground color is not set, or + # `draw_bold_text_with_bright_colors` is `false`, the normal foreground + # color will be used. + #dim_foreground: '#828482' + #bright_foreground: '#eaeaea' + + # Cursor colors + # + # Colors which should be used to draw the terminal cursor. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #cursor: + # text: CellBackground + # cursor: CellForeground + + # Vi mode cursor colors + # + # Colors for the cursor when the vi mode is active. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #vi_mode_cursor: + # text: CellBackground + # cursor: CellForeground + + # Search colors + # + # Colors used for the search bar and match highlighting. + #search: + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #matches: + # foreground: '#000000' + # background: '#ffffff' + #focused_match: + # foreground: '#ffffff' + # background: '#000000' + + #bar: + # background: '#c5c8c6' + # foreground: '#1d1f21' + + # Keyboard regex hints + #hints: + # First character in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #start: + # foreground: '#1d1f21' + # background: '#e9ff5e' + + # All characters after the first one in the hint label + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #end: + # foreground: '#e9ff5e' + # background: '#1d1f21' + + # Line indicator + # + # Color used for the indicator displaying the position in history during + # search and vi mode. + # + # By default, these will use the opposing primary color. + #line_indicator: + # foreground: None + # background: None + + # Selection colors + # + # Colors which should be used to draw the selection area. + # + # Allowed values are CellForeground/CellBackground, which reference the + # affected cell, or hexadecimal colors like #ff00ff. + #selection: + # text: CellBackground + # background: '#634e75' + + # Normal colors + normal: + black: '#231d29' + red: '#e83f80' + green: '#a2baa8' + yellow: '#eacac0' + blue: '#9985d1' + magenta: '#e68ac1' + cyan: '#aabae7' + white: '#dedbeb' + + # Bright colors + bright: + black: '#302838' + red: '#f55d8f' + green: '#bfd1c3' + yellow: '#f0ddd8' + blue: '#b4a4de' + magenta: '#edabd2' + cyan: '#c4d1f5' + white: '#edebf7' + + # Dim colors + # + # If the dim colors are not set, they will be calculated automatically based + # on the `normal` colors. + #dim: + # black: '#131415' + # red: '#864343' + # green: '#777c44' + # yellow: '#9e824c' + # blue: '#556a7d' + # magenta: '#75617b' + # cyan: '#5b7d78' + # white: '#828482' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '#ff00ff' }` + # + #indexed_colors: [] + + # Transparent cell backgrounds + # + # Whether or not `window.opacity` applies to all cell backgrounds or only to + # the default background. When set to `true` all cells will be transparent + # regardless of their background color. + #transparent_background_colors: false + +# Bell +# +# The bell is rung every time the BEL control character is received. +#bell: + # Visual Bell Animation + # + # Animation effect for flashing the screen when the visual bell is rung. + # + # Values for `animation`: + # - Ease + # - EaseOut + # - EaseOutSine + # - EaseOutQuad + # - EaseOutCubic + # - EaseOutQuart + # - EaseOutQuint + # - EaseOutExpo + # - EaseOutCirc + # - Linear + #animation: EaseOutExpo + + # Duration of the visual bell flash in milliseconds. A `duration` of `0` will + # disable the visual bell animation. + #duration: 0 + + # Visual bell animation color. + #color: '#ffffff' + + # Bell Command + # + # This program is executed whenever the bell is rung. + # + # When set to `command: None`, no command will be executed. + # + # Example: + # command: + # program: notify-send + # args: ["Hello, World!"] + # + #command: None + +#selection: + # This string contains all characters that are used as separators for + # "semantic words" in Alacritty. + #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" + + # When set to `true`, selected text will be copied to the primary clipboard. + #save_to_clipboard: false + +#cursor: + # Cursor style + #style: + # Cursor shape + # + # Values for `shape`: + # - ▇ Block + # - _ Underline + # - | Beam + #shape: Block + + # Cursor blinking state + # + # Values for `blinking`: + # - Never: Prevent the cursor from ever blinking + # - Off: Disable blinking by default + # - On: Enable blinking by default + # - Always: Force the cursor to always blink + #blinking: Off + + # Vi mode cursor style + # + # If the vi mode cursor style is `None` or not specified, it will fall back to + # the style of the active value of the normal cursor. + # + # See `cursor.style` for available options. + #vi_mode_style: None + + # Cursor blinking interval in milliseconds. + #blink_interval: 750 + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + #unfocused_hollow: true + + # Thickness of the cursor relative to the cell width as floating point number + # from `0.0` to `1.0`. + #thickness: 0.15 + +# Live config reload (changes require restart) +#live_config_reload: true + +# Shell +# +# You can set `shell.program` to the path of your favorite shell, e.g. +# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the +# shell. +# +# Default: +# - (macOS) /bin/bash --login +# - (Linux/BSD) user login shell +# - (Windows) powershell +#shell: +# program: /bin/bash +# args: +# - --login + +# Startup directory +# +# Directory the shell is started in. If this is unset, or `None`, the working +# directory of the parent process will be used. +#working_directory: None + +# Send ESC (\x1b) before characters when alt is pressed. +#alt_send_esc: true + +#mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + #double_click: { threshold: 300 } + #triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + #hide_when_typing: false + +# Regex hints +# +# Terminal hints can be used to find text in the visible part of the terminal +# and pipe it to other applications. +#hints: + # Keys used for the hint labels. + #alphabet: "jfkdls;ahgurieowpq" + + # List with all available hints + # + # Each hint must have a `regex` and either an `action` or a `command` field. + # The fields `mouse`, `binding` and `post_processing` are optional. + # + # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and + # `mouse.mods` accept the same values as they do in the `key_bindings` section. + # + # The `mouse.enabled` field controls if the hint should be underlined while + # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. + # + # If the `post_processing` field is set to `true`, heuristics will be used to + # shorten the match if there are characters likely not to be part of the hint + # (e.g. a trailing `.`). This is most useful for URIs. + # + # Values for `action`: + # - Copy + # Copy the hint's text to the clipboard. + # - Paste + # Paste the hint's text to the terminal or search. + # - Select + # Select the hint's text. + # - MoveViModeCursor + # Move the vi mode cursor to the beginning of the hint. + #enabled: + # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ + # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" + # command: xdg-open + # post_processing: true + # mouse: + # enabled: true + # mods: None + # binding: + # key: U + # mods: Control|Shift + +# Mouse bindings +# +# Mouse bindings are specified as a list of objects, much like the key +# bindings further below. +# +# To trigger mouse bindings when an application running within Alacritty +# captures the mouse, the `Shift` modifier is automatically added as a +# requirement. +# +# Each mouse binding will specify a: +# +# - `mouse`: +# +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# - `action` (see key bindings for actions not exclusive to mouse mode) +# +# - Mouse exclusive actions: +# +# - ExpandSelection +# Expand the selection to the current mouse cursor location. +# +# And optionally: +# +# - `mods` (see key bindings) +mouse_bindings: +# - { mouse: Right, action: ExpandSelection } + - { mouse: Middle, action: Paste } + +# Key bindings +# +# Key bindings are specified as a list of objects. For example, this is the +# default paste binding: +# +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Each key binding will specify a: +# +# - `key`: Identifier of the key pressed +# +# - A-Z +# - F1-F24 +# - Key0-Key9 +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. This command will allow you to display the hex scancodes +# for certain keys: +# +# `showkey --scancodes`. +# +# Then exactly one of: +# +# - `chars`: Send a byte sequence to the running application +# +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. To find escape codes for bindings +# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside +# of tmux. Note that applications use terminfo to map escape sequences back +# to keys. It is therefore required to update the terminfo when changing an +# escape sequence. +# +# - `action`: Execute a predefined action +# +# - ToggleViMode +# - SearchForward +# Start searching toward the right of the search origin. +# - SearchBackward +# Start searching toward the left of the search origin. +# - Copy +# - Paste +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollHalfPageUp +# - ScrollHalfPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# Remove the terminal's scrollback history. +# - Hide +# Hide the Alacritty window. +# - Minimize +# Minimize the Alacritty window. +# - Quit +# Quit Alacritty. +# - ToggleFullscreen +# - SpawnNewInstance +# Spawn a new instance of Alacritty. +# - ClearLogNotice +# Clear Alacritty's UI warning and error notice. +# - ClearSelection +# Remove the active selection. +# - ReceiveChar +# - None +# +# - Vi mode exclusive actions: +# +# - Open +# Perform the action of the first matching hint under the vi mode cursor +# with `mouse.enabled` set to `true`. +# - ToggleNormalSelection +# - ToggleLineSelection +# - ToggleBlockSelection +# - ToggleSemanticSelection +# Toggle semantic selection based on `selection.semantic_escape_chars`. +# +# - Vi mode exclusive cursor motion actions: +# +# - Up +# One line up. +# - Down +# One line down. +# - Left +# One character left. +# - Right +# One character right. +# - First +# First column, or beginning of the line when already at the first column. +# - Last +# Last column, or beginning of the line when already at the last column. +# - FirstOccupied +# First non-empty cell in this terminal row, or first non-empty cell of +# the line when already at the first cell of the row. +# - High +# Top of the screen. +# - Middle +# Center of the screen. +# - Low +# Bottom of the screen. +# - SemanticLeft +# Start of the previous semantically separated word. +# - SemanticRight +# Start of the next semantically separated word. +# - SemanticLeftEnd +# End of the previous semantically separated word. +# - SemanticRightEnd +# End of the next semantically separated word. +# - WordLeft +# Start of the previous whitespace separated word. +# - WordRight +# Start of the next whitespace separated word. +# - WordLeftEnd +# End of the previous whitespace separated word. +# - WordRightEnd +# End of the next whitespace separated word. +# - Bracket +# Character matching the bracket at the cursor's location. +# - SearchNext +# Beginning of the next match. +# - SearchPrevious +# Beginning of the previous match. +# - SearchStart +# Start of the match to the left of the vi mode cursor. +# - SearchEnd +# End of the match to the right of the vi mode cursor. +# +# - Search mode exclusive actions: +# - SearchFocusNext +# Move the focus to the next search match. +# - SearchFocusPrevious +# Move the focus to the previous search match. +# - SearchConfirm +# - SearchCancel +# - SearchClear +# Reset the search regex. +# - SearchDeleteWord +# Delete the last word in the search regex. +# - SearchHistoryPrevious +# Go to the previous regex in the search history. +# - SearchHistoryNext +# Go to the next regex in the search history. +# +# - macOS exclusive actions: +# - ToggleSimpleFullscreen +# Enter fullscreen without occupying another space. +# +# - Linux/BSD exclusive actions: +# +# - CopySelection +# Copy from the selection buffer. +# - PasteSelection +# Paste from the selection buffer. +# +# - `command`: Fork and execute a specified command plus arguments +# +# The `command` field must be a map containing a `program` string and an +# `args` array of command line parameter strings. For example: +# `{ program: "alacritty", args: ["-e", "vttest"] }` +# +# And optionally: +# +# - `mods`: Key modifiers to filter binding actions +# +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: +# `mods: Control|Shift`. +# Whitespace and capitalization are relevant and must match the example. +# +# - `mode`: Indicate a binding for only specific terminal reported modes +# +# This is mainly used to send applications the correct escape sequences +# when in different modes. +# +# - AppCursor +# - AppKeypad +# - Search +# - Alt +# - Vi +# +# A `~` operator can be used before a mode to apply the binding whenever +# the mode is *not* active, e.g. `~Alt`. +# +# Bindings are always filled by default, but will be replaced when a new +# binding with the same triggers is defined. To unset a default binding, it can +# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for +# a no-op if you do not wish to receive input characters for that binding. +# +# If the same trigger is assigned to multiple actions, all of them are executed +# in the order they were defined in. +key_bindings: + #- { key: Paste, action: Paste } + #- { key: Copy, action: Copy } + #- { key: L, mods: Control, action: ClearLogNotice } + #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, } + #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } + #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, } + #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + + # Vi Mode + #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } + #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } + #- { key: Escape, mode: Vi|~Search, action: ClearSelection } + #- { key: I, mode: Vi|~Search, action: ToggleViMode } + #- { key: I, mode: Vi|~Search, action: ScrollToBottom } + #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } + #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } + #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } + #- { key: G, mode: Vi|~Search, action: ScrollToTop } + #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } + #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } + #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } + #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } + #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } + #- { key: Y, mode: Vi|~Search, action: Copy } + #- { key: Y, mode: Vi|~Search, action: ClearSelection } + #- { key: Copy, mode: Vi|~Search, action: ClearSelection } + #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } + #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } + #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } + #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } + #- { key: Return, mode: Vi|~Search, action: Open } + #- { key: K, mode: Vi|~Search, action: Up } + #- { key: J, mode: Vi|~Search, action: Down } + #- { key: H, mode: Vi|~Search, action: Left } + #- { key: L, mode: Vi|~Search, action: Right } + #- { key: Up, mode: Vi|~Search, action: Up } + #- { key: Down, mode: Vi|~Search, action: Down } + #- { key: Left, mode: Vi|~Search, action: Left } + #- { key: Right, mode: Vi|~Search, action: Right } + #- { key: Key0, mode: Vi|~Search, action: First } + #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } + #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } + #- { key: H, mods: Shift, mode: Vi|~Search, action: High } + #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } + #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } + #- { key: B, mode: Vi|~Search, action: SemanticLeft } + #- { key: W, mode: Vi|~Search, action: SemanticRight } + #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } + #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } + #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } + #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } + #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } + #- { key: Slash, mode: Vi|~Search, action: SearchForward } + #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } + #- { key: N, mode: Vi|~Search, action: SearchNext } + #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + + # Search Mode + #- { key: Return, mode: Search|Vi, action: SearchConfirm } + #- { key: Escape, mode: Search, action: SearchCancel } + #- { key: C, mods: Control, mode: Search, action: SearchCancel } + #- { key: U, mods: Control, mode: Search, action: SearchClear } + #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } + #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } + #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } + #- { key: Up, mode: Search, action: SearchHistoryPrevious } + #- { key: Down, mode: Search, action: SearchHistoryNext } + #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } + #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + + # (Windows, Linux, and BSD only) + - { key: V, mods: Control|Shift, action: Paste } + - { key: C, mods: Control|Shift, action: Copy } + #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } + #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } + #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } + #- { key: Insert, mods: Shift, action: PasteSelection } + #- { key: Key0, mods: Control, action: ResetFontSize } + #- { key: Equals, mods: Control, action: IncreaseFontSize } + #- { key: Plus, mods: Control, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } + #- { key: Minus, mods: Control, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + + # (Windows only) + #- { key: Return, mods: Alt, action: ToggleFullscreen } + + # (macOS only) + #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } + #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } + #- { key: Key0, mods: Command, action: ResetFontSize } + #- { key: Equals, mods: Command, action: IncreaseFontSize } + #- { key: Plus, mods: Command, action: IncreaseFontSize } + #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } + #- { key: Minus, mods: Command, action: DecreaseFontSize } + #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } + #- { key: V, mods: Command, action: Paste } + #- { key: C, mods: Command, action: Copy } + #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } + #- { key: H, mods: Command, action: Hide } + #- { key: H, mods: Command|Alt, action: HideOtherApplications } + #- { key: M, mods: Command, action: Minimize } + #- { key: Q, mods: Command, action: Quit } + #- { key: W, mods: Command, action: Quit } + #- { key: N, mods: Command, action: SpawnNewInstance } + #- { key: F, mods: Command|Control, action: ToggleFullscreen } + #- { key: F, mods: Command, mode: ~Search, action: SearchForward } + #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } + +#debug: + # Display the time it takes to redraw each frame. + #render_timer: false + + # Keep the log file after quitting Alacritty. + #persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - Off + # - Error + # - Warn + # - Info + # - Debug + # - Trace + #log_level: Warn + + # Print all received window events. + #print_events: false diff --git a/common/glualint.json b/common/glualint.json new file mode 100644 index 0000000..788a68e --- /dev/null +++ b/common/glualint.json @@ -0,0 +1,26 @@ +{ + "lint_maxScopeDepth": 10, + "lint_syntaxErrors": true, + "lint_syntaxInconsistencies": true, + "lint_deprecated": true, + "lint_whitespaceStyle": true, + "lint_beginnerMistakes": true, + "lint_emptyBlocks": true, + "lint_shadowing": true, + "lint_gotos": false, + "lint_doubleNegations": true, + "lint_duplicateTableKeys": true, + "lint_profanity": false, + "lint_unusedVars": true, + "lint_unusedParameters": false, + "lint_unusedLoopVars": false, + + "prettyprint_spaceAfterParens": false, + "prettyprint_spaceAfterBrackets": false, + "prettyprint_spaceAfterBraces": false, + "prettyprint_spaceBeforeComma": false, + "prettyprint_spaceAfterComma": true, + "prettyprint_semicolons": false, + "prettyprint_cStyle": false, + "prettyprint_indentation": " " +} diff --git a/common/nvim/init.vim b/common/nvim/init.vim new file mode 100644 index 0000000..f83c02c --- /dev/null +++ b/common/nvim/init.vim @@ -0,0 +1,310 @@ +" plugins +call plug#begin(stdpath('data') . '/plugged') + +" color scheme +Plug 'owozsh/amora' + +" misc +Plug 'itchyny/vim-gitbranch' +Plug 'andweeb/presence.nvim' +Plug 'ntpeters/vim-better-whitespace' +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' +Plug 'airblade/vim-gitgutter' +Plug 'tpope/vim-fugitive' +Plug 'mg979/vim-visual-multi' +Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } +Plug 'rhysd/committia.vim' + +" interface +Plug 'romgrk/barbar.nvim' +Plug 'kyazdani42/nvim-tree.lua' + +" language specific +Plug 'sheerun/vim-polyglot' +"Plug 'ruanyl/vim-fixmyjs' +"Plug 'prettier/vim-prettier', {'build': 'pnpm i'} +Plug 'dense-analysis/ale' +Plug 'neovim/nvim-lspconfig' +Plug 'nvim-lua/completion-nvim' + +call plug#end() + +" misc +let g:mode = "old_amora" +colorscheme amora +set termguicolors + +set fileformat=unix +set fileformats=unix,dos + +set number +set cul + +set tabstop=2 +set shiftwidth=2 +set expandtab + +set mouse+=nia + +au WinEnter * set cul +au WinLeave * set nocul + +let g:better_whitespace_enabled = 1 + +let bufferline = get(g:, 'bufferline', {}) +let bufferline.icons = v:false +let bufferline.icon_separator_active = '▎' +let bufferline.icon_separator_inactive = '▎' +let bufferline.icon_close_tab = 'x' +let bufferline.icon_close_tab_modified = '●' +let bufferline.icon_pinned = '▲' + +let g:presence_buttons = 0 + +let g:ale_fixers = { +\ '*': ['trim_whitespace'], +\ 'vim': [], +\ 'javascript': ['eslint', 'prettier'], +\ 'json': ['prettier'], +\ 'css': ['prettier'], +\} +let g:ale_fix_on_save = 1 + +let g:Hexokinase_highlighters = ['virtual'] + +set fillchars+=vert:▎ + +lua << EOF +local lspconfig = require("lspconfig") +local completion_callback = require("completion").on_attach + +lspconfig.eslint.setup({on_attach = completion_callback}) +lspconfig.tsserver.setup({on_attach = completion_callback}) +EOF + +set completeopt=menuone,noinsert,noselect +set shortmess+=c + +let g:completion_enable_auto_popup = 1 + +" tre +let g:nvim_tree_git_hl = 1 +let g:nvim_tree_symlink_arrow = ' >> ' + +let g:nvim_tree_icons = { + \ 'default': '', + \ 'symlink': '[S]', + \ 'git': { + \ 'unstaged': "U", + \ 'staged': "A", + \ 'unmerged': "M", + \ 'renamed': "R", + \ 'untracked': "", + \ 'deleted': "D", + \ 'ignored': "I" + \ }, + \ 'folder': { + \ 'arrow_open': "-", + \ 'arrow_closed': "+", + \ 'default': "", + \ 'open': "", + \ 'empty': "[E]", + \ 'empty_open': "[E]", + \ 'symlink': "[S]", + \ 'symlink_open': "[S]", + \ } + \ } + +let g:nvim_tree_show_icons = { + \ 'git': 1, + \ 'folders': 0, + \ 'files': 0, + \ 'folder_arrows': 1, + \ } + +lua << EOF +require("nvim-tree").setup({ + git = { + enable = true, + ignore = true, + timeout = 500, + }, +}) +EOF + +" keys +tnoremap + +nnoremap :m-2 +nnoremap :m+ +inoremap :m-2 +inoremap :m+ + +nnoremap :NvimTreeToggle :lua require'bufferline.state'.set_offset(require'nvim-tree.view'.win_open() and 30 or 0) + +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\": "\" +imap (completion_smart_tab) +imap (completion_smart_s_tab) + +" barbar keys +" Move to previous/next +nnoremap :BufferPrevious +nnoremap :BufferNext +" Re-order to previous/next +nnoremap :BufferMovePrevious +nnoremap > :BufferMoveNext +" Goto buffer in position... +nnoremap :BufferGoto 1 +nnoremap :BufferGoto 2 +nnoremap :BufferGoto 3 +nnoremap :BufferGoto 4 +nnoremap :BufferGoto 5 +nnoremap :BufferGoto 6 +nnoremap :BufferGoto 7 +nnoremap :BufferGoto 8 +nnoremap :BufferLast +" Pin/unpin buffer +nnoremap :BufferPin +" Close buffer +nnoremap :BufferClose + +" Colors + +function! s:h(scope, fg, ...) " bg, attr_list, special + let l:fg = copy(a:fg) + let l:bg = get(a:, 1, ['NONE', 'NONE']) + + let l:attr_list = filter(get(a:, 2, ['NONE']), 'type(v:val) == 1') + let l:attrs = len(l:attr_list) > 0 ? join(l:attr_list, ',') : 'NONE' + + " Falls back to coloring foreground group on terminals because + " nearly all do not support undercurl + let l:special = get(a:, 3, ['NONE', 'NONE']) + if l:special[0] !=# 'NONE' && l:fg[0] ==# 'NONE' && !has('gui_running') + let l:fg[0] = l:special[0] + let l:fg[1] = l:special[1] + endif + + let l:hl_string = [ + \ 'highlight', a:scope, + \ 'guifg=' . l:fg[0], 'ctermfg=' . l:fg[1], + \ 'guibg=' . l:bg[0], 'ctermbg=' . l:bg[1], + \ 'gui=' . l:attrs, 'cterm=' . l:attrs, + \ 'guisp=' . l:special[0], + \] + + execute join(l:hl_string, ' ') +endfunction + +hi Normal ctermbg=NONE +hi LineNr ctermfg=7 +hi CursorLineNr ctermfg=1 ctermbg=8 +hi CursorLine cterm=NONE ctermfg=NONE ctermbg=8 +hi StatusLine ctermbg=2 ctermfg=0 +hi StatusLineNC ctermbg=7 ctermfg=0 +hi VertSplit ctermbg=0 ctermfg=0 +hi ExtraWhitespace ctermbg=1 +hi SignColumn ctermbg=8 + +hi BufferCurrent ctermfg=5 ctermbg=NONE +hi BufferCurrentIndex ctermfg=5 ctermbg=NONE +hi BufferCurrentMod ctermfg=9 ctermbg=NONE +hi BufferCurrentSign ctermfg=5 ctermbg=NONE +hi BufferCurrentTarget ctermfg=5 ctermbg=NONE +hi BufferVisible ctermfg=7 ctermbg=NONE +hi BufferVisibleIndex ctermfg=7 ctermbg=NONE +hi BufferVisibleMod ctermfg=9 ctermbg=NONE +hi BufferVisibleSign ctermfg=7 ctermbg=NONE +hi BufferVisibleTarget ctermfg=7 ctermbg=NONE +hi BufferInactive ctermfg=7 ctermbg=0 +hi BufferInactiveIndex ctermfg=5 ctermbg=0 +hi BufferInactiveMod ctermfg=1 ctermbg=0 +hi BufferInactiveSign ctermfg=10 ctermbg=0 +hi BufferInactiveTarget ctermfg=11 ctermbg=0 +hi BufferTabpages ctermfg=7 ctermbg=0 +hi BufferTabpageFill ctermfg=7 ctermbg=0 +hi BufferOffset ctermfg=0 ctermbg=0 + +hi NvimTreeNormal ctermbg=0 + +call s:h('StatusLine', g:amora#palette.green, g:amora#palette.bgdark) +call s:h('StatusLineNC', g:amora#palette.fg, g:amora#palette.bgdark) +call s:h('VertSplit', g:amora#palette.bg, g:amora#palette.bgdarker) +call s:h('ExtraWhitespace', g:amora#palette.fg, g:amora#palette.red) + +call s:h('BufferCurrent', g:amora#palette.pink, g:amora#palette.bg) +call s:h('BufferCurrentIndex', g:amora#palette.pink, g:amora#palette.bg) +call s:h('BufferCurrentSign', g:amora#palette.pink, g:amora#palette.bg) +call s:h('BufferCurrentTarget', g:amora#palette.pink, g:amora#palette.bg) +call s:h('BufferCurrentMod', g:amora#palette.red, g:amora#palette.bg) +call s:h('BufferVisible', g:amora#palette.fg, g:amora#palette.bg) +call s:h('BufferVisibleIndex', g:amora#palette.fg, g:amora#palette.bg) +call s:h('BufferVisibleSign', g:amora#palette.fg, g:amora#palette.bg) +call s:h('BufferVisibleTarget', g:amora#palette.fg, g:amora#palette.bg) +call s:h('BufferVisibleMod', g:amora#palette.pink, g:amora#palette.bg) +call s:h('BufferInactive', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferInactiveIndex', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferInactiveSign', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferInactiveTarget', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferInactiveMod', g:amora#palette.red, g:amora#palette.bgdarker) +call s:h('BufferTabpages', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferTabpagesFill', g:amora#palette.bglighter, g:amora#palette.bgdarker) +call s:h('BufferOffset', g:amora#palette.bgdarker, g:amora#palette.bgdarker) + +call s:h('NvimTreeNormal', g:amora#palette.fg, g:amora#palette.bgdarker) + +" statusline hell +hi StatusLineMode ctermbg=1 ctermfg=0 +hi StatusLineGitBranch ctermbg=5 ctermfg=0 +hi StatusLineChar ctermbg=4 ctermfg=0 +hi StatusLineFormat ctermbg=3 ctermfg=0 +hi StatusLineFileType ctermbg=7 ctermfg=0 + +call s:h('StatusLineMode', g:amora#palette.bgdark, g:amora#palette.red) +call s:h('StatusLineGitBranch', g:amora#palette.bgdark, g:amora#palette.pink) +call s:h('StatusLineChar', g:amora#palette.bgdark, g:amora#palette.purple) +call s:h('StatusLineFormat', g:amora#palette.bgdark, g:amora#palette.yellow) +call s:h('StatusLineFileType', g:amora#palette.bgdark, g:amora#palette.fg) + +function! GetMode() + let l:m = mode(1) + + if l:m ==# "i" + let l:mode = "INS" + elseif l:m ==# "c" + let l:mode = "CMD" + elseif l:m[0] ==# "R" + let l:mode = "REP" + elseif l:m ==# "Rv" + let l:mode = "REP" + elseif l:m =~# '\v(v|V| |s|S| )' + let l:mode = "VIS" + else + return "" + endif + + return ' '.l:mode.' ' +endfunction + +function! GitBranch() + let l:branch = gitbranch#name() + return strlen(l:branch) ? ' ' . l:branch . ' ' : '' +endfunction + +set statusline= +set statusline+=%#StatusLineMode# +set statusline+=%{GetMode()} +set statusline+=%#StatusLineGitBranch# +set statusline+=%{GitBranch()} +set statusline+=%* +set statusline+=\ %f +set statusline+=\ %m%r +set statusline+=%= +set statusline+=%#StatusLineChar# +set statusline+=\ %l,\ %c\ +set statusline+=%#StatusLineFormat# +set statusline+=\ %{&fileencoding?&fileencoding:&encoding}\ %{&fileformat}\ +set statusline+=%#StatusLineFileType# +set statusline+=\ %{&filetype}\ diff --git a/linux/.Xresources b/linux/.Xresources new file mode 100644 index 0000000..34d82e3 --- /dev/null +++ b/linux/.Xresources @@ -0,0 +1,32 @@ +! special +*.foreground: #dedbeb +*.background: #2a2331 +*.cursorColor: #dedbeb +*.cursorColor2: #634e75 + +! colors +*.color0: #231d29 +*.color1: #e83f80 +*.color2: #a2baa8 +*.color3: #eacac0 +*.color4: #9985d1 +*.color5: #e68ac1 +*.color6: #aabae7 +*.color7: #dedbeb + +*.color8: #302838 +*.color9: #f55d8f +*.color10: #bfd1c3 +*.color11: #f0ddd8 +*.color12: #b4a4de +*.color13: #edabd2 +*.color14: #c4d1f5 +*.color15: #edebf7 + +! urxvt +URxvt.font: xft:Terminus:size=9 + +URxvt.perl-ext-common: clipboard +URxvt.clipboard.autocopy: false +URxvt.keysym.C-S-c: perl:clipboard:copy +URxvt.keysym.C-S-v: perl:clipboard:paste diff --git a/linux/.config/bspwm/bspwmrc b/linux/.config/bspwm/bspwmrc new file mode 100644 index 0000000..3f7db8d --- /dev/null +++ b/linux/.config/bspwm/bspwmrc @@ -0,0 +1,23 @@ +#! /bin/sh + +picom & +vmware-user-suid-wrapper & +pgrep -f xmousepasteblock > /dev/null || xmousepasteblock & +~/.fehbg & +~/.local/bin/polybar.sh & + +pgrep -x sxhkd > /dev/null || sxhkd & + +bspc monitor -d I II III IV V VI VII VIII + +bspc config border_width 2 +bspc config window_gap 8 +bspc config top_padding 16 + +bspc config normal_border_color $(xrdb -query | awk '/*.background:/ { print substr($2,1) }') +bspc config focused_border_color $(xrdb -query | awk '/*.color5:/ { print substr($2,1) }') +bspc config presel_feedback_color $(xrdb -query | awk '/*.color1:/ { print substr($2,1) }') + +bspc config split_ratio 0.52 +bspc config borderless_monocle true +bspc config gapless_monocle true diff --git a/linux/.config/polybar/config b/linux/.config/polybar/config new file mode 100644 index 0000000..4c88ed1 --- /dev/null +++ b/linux/.config/polybar/config @@ -0,0 +1,160 @@ +[colors] +bg = ${xrdb:background:#2a2331} +fg = ${xrdb:foreground:#dedbeb} +hi = ${xrdb:cursorColor2:#634e75} +tr = #00000000 + +0 = ${xrdb:color0:#231d29} +1 = ${xrdb:color1:#e83f80} +2 = ${xrdb:color2:#a2baa8} +3 = ${xrdb:color3:#eacac0} +4 = ${xrdb:color4:#9985d1} +5 = ${xrdb:color5:#e68ac1} +6 = ${xrdb:color6:#aabae7} +7 = ${xrdb:color7:#dedbeb} + +8 = ${xrdb:color8:#302838} +9 = ${xrdb:color9:#f55d8f} +10 = ${xrdb:color10:#bfd1c3} +11 = ${xrdb:color11:#f0ddd8} +12 = ${xrdb:color12:#b4a4de} +13 = ${xrdb:color13:#edabd2} +14 = ${xrdb:color14:#c4d1f5} +15 = ${xrdb:color15:#edebf7} + +[bar/bar] +width = 100% +height = 16 +bottom = false + +background = ${colors.bg} +foreground = ${colors.fg} + +line-size = 0 + +border-size = 0 +border-color = ${colors.tr} + +font-0 = terminus:pixelsize=8;1 +font-1 = siji:pixelsize=8;1 +font-2 = unifont:size=8;1 + +modules-left = workspace +modules-center = polywins +modules-right = music cpu ram volume bclock + +tray-position = right +tray-padding = 1 +tray-background = ${colors.bg} + +override-redirect = true + +[global/wm] +margin-top = 16 + +[settings] +format-background = ${colors.bg} +format-foreground = ${colors.fg} +format-padding = 1 + +[module/date] +type = internal/date + +interval = 1.0 + +time =  %H:%M:%S +time-alt =  %a, %m/%d/%Y + +label = %time% +label-foreground = ${colors.6} + +[module/bclock] +type = custom/script + +exec = ~/.config/polybar/scripts/binaryclock-polybar.sh +tail = true +click-left = "kill -USR1 $(pgrep --oldest --parent %pid%)" + +label-foreground = ${colors.6} + +[module/volume] +type = internal/alsa + +format-volume = +label-volume = %percentage%% +format-volume-foreground = ${colors.4} +label-muted =  0% +label-muted-foreground = ${colors.1} + +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  + +[module/ram] +type = internal/memory + +format =