From f2b69d2bfe8613170bcb7d5e6d54d8d10267fffb Mon Sep 17 00:00:00 2001 From: adrien Date: Wed, 23 Nov 2022 10:59:16 +0100 Subject: [PATCH] Update Alacritty configuration, documentation and add fish functions --- .config/alacritty/alacritty.yml | 492 +++++++++++++++++++++++------- .config/fish/functions/cache.fish | 2 +- .config/fish/functions/drop.fish | 5 + .config/fish/functions/usb.fish | 3 + README.md | 14 +- 5 files changed, 410 insertions(+), 106 deletions(-) create mode 100644 .config/fish/functions/drop.fish create mode 100644 .config/fish/functions/usb.fish diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index ba976cc..9254126 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -38,7 +38,14 @@ window: y: 6 # Spread additional padding evenly around the terminal content. - #dynamic_padding: false + dynamic_padding: false + + # 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 + # opacity: 0.80 # Window decorations # @@ -148,12 +155,12 @@ font: style: Bold Italic # Point size - size: 11.5 + size: 13 # 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: 1 + x: 0 y: 1 # Glyph offset determines the locations of the glyphs within their cells with @@ -180,85 +187,371 @@ font: #use_thin_strokes: true # If `true`, bold text is drawn using the bright color variants. -#draw_bold_text_with_bright_colors: true +draw_bold_text_with_bright_colors: true -# Colors (Tomorrow Night Bright) -colors: - # Default colors - primary: - background: '0x292d3e' - foreground: '0xbbc5ff' +####################################### +## START OF COLOR SCHEMES ## +####################################### +schemes: + ### Doom One ### + DoomOne: &DoomOne + primary: + background: '#282c34' + foreground: '#bbc2cf' + cursor: + text: CellBackground + cursor: '#528bff' + selection: + text: CellForeground + background: '#3e4451' + normal: + black: '#1c1f24' + red: '#ff6c6b' + green: '#98be65' + yellow: '#da8548' + blue: '#51afef' + magenta: '#c678dd' + cyan: '#5699af' + white: '#202328' + bright: + black: '#5b6268' + red: '#da8548' + green: '#4db5bd' + yellow: '#ecbe7b' + blue: '#3071db' # This is 2257a0 in Doom Emacs but I lightened it. + magenta: '#a9a1e1' + cyan: '#46d9ff' + white: '#dfdfdf' - # 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: '0x9a9a9a' - #bright_foreground: '0xffffff' + ### Dracula ### + Dracula: &Dracula + primary: + background: '#282a36' + foreground: '#f8f8f2' + cursor: + text: CellBackground + cursor: CellForeground + vi_mode_cursor: + text: CellBackground + cursor: CellForeground + search: + matches: + foreground: '#44475a' + background: '#50fa7b' + focused_match: + foreground: '#44475a' + background: '#ffb86c' + bar: + background: '#282a36' + foreground: '#f8f8f2' + line_indicator: + foreground: None + background: None + selection: + text: CellForeground + background: '#44475a' + normal: + black: '#000000' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#bd93f9' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#bfbfbf' + bright: + black: '#4d4d4d' + red: '#ff6e67' + green: '#5af78e' + yellow: '#f4f99d' + blue: '#caa9fa' + magenta: '#ff92d0' + cyan: '#9aedfe' + white: '#e6e6e6' + dim: + black: '#14151b' + red: '#ff2222' + green: '#1ef956' + yellow: '#ebf85b' + blue: '#4d5b86' + magenta: '#ff46b0' + cyan: '#59dffc' + white: '#e6e6d1' - # Cursor colors - # - # Colors which should be used to draw the terminal cursor. If these are unset, - # the cursor color will be the inverse of the cell color. - #cursor: - # text: '0x000000' - # cursor: '0xffffff' + ### Gruvbox dark ### + GruvboxDark: &GruvboxDark + # Default colors + primary: + # hard contrast: background = '0x1d2021' + background: '#282828' + # soft contrast: background = '0x32302f' + foreground: '#ebdbb2' - # Selection colors - # - # Colors which should be used to draw the selection area. If selection - # background is unset, selection color will be the inverse of the cell colors. - # If only text is unset the cell text color will remain the same. - selection: - text: '0x292d3e' - background: '0xbbc5ff' + # Normal colors + normal: + black: '#282828' + red: '#cc241d' + green: '#98971a' + yellow: '#d79921' + blue: '#458588' + magenta: '#b16286' + cyan: '#689d6a' + white: '#a89984' - # Normal colors - normal: - black: '0x292d3e' - red: '0xf07178' - green: '0xc3e88d' - yellow: '0xffcb6b' - blue: '0x82aaff' - magenta: '0xc792ea' - cyan: '0x89ddff' - white: '0xd0d0d0' + # Bright colors + bright: + black: '#928374' + red: '#fb4934' + green: '#b8bb26' + yellow: '#fabd2f' + blue: '#83a598' + magenta: '#d3869b' + cyan: '#8ec07c' + white: '#ebdbb2' - # Bright colors - bright: - black: '0x434758' - red: '0xff8b92' - green: '0xddffa7' - yellow: '0xffe585' - blue: '0x9cc4ff' - magenta: '0xe1acff' - cyan: '0xa3f7ff' - white: '0xffffff' +### Monokai ### + MonokaiPro: &MonokaiPro + # Default colors + primary: + background: '#2D2A2E' + foreground: '#FCFCFA' - # Dim colors - # - # If the dim colors are not set, they will be calculated automatically based - # on the `normal` colors. - #dim: - # black: '0x000000' - # red: '0x8c3336' - # green: '0x7a8530' - # yellow: '0x97822e' - # blue: '0x506d8f' - # magenta: '0x80638e' - # cyan: '0x497e7a' - # white: '0x9a9a9a' + # Normal colors + normal: + black: '#403E41' + red: '#FF6188' + green: '#A9DC76' + yellow: '#FFD866' + blue: '#FC9867' + magenta: '#AB9DF2' + cyan: '#78DCE8' + white: '#FCFCFA' - # 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: '0xff00ff' }` - # - #indexed_colors: [] + # Bright colors + bright: + black: '#727072' + red: '#FF6188' + green: '#A9DC76' + yellow: '#FFD866' + blue: '#FC9867' + magenta: '#AB9DF2' + cyan: '#78DCE8' + white: '#FCFCFA' + + ### Nord ### + Nord: &Nord + # Default colors + primary: + background: '#2E3440' + foreground: '#D8DEE9' + + # Normal colors + normal: + black: '#3B4252' + red: '#BF616A' + green: '#A3BE8C' + yellow: '#EBCB8B' + blue: '#81A1C1' + magenta: '#B48EAD' + cyan: '#88C0D0' + white: '#E5E9F0' + + # Bright colors + bright: + black: '#4C566A' + red: '#BF616A' + green: '#A3BE8C' + yellow: '#EBCB8B' + blue: '#81A1C1' + magenta: '#B48EAD' + cyan: '#8FBCBB' + white: '#ECEFF4' + + ### Oceanic Next ### + OceanicNext: &OceanicNext + # Default colors + primary: + background: '#1b2b34' + foreground: '#d8dee9' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#1b2b34' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#343d46' + red: '#EC5f67' + green: '#99C794' + yellow: '#FAC863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#d8dee9' + + # Bright colors + bright: + black: '#343d46' + red: '#EC5f67' + green: '#99C794' + yellow: '#FAC863' + blue: '#6699cc' + magenta: '#c594c5' + cyan: '#5fb3b3' + white: '#d8dee9' + + ### Palenight ### + Palenight: &Palenight + # Default colors + primary: + background: '#292d3e' + foreground: '#d0d0d0' + + # Normal colors + normal: + black: '#292d3e' + red: '#f07178' + green: '#c3e88d' + yellow: '#ffcb6b' + blue: '#82aaff' + magenta: '#c792ea' + cyan: '#89ddff' + white: '#d0d0d0' + + # Bright colors + bright: + black: '#434758' + red: '#ff8b92' + green: '#ddffa7' + yellow: '#ffe585' + blue: '#9cc4ff' + magenta: '#e1acff' + cyan: '#a3f7ff' + white: '#ffffff' + + ### Solarized Dark ### + SolarizedDark: &SolarizedDark + # Default colors + primary: + background: '#002b36' # base03 + foreground: '#839496' # base0 + + # Cursor colors + cursor: + text: '#002b36' # base03 + cursor: '#839496' # base0 + + # Normal colors + normal: + black: '#073642' # base02 + red: '#dc322f' # red + green: '#859900' # green + yellow: '#b58900' # yellow + blue: '#268bd2' # blue + magenta: '#d33682' # magenta + cyan: '#2aa198' # cyan + white: '#eee8d5' # base2 + + # Bright colors + bright: + black: '#002b36' # base03 + red: '#cb4b16' # orange + green: '#586e75' # base01 + yellow: '#657b83' # base00 + blue: '#839496' # base0 + magenta: '#6c71c4' # violet + cyan: '#93a1a1' # base1 + white: '#fdf6e3' # base3 + + ### Solarized Light ### + SolarizedLight: &SolarizedLight + # Default colors + primary: + background: '#fdf6e3' # base3 + foreground: '#657b83' # base00 + + # Cursor colors + cursor: + text: '#fdf6e3' # base3 + cursor: '#657b83' # base00 + + # Normal colors + normal: + black: '#073642' # base02 + red: '#dc322f' # red + green: '#859900' # green + yellow: '#b58900' # yellow + blue: '#268bd2' # blue + magenta: '#d33682' # magenta + cyan: '#2aa198' # cyan + white: '#eee8d5' # base2 + + # Bright colors + bright: + black: '#002b36' # base03 + red: '#cb4b16' # orange + green: '#586e75' # base01 + yellow: '#657b83' # base00 + blue: '#839496' # base0 + magenta: '#6c71c4' # violet + cyan: '#93a1a1' # base1 + white: '#fdf6e3' # base3 + + ### Tomorrow Night ### + TomorrowNight: &TomorrowNight + # Default colors + primary: + background: '#1d1f21' + foreground: '#c5c8c6' + + # Colors the cursor will use if `custom_cursor_colors` is true + cursor: + text: '#1d1f21' + cursor: '#ffffff' + + # Normal colors + normal: + black: '#1d1f21' + red: '#cc6666' + green: '#b5bd68' + yellow: '#e6c547' + blue: '#81a2be' + magenta: '#b294bb' + cyan: '#70c0ba' + white: '#373b41' + + # Bright colors + bright: + black: '#666666' + red: '#ff3334' + green: '#9ec400' + yellow: '#f0c674' + blue: '#81a2be' + magenta: '#b77ee0' + cyan: '#54ced6' + white: '#282a2e' + +###################################################################### +## SET THEME: Choose ONE color scheme from those in the above list. ## +## ################################################################### +# Available themes are: +# *DoomOne +# *Dracula +# *GruvboxDark +# *MonokaiPro +# *Nord +# *OceanicNext +# *Palenight +# *SolarizedLight +# *SolarizedDark +# *TomorrowNight + +colors: *OceanicNext + +####################################### +## END OF COLOR SCHEMES ## +####################################### # Visual Bell # @@ -284,20 +577,13 @@ colors: #visual_bell: # animation: EaseOutExpo # duration: 0 -# color: '0xffffff' +# color: '#ffffff' -# Background opacity -# -# Window opacity as a floating point number from `0.0` to `1.0`. -# The value `0.0` is completely transparent and `1.0` is opaque. -# background_opacity: 1.0 -background_opacity: 1.0 - -#selection: +selection: #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" # When set to `true`, selected text will be copied to the primary clipboard. - #save_to_clipboard: false + save_to_clipboard: true # Allow terminal applications to change Alacritty's window title. #dynamic_title: true @@ -327,8 +613,8 @@ background_opacity: 1.0 # - (macOS) /bin/bash --login # - (Linux/BSD) user login shell # - (Windows) powershell -shell: - program: /bin/fish +#shell: +# program: /bin/bash # args: # - --login @@ -375,7 +661,7 @@ shell: # Record all characters and escape sequences as test data. #ref_test: false -mouse: +#mouse: # Click settings # # The `double_click` and `triple_click` settings control the time @@ -385,7 +671,7 @@ mouse: #triple_click: { threshold: 300 } # If this is `true`, the cursor is temporarily hidden when typing. - hide_when_typing: true + #hide_when_typing: false #url: # URL launcher @@ -533,18 +819,20 @@ mouse: # a no-op if you do not wish to receive input characters for that binding. key_bindings: # (Windows, Linux, and BSD only) - - { key: V, mods: Control|Shift, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - - { key: Insert, mods: Shift, action: PasteSelection } - - { key: R, mods: Control, action: ResetFontSize } - - { key: Equals, mods: Control, action: IncreaseFontSize } - - { key: Minus, mods: Control, action: DecreaseFontSize } + - { key: V, mods: Control|Shift, action: Paste } + - { key: C, mods: Control|Shift, action: Copy } + - { key: Insert, mods: Shift, action: PasteSelection } + - { key: R, mods: Control, action: ResetFontSize } + - { key: Equals, mods: Control, action: IncreaseFontSize } + - { key: Plus, mods: Control, action: IncreaseFontSize } + - { key: Minus, mods: Control, action: DecreaseFontSize } + - { key: F11, mods: None, action: ToggleFullscreen } + - { key: Paste, mods: None, action: Paste } + - { key: Copy, mods: None, action: Copy } + - { key: L, mods: Control, action: ClearLogNotice } + - { key: L, mods: Control, chars: "\x0c" } + - { key: PageUp, mods: None, action: ScrollPageUp, mode: ~Alt } + - { key: PageDown, mods: None, action: ScrollPageDown, mode: ~Alt } + - { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } + - { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } - - { key: Paste, action: Paste } - - { key: Copy, action: Copy } - - { key: L, mods: Control, action: ClearLogNotice } - - { key: L, mods: Control, chars: "\x0c" } - - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } - - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } - - { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } - - { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } diff --git a/.config/fish/functions/cache.fish b/.config/fish/functions/cache.fish index 64ab2ae..25817d7 100644 --- a/.config/fish/functions/cache.fish +++ b/.config/fish/functions/cache.fish @@ -1,7 +1,7 @@ function cache /usr/bin/yay -Scc --noconfirm /usr/bin/yay -Sc --noconfirm - #/usr/bin/gem cleanup --silent + /usr/bin/gem cleanup --silent /usr/bin/go clean -modcache -cache -testcache /usr/bin/composer clear-cache /usr/bin/python -m pip cache purge diff --git a/.config/fish/functions/drop.fish b/.config/fish/functions/drop.fish new file mode 100644 index 0000000..0da1deb --- /dev/null +++ b/.config/fish/functions/drop.fish @@ -0,0 +1,5 @@ +function drop + /usr/bin/sudo /usr/bin/parted /dev/sda --script -- mklabel msdos + /usr/bin/sudo /usr/bin/parted /dev/sda --script -- mkpart primary fat32 1MiB 100% + /usr/bin/sudo /usr/bin/mkfs.vfat -F32 /dev/sda1 +end diff --git a/.config/fish/functions/usb.fish b/.config/fish/functions/usb.fish new file mode 100644 index 0000000..5b05355 --- /dev/null +++ b/.config/fish/functions/usb.fish @@ -0,0 +1,3 @@ +function usb + /usr/bin/sudo /usr/bin/mount /dev/sda1 /mnt/usb/ --options uid=1000,gid=984 +end diff --git a/README.md b/README.md index dd294f8..fc6f4a8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Bulk commands ``` -yay -S spectrwm fish openssh rofi xorg xorg-server scrot xorg-xinit alacritty ranger feh nerd-fonts-complete xf86-video-intel librewolf-bin cifs-utils pulseaudio-alsa pulseaudio-ctl slock xautolock zip unzip alsa-utils redshift-minimal numlockx usbutils cmatrix yubikey-touch-detector tlp powertop +yay -S spectrwm fish openssh rofi xorg xorg-server scrot xorg-xinit alacritty ranger feh xf86-video-intel librewolf-bin cifs-utils pulseaudio-alsa pulseaudio-ctl slock xautolock zip unzip alsa-utils redshift-minimal numlockx usbutils cmatrix yubikey-touch-detector tlp powertop cp dotfiles/.xinitrc ~/ cp dotfiles/.fehbg ~/ cp dotfiles/.bash_profile ~/ @@ -123,11 +123,19 @@ git config --global commit.gpgsign true ### Configure vim ``` +curl -LOsSf https://raw.githubusercontent.com/glepnir/oceanic-material/master/colors/oceanic_material.vim +sudo mv oceanic_material.vim /usr/share/vim/vim90/colors/ echo "syntax on" | sudo tee -a /etc/vimrc -echo "colo desert" | sudo tee -a /etc/vimrc +echo "colorscheme oceanic_material" | sudo tee -a /etc/vimrc echo "filetype plugin indent on" | sudo tee -a /etc/vimrc ``` +### Disable sleep mode when closing the lid +``` +sudo sed -i "s/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/" /etc/systemd +/logind.conf +``` + ## Specific installations ### Docker @@ -186,7 +194,7 @@ Replace `{default, stable, nighlty}` by the toolchain you want install. ``` yay -S rustup -rustup {default, stable, nightly} +rustup default {stable, nightly} ``` #### Update toolchain