diff --git a/.config/alacritty.yml b/.config/alacritty.yml index ecf96d6..504e21a 100644 --- a/.config/alacritty.yml +++ b/.config/alacritty.yml @@ -102,7 +102,7 @@ #multiplier: 3 # Font configuration -font: +#font: # Normal (roman) font face #normal: # Font family @@ -150,7 +150,7 @@ font: #style: Bold Italic # Point size - size: 14.0 + #size: 11.0 # Offset is the extra space around each character. `offset.y` can be thought # of as modifying the line spacing, and `offset.x` as modifying the letter diff --git a/.config/gammastep/config.ini b/.config/gammastep/config.ini deleted file mode 100644 index c3c2b21..0000000 --- a/.config/gammastep/config.ini +++ /dev/null @@ -1,6 +0,0 @@ -[general] -location-provider=manual - -[manual] -lat=44 -lon=2 diff --git a/.config/nvim/epitech_header.vim b/.config/nvim/epitech_header.vim new file mode 100644 index 0000000..4ef8237 --- /dev/null +++ b/.config/nvim/epitech_header.vim @@ -0,0 +1,35 @@ +function! EpitechHeader() + let com_arr = { + \ 'c': {'top': '/*', 'mid': '**', 'bot': '*/'}, + \ 'cpp': {'top': '/*', 'mid': '**', 'bot': '*/'}, + \ 'make': {'top': '##', 'mid': '##', 'bot': '##'} + \ } + + if (!has_key(com_arr, &filetype)) + echoerr "Unsupported filetype: " . &filetype + return + endif + + let top = com_arr[&filetype]['top'] + let mid = com_arr[&filetype]['mid'] + let bot = com_arr[&filetype]['bot'] + let dir_name = fnamemodify(getcwd(), ':t') + let proj_name = input('Enter project name (default ' . dir_name . '): ') + let file_name = expand('%:t:r') + let file_desc = input('Enter file description (default ' . file_name . '): ') + + if file_desc == '' + let file_desc = file_name + endif + if proj_name == '' + let proj_name = dir_name + endif + call append(0, top) + call append(1, mid . ' EPITECH PROJECT, ' . strftime('%Y')) + call append(2, mid . ' ' . proj_name) + call append(3, mid . ' File description:') + call append(4, mid . ' ' . file_desc) + call append(5, bot) +endfunction + +command Header call EpitechHeader() diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..13a0412 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,73 @@ +" variables +let &path = getcwd() . '/**' . ',' . &path +let g:netrw_liststyle=3 " tree style file explorer +set expandtab +set smartindent +set shiftwidth=4 +set tabstop=4 +set number relativenumber +set ignorecase +set smartcase +set list +set mouse=a +au BufNewFile,BufRead *.c set cc=81 +au BufNewFile,BufRead *.h set cc=81 + +" packages +source ~/.config/nvim/epitech_header.vim +packadd! nvim-treesitter +lua require('nvim-treesitter.configs').setup {highlight = {enable = true}} + +"packadd! nvim-lspconfig + +"lua << EOF +" local nvim_lsp = require('lspconfig') +" +" -- Use an on_attach function to only map the following keys +" -- after the language server attaches to the current buffer +" local on_attach = function(client, bufnr) +" local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end +" local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end +" +" -- Enable completion triggered by +" buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') +" +" -- Mappings. +" local opts = { noremap=true, silent=true } +" +" -- See `:help vim.lsp.*` for documentation on any of the below functions +" buf_set_keymap('n', 'gD', 'lua vim.lsp.buf.declaration()', opts) +" buf_set_keymap('n', 'gd', 'lua vim.lsp.buf.definition()', opts) +" buf_set_keymap('n', 'K', 'lua vim.lsp.buf.hover()', opts) +" buf_set_keymap('n', 'gi', 'lua vim.lsp.buf.implementation()', opts) +" buf_set_keymap('n', '', 'lua vim.lsp.buf.signature_help()', opts) +" buf_set_keymap('n', 'wa', 'lua vim.lsp.buf.add_workspace_folder()', opts) +" buf_set_keymap('n', 'wr', 'lua vim.lsp.buf.remove_workspace_folder()', opts) +" buf_set_keymap('n', 'wl', 'lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))', opts) +" buf_set_keymap('n', 'D', 'lua vim.lsp.buf.type_definition()', opts) +" buf_set_keymap('n', 'rn', 'lua vim.lsp.buf.rename()', opts) +" buf_set_keymap('n', 'ca', 'lua vim.lsp.buf.code_action()', opts) +" buf_set_keymap('n', 'gr', 'lua vim.lsp.buf.references()', opts) +" buf_set_keymap('n', 'e', 'lua vim.diagnostic.open_float()', opts) +" buf_set_keymap('n', '[d', 'lua vim.diagnostic.goto_prev()', opts) +" buf_set_keymap('n', ']d', 'lua vim.diagnostic.goto_next()', opts) +" buf_set_keymap('n', 'q', 'lua vim.diagnostic.setloclist()', opts) +" buf_set_keymap('n', 'f', 'lua vim.lsp.buf.formatting()', opts) +" +" end +" +" -- Use a loop to conveniently call 'setup' on multiple servers and +" -- map buffer local keybindings when the language server attaches +" local servers = {'clangd'} +" for _, lsp in ipairs(servers) do +" nvim_lsp[lsp].setup { +" on_attach = on_attach, +" flags = { +" debounce_text_changes = 150, +" } +" } +" end +"EOF + +" keybindings +nnoremap :Header diff --git a/.config/nvim/pack/plugins/opt/nvim-lspconfig b/.config/nvim/pack/plugins/opt/nvim-lspconfig new file mode 160000 index 0000000..bbba0cc --- /dev/null +++ b/.config/nvim/pack/plugins/opt/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit bbba0ccbf8aef4dd36d4ed7fa49518387285534d diff --git a/.config/nvim/pack/plugins/opt/nvim-treesitter b/.config/nvim/pack/plugins/opt/nvim-treesitter new file mode 160000 index 0000000..1d66657 --- /dev/null +++ b/.config/nvim/pack/plugins/opt/nvim-treesitter @@ -0,0 +1 @@ +Subproject commit 1d66657e6d0f1f8f79ddc48ff1dac9788694cc2d diff --git a/.config/suckless b/.config/suckless new file mode 160000 index 0000000..b8666c7 --- /dev/null +++ b/.config/suckless @@ -0,0 +1 @@ +Subproject commit b8666c784e7565e1399495ba6bea1c652c721533 diff --git a/.config/sway/config b/.config/sway/config deleted file mode 100644 index a698e17..0000000 --- a/.config/sway/config +++ /dev/null @@ -1,9 +0,0 @@ -# Config for sway -# Read `man 5 sway` for a complete reference. - -include "$HOME"/.config/sway/config.d/variables.conf -include "$HOME"/.config/sway/config.d/output.conf -include "$HOME"/.config/sway/config.d/startup.conf -include "$HOME"/.config/sway/config.d/input.conf -include "$HOME"/.config/sway/config.d/hotkeys.conf -#include "$HOME"/.config/sway/config.d/bar.conf diff --git a/.config/sway/config.d/bar.conf b/.config/sway/config.d/bar.conf deleted file mode 100644 index c7271ad..0000000 --- a/.config/sway/config.d/bar.conf +++ /dev/null @@ -1,16 +0,0 @@ -# Read `man 5 sway-bar` for more information about this section. -bar { - position top - #tray_output primary - - # Date - status_command while date +'%a %b %d, %R'; do sleep $(($clock_refresh_rate-$(date +%S)%$clock_refresh_rate)); done - - strip_workspace_numbers yes - colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c - } -} - diff --git a/.config/sway/config.d/hotkeys.conf b/.config/sway/config.d/hotkeys.conf deleted file mode 100644 index ad3e84d..0000000 --- a/.config/sway/config.d/hotkeys.conf +++ /dev/null @@ -1,90 +0,0 @@ -## Basics: - # Default apps - bindsym $mod+Return exec $term - bindsym $mod+b workspace $ws2; exec $browser - bindsym $mod+e exec $files - bindsym $mod+l exec $lock - bindsym $mod+Print exec screenshot - bindsym $mod+Shift+Print exec screenshot_gui - - # Hotkeys - bindsym XF86AudioRaiseVolume exec $raise_volume - bindsym XF86AudioLowerVolume exec $lower_volume - bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle - bindsym Shift+XF86AudioMute exec pactl set-source-mute 0 toggle - - bindsym XF86AudioPlay exec playerctl play-pause - bindsym Shift+Insert exec playerctl play-pause - bindsym XF86AudioPrev exec playerctl previous - bindsym Shift+Prior exec playerctl previous - bindsym XF86AudioNext exec playerctl next - bindsym Shift+Next exec playerctl next - - bindsym Ctrl+F4 input type:touchpad events toggle - - bindsym XF86MonBrightnessDown exec $lower_backlight - bindsym XF86MonBrightnessUp exec $raise_backlight - - # Kill focused window - bindsym $mod+Shift+c kill - - # Start your launcher - bindsym $mod+r exec $menu - - # Drag window $mod + left - # Resize window $mod + right - floating_modifier $mod normal - - # Reload config - bindsym $mod+Ctrl+r reload - - # Exit sway - bindsym $mod+Ctrl+q exit - -## Moving around: - # Move your focus around - bindsym $mod+$down focus prev - bindsym $mod+$up focus next - - # Move the focused window with the same, but add Shift - bindsym $mod+Shift+$left move left - bindsym $mod+Shift+$down move down - bindsym $mod+Shift+$up move up - bindsym $mod+Shift+$right move right - -## Workspaces: - # Switch to workspace - bindsym $mod+1 workspace $ws1 - bindsym $mod+2 workspace $ws2 - bindsym $mod+3 workspace $ws3 - bindsym $mod+4 workspace $ws4 - bindsym $mod+5 workspace $ws5 - bindsym $mod+6 workspace $ws6 - bindsym $mod+7 workspace $ws7 - bindsym $mod+8 workspace $ws8 - bindsym $mod+9 workspace $ws9 - # Move focused client to workspace - bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 - bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 - bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 - bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 - bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 - bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 - bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 - bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 - bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 - - # You can "split" the current object of your focus with - # $mod+b or $mod+v, for horizontal and vertical splits - # respectively. - #bindsym $mod+b splith - #bindsym $mod+v splitv - - # Switch the current container between different layout styles - #bindsym $mod+e layout toggle split - - # Make the current focus fullscreen - bindsym $mod+f fullscreen - - # Toggle the current focus between tiling and floating mode - bindsym $mod+space floating toggle diff --git a/.config/sway/config.d/input.conf b/.config/sway/config.d/input.conf deleted file mode 100644 index 260d3d5..0000000 --- a/.config/sway/config.d/input.conf +++ /dev/null @@ -1,15 +0,0 @@ -input type:keyboard { - xkb_layout "us" - xkb_variant "altgr-intl" - xkb_numlock "enable" -} - -input type:pointer { - accel_profile "flat" -} - -input type:touchpad { - tap "enabled" - click_method "clickfinger" - natural_scroll "enabled" -} diff --git a/.config/sway/config.d/output.conf b/.config/sway/config.d/output.conf deleted file mode 100644 index dfb9fe1..0000000 --- a/.config/sway/config.d/output.conf +++ /dev/null @@ -1,3 +0,0 @@ -output HDMI-A-1 position 1920,0 -output eDP-1 mode --custom 1920x1080@120Hz position 0,0 -output * bg $wallpapers/mount_cook.jpg fill diff --git a/.config/sway/config.d/startup.conf b/.config/sway/config.d/startup.conf deleted file mode 100644 index 7840951..0000000 --- a/.config/sway/config.d/startup.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Lock after $screen_timeout -# Turn off screen after $screem_timeout - 10 -# Lock if screen off - -workspace $ws1 -exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 -exec swayidle -w \ - timeout $(($screen_timeout+10)) $lock \ - timeout $screen_timeout 'swaymsg "output * dpms off"' \ - resume 'swaymsg "output * dpms on"' \ - before-sleep $lock -exec gammastep -exec waybar -exec nm-applet --indicator -exec flameshot -exec alacritty -exec gnome-keyring-daemon --start diff --git a/.config/sway/config.d/variables.conf b/.config/sway/config.d/variables.conf deleted file mode 100644 index de58c56..0000000 --- a/.config/sway/config.d/variables.conf +++ /dev/null @@ -1,35 +0,0 @@ -set $mod Mod4 -# direction keys -set $left h -set $down j -set $up k -set $right l - -set $menu dmenu_path | dmenu | xargs swaymsg exec -- -set $term alacritty -set $browser brave -set $file pcmanfm -set $wallpapers "$HOME/.config/wallpapers" -set $lock "swaylock -F -f -i $wallpapers/lock.png" -set $screenshot "flameshot full -c" -set $screenshot_gui "flameshot gui" -set $raise_volume "pactl set-sink-mute 0 0 && pactl set-sink-volume 0 +2%" -set $lower_volume "pactl set-sink-mute 0 0 && pactl set-sink-volume 0 -2%" -set $raise_backlight "xbacklight +10" -set $lower_backlight "xbacklight -10" - -set $ws1 1:TTY -set $ws2 2:WEB -set $ws3 3:DEV -set $ws4 4:SBX -set $ws5 5:GAM -set $ws6 6:MED -set $ws7 7:DOC -set $ws8 8:GFX -set $ws9 9:ETC - -default_border pixel -gaps inner 4 -gaps outer 4 - -set $screen_timeout 600 diff --git a/.config/waybar/config b/.config/waybar/config deleted file mode 100644 index ef8d384..0000000 --- a/.config/waybar/config +++ /dev/null @@ -1,73 +0,0 @@ -{ - "modules-left": ["sway/workspaces", "sway/mode"], - "modules-center": ["sway/window"], - "modules-right": ["idle_inhibitor", "pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "clock"], - //"sway/mode": { - // "format": "{mode}" - //}, - "sway/workspaces": { - "format": "{name}" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "", - "deactivated": "" - } - }, - "tray": { - "icon-size": 22, - "spacing": 10 - }, - "clock": { - "format": "{:%a %b %d, %R}", - "tooltip-format": "{calendar}", - }, - "cpu": { - "format": "{usage}% ", - "tooltip": false - }, - "memory": { - "format": "{}% " - }, - "temperature": { - "critical-threshold": 80, - "format": "{temperatureC}°C {icon}", - "format-icons": ["", "", ""] - }, - "backlight": { - "format": "{percent}% {icon}", - "format-icons": ["", ""] - }, - "battery": { - "states": { - "warning": 30, - "critical": 15 - }, - "interval": 5, - "format": "{capacity}% {icon}", - "format-charging": "{capacity}% ", - "format-plugged": "{capacity}% ", - "format-alt": "{time} {icon}", - "format-icons": ["", "", "", "", ""] - }, - "pulseaudio": { - "scroll-step": 2, - "format": "{volume}% {icon} {format_source}", - "format-bluetooth": "{volume}% {icon} {format_source}", - "format-bluetooth-muted": " {icon} {format_source}", - "format-muted": " {format_source}", - "format-source": "{volume}% ", - "format-source-muted": "", - "format-icons": { - "headphone": "", - "hands-free": "", - "headset": "", - "phone": "", - "portable": "", - "car": "", - "default": ["", "", ""] - }, - "on-click": "pavucontrol" - }, -} diff --git a/.config/waybar/style.css b/.config/waybar/style.css deleted file mode 100644 index c0d4d9b..0000000 --- a/.config/waybar/style.css +++ /dev/null @@ -1,255 +0,0 @@ -* { - border: none; - border-radius: 0; - /* `otf-font-awesome` is required to be installed for icons */ - font-family: Roboto, Helvetica, Arial, sans-serif; - font-size: 13px; - min-height: 0; -} - -window#waybar { - background-color: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); - color: #ffffff; - transition-property: background-color; - transition-duration: .5s; -} - -window#waybar.hidden { - opacity: 0.2; -} - -/* -window#waybar.empty { - background-color: transparent; -} -window#waybar.solo { - background-color: #FFFFFF; -} -*/ - -window#waybar.termite { - background-color: #3F3F3F; -} - -window#waybar.chromium { - background-color: #000000; - border: none; -} - -#workspaces button { - padding: 0 5px; - background-color: transparent; - color: #ffffff; - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px transparent; -} - -/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ -#workspaces button:hover { - background: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px #ffffff; -} - -#workspaces button.focused { - background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; -} - -#workspaces button.urgent { - background-color: #eb4d4b; -} - -#mode { - background-color: #64727D; - border-bottom: 3px solid #ffffff; -} - -#clock, -#battery, -#cpu, -#memory, -#disk, -#temperature, -#backlight, -#network, -#pulseaudio, -#custom-media, -#tray, -#mode, -#idle_inhibitor, -#mpd { - padding: 0 10px; - margin: 0 4px; - color: #ffffff; -} - -#window, -#workspaces { - margin: 0 4px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; -} - -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { - margin-right: 0; -} - -#clock { - background-color: #64727D; -} - -#battery { - background-color: #ffffff; - color: #000000; -} - -#battery.charging, #battery.plugged { - color: #ffffff; - background-color: #26A65B; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} - -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: linear; - animation-iteration-count: infinite; - animation-direction: alternate; -} - -label:focus { - background-color: #000000; -} - -#cpu { - background-color: #2ecc71; - color: #000000; -} - -#memory { - background-color: #9b59b6; -} - -#disk { - background-color: #964B00; -} - -#backlight { - background-color: #90b1b1; -} - -#network { - background-color: #2980b9; -} - -#network.disconnected { - background-color: #f53c3c; -} - -#pulseaudio { - background-color: #f1c40f; - color: #000000; -} - -#pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; -} - -#custom-media { - background-color: #66cc99; - color: #2a5c45; - min-width: 100px; -} - -#custom-media.custom-spotify { - background-color: #66cc99; -} - -#custom-media.custom-vlc { - background-color: #ffa000; -} - -#temperature { - background-color: #f0932b; -} - -#temperature.critical { - background-color: #eb4d4b; -} - -#tray { - background-color: #2980b9; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; -} - -#idle_inhibitor { - background-color: #2d3436; -} - -#idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; -} - -#mpd { - background-color: #66cc99; - color: #2a5c45; -} - -#mpd.disconnected { - background-color: #f53c3c; -} - -#mpd.stopped { - background-color: #90b1b1; -} - -#mpd.paused { - background-color: #51a37a; -} - -#language { - background: #00b093; - color: #740864; - padding: 0 5px; - margin: 0 5px; - min-width: 16px; -} - -#keyboard-state { - background: #97e1ad; - color: #000000; - padding: 0 0px; - margin: 0 5px; - min-width: 16px; -} - -#keyboard-state > label { - padding: 0 5px; -} - -#keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); -} diff --git a/.gitmodules b/.gitmodules index 253220a..c8ff1ea 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule ".vim/pack/dist/opt/vim-better-whitespace"] - path = .vim/pack/dist/opt/vim-better-whitespace - url = https://github.com/ntpeters/vim-better-whitespace.git +[submodule ".config/suckless"] + path = .config/suckless + url = git@github.com:AustralEpitech/suckless.git +[submodule ".config/nvim/pack/plugins/opt/nvim-lspconfig"] + path = .config/nvim/pack/plugins/opt/nvim-lspconfig + url = https://github.com/neovim/nvim-lspconfig diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..617f1cc --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,12 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =6 +let g:netrw_dirhist_6='/home/ange/.config/sway/config.d' +let g:netrw_dirhist_5='/home/ange/.config/sway' +let g:netrw_dirhist_4='/home/ange/delivery/pushswap/tests/pushswap-tester' +let g:netrw_dirhist_3='/home/ange/delivery/pushswap/include' +let g:netrw_dirhist_2='/home/ange/delivery/pushswap/src' +let g:netrw_dirhist_1='/usr/include/X11' +let g:netrw_dirhist_0='/usr/include' +let g:netrw_dirhist_9='/home/ange/.config/sway/config.d' +let g:netrw_dirhist_8='/home/ange/.config/sway' +let g:netrw_dirhist_7='/home/ange/.config/sway/config.d' diff --git a/.vim/epitech_header.vim b/.vim/epitech_header.vim new file mode 100644 index 0000000..c75acc6 --- /dev/null +++ b/.vim/epitech_header.vim @@ -0,0 +1,35 @@ +function! EpitechHeader() + let com_arr = { + \ 'c': {'top': '/*', 'mid': '**', 'bot': '*/'}, + \ 'cpp': {'top': '/*', 'mid': '**', 'bot': '*/'}, + \ 'make': {'top': '##', 'mid': '##', 'bot': '##'} + \ } + + if (!com_arr->has_key(&filetype)) + echoerr "Unsupported filetype: " . &filetype + return + endif + + let top = com_arr[&filetype]['top'] + let mid = com_arr[&filetype]['mid'] + let bot = com_arr[&filetype]['bot'] + let dir_name = fnamemodify(getcwd(), ':t') + let proj_name = input('Enter project name (default ' . dir_name . '): ') + let file_name = expand('%:t:r') + let file_desc = input('Enter file description (default ' . file_name . '): ') + + if file_desc == '' + let file_desc = file_name + endif + if proj_name == '' + let proj_name = dir_name + endif + call append(0, top) + call append(1, mid . ' EPITECH PROJECT, ' . strftime('%Y')) + call append(2, mid . ' ' . proj_name) + call append(3, mid . ' File description:') + call append(4, mid . ' ' . file_desc) + call append(5, bot) +endfunction + +command Header call EpitechHeader() diff --git a/.vim/pack/dist/opt/vim-better-whitespace b/.vim/pack/dist/opt/vim-better-whitespace deleted file mode 160000 index c5afbe9..0000000 --- a/.vim/pack/dist/opt/vim-better-whitespace +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c5afbe91d29c5e3be81d5125ddcdc276fd1f1322 diff --git a/.vimrc b/.vimrc index 8cc074d..dbe1290 100644 --- a/.vimrc +++ b/.vimrc @@ -1,54 +1,27 @@ -""" load default config \""" +" system config unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim -""" variables \""" -let &path = &path . ',' . getcwd() . '/**' +" variables +let &path = getcwd() . '/**' . ',' . &path let g:netrw_liststyle=3 " tree style file explorer set expandtab -set hlsearch -set ignorecase -set number relativenumber set shiftwidth=4 -set smartcase -set smartindent set tabstop=4 +set number relativenumber +set ignorecase +set smartcase +set list +set listchars=tab:\ \ ,multispace:⸱,trail:⸱ +set hlsearch +set smartindent +set splitright set ttymouse=sgr au BufNewFile,BufRead *.c set cc=81 au BufNewFile,BufRead *.h set cc=81 -""" packages \""" -packadd! vim-better-whitespace +" packages +source ~/.vim/epitech_header.vim -function! EpitechHeader() - let com_arr = { - \ 'c': {'top': '/*', 'mid': '**', 'bot': '*/'}, - \ 'cpp': {'top': '/*', 'mid': '**', 'bot': '*/'}, - \ 'make': {'top': '##', 'mid': '##', 'bot': '##'} - \ } - let top = com_arr[&filetype]['top'] - let mid = com_arr[&filetype]['mid'] - let bot = com_arr[&filetype]['bot'] - let dir_name = fnamemodify(getcwd(), ':t') - let proj_name = input('Enter project name (default ' . dir_name . '): ') - let file_name = expand('%:t:r') - let file_desc = input('Enter file description (default ' . file_name . '): ') - - if file_desc == '' - let file_desc = file_name - endif - if proj_name == '' - let proj_name = dir_name - endif - call append(0, top) - call append(1, mid . ' EPITECH PROJECT, ' . strftime('%Y')) - call append(2, mid . ' ' . proj_name) - call append(3, mid . ' File description:') - call append(4, mid . ' ' . file_desc) - call append(5, bot) -endfunction - -command EpiHeader call EpitechHeader() - -""" keybindings \""" -nnoremap :EpiHeader +" keybindings +nnoremap :Header diff --git a/.zshrc b/.zshrc index a3bb696..1b2792d 100644 --- a/.zshrc +++ b/.zshrc @@ -6,7 +6,7 @@ typeset -U path export ZSH="$HOME/.oh-my-zsh" # Editor -export EDITOR=vim +export EDITOR=nvim # Set name of the theme to load --- if set to "random", it will # load a random theme each time oh-my-zsh is loaded, in which case, @@ -99,10 +99,8 @@ source $ZSH/oh-my-zsh.sh # plugins, and themes. Aliases can be placed here, though oh-my-zsh # users are encouraged to define aliases within the ZSH_CUSTOM folder. # For a full list of active aliases, run `alias`. - alias pls="sudo" alias -g G="|grep -i" -alias parupdate="sudo systemctl start reflector && paru -Syu" alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" alias mkdebug="CFLAGS+=-ggdb make re" -alias svim="vim $HOME/.config/sway" +alias svim="$EDITOR $HOME/.config/sway" diff --git a/bin/toggle-touchpad b/bin/toggle-touchpad new file mode 100755 index 0000000..b03e5da --- /dev/null +++ b/bin/toggle-touchpad @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +device="PNP0C50:0e 06CB:7E7E Touchpad" + +enabled=$(xinput list-props "$device" | awk -F ':' '$1 ~ "Device Enabled" {print $2}') + +xinput set-prop "$device" "Device Enabled" "$((1 - enabled))"