From 7ab6ef170dc4338b4be844ab3c4ded980e90b888 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 3 Feb 2025 17:51:15 +0000 Subject: [PATCH] Update config files --- README.md | 1 - home/vylpes/.config/alacritty/alacritty.toml | 77 ++++++++++++++++++ home/vylpes/.config/alacritty/alacritty.yml | 58 ------------- home/vylpes/.config/dunst/dunstrc | 1 + home/vylpes/.config/i3/config | 42 +++++++--- home/vylpes/.config/nvim/coc-settings.json | 9 +++ home/vylpes/.config/nvim/init.vim | 81 +++++++++++++++++++ home/vylpes/.config/picom/picom.conf | 1 + home/vylpes/.config/polybar/config.ini | 49 ++++++++--- home/vylpes/.config/yt-dlp/config | 22 +++++ home/vylpes/.mutt/muttrc | 20 ----- .../audio/get-sink-name.sh | 3 +- home/vylpes/scripts/system/power.sh | 18 +++++ 13 files changed, 280 insertions(+), 102 deletions(-) create mode 100644 home/vylpes/.config/alacritty/alacritty.toml delete mode 100644 home/vylpes/.config/alacritty/alacritty.yml create mode 100644 home/vylpes/.config/nvim/coc-settings.json create mode 100644 home/vylpes/.config/yt-dlp/config delete mode 100644 home/vylpes/.mutt/muttrc rename home/vylpes/{.scripts => scripts}/audio/get-sink-name.sh (92%) create mode 100644 home/vylpes/scripts/system/power.sh diff --git a/README.md b/README.md index 1153341..bd44da1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ This is a list of the packages I use - cmatrix - cups - discord -- doas - dolphin-emu - dunst - flameshot diff --git a/home/vylpes/.config/alacritty/alacritty.toml b/home/vylpes/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..e14d358 --- /dev/null +++ b/home/vylpes/.config/alacritty/alacritty.toml @@ -0,0 +1,77 @@ +[colors] +draw_bold_text_with_bright_colors = true + +[env] +TERM = "xterm-256color" + +[font] +size = 11.0 + +[font.bold] +family = "Hack" +style = "Bold" + +[font.bold_italic] +family = "Hack" +style = "Bold Italic" + +[font.italic] +family = "Hack" +style = "Italic" + +[font.normal] +family = "Hack" +style = "Regular" + +[font.offset] +x = 0 +y = 1 + +[[keyboard.bindings]] +action = "Paste" +key = "V" +mods = "Control|Shift" + +[[keyboard.bindings]] +action = "Copy" +key = "C" +mods = "Control|Shift" + +[[keyboard.bindings]] +action = "ScrollPageUp" +key = "PageUp" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollPageDown" +key = "PageDown" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToTop" +key = "Home" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToBottom" +key = "End" +mods = "Shift" + +[scrolling] +history = 5000 + +[window] +opacity = 1 +title = "Alacritty" + +[window.class] +general = "Alacritty" +instance = "Alacritty" + +[window.dimensions] +columns = 133 +lines = 40 + +[window.padding] +x = 6 +y = 6 diff --git a/home/vylpes/.config/alacritty/alacritty.yml b/home/vylpes/.config/alacritty/alacritty.yml deleted file mode 100644 index 57d36c3..0000000 --- a/home/vylpes/.config/alacritty/alacritty.yml +++ /dev/null @@ -1,58 +0,0 @@ -env: - TERM: xterm-256color - -window: - dimensions: - columns: 133 - lines: 40 - - padding: - x: 6 - y: 6 - - title: Alacritty - - class: - instance: Alacritty - general: Alacritty - - opacity: 1 - -scrolling: - history: 5000 - -font: - normal: - family: Hack - style: Regular - - bold: - family: Hack - style: Bold - - italic: - family: Hack - style: Italic - - bold_italic: - family: Hack - style: Bold Italic - - size: 11.0 - - offset: - x: 0 - y: 1 - -draw_bold_text_with_bright_colors: true - -key_bindings: - - { key: V, mods: Control|Shift, action: Paste } - - { key: C, mods: Control|Shift, action: Copy } - - { key: PageUp, mods: Shift, action: ScrollPageUp } - - { key: PageDown, mods: Shift, action: ScrollPageDown } - - { key: Home, mods: Shift, action: ScrollToTop } - - { key: End, mods: Shift, action: ScrollToBottom } - -shell: - program: /bin/zsh diff --git a/home/vylpes/.config/dunst/dunstrc b/home/vylpes/.config/dunst/dunstrc index 336daf3..04bdfb9 100644 --- a/home/vylpes/.config/dunst/dunstrc +++ b/home/vylpes/.config/dunst/dunstrc @@ -436,3 +436,4 @@ # set_stack_tag = "volume" # # vim: ft=cfg + diff --git a/home/vylpes/.config/i3/config b/home/vylpes/.config/i3/config index 68ece06..a0aa2d1 100644 --- a/home/vylpes/.config/i3/config +++ b/home/vylpes/.config/i3/config @@ -28,7 +28,7 @@ exec --no-startup-id dex --autostart --environment i3 # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-fancy --nofork # NetworkManager is the most popular way to manage wireless networks on Linux, # and nm-applet is a desktop environment-independent system tray GUI for it. @@ -38,29 +38,41 @@ exec_always --no-startup-id picom exec_always --no-startup-id nitrogen --restore exec_always --no-startup-id dunst exec_always --no-startup-id xborders --disable-version-warning --border-red 79 --border-green 190 --border-blue 217 --border-radius 15 +exec_always --no-startup-id nextcloud --background exec --no-startup-id polybar -r exec --no-startup-id "sh /home/vylpes/.screenlayout/default.sh" # Use pactl to adjust volume in PulseAudio. # Add "&& $refresh_i3status" if needed set $refresh_i3status killall -SIGUSR1 polybar -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle +# Use playerctl to control playback +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioPause exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + +# Use brightnessctl to adjust brightness +bindsym XF86MonBrightnessUp exec brightnessctl set 10%+ +bindsym XF86MonBrightnessDown exec brightnessctl set 10%- + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod # Custom keybinds bindsym $mod+s exec --no-startup-id flameshot gui -p ~/Pictures/captures --clipboard bindsym $mod+f exec --no-startup-id firefox +bindsym $mod+u exec --no-startup-id autorandr -c bindsym $mod+Shift+f exec --no-startup-id firefox --private-window bindsym $mod+Shift+z exec --no-startup-id i3lock-fancy -g -t "System Locked" -f Hack-Regular # ===== # start a terminal -bindsym $mod+a exec i3-sensible-terminal +bindsym $mod+a exec alacritty # kill focused window bindsym $mod+Shift+c kill @@ -182,7 +194,7 @@ bindsym $mod+Mod1+r reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" +bindsym $mod+Shift+e exec "bash /home/vylpes/.cache/scripts/power.sh" # resize window (you can also use the mouse for that) mode "resize" { @@ -211,18 +223,22 @@ mode "resize" { bindsym $mod+r mode "resize" +# Windows to force floating +for_window [class="Plexamp"] floating enable + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) # Gaps -gaps inner 10 -gaps outer 10 -gaps horizontal 10 -gaps vertical 10 -gaps top 10 -gaps right 10 -gaps bottom 10 -gaps left 10 +gaps inner 5 +gaps outer -5 +gaps horizontal 5 +gaps vertical 5 +gaps top 5 +gaps right 5 +gaps bottom 5 +gaps left 5 default_border pixel 1 client.focused #555555 #555555 #ffffff #2e9ef4 #63C5DA + diff --git a/home/vylpes/.config/nvim/coc-settings.json b/home/vylpes/.config/nvim/coc-settings.json new file mode 100644 index 0000000..eefcc3e --- /dev/null +++ b/home/vylpes/.config/nvim/coc-settings.json @@ -0,0 +1,9 @@ +{ + "languageserver": { + "csharp_ls": { + "command": "csharp-ls", + "filetypes": ["cs"], + "rootPatterns": ["*.csproj", ".vim/", ".git/", ".hg/"] + } + } +} diff --git a/home/vylpes/.config/nvim/init.vim b/home/vylpes/.config/nvim/init.vim index 4fd827e..32d91e7 100644 --- a/home/vylpes/.config/nvim/init.vim +++ b/home/vylpes/.config/nvim/init.vim @@ -1,3 +1,6 @@ +let mapleader = " " +let g:copilot_enabled = v:false + set nocompatible set showmatch set ignorecase @@ -10,6 +13,7 @@ set expandtab set shiftwidth=4 set autoindent set number +set relativenumber set wildmode=longest,list set cc=80 filetype plugin indent on @@ -19,6 +23,13 @@ set clipboard=unnamedplus filetype plugin on set cursorline set ttyfast +set nofixeol + +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif call plug#begin("~/.vim/plugged") Plug 'dracula/vim' @@ -29,8 +40,39 @@ call plug#begin("~/.vim/plugged") Plug 'preservim/nerdcommenter' Plug 'mhinz/vim-startify' Plug 'neoclide/coc.nvim', {'branch': 'release'} + Plug 'nvim-lua/plenary.nvim' + Plug 'ThePrimeagen/harpoon' + Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } + Plug 'junegunn/fzf.vim' + Plug 'neovim/nvim-lspconfig' + Plug 'jose-elias-alvarez/null-ls.nvim' + Plug 'MunifTanjim/prettier.nvim' + Plug 'github/copilot.vim' + Plug 'CopilotC-Nvim/CopilotChat.nvim', { 'branch': 'canary' } call plug#end() +lua << EOF +local prompts = require('CopilotChat.prompts') +local select = require('CopilotChat.select') + +require("CopilotChat").setup { + debug = false, + + question_header = '## User ', + answer_header = '## Copilot ', + error_header = '## Error ', + separator = '---', + + selection = function(source) + return select.visual(source) or select.line(source) + end, + + window = { + layout = 'float', + }, +} +EOF + if (has("termguicolors")) set termguicolors endif @@ -60,3 +102,42 @@ nnoremap gf :vert winc f inoremap coc#pum#visible() ? coc#_select_confirm() : "\u\" inoremap coc#pum#visible() ? coc#pum#next(1) : "\" inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" + +nnoremap n :NERDTreeFocus +nnoremap :NERDTree +nnoremap :NERDTreeToggle +nnoremap :NERDTreeFind +nnoremap ee :Ex + +nnoremap ha lua require("harpoon.mark").add_file() +nnoremap hh lua require("harpoon.ui").toggle_quick_menu() +nnoremap 1 lua require("harpoon.ui").nav_file(1) +nnoremap 2 lua require("harpoon.ui").nav_file(2) +nnoremap 3 lua require("harpoon.ui").nav_file(3) +nnoremap 4 lua require("harpoon.ui").nav_file(4) +nnoremap lua require("harpoon.ui").nav_prev() +nnoremap lua require("harpoon.ui").nav_next() + +nnoremap ff :FZF + +nnoremap mm :nohl +nnoremap ml :%s/\r//g + +nnoremap yb :!yarn build +nnoremap yi :!yarn install +nnoremap ys :!yarn start +nnoremap yt :!yarn test + +nnoremap dr :!dotnet run + +nnoremap p (prettier-format) + +nnoremap :CopilotChatToggle +nnoremap ps :CopilotChatStop +nnoremap pr :CopilotChatReset +vnoremap pe :CopilotChatExplain +vnoremap pr :CopilotChatReview +vnoremap pf :CopilotChatFix +vnoremap po :CopilotChatOptimize +vnoremap pd :CopilotChatDocs +vnoremap pt :CopilotChatTests diff --git a/home/vylpes/.config/picom/picom.conf b/home/vylpes/.config/picom/picom.conf index 8f2b62e..ff9b5e7 100644 --- a/home/vylpes/.config/picom/picom.conf +++ b/home/vylpes/.config/picom/picom.conf @@ -428,3 +428,4 @@ wintypes: popup_menu = { opacity = 0.8; } dropdown_menu = { opacity = 0.8; } }; + diff --git a/home/vylpes/.config/polybar/config.ini b/home/vylpes/.config/polybar/config.ini index a30afba..a1e8c31 100644 --- a/home/vylpes/.config/polybar/config.ini +++ b/home/vylpes/.config/polybar/config.ini @@ -38,6 +38,7 @@ foreground = ${colors.foreground} line-size = 3pt border-size = 4pt +border-bottom-size = 0pt border-color = #00000000 padding-left = 0 @@ -49,10 +50,11 @@ separator = | separator-foreground = ${colors.disabled} font-0 = Hack;2 -font-1 = Font Awesome +font-1 = Font Awesome 6 Free:style=Regular;2 +font-2 = Font Awesome 6 Free:style=Solid;2 modules-left = xworkspaces xwindow -modules-right = filesystem audiooutput pulseaudio xkeyboard memory cpu date +modules-right = filesystem pulseaudio-control-output xkeyboard memory cpu battery tray date cursor-click = pointer cursor-scroll = ns-resize @@ -113,14 +115,16 @@ label-volume = %percentage%% label-muted = muted label-muted-foreground = ${colors.disabled} -[module/audiooutput] +[module/pulseaudio-control-output] type = custom/script -exec = cat ~/.cache/scripts/get-sink-name.txt -interval = 1 -format =