From 07fd93da1f2377d6fdc9e6dd59ea56db9a04bcc4 Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 31 Jan 2026 21:21:10 +0530 Subject: stow: Using GNU Stow --- .config/hypr/hyprland.conf | 469 ------------------ .config/nvim/init.lua | 19 - .config/nvim/lua/justsaumit/bufferline-config.lua | 71 --- .config/nvim/lua/justsaumit/cmp-config.lua | 88 ---- .config/nvim/lua/justsaumit/colorizer-config.lua | 27 - .config/nvim/lua/justsaumit/colorscheme.lua | 33 -- .config/nvim/lua/justsaumit/keymaps.lua | 73 --- .config/nvim/lua/justsaumit/lastplace-config.lua | 5 - .config/nvim/lua/justsaumit/lsp-config.lua | 95 ---- .config/nvim/lua/justsaumit/lspsaga-config.lua | 49 -- .config/nvim/lua/justsaumit/lualine-config.lua | 40 -- .config/nvim/lua/justsaumit/mason.lua | 39 -- .../nvim/lua/justsaumit/nvim-comment-config.lua | 5 - .config/nvim/lua/justsaumit/nvim-tree-config.lua | 75 --- .config/nvim/lua/justsaumit/options.lua | 46 -- .config/nvim/lua/justsaumit/plugins.lua | 113 ----- .config/nvim/lua/justsaumit/telescope-config.lua | 52 -- .config/nvim/lua/justsaumit/toggleterm-config.lua | 16 - .config/nvim/lua/justsaumit/treesitter-config.lua | 26 - .config/nvim/lua/justsaumit/which-key-config.lua | 69 --- .config/nvim/plugin/packer_compiled.lua | 249 ---------- .config/tmux/tmux.conf | 20 - .config/vim/vimrc | 20 - .config/zsh/.zshrc | 133 ----- .gitignore | 2 + stow/hyprland/.config/hypr/hyprland-base.conf | 341 +++++++++++++ stow/hyprland/.config/hypr/hyprland.conf | 551 +++++++++++++++++++++ stow/nvim/.config/nvim/init.lua | 19 + .../nvim/lua/justsaumit/bufferline-config.lua | 71 +++ .../.config/nvim/lua/justsaumit/cmp-config.lua | 88 ++++ .../nvim/lua/justsaumit/colorizer-config.lua | 27 + .../.config/nvim/lua/justsaumit/colorscheme.lua | 33 ++ stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua | 73 +++ .../nvim/lua/justsaumit/lastplace-config.lua | 5 + .../.config/nvim/lua/justsaumit/lsp-config.lua | 95 ++++ .../.config/nvim/lua/justsaumit/lspsaga-config.lua | 49 ++ .../.config/nvim/lua/justsaumit/lualine-config.lua | 40 ++ stow/nvim/.config/nvim/lua/justsaumit/mason.lua | 39 ++ .../nvim/lua/justsaumit/nvim-comment-config.lua | 5 + .../nvim/lua/justsaumit/nvim-tree-config.lua | 75 +++ stow/nvim/.config/nvim/lua/justsaumit/options.lua | 46 ++ stow/nvim/.config/nvim/lua/justsaumit/plugins.lua | 113 +++++ .../nvim/lua/justsaumit/telescope-config.lua | 52 ++ .../nvim/lua/justsaumit/toggleterm-config.lua | 16 + .../nvim/lua/justsaumit/treesitter-config.lua | 26 + .../nvim/lua/justsaumit/which-key-config.lua | 69 +++ stow/nvim/.config/nvim/plugin/packer_compiled.lua | 249 ++++++++++ stow/vim/.config/vim/vimrc | 20 + stow/vscode/.config/Code/User/keybindings.json | 7 + stow/vscode/.config/Code/User/settings.json | 87 ++++ stow/zsh/.zshrc | 159 ++++++ tmux/tmux.conf | 20 + 52 files changed, 2377 insertions(+), 1832 deletions(-) delete mode 100644 .config/hypr/hyprland.conf delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/justsaumit/bufferline-config.lua delete mode 100644 .config/nvim/lua/justsaumit/cmp-config.lua delete mode 100644 .config/nvim/lua/justsaumit/colorizer-config.lua delete mode 100644 .config/nvim/lua/justsaumit/colorscheme.lua delete mode 100644 .config/nvim/lua/justsaumit/keymaps.lua delete mode 100644 .config/nvim/lua/justsaumit/lastplace-config.lua delete mode 100644 .config/nvim/lua/justsaumit/lsp-config.lua delete mode 100644 .config/nvim/lua/justsaumit/lspsaga-config.lua delete mode 100644 .config/nvim/lua/justsaumit/lualine-config.lua delete mode 100644 .config/nvim/lua/justsaumit/mason.lua delete mode 100644 .config/nvim/lua/justsaumit/nvim-comment-config.lua delete mode 100644 .config/nvim/lua/justsaumit/nvim-tree-config.lua delete mode 100644 .config/nvim/lua/justsaumit/options.lua delete mode 100644 .config/nvim/lua/justsaumit/plugins.lua delete mode 100644 .config/nvim/lua/justsaumit/telescope-config.lua delete mode 100644 .config/nvim/lua/justsaumit/toggleterm-config.lua delete mode 100644 .config/nvim/lua/justsaumit/treesitter-config.lua delete mode 100644 .config/nvim/lua/justsaumit/which-key-config.lua delete mode 100644 .config/nvim/plugin/packer_compiled.lua delete mode 100644 .config/tmux/tmux.conf delete mode 100644 .config/vim/vimrc delete mode 100644 .config/zsh/.zshrc create mode 100644 .gitignore create mode 100644 stow/hyprland/.config/hypr/hyprland-base.conf create mode 100644 stow/hyprland/.config/hypr/hyprland.conf create mode 100644 stow/nvim/.config/nvim/init.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/mason.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/options.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/plugins.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua create mode 100644 stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua create mode 100644 stow/nvim/.config/nvim/plugin/packer_compiled.lua create mode 100644 stow/vim/.config/vim/vimrc create mode 100644 stow/vscode/.config/Code/User/keybindings.json create mode 100644 stow/vscode/.config/Code/User/settings.json create mode 100644 stow/zsh/.zshrc create mode 100644 tmux/tmux.conf diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf deleted file mode 100644 index adc9e77..0000000 --- a/.config/hypr/hyprland.conf +++ /dev/null @@ -1,469 +0,0 @@ -################ -### MONITORS ### -################ - -# See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=eDP-1,1920x1080@144,0x0,1.00,transform,0 -monitor=HDMI-A-1,1920x1080@144,0x0,1.00,transform,0,mirror,eDP-1 - - -################### -### MY PROGRAMS ### -################### - -# See https://wiki.hyprland.org/Configuring/Keywords/ - -# Set programs that you use -#$terminal = kitty -#$fileManager = dolphin -#$menu = wofi --show drun - - -################# -### AUTOSTART ### -################# - -# Autostart necessary processes (like notifications daemons, status bars, etc.) -# Or execute your favorite apps at launch like this: - -# exec-once = $terminal -# exec-once = nm-applet & -# exec-once = waybar & hyprpaper & firefox -exec-once = waybar & dunst & wpaperd & suspend.sh & nextcloud & nm-applet & blueman-applet & notion-app & memospot -#exec-once = dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY -#exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY && XDG_CURRENT_DESKTOP=Hyprland -exec-once = systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -exec-once = xhost +SI:localuser:root - -# Source a file (multi-file configs) -# source = ~/.config/hypr/myColors.conf - -############################# -### ENVIRONMENT VARIABLES ### -############################# - -# See https://wiki.hypr.land/Configuring/Environment-variables/ - -env = XCURSOR_SIZE,24 -env = HYPRCURSOR_SIZE,24 -#env = LIBVA_DRIVER_NAME,nvidia -env = XDG_SESSION_TYPE,wayland -#env = GBM_BACKEND,nvidia-drm -#env = __GLX_VENDOR_LIBRARY_NAME,nvidia -env = WLR_NO_HARDWARE_CURSORS,1 - -################### -### PERMISSIONS ### -################### - -# See https://wiki.hypr.land/Configuring/Permissions/ -# Please note permission changes here require a Hyprland restart and are not applied on-the-fly -# for security reasons - -# ecosystem { -# enforce_permissions = 1 -# } - -# permission = /usr/(bin|local/bin)/grim, screencopy, allow -# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow -# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow - - -##################### -### LOOK AND FEEL ### -##################### - -# Refer to https://wiki.hypr.land/Configuring/Variables/ - -# https://wiki.hypr.land/Configuring/Variables/#general -general { - gaps_in = 5 - gaps_out = 20 - - border_size = 2 - - # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg - col.inactive_border = rgba(595959aa) - - # Set to true enable resizing windows by clicking and dragging on borders and gaps - resize_on_border = false - - # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on - allow_tearing = false - - layout = master -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - special_scale_factor=0.8 - new_on_top=false -# no_gaps_when_only=true // config removed add through Workspace rules - orientation=left - inherit_fullscreen=true -} - -# https://wiki.hypr.land/Configuring/Variables/#decoration -decoration { - rounding = 3 - #multisample_edges = true - - # Change transparency of focused and unfocused windows - active_opacity=0.99 - inactive_opacity=0.94 - fullscreen_opacity=1.0 - - shadow { - enabled = true - range = 4 - render_power = 3 - color = rgba(1a1a1aee) - } - - # https://wiki.hypr.land/Configuring/Variables/#blur - blur { - enabled = true - size = 4 - passes = 1 - - vibrancy = 0.1696 - } -} - -# https://wiki.hypr.land/Configuring/Variables/#animations -animations { - enabled = yes, please :) - - # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - - #bezier = easeOutQuint,0.23,1,0.32,1 - #bezier = easeInOutCubic,0.65,0.05,0.36,1 - #bezier = linear,0,0,1,1 - #bezier = almostLinear,0.5,0.5,0.75,1.0 - #bezier = quick,0.15,0,0.1,1 - - animation = windows, 1, 7, myBezier - animation = windowsOut, 1, 7, default, popin 80% - animation = border, 1, 10, default - animation = borderangle, 1, 8, default - animation = fade, 1, 7, default - animation = workspaces, 1, 6, default - #animation = global, 1, 10, default - #animation = border, 1, 5.39, easeOutQuint - #animation = windows, 1, 4.79, easeOutQuint - #animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% - #animation = windowsOut, 1, 1.49, linear, popin 87% - #animation = fadeIn, 1, 1.73, almostLinear - #animation = fadeOut, 1, 1.46, almostLinear - #animation = fade, 1, 3.03, quick - #animation = layers, 1, 3.81, easeOutQuint - #animation = layersIn, 1, 4, easeOutQuint, fade - #animation = layersOut, 1, 1.5, linear, fade - #animation = fadeLayersIn, 1, 1.79, almostLinear - #animation = fadeLayersOut, 1, 1.39, almostLinear - #animation = workspaces, 1, 1.94, almostLinear, fade - #animation = workspacesIn, 1, 1.21, almostLinear, fade - #animation = workspacesOut, 1, 1.94, almostLinear, fade -} - - -# https://wiki.hypr.land/Configuring/Variables/#misc -misc { -# enable_swallow = true -# swallow_regex = ^(foot)$ -# force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers -# disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( -} - - -############# -### INPUT ### -############# - -# https://wiki.hypr.land/Configuring/Variables/#input -input { - kb_layout = us - kb_variant = - kb_model = - kb_options=caps:escape - # kb_options=ctrl:nocaps - kb_rules = - - follow_mouse = 1 - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. - - touchpad { - natural_scroll = true - disable_while_typing = false - tap-to-click=yes - } -} - -# See https://wiki.hypr.land/Configuring/Gestures -gesture = 3, horizontal, workspace -gesture = 3, down, dispatcher, movetoworkspacesilent, special -gesture = 3, up, scale: 1.5, dispatcher, movetoworkspacesilent, +0 -gesture = 3, pinch, fullscreen - -binds { - workspace_back_and_forth = true - allow_workspace_cycles = true - # trigger when the switch is toggled - bindl=,switch:Lid Switch,exec,swaylock -} - -# Example per-device config -# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more -#device { -# name = epic-mouse-v1 -# sensitivity = -0.5 -#} - -$TOUCHPAD_ENABLED = true -device { - name = pnp0c50:0d-06cb:cebd-touchpad - enabled = $TOUCHPAD_ENABLED -} - -$KEYBOARD_ENABLED = true -device { - name = at-translated-set-2-keyboard - enabled = $KEYBOARD_ENABLED -} - -################### -### KEYBINDINGS ### -################### - -# See https://wiki.hypr.land/Configuring/Keywords/ -$MOD = SUPER - -# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more - - -############### -# Imp Utils # -############### -#Terminal -bind = $MOD SHIFT, Return, exec, foot -bind = $MOD, W, killactive -bind = $MOD CTRL SHIFT, Q, exit -bind = $MOD, F, togglefloating -bind = $MOD, Space, togglefloating -bind = $MOD, P, pin -# Move to/Toggle scratchpad -bind = $MOD SHIFT,S,movetoworkspace,special -bind = $MOD,S,togglespecialworkspace, -#bindr= $MOD, D, exec, pkill tofi || tofi-run | xargs hyprctl dispatch exec -bind = $MOD, F1, exec, pidkillall -#rofi -bindr = $MOD, D, exec, pkill rofi || rofi -show run -bindr = $MOD CTRL, D, exec, pkill rofi || rofi -show drun -bind = $MOD, F3, exec, rofi -modi emoji -show emoji -kb-custom-1 Ctrl+C -bind = $MOD, X, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy -bind = ALT, L, exec, ~/.scripts/rofi-beats-linux.sh -# Toggle Touchpad -bind = $MOD ALT, M, exec, toggle-touchpad-hypr - -################ -# Applications # -################ - -##(Perma Launch) -# Launch Brave -bind = $MOD, Q, exec, brave -bind = $MOD CTRL, Q, exec, brave --incognito -bind = $MOD ALT, Q, exec, brave --tor -bind = $MOD SHIFT, Z, exec, zen-browser -# Launch wa -bind = $MOD SHIFT, W, exec, whatsapp-nativefier --no-sandbox -#Launch emacs -bind = $MOD, E, exec, emacs -# Launch ncloud -bind = $MOD SHIFT, N, exec, qutebrowser https://ncloud.draconyan.xyz -# Launch thunderbird -bind = $MOD SHIFT, E, exec, thunderbird -# Launch protonmail -bind = $MOD ALT, E, exec, qutebrowser https://mail.proton.me/u/0/inbox -# Launch teams -# bind = $MOD SHIFT, T, exec, qutebrowser https://teams.microsoft.com -bind = $MOD SHIFT, T, exec, teams -# Launch spotify -bind = $MOD SHIFT, M, exec, spotify -# Launch memospot -bind = $MOD CTRL, M, exec, memospot -# Launch discord -bind = $MOD SHIFT, D, exec, webcord --enable-features=UseOzonePlatform --ozone-platform=wayland -# Launch telegram -bind = $MOD CTRL, T, exec, telegram-desktop - -##(Temp Launch) -# Launch ranger -bind = $MOD, R, exec, foot --term xterm-256color -e ranger -# Launch pulsemixer -bind = $MOD SHIFT, P, exec, foot -e pulsemixer -#Launch top -bind = $MOD SHIFT, G, exec, foot --term xterm -e gotop -bind = $MOD SHIFT, H, exec, foot -e htop -bind = $MOD SHIFT, B, exec, foot -e btop - - -################### -# Global Hot-keys # -################### -##screenlock -bind = $MOD , L, exec, swaylock - -#screenshot -#bind = ,Print, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim "$GRIM_DEFAULT_DIR/""$IMG" && wl-copy < "$GRIM_DEFAULT_DIR/""$IMG" -#bind = CTRL,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" "$GRIM_DEFAULT_DIR/""$IMG" && wl-copy < "$GRIM_DEFAULT_DIR/""$IMG" -#bind = ALT ,Print, exec, flameshot gui -bind = ,Print, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the whole screen taken" "$IMG" -t 1000 # screenshot of whole screen -bind = $MOD SHIFT,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region -bind = CTRL,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region -bind = ALT,Print, exec, flameshot gui -bind = ,F10, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the whole screen taken" "$IMG" -t 1000 # screenshot of whole screen -bind = ,F11, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region -bind = ,F12, exec, flameshot gui - -#otherkeyb -bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && [[ "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep MUTE)" ]] && dunstify "Mute" "Volume set to 0%" -i volume-xmark -t 1000 -r 1234 -#binde = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && dunstify -i volume-high -t 1500 -r 1235 "Volume Changed" "Volume increased by 2%" -binde = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && dunstify "Volume Changed" "Volume set to $(volumecurr)" -i volume-high -t 1500 -r 1235 -# binde = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && dunstify -i volume-low -t 1500 -r 1235 "Volume Changed" "Volume decreased by 2%" -binde = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && dunstify "Volume Changed" "Volume set to $(volumecurr)" -i volume-low -t 1500 -r 1236 -binde = ,XF86MonBrightnessUp, exec, brillo -A 4 && dunstify -u normal -t 3000 -r 90210 -i brightness "$(printf %.0f%% $( brillo -G) )" -binde = ,XF86MonBrightnessDown, exec, brillo -U 4 && dunstify -u normal -t 3000 -r 90210 -i brightness "$(printf %.0f%% $( brillo -G) )" -#Launch rofi calc mode -bind = $MOD, F2 , exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy" -bind = , XF86Calculator, exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy" - -# Toggle play/pause in Spotify or Chromium (fallback) -bind = , XF86AudioPlay, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify play-pause; else playerctl -p chromium play-pause; fi - -# Change tracks in Spotify or Chromium (fallback) -bind = , XF86AudioPrev, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify previous; else playerctl -p chromium previous; fi -bind = , XF86AudioNext, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify next; else playerctl -p chromium next; fi - -#bluetooth applet -bind = $MOD, F9, exec, blueman-manager - -#master-stack layout -bind = $MOD, Return,layoutmsg, swapwithmaster - -#fullscreen layout toggle -bind= $MOD, U, fullscreen - -# Move focus with MOD + arrow keys -#bind = $MOD, h, movefocus, l -#bind = $MOD, l, movefocus, r -#bind = $MOD, k, movefocus, u -#bind = $MOD, j, movefocus, d -# Better performed using cycle -bind = $MOD, k, layoutmsg, cycleprev -bind = $MOD, j, layoutmsg, cyclenext - -# Switch workspaces with MOD + [0-9] -bind = $MOD, 1, workspace, 1 -bind = $MOD, 2, workspace, 2 -bind = $MOD, 3, workspace, 3 -bind = $MOD, 4, workspace, 4 -bind = $MOD, 5, workspace, 5 -bind = $MOD, 6, workspace, 6 -bind = $MOD, 7, workspace, 7 -bind = $MOD, 8, workspace, 8 -bind = $MOD, 9, workspace, 9 -bind = $MOD, 0, workspace, 10 - -# Move active window to a workspace with MOD + SHIFT + [0-9] -bind = $MOD SHIFT, 1, movetoworkspace, 1 -bind = $MOD SHIFT, 2, movetoworkspace, 2 -bind = $MOD SHIFT, 3, movetoworkspace, 3 -bind = $MOD SHIFT, 4, movetoworkspace, 4 -bind = $MOD SHIFT, 5, movetoworkspace, 5 -bind = $MOD SHIFT, 6, movetoworkspace, 6 -bind = $MOD SHIFT, 7, movetoworkspace, 7 -bind = $MOD SHIFT, 8, movetoworkspace, 8 -bind = $MOD SHIFT, 9, movetoworkspace, 9 -bind = $MOD SHIFT, 0, movetoworkspace, 10 - -#Switch between recent workspaces -bind = $MOD, TAB, workspace, previous - -# Scroll through existing workspaces with MOD + scroll -bind = ALT, tab, workspace, e+1 -bind = ALT SHIFT, tab, workspace, e-1 -bind = $MOD, mouse_down, workspace, e+1 -bind = $MOD, mouse_up, workspace, e-1 -# Scroll through existing workspaces with just mouse sidebuttons -bind = , mouse:276, workspace, e+1 -bind = , mouse:275, workspace, e-1 - -# Move/resize windows with MOD + LMB/RMB and dragging -bindm = $MOD, mouse:272, movewindow -bindm = $MOD, mouse:273, resizewindow - -# will switch to a submap called resize -bind=ALT,R,submap,resize - -# will start a submap called "resize" -submap=resize - -# sets repeatable binds for resizing the active window -binde=$MOD ,h,resizeactive,-10 0 -binde=$MOD ,l,resizeactive,10 0 -binde=$MOD ,k,resizeactive,0 -10 -binde=$MOD ,j,resizeactive,0 10 - -# use reset to go back to the global submap -bind=,escape,submap,reset - -# will reset the submap, meaning end the current one and return to the global one -submap=reset - -# keybinds further down will be global again... -# -# -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hypr.land/Configuring/Window-Rules/ for more -# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrules that are useful -# Suppress maximize events -windowrule = suppressevent maximize, class:.* - -# Fix some dragging issues with XWayland -windowrule = nofocus, class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 - -# Move Hyprland-run -windowrule = move 20 monitor_h-120,class:hyprland-run -windowrule = float,class:hyprland-run - -# Spotify to workspace 9 -windowrule = workspace 9,class:^(spotify)$ -# Obsidian opacity -windowrule = opacity 1.0 override 1.0 override,class:^(obsidian)$ -# MPV player floating -> spawn bottomright -windowrule = pin,float,move 1232 615,size 687 467,class:mpv - -# "Smart gaps" / "No gaps when only" -workspace = w[t1], gapsout:0, gapsin:0 -workspace = w[tg1], gapsout:0, gapsin:0 -workspace = f[1], gapsout:0, gapsin:0 -windowrulev2 = bordersize 0, floating:0, onworkspace:w[t1] -windowrulev2 = rounding 0, floating:0, onworkspace:w[t1] -windowrulev2 = bordersize 0, floating:0, onworkspace:w[tg1] -windowrulev2 = rounding 0, floating:0, onworkspace:w[tg1] -windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] -windowrulev2 = rounding 0, floating:0, onworkspace:f[1] - -# Fix some dragging issues with XWayland -windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index 11ab069..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,19 +0,0 @@ -require("justsaumit.options") -require("justsaumit.keymaps") -require("justsaumit.plugins") -require("justsaumit.colorscheme") -require("justsaumit.treesitter-config") -require("justsaumit.lualine-config") -require("justsaumit.bufferline-config") -require("justsaumit.nvim-tree-config") -require("justsaumit.lastplace-config") -require("justsaumit.which-key-config") -require("justsaumit.colorizer-config") -require("justsaumit.telescope-config") -require("justsaumit.nvim-comment-config") -require("justsaumit.mason") -require("justsaumit.lsp-config") -require("justsaumit.lspsaga-config") -require("justsaumit.cmp-config") -require("justsaumit.toggleterm-config") -print ("while(!(succeed = try() ) );") diff --git a/.config/nvim/lua/justsaumit/bufferline-config.lua b/.config/nvim/lua/justsaumit/bufferline-config.lua deleted file mode 100644 index 879c669..0000000 --- a/.config/nvim/lua/justsaumit/bufferline-config.lua +++ /dev/null @@ -1,71 +0,0 @@ ---Enable true color support for the terminal -vim.opt.termguicolors = true ---Protected call -local status, bufferline = pcall(require, "bufferline") -if not status then - return -end - -bufferline.setup { - options = { - mode = "buffers", - numbers = "none", - close_command = "bdelete! %d", - right_mouse_command = "bdelete! %d", - left_mouse_command = "buffer %d", - middle_mouse_command = nil, - indicator = { - icon = '▎', - style = 'icon', - }, - --buffer_close_icon = '󰠳', - buffer_close_icon = "", - modified_icon = '●', - close_icon = '', - -- close_icon = '', - left_trunc_marker = '', - right_trunc_marker = '', - max_name_length = 30, - max_prefix_length = 30, -- prefix used when a buffer is de-duplicated - tab_size = 22, - diagnostics = false, - diagnostics_update_in_insert = false, - offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, - color_icons = true, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = true, - show_tab_indicators = true, - persist_buffer_sort = true, - separator_style = "thin", -- | "thick" | "thin" | slant, - enforce_regular_tabs = true, - always_show_bufferline = true, - -- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr" - -- -- remove extension from markdown files for example - -- if buf.name:match('%.md') then - -- return vim.fn.fnamemodify(buf.name, ':t:r') - -- end - -- end - } -} -local opts = { noremap = true, silent = true } -local keymap = vim.keymap.set -keymap("", "", "", opts) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - ---Leader+number -> tab change -for i = 1, 9 do - keymap("n", "" .. i, function() - require("bufferline").go_to_buffer(i, true) - end, opts) -end - ---Ctrl+W to close a buffer -keymap("n", "W", ":bdelete!", opts) - - ---Tab or Ctrl+Tab for Forward Cycle //terminals don't see a difference between and ---Shift+Tab for Backward Cycle -keymap("n", "", ":BufferLineCycleNext", opts) -keymap("n", "", ":BufferLineCyclePrev", opts) diff --git a/.config/nvim/lua/justsaumit/cmp-config.lua b/.config/nvim/lua/justsaumit/cmp-config.lua deleted file mode 100644 index 7e29155..0000000 --- a/.config/nvim/lua/justsaumit/cmp-config.lua +++ /dev/null @@ -1,88 +0,0 @@ -vim.g.completeopt="menu,menuone,noselect,noinsert" - -local has_words_before = function() - unpack = unpack or table.unpack - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil -end - -local luasnip = require("luasnip") -local cmp = require'cmp' - -cmp.setup({ - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - luasnip.lsp_expand(args.body) - end, - }, - window = { - -- completion = cmp.config.window.bordered(), - -- documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- they way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, -- For luasnip users. - { name = 'buffer' }, - { name = 'path' }, - }), -}) - --- Set configuration for specific filetype. -cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). - }, { - { name = 'buffer' }, - }) -}) - --- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) - --- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) - diff --git a/.config/nvim/lua/justsaumit/colorizer-config.lua b/.config/nvim/lua/justsaumit/colorizer-config.lua deleted file mode 100644 index 569021d..0000000 --- a/.config/nvim/lua/justsaumit/colorizer-config.lua +++ /dev/null @@ -1,27 +0,0 @@ -require("colorizer").setup { - filetypes = { "*" }, - user_default_options = { - RGB = true, -- #RGB hex codes - RRGGBB = true, -- #RRGGBB hex codes - names = true, -- "Name" codes like Blue or blue - RRGGBBAA = false, -- #RRGGBBAA hex codes - AARRGGBB = false, -- 0xAARRGGBB hex codes - rgb_fn = false, -- CSS rgb() and rgba() functions - hsl_fn = false, -- CSS hsl() and hsla() functions - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn - -- Available modes for `mode`: foreground, background, virtualtext - mode = "background", -- Set the display mode. - -- Available methods are false / true / "normal" / "lsp" / "both" - -- True is same as normal - tailwind = false, -- Enable tailwind colors - -- parsers can contain values used in |user_default_options| - sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors - virtualtext = "■", - -- update color values even if buffer is not focused - -- example use: cmp_menu, cmp_docs - always_update = false - }, - -- all the sub-options of filetypes apply to buftypes - buftypes = {}, -} diff --git a/.config/nvim/lua/justsaumit/colorscheme.lua b/.config/nvim/lua/justsaumit/colorscheme.lua deleted file mode 100644 index 67c166f..0000000 --- a/.config/nvim/lua/justsaumit/colorscheme.lua +++ /dev/null @@ -1,33 +0,0 @@ ---configuration needs to be set BEFORE loading the color scheme with colorscheme tokyonight -vim.g.tokyonight_style = "night" -tokyonight_terminal_colors=true -tokyonight_italic_comments=true -tokyonight_italic_keywords=true -tokyonight_italic_functions=false -tokyonight_italic_variables=false -tokyonight_transparent=false -tokyonight_hide_inactive_statusline=false -tokyonight_sidebars={} -tokyonight_transparent_sidebar=false -tokyonight_dark_sidebar=true -tokyonight_dark_float=true -tokyonight_colors={} -tokyonight_lualine_bold=false - ---protected call -local colorscheme = "tokyonight" -local pywal = require('pywal') - -local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) -if not status_ok then - vim.notify("colorscheme " .. colorscheme .. " not found! :(") - pywal.setup() - return -end - --- init.lua -vim.g.tokyodark_transparent_background = false -vim.g.tokyodark_enable_italic_comment = true -vim.g.tokyodark_enable_italic = true -vim.g.tokyodark_color_gamma = "1.0" -vim.cmd("colorscheme tokyodark") diff --git a/.config/nvim/lua/justsaumit/keymaps.lua b/.config/nvim/lua/justsaumit/keymaps.lua deleted file mode 100644 index 582113c..0000000 --- a/.config/nvim/lua/justsaumit/keymaps.lua +++ /dev/null @@ -1,73 +0,0 @@ -local opts = { noremap = true, silent = true } - --- Shorten function name -local keymap = vim.keymap.set - ---Remap space as leader key -keymap("", "", "", opts) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - ----Autocompile and Execute ---ANSI C -vim.cmd([[autocmd BufEnter *.c map :w :!gcc % -ansi -o %< && ./%< ]]) ---C99 -vim.cmd([[autocmd BufEnter *.c map :w :!gcc -std=c99 % -o %< && ./%< ]]) ---C -vim.cmd([[autocmd BufEnter *.c map :w :!gcc % -o %< && ./%< ]]) - ---C++ -vim.cmd([[autocmd BufEnter *.cpp map :w :!g++ % -o %< && ./%< ]]) - --- Modes --- normal_mode = "n", --- insert_mode = "i", --- visual_mode = "v", --- visual_block_mode = "x", --- command_mode = "c", - --- Normal -- --- --- ---Save file with Ctrl+S -keymap("n", "", ":w", opts) ---Toggle nvim-tree -keymap('n', '', ':NvimTreeToggle', opts) -keymap('n', 'e', ':NvimTreeToggle', opts) ---Disable C-e --- keymap("n", "", ":", opts) - --- Better window navigation for split -keymap("n", "", "h", opts) -keymap("n", "", "j", opts) -keymap("n", "", "k", opts) -keymap("n", "", "l", opts) - --- Resize with arrows -keymap("n", "", ":resize +2", opts) -keymap("n", "", ":resize -2", opts) -keymap("n", "", ":vertical resize +2", opts) -keymap("n", "", ":vertical resize -2", opts) - --- Move text up and down(better implementation in visual mode) ---keymap("n", "", ":m .+1==gi", opts) ---keymap("n", "", ":m .-2==gi", opts) - --- Insert -- - --- Visual -- --- Stay in indent mode -keymap("v", "<", "", ">gv", opts) - --- Move text up and down -keymap("v", "", ":m .+1==", opts) -keymap("v", "", ":m .-2==", opts) -keymap("v", "p", '"_dP', opts) - --- Visual Block -- --- Move text up and down -keymap("x", "J", ":move '>+1gv-gv", opts) -keymap("x", "K", ":move '<-2gv-gv", opts) -keymap("x", "", ":move '>+1gv-gv", opts) -keymap("x", "", ":move '<-2gv-gv", opts) diff --git a/.config/nvim/lua/justsaumit/lastplace-config.lua b/.config/nvim/lua/justsaumit/lastplace-config.lua deleted file mode 100644 index 4fa6a83..0000000 --- a/.config/nvim/lua/justsaumit/lastplace-config.lua +++ /dev/null @@ -1,5 +0,0 @@ -require'nvim-lastplace'.setup { - lastplace_ignore_buftype = {"quickfix", "nofile", "help"}, - lastplace_ignore_filetype = {"gitcommit", "gitrebase", "svn", "hgcommit"}, - lastplace_open_folds = true -} diff --git a/.config/nvim/lua/justsaumit/lsp-config.lua b/.config/nvim/lua/justsaumit/lsp-config.lua deleted file mode 100644 index 2c0d746..0000000 --- a/.config/nvim/lua/justsaumit/lsp-config.lua +++ /dev/null @@ -1,95 +0,0 @@ -local lspconfig = require("lspconfig") -local on_attach = function(_, 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 - - buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") - - local opts = { noremap = true, silent = true } - buf_set_keymap("n", "K", ":lua vim.lsp.buf.hover()", opts) --> information about the symbol under the cursors in a floating window - buf_set_keymap("n", "rn", ":lua vim.lsp.util.rename()", opts) --> rename old_fname to new_fname - buf_set_keymap("n", "ca", ":lua vim.lsp.buf.code_action()", opts) --> selects a code action available at the current cursor position - buf_set_keymap("n", "gd", ":lua vim.lsp.buf.definition()", opts) --> jumps to the definition of the symbol under the cursor - buf_set_keymap("n", "gi", ":lua vim.lsp.buf.implementation()", opts) --> lists all the implementations for the symbol under the cursor in the quickfix window - buf_set_keymap("n", "gr", ":lua vim.lsp.buf.references()", opts) --> lists all the references to the symbl under the cursor in the quickfix window - buf_set_keymap("n", "ld", ":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", "lq", ":lua vim.diagnostic.setloclist()", opts) - buf_set_keymap("n", "lf", ":lua vim.lsp.buf.formatting()", opts) --> formats the current buffer -end - ----@diagnostic disable-next-line: undefined-global -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) - ---lspconfig x cmp_nvim_lsp --- Set up lspconfig. --- require("lspconfig")["clangd"].setup({ -lspconfig.clangd.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.pyright.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.bashls.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.cssls.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.gopls.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.html.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.lua_ls.setup({ - on_attach = on_attach, - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = 'LuaJIT',}, - diagnostics = { - globals = {'vim','require',},}, - workspace = { library = vim.api.nvim_get_runtime_file("", true),}, - telemetry = {enable = false,}, - }, - }, -}) - -lspconfig.marksman.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - -lspconfig.rust_analyzer.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) - --- lspconfig.tsserver.setup({ --- on_attach = on_attach, --- capabilities = capabilities, --- }) - -lspconfig.yamlls.setup({ - on_attach = on_attach, - capabilities = capabilities, -}) diff --git a/.config/nvim/lua/justsaumit/lspsaga-config.lua b/.config/nvim/lua/justsaumit/lspsaga-config.lua deleted file mode 100644 index 70d3d79..0000000 --- a/.config/nvim/lua/justsaumit/lspsaga-config.lua +++ /dev/null @@ -1,49 +0,0 @@ -local lspsaga = require 'lspsaga' -lspsaga.setup { -- defaults ... - debug = false, - use_saga_diagnostic_sign = true, - -- diagnostic sign - error_sign = " ", - warn_sign = " ", - hint_sign = " ", - infor_sign = " ", - diagnostic_header_icon = "  ", - -- code action title icon - code_action_icon = " ", - code_action_prompt = { - enable = true, - sign = true, - sign_priority = 40, - virtual_text = true, - }, - finder_definition_icon = "󰈞 ", - finder_reference_icon = "󰈞 ", - max_preview_lines = 10, - finder_action_keys = { - open = "o", - vsplit = "s", - split = "i", - quit = "q", - scroll_down = "", - scroll_up = "", - }, - code_action_keys = { - quit = "q", - exec = "", - }, - rename_action_keys = { - quit = "", - exec = "", - }, - definition_preview_icon = " ", - border_style = "single", - rename_prompt_prefix = "➤ ", - rename_output_qflist = { - enable = false, - auto_open_qflist = false, - }, - server_filetype_map = {}, - diagnostic_prefix_format = "%d. ", - diagnostic_message_format = "%m %c", - highlight_prefix = false, -} diff --git a/.config/nvim/lua/justsaumit/lualine-config.lua b/.config/nvim/lua/justsaumit/lualine-config.lua deleted file mode 100644 index 56c426a..0000000 --- a/.config/nvim/lua/justsaumit/lualine-config.lua +++ /dev/null @@ -1,40 +0,0 @@ -require('lualine').setup { - options = { - icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} -} diff --git a/.config/nvim/lua/justsaumit/mason.lua b/.config/nvim/lua/justsaumit/mason.lua deleted file mode 100644 index d651810..0000000 --- a/.config/nvim/lua/justsaumit/mason.lua +++ /dev/null @@ -1,39 +0,0 @@ -require("mason").setup({ - options = { - ensure_installed = { "clangd", "clangd-format", "codelldb", "lua-language-server" }, -- not an option from mason.nvim - PATH = "skip" - }, - ui = { - icons = { - package_pending = " ", - package_installed = "󰄳 ", - package_uninstalled = " 󰚌", - }, - keymaps = { - toggle_server_expand = "", - install_server = "i", - update_server = "u", - check_server_version = "c", - update_all_servers = "U", - check_outdated_servers = "C", - uninstall_server = "X", - cancel_installation = "", - }, - }, - max_concurrent_installers = 10, -}) -require("mason-lspconfig").setup ({ - ensure_installed = { - "lua_ls", - "clangd", - "pyright", - "rust_analyzer", - "bashls", - "cssls", - "html", - "lua_ls", - "marksman", - --"tsserver", - "yamlls", - }, -}) diff --git a/.config/nvim/lua/justsaumit/nvim-comment-config.lua b/.config/nvim/lua/justsaumit/nvim-comment-config.lua deleted file mode 100644 index d71ce14..0000000 --- a/.config/nvim/lua/justsaumit/nvim-comment-config.lua +++ /dev/null @@ -1,5 +0,0 @@ -require('nvim_comment').setup({ - line_mapping = "cl", - operator_mapping = "c", - comment_empty = false -}) diff --git a/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/.config/nvim/lua/justsaumit/nvim-tree-config.lua deleted file mode 100644 index b499f91..0000000 --- a/.config/nvim/lua/justsaumit/nvim-tree-config.lua +++ /dev/null @@ -1,75 +0,0 @@ --- disable netrw at the very start of your init.lua -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - --- set termguicolors to enable highlight groups -vim.opt.termguicolors = true - --- empty setup using defaults --- require("nvim-tree").setup() - --- OR setup with some options -require("nvim-tree").setup({ - sort_by = "case_sensitive", - view = { - adaptive_size = true, - }, - renderer = { - group_empty = true, - highlight_git = false, - full_name = false, - highlight_opened_files = "none", - root_folder_modifier = ":~", - indent_width = 2, - indent_markers = { - enable = true, - inline_arrows = true, - icons = { - corner = "└", - edge = "│", - item = "│", - bottom = "─", - none = " ", - }, - }, - icons = { - webdev_colors = true, - git_placement = "before", - padding = " ", - symlink_arrow = " ➛ ", - show = { - file = true, - folder = true, - folder_arrow = true, - git = true, - }, - glyphs = { - default = "", - symlink = "", - bookmark = "", - folder = { - arrow_closed = "", - arrow_open = "", - default = "", - open = "", - empty = "", - empty_open = "", - symlink = "", - symlink_open = "", - }, - git = { - unstaged = "✗", - staged = "✓", - unmerged = "", - renamed = "➜", - untracked = "★", - deleted = "", - ignored = "◌", - }, - }, - }, - }, - filters = { - dotfiles = true, - }, -}) diff --git a/.config/nvim/lua/justsaumit/options.lua b/.config/nvim/lua/justsaumit/options.lua deleted file mode 100644 index 4eae867..0000000 --- a/.config/nvim/lua/justsaumit/options.lua +++ /dev/null @@ -1,46 +0,0 @@ -local options = { - number=true, -- Shows absolute linenumber - relativenumber=true, -- Shows linenumber relative to cursor - --combination of both^ for hybrid linenumber --- textwidth=100, - numberwidth=4, - scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance - sidescroll=18, - mouse="a", -- enable mouse support - splitbelow=true, -- on horizontal split instead of opening window to left open it at right - splitright=true, -- on vertical split instead of opening window to left open it at right - termguicolors=true, - showmode=false, -- lualine does the job - cmdheight=1, - wrap=false, - whichwrap='b,s,<,>,[,],h,l', - clipboard="unnamedplus", -- allows neovim to access system clipboard using yank - fileencoding="UTF-8", - --spaces/tabs/indents - softtabstop=4, -- No. of spaces per tab - shiftwidth=4, -- No. of auto-indent space - expandtab=true, -- spaces inplace of tabs - autoindent=true, -- New line copies indentation from past line - smartindent=true, -- Indents in accordance to the syntax/style of the code extension - --searches - ignorecase=true, -- Ignore case-sensitivity during search - smartcase=true, -- If searching capital search only capital - hlsearch=false, -- no perma highlight post search - incsearch=true, -- searches for strings incrementally - showmatch=true, -- Highlight matching braces - --git integration/lsp/diagnostic - signcolumn="yes", - --undo/backup - backup=false, - swapfile=false, - undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir", - undofile=true --- showbreak="+++", -- wrap broken line prefix -} ---forloop for table 'options' -for key, value in pairs(options) do - vim.opt[key] = value -end - ---to 'cw/'dw' a word containing '-' in between -vim.cmd [[set iskeyword+=-]] diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua deleted file mode 100644 index 460d6f3..0000000 --- a/.config/nvim/lua/justsaumit/plugins.lua +++ /dev/null @@ -1,113 +0,0 @@ -local fn = vim.fn - --- Automatically install packer -local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" -if fn.empty(fn.glob(install_path)) > 0 then - PACKER_BOOTSTRAP = fn.system { - "git", - "clone", - "--depth", - "1", - "https://github.com/wbthomason/packer.nvim", - install_path, - } - print "Installing packer close and reopen Neovim..." - vim.cmd [[packadd packer.nvim]] -end - --- Autocommand that reloads neovim whenever you save (:w) the plugins.lua file -vim.cmd [[ - augroup packer_user_config - autocmd! - autocmd BufWritePost plugins.lua source | PackerSync - augroup end -]] - --- Use a protected call so we don't error out! -local status_ok, packer = pcall(require, "packer") -if not status_ok then - return -end - --- Have packer use a popup window -packer.init { - display = { - open_fn = function() - return require("packer.util").float { border = "rounded" } - end, - }, -} - ---Actual good stuff ---Install all your plugins here -return packer.startup(function(use) ---Necessities - use "wbthomason/packer.nvim" -- Have packer manage itself - use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim - use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins - use "ethanholz/nvim-lastplace" -- Preserve last editing position in nvim ---TreeSitter - use {'nvim-treesitter/nvim-treesitter',run = ':TSUpdate'} ---ColorSchemes - use "folke/tokyonight.nvim" - use "tiagovla/tokyodark.nvim" - use { "catppuccin/nvim", as = "catppuccin" } - use { 'AlphaTechnolog/pywal.nvim', as = 'pywal' } ---Web-devicons - use "kyazdani42/nvim-web-devicons" ---Lualine - use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }} ---Bufferline - use {'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons'} ---Nvim-tree File explorer for nvim - use {'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons'}} ---Which-key - displays a popup with possible key bindings - use 'folke/which-key.nvim' ---mini.nvim - Lua module pack - use 'echasnovski/mini.nvim' ---Mason-nvim Portable Package manager for LSP and DAP servers, linters and formatters - use { "williamboman/mason.nvim", run = ":MasonUpdate"} -- :MasonUpdate updates registry contents ---lsp - use("williamboman/mason-lspconfig.nvim") - use("neovim/nvim-lspconfig") --> Collection of configurations for built-in LSP client - use("kkharji/lspsaga.nvim") --> icons for LSP diagnostics - use("onsails/lspkind-nvim") --> vscode-like pictograms for neovim lsp completion items ---cmp - Autocompletions - use("hrsh7th/nvim-cmp") --completion engine - use("L3MON4D3/LuaSnip") --snippets engine - use("saadparwaiz1/cmp_luasnip") --luasnip completion source for nvim-cmp ---cmp plugins - use("hrsh7th/cmp-nvim-lsp")--nvim-cmp source for neovim's built-in language server client. - use("hrsh7th/cmp-buffer") --nvim-cmp source for buffer words. - use("hrsh7th/cmp-path") --nvim-cmp source for filesystem path - use("hrsh7th/cmp-cmdline") --nvim-cmp source for vim's cmdline - --- use("jose-elias-alvarez/null-ls.nvim") --> inject lsp diagnistocs, formattings, code actions, and more ... ---HTML - use("windwp/nvim-ts-autotag") -- Use treesitter autotag ---Markdown + Zenmode ---Telescope - use {'nvim-telescope/telescope.nvim', tag = '0.1.2', requires = { {'nvim-lua/plenary.nvim'} }} --- ToggleTerm - use ('akinsho/toggleterm.nvim') - --- use "rafamadriz/friendly-snippets" -- a bunch of snippets to use - --- Dashboard - -- use {'glepnir/dashboard-nvim', event = 'Vimenter'} --- Comments - Toggle comments in Neovim - use "terrortylor/nvim-comment" - ---Autopairs for HTML - --use {"windwp/nvim-autopairs", wants = "nvim-treesitter", module = { "nvim-autopairs.completion.cmp", "nvim-autopairs" }, config = function() - --require("config.autopairs").setup() end,} ---CSS - use 'NvChad/nvim-colorizer.lua' - - --- Automatically set up your configuration after cloning packer.nvim --- Put this at the end after all plugins - if PACKER_BOOTSTRAP then - require("packer").sync() - end -end) diff --git a/.config/nvim/lua/justsaumit/telescope-config.lua b/.config/nvim/lua/justsaumit/telescope-config.lua deleted file mode 100644 index 534e663..0000000 --- a/.config/nvim/lua/justsaumit/telescope-config.lua +++ /dev/null @@ -1,52 +0,0 @@ -local actions = require('telescope.actions') -require('telescope').setup { - defaults = { - layout_config = { - width = 0.75, - prompt_position = "top", - preview_cutoff = 120, - horizontal = {mirror = false}, - vertical = {mirror = false} - }, - find_command = { - 'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' - }, - prompt_prefix = " ", - selection_caret = " ", - entry_prefix = " ", - initial_mode = "insert", - selection_strategy = "reset", - sorting_strategy = "descending", - layout_strategy = "horizontal", - file_sorter = require'telescope.sorters'.get_fuzzy_file, - file_ignore_patterns = { - "node_modules", "build", "dist", "yarn.lock", ".local", ".cargo", ".rustup", ".mozilla",".git" - }, - generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, - path_display = {}, - winblend = 0, - border = {}, - borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, - color_devicons = true, - use_less = true, - set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, - file_previewer = require'telescope.previewers'.vim_buffer_cat.new, - grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, - qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, - buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, - mappings = { - i = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_send_to_qflist + actions.open_qflist, - [""] = actions.close, - [""] = actions.select_default + actions.center - }, - n = { - [""] = actions.move_selection_next, - [""] = actions.move_selection_previous, - [""] = actions.smart_send_to_qflist + actions.open_qflist - } - } - } -} diff --git a/.config/nvim/lua/justsaumit/toggleterm-config.lua b/.config/nvim/lua/justsaumit/toggleterm-config.lua deleted file mode 100644 index b1579cd..0000000 --- a/.config/nvim/lua/justsaumit/toggleterm-config.lua +++ /dev/null @@ -1,16 +0,0 @@ -require'toggleterm'.setup{ - size = 20, - open_mapping = [[]], - hide_numbers = true, -- hide the number column in toggleterm buffers - shade_filetypes = {}, - autochdir = false, - shade_terminals = true, - shading_factor = 1, - start_in_insert = true, - insert_mappings = true, -- whether or not the open mapping applies in insert mode - terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals - persist_size = true, - direction = 'horizontal', - close_on_exit = true, - shell = '/usr/bin/zsh', -} diff --git a/.config/nvim/lua/justsaumit/treesitter-config.lua b/.config/nvim/lua/justsaumit/treesitter-config.lua deleted file mode 100644 index c64e659..0000000 --- a/.config/nvim/lua/justsaumit/treesitter-config.lua +++ /dev/null @@ -1,26 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" - ensure_installed = { "bash", "c", "cpp", "lua", "rust", "python", "go","html", "javascript", "typescript", "markdown", "solidity", "sxhkdrc" }, - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - auto_install = true, - - -- List of parsers to ignore installing (for "all") - highlight = { - -- `false` will disable the whole extension - enable = true, - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - autotag = { - enable = true, - enable_close = true, - enable_close_on_slash = true, - enable_rename = true, - filetypes = { "html" , "xml", - 'javascript', 'typescript', 'svelte', - 'markdown',}, - } -} diff --git a/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua deleted file mode 100644 index 93a42fa..0000000 --- a/.config/nvim/lua/justsaumit/which-key-config.lua +++ /dev/null @@ -1,69 +0,0 @@ -local wk = require("which-key") -local Terminal = require('toggleterm.terminal').Terminal -local toggle_float = function() - local float = Terminal:new({ direction = "float" }) - return float:toggle() -end -local toggle_lazygit = function() - local lazygit = Terminal:new({ cmd = "lazygit", direction = "float" }) - return lazygit:toggle() -end -local mappings = { - q = {":q", "Quit"}, - Z = {":wq", "Save and Quit"}, - w = {":w", "Save"}, - x ={":bdelete", "Close"}, - E = { ":e ~/.config/nvim/init.lua", "Edit config" }, - f = { - name = "Telescope", - f = {":Telescope find_files", "Telescope Find Files" }, - h = { ":Telescope find_files hidden=true", "Telescope Find Files" }, - g = { ":Telescope live_grep", "Telescope Live Grep" }, - }, - r = { ":Telescope oldfiles", "Recent files" }, - l = { - name = "LSP", - i = {":LspInfo", "Connected Language Servers"}, - I = {'LspInstallInfo', 'Install language server'}, - f = {'lua vim.lsp.buf.formatting()', "Format File"}, - k = {" lua vim.lsp.buf.signature_help()", "Signature Help"}, - -- K = {'lua vim.lsp.buf.hover()', "Hover"}, - K = {" Lspsaga hover_doc", "Hover Commands"}, - w = {" lua vim.lsp.add_workspace_folder()", "Add Workspace Folder"}, - W = {" lua vim.lsp.remove_workspace_folder()", "Remove Workspace Folder"}, - l = {" lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder"}, - t = {'lua vim.lsp.buf.type_definition()', "Type definition"}, - d = {" lua vim.lsp.buf.definition()", "Go to Definition"}, - D = {" lua vim.lsp.buf.declaration()", "Go to Declaration"}, - r = {" lua vim.lsp.buf.references()", "References"}, - R = {" Lspsaga rename", "Rename"}, - -- R = {'lua vim.lsp.buf.rename()', "Rename"}, - a = {" Lspsaga code_action", "Code Action"}, - -- a = {'lua vim.lsp.buf.code_action()', "Code actions"}, - -- T = {' Telescope diagnostics bufnr=0', "Get Diagnostics"} - go = {"Lspsaga show_line_diagnostics","Show Line Diagnostic"}, - -- e = {'lua vim.diagnostic.show_line_diagnostics()', "Show line diagnostics"}, - gj = {"Lspsaga diagnostic_jump_next","Go to Next Diagnostic"}, - -- n = {'lua vim.diagnostic.goto_next()', "Go to next diagnostic"}, - gk = {"Lspsaga diagnostic_jump_prev","Go to Prev Diagnostic"}, - -- N = {'lua vim.diagnostic.goto_prev()', "Go to previous diagnostic"}, - }, - t = { - name = "ToggleTerm", - t = { ":ToggleTerm", "Split Below" }, - f = { toggle_float, "Floating Terminal" }, - l = { toggle_lazygit, "Lazygit" }, - }, - p = { - name = "Packer", - s = { ":PackerSync", "Sync Plugins" }, - r = { ":PackerClean", "Remove Unused Plugins" }, - c = { ":PackerCompile profile=true", "Recompile Plugins" }, - i = { ":PackerInstall", "Install Plugins" }, - p = { ":PackerProfile", "Packer Profile" }, - S = { ":PackerStatus", "Packer Status" }, - u = { ":PackerUpdate", "Update Plugins" } - }, -} -local opts = {prefix = ''} -wk.register(mappings, opts) diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua deleted file mode 100644 index f5e9107..0000000 --- a/.config/nvim/plugin/packer_compiled.lua +++ /dev/null @@ -1,249 +0,0 @@ --- Automatically generated packer.nvim plugin loader code - -if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then - vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') - return -end - -vim.api.nvim_command('packadd packer.nvim') - -local no_errors, error_msg = pcall(function() - -_G._packer = _G._packer or {} -_G._packer.inside_compile = true - -local time -local profile_info -local should_profile = false -if should_profile then - local hrtime = vim.loop.hrtime - profile_info = {} - time = function(chunk, start) - if start then - profile_info[chunk] = hrtime() - else - profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 - end - end -else - time = function(chunk, start) end -end - -local function save_profiles(threshold) - local sorted_times = {} - for chunk_name, time_taken in pairs(profile_info) do - sorted_times[#sorted_times + 1] = {chunk_name, time_taken} - end - table.sort(sorted_times, function(a, b) return a[2] > b[2] end) - local results = {} - for i, elem in ipairs(sorted_times) do - if not threshold or threshold and elem[2] > threshold then - results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' - end - end - if threshold then - table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') - end - - _G._packer.profile_output = results -end - -time([[Luarocks path setup]], true) -local package_path_str = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?/init.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/lua/5.1/?.so" -if not string.find(package.path, package_path_str, 1, true) then - package.path = package.path .. ';' .. package_path_str -end - -if not string.find(package.cpath, install_cpath_pattern, 1, true) then - package.cpath = package.cpath .. ';' .. install_cpath_pattern -end - -time([[Luarocks path setup]], false) -time([[try_loadstring definition]], true) -local function try_loadstring(s, component, name) - local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) - if not success then - vim.schedule(function() - vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) - end) - end - return result -end - -time([[try_loadstring definition]], false) -time([[Defining packer_plugins]], true) -_G.packer_plugins = { - LuaSnip = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/LuaSnip", - url = "https://github.com/L3MON4D3/LuaSnip" - }, - ["bufferline.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/bufferline.nvim", - url = "https://github.com/akinsho/bufferline.nvim" - }, - catppuccin = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/catppuccin", - url = "https://github.com/catppuccin/nvim" - }, - ["cmp-buffer"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-buffer", - url = "https://github.com/hrsh7th/cmp-buffer" - }, - ["cmp-cmdline"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-cmdline", - url = "https://github.com/hrsh7th/cmp-cmdline" - }, - ["cmp-nvim-lsp"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", - url = "https://github.com/hrsh7th/cmp-nvim-lsp" - }, - ["cmp-path"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-path", - url = "https://github.com/hrsh7th/cmp-path" - }, - cmp_luasnip = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp_luasnip", - url = "https://github.com/saadparwaiz1/cmp_luasnip" - }, - ["lspkind-nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspkind-nvim", - url = "https://github.com/onsails/lspkind-nvim" - }, - ["lspsaga.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", - url = "https://github.com/kkharji/lspsaga.nvim" - }, - ["lualine.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lualine.nvim", - url = "https://github.com/nvim-lualine/lualine.nvim" - }, - ["mason-lspconfig.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", - url = "https://github.com/williamboman/mason-lspconfig.nvim" - }, - ["mason.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason.nvim", - url = "https://github.com/williamboman/mason.nvim" - }, - ["nvim-cmp"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-cmp", - url = "https://github.com/hrsh7th/nvim-cmp" - }, - ["nvim-colorizer.lua"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", - url = "https://github.com/NvChad/nvim-colorizer.lua" - }, - ["nvim-comment"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-comment", - url = "https://github.com/terrortylor/nvim-comment" - }, - ["nvim-lastplace"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace", - url = "https://github.com/ethanholz/nvim-lastplace" - }, - ["nvim-lspconfig"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", - url = "https://github.com/neovim/nvim-lspconfig" - }, - ["nvim-tree.lua"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", - url = "https://github.com/nvim-tree/nvim-tree.lua" - }, - ["nvim-treesitter"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-treesitter", - url = "https://github.com/nvim-treesitter/nvim-treesitter" - }, - ["nvim-ts-autotag"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag", - url = "https://github.com/windwp/nvim-ts-autotag" - }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, - ["packer.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/packer.nvim", - url = "https://github.com/wbthomason/packer.nvim" - }, - ["plenary.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/plenary.nvim", - url = "https://github.com/nvim-lua/plenary.nvim" - }, - ["popup.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/popup.nvim", - url = "https://github.com/nvim-lua/popup.nvim" - }, - pywal = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/pywal", - url = "https://github.com/AlphaTechnolog/pywal.nvim" - }, - ["telescope.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/telescope.nvim", - url = "https://github.com/nvim-telescope/telescope.nvim" - }, - ["toggleterm.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", - url = "https://github.com/akinsho/toggleterm.nvim" - }, - ["tokyodark.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyodark.nvim", - url = "https://github.com/tiagovla/tokyodark.nvim" - }, - ["tokyonight.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", - url = "https://github.com/folke/tokyonight.nvim" - }, - ["which-key.nvim"] = { - loaded = true, - path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/which-key.nvim", - url = "https://github.com/folke/which-key.nvim" - } -} - -time([[Defining packer_plugins]], false) - -_G._packer.inside_compile = false -if _G._packer.needs_bufread == true then - vim.cmd("doautocmd BufRead") -end -_G._packer.needs_bufread = false - -if should_profile then save_profiles() end - -end) - -if not no_errors then - error_msg = error_msg:gsub('"', '\\"') - vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') -end diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf deleted file mode 100644 index 0023540..0000000 --- a/.config/tmux/tmux.conf +++ /dev/null @@ -1,20 +0,0 @@ -#Unbind default prefix key and bind it to Ctrl+Space -unbind C-b -set -g prefix C-space - -# Start window numbering at 1 -set -g base-index 1 -# mouse support -set -g mouse on - -#george hotz -set -g status-position bottom -set -g status-bg colour234 -set -g status-fg colour137 -set -g status-left '' -set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' -set -g status-right-length 50 -set -g status-left-length 20 - -setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' -setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' diff --git a/.config/vim/vimrc b/.config/vim/vimrc deleted file mode 100644 index 0832263..0000000 --- a/.config/vim/vimrc +++ /dev/null @@ -1,20 +0,0 @@ -syntax on - -set tabstop=4 -set softtabstop=4 -set shiftwidth=4 -set expandtab -set autoindent -set smartindent -set nu -set relativenumber -"set nowrap -set smartcase -set noswapfile -set nobackup -set undofile -set undodir=~/.cache/vim/undodir -set incsearch -set nohlsearch -"set signcolumn=yes -set mouse=a diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc deleted file mode 100644 index 4231e29..0000000 --- a/.config/zsh/.zshrc +++ /dev/null @@ -1,133 +0,0 @@ -# Path to your Oh My Zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -# 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, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="spaceship" - - -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -#ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=( - git - zsh-autosuggestions - zsh-syntax-highlighting - jump - dotenv - aliases - colorize - cp - history - pass - tmux - vi-mode - rand-quote - nvm - npm - node -) - -source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='mvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch x86_64" - -# Set personal aliases, overriding those provided by Oh My Zsh libs, -# plugins, and themes. Aliases can be placed here, though Oh My Zsh -# users are encouraged to define aliases within a top-level file in -# the $ZSH_CUSTOM folder, with .zsh extension. Examples: -# - $ZSH_CUSTOM/aliases.zsh -# - $ZSH_CUSTOM/macos.zsh -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - -export NVM_DIR="$HOME/.nvm" -export PATH=$PATH:/usr/local/x -export PATH="$PATH:$HOME/.scripts" - -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - -# Load aliases -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" -# Load shortcut -[ -f "${xdg_config_home:-$home/.config}/shell/shortcutrc" ] && source "${xdg_config_home:-$home/.config}/shell/shortcutrc" -# Load profile -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..acb92f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +stow/nvim/.config/nvim/lua/secrets.lua +stow/zsh/.zsh_secrets diff --git a/stow/hyprland/.config/hypr/hyprland-base.conf b/stow/hyprland/.config/hypr/hyprland-base.conf new file mode 100644 index 0000000..98ac099 --- /dev/null +++ b/stow/hyprland/.config/hypr/hyprland-base.conf @@ -0,0 +1,341 @@ +# This is an example Hyprland config file. +# Refer to the wiki for more information. +# https://wiki.hypr.land/Configuring/ + +# Please note not all available settings / options are set here. +# For a full list, see the wiki + +# You can split this configuration into multiple files +# Create your files separately and then link them to this file like this: +# source = ~/.config/hypr/myColors.conf + + +################ +### MONITORS ### +################ + +# See https://wiki.hypr.land/Configuring/Monitors/ +monitor=,preferred,auto,auto + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ + +# Set programs that you use +$terminal = kitty +$fileManager = dolphin +$menu = hyprlauncher + + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +# exec-once = $terminal +# exec-once = nm-applet & +# exec-once = waybar & hyprpaper & firefox + + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 + + +################### +### PERMISSIONS ### +################### + +# See https://wiki.hypr.land/Configuring/Permissions/ +# Please note permission changes here require a Hyprland restart and are not applied on-the-fly +# for security reasons + +# ecosystem { +# enforce_permissions = 1 +# } + +# permission = /usr/(bin|local/bin)/grim, screencopy, allow +# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hypr.land/Configuring/Variables/ + +# https://wiki.hypr.land/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = dwindle +} + +# https://wiki.hypr.land/Configuring/Variables/#decoration +decoration { + rounding = 10 + rounding_power = 2 + + # Change transparency of focused and unfocused windows + active_opacity = 1.0 + inactive_opacity = 1.0 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } + + # https://wiki.hypr.land/Configuring/Variables/#blur + blur { + enabled = true + size = 3 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hypr.land/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves + # NAME, X0, Y0, X1, Y1 + bezier = easeOutQuint, 0.23, 1, 0.32, 1 + bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1 + bezier = linear, 0, 0, 1, 1 + bezier = almostLinear, 0.5, 0.5, 0.75, 1 + bezier = quick, 0.15, 0, 0.1, 1 + + # Default animations, see https://wiki.hypr.land/Configuring/Animations/ + # NAME, ONOFF, SPEED, CURVE, [STYLE] + animation = global, 1, 10, default + animation = border, 1, 5.39, easeOutQuint + animation = windows, 1, 4.79, easeOutQuint + animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + animation = windowsOut, 1, 1.49, linear, popin 87% + animation = fadeIn, 1, 1.73, almostLinear + animation = fadeOut, 1, 1.46, almostLinear + animation = fade, 1, 3.03, quick + animation = layers, 1, 3.81, easeOutQuint + animation = layersIn, 1, 4, easeOutQuint, fade + animation = layersOut, 1, 1.5, linear, fade + animation = fadeLayersIn, 1, 1.79, almostLinear + animation = fadeLayersOut, 1, 1.39, almostLinear + animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspacesIn, 1, 1.21, almostLinear, fade + animation = workspacesOut, 1, 1.94, almostLinear, fade + animation = zoomFactor, 1, 7, quick +} + +# Ref https://wiki.hypr.land/Configuring/Workspace-Rules/ +# "Smart gaps" / "No gaps when only" +# uncomment all if you wish to use that. +# workspace = w[tv1], gapsout:0, gapsin:0 +# workspace = f[1], gapsout:0, gapsin:0 +# windowrule { +# name = no-gaps-wtv1 +# match:float = false +# match:workspace = w[tv1] +# +# border_size = 0 +# rounding = 0 +# } +# +# windowrule { +# name = no-gaps-f1 +# match:float = false +# match:workspace = f[1] +# +# border_size = 0 +# rounding = 0 +# } + +# See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more +dwindle { + pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = true # You probably want this +} + +# See https://wiki.hypr.land/Configuring/Master-Layout/ for more +master { + new_status = master +} + +# https://wiki.hypr.land/Configuring/Variables/#misc +misc { + force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + touchpad { + natural_scroll = false + } +} + +# See https://wiki.hypr.land/Configuring/Gestures +gesture = 3, horizontal, workspace + +# Example per-device config +# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +device { + name = epic-mouse-v1 + sensitivity = -0.5 +} + + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ +$mainMod = SUPER # Sets "Windows" key as main modifier + +# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more +bind = $mainMod, Q, exec, $terminal +bind = $mainMod, C, killactive, +bind = $mainMod, M, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit +bind = $mainMod, E, exec, $fileManager +bind = $mainMod, V, togglefloating, +bind = $mainMod, R, exec, $menu +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Example special workspace (scratchpad) +bind = $mainMod, S, togglespecialworkspace, magic +bind = $mainMod SHIFT, S, movetoworkspace, special:magic + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Laptop multimedia keys for volume and LCD brightness +bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ +bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+ +bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%- + +# Requires playerctl +bindl = , XF86AudioNext, exec, playerctl next +bindl = , XF86AudioPause, exec, playerctl play-pause +bindl = , XF86AudioPlay, exec, playerctl play-pause +bindl = , XF86AudioPrev, exec, playerctl previous + +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hypr.land/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrules that are useful + +windowrule { + # Ignore maximize requests from all apps. You'll probably like this. + name = suppress-maximize-events + match:class = .* + + suppress_event = maximize +} + +windowrule { + # Fix some dragging issues with XWayland + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} + +# Hyprland-run windowrule +windowrule { + name = move-hyprland-run + + match:class = hyprland-run + + move = 20 monitor_h-120 + float = yes +} diff --git a/stow/hyprland/.config/hypr/hyprland.conf b/stow/hyprland/.config/hypr/hyprland.conf new file mode 100644 index 0000000..f5c2b61 --- /dev/null +++ b/stow/hyprland/.config/hypr/hyprland.conf @@ -0,0 +1,551 @@ +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=eDP-1,1920x1080@144,0x0,1.00,transform,0 +monitor=HDMI-A-1,1920x1080@144,0x0,1.00,transform,0,mirror,eDP-1 + + +################### +### MY PROGRAMS ### +################### + +# See https://wiki.hyprland.org/Configuring/Keywords/ + +# Set programs that you use +#$terminal = kitty +#$fileManager = dolphin +#$menu = wofi --show drun + + +################# +### AUTOSTART ### +################# + +# Autostart necessary processes (like notifications daemons, status bars, etc.) +# Or execute your favorite apps at launch like this: + +# exec-once = $terminal +# exec-once = nm-applet & +# exec-once = waybar & hyprpaper & firefox +exec-once = waybar & dunst & wpaperd & suspend.sh & nm-applet & blueman-applet & notion-app & memospot +#exec-once = dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY +#exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY && XDG_CURRENT_DESKTOP=Hyprland +exec-once = systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec-once = xhost +SI:localuser:root + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +############################# +### ENVIRONMENT VARIABLES ### +############################# + +# See https://wiki.hypr.land/Configuring/Environment-variables/ + +env = XCURSOR_SIZE,24 +env = HYPRCURSOR_SIZE,24 +env = XDG_SESSION_TYPE,wayland +env = WLR_NO_HARDWARE_CURSORS,1 + +#env = LIBVA_DRIVER_NAME,nvidia +env = XDG_SESSION_TYPE,wayland +#env = GBM_BACKEND,nvidia-drm +#env = __GLX_VENDOR_LIBRARY_NAME,nvidia +env = WLR_NO_HARDWARE_CURSORS,1 +env = WLR_DRM_NO_MODIFIERS,1 +env = WLR_RENDERER,vulkan + +################### +### PERMISSIONS ### +################### + +# See https://wiki.hypr.land/Configuring/Permissions/ +# Please note permission changes here require a Hyprland restart and are not applied on-the-fly +# for security reasons + +# ecosystem { +# enforce_permissions = 1 +# } + +# permission = /usr/(bin|local/bin)/grim, screencopy, allow +# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow +# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow + + +##################### +### LOOK AND FEEL ### +##################### + +# Refer to https://wiki.hypr.land/Configuring/Variables/ + +# https://wiki.hypr.land/Configuring/Variables/#general +general { + gaps_in = 5 + gaps_out = 20 + + border_size = 2 + + # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors + col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.inactive_border = rgba(595959aa) + + # Set to true enable resizing windows by clicking and dragging on borders and gaps + resize_on_border = false + + # Please see https://wiki.hypr.land/Configuring/Tearing/ before you turn this on + allow_tearing = false + + layout = master +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + special_scale_factor=0.8 + new_on_top=false +# no_gaps_when_only=true // config removed add through Workspace rules + orientation=left +} + +# https://wiki.hypr.land/Configuring/Variables/#decoration +decoration { + rounding = 3 + #multisample_edges = true + + # Change transparency of focused and unfocused windows + active_opacity=0.99 + inactive_opacity=0.94 + fullscreen_opacity=1.0 + + shadow { + enabled = true + range = 4 + render_power = 3 + color = rgba(1a1a1aee) + } + + # https://wiki.hypr.land/Configuring/Variables/#blur + blur { + enabled = true + size = 4 + passes = 1 + + vibrancy = 0.1696 + } +} + +# https://wiki.hypr.land/Configuring/Variables/#animations +animations { + enabled = yes, please :) + + # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + + #bezier = easeOutQuint,0.23,1,0.32,1 + #bezier = easeInOutCubic,0.65,0.05,0.36,1 + #bezier = linear,0,0,1,1 + #bezier = almostLinear,0.5,0.5,0.75,1.0 + #bezier = quick,0.15,0,0.1,1 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default + #animation = global, 1, 10, default + #animation = border, 1, 5.39, easeOutQuint + #animation = windows, 1, 4.79, easeOutQuint + #animation = windowsIn, 1, 4.1, easeOutQuint, popin 87% + #animation = windowsOut, 1, 1.49, linear, popin 87% + #animation = fadeIn, 1, 1.73, almostLinear + #animation = fadeOut, 1, 1.46, almostLinear + #animation = fade, 1, 3.03, quick + #animation = layers, 1, 3.81, easeOutQuint + #animation = layersIn, 1, 4, easeOutQuint, fade + #animation = layersOut, 1, 1.5, linear, fade + #animation = fadeLayersIn, 1, 1.79, almostLinear + #animation = fadeLayersOut, 1, 1.39, almostLinear + #animation = workspaces, 1, 1.94, almostLinear, fade + #animation = workspacesIn, 1, 1.21, almostLinear, fade + #animation = workspacesOut, 1, 1.94, almostLinear, fade +} + + +# https://wiki.hypr.land/Configuring/Variables/#misc +misc { +# enable_swallow = true +# swallow_regex = ^(foot)$ +# force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers +# disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( +} + + +############# +### INPUT ### +############# + +# https://wiki.hypr.land/Configuring/Variables/#input +input { + kb_layout = us + kb_variant = + kb_model = + kb_options=caps:escape + # kb_options=ctrl:nocaps + kb_rules = + + follow_mouse = 1 + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + + scroll_factor = 1.0 + scroll_method = 2fg + + touchpad { + natural_scroll = true + scroll_factor = 1.0 + tap-to-click = yes + tap-and-drag = yes + disable_while_typing = false + clickfinger_behavior = yes + } +} + +# See https://wiki.hypr.land/Configuring/Gestures +gesture = 3, horizontal, workspace +gesture = 3, down, dispatcher, movetoworkspacesilent, special +gesture = 3, up, scale: 1.5, dispatcher, movetoworkspacesilent, +0 +gesture = 3, pinch, fullscreen + +binds { + workspace_back_and_forth = true + allow_workspace_cycles = true + # trigger when the switch is toggled + bindl=,switch:Lid Switch,exec,swaylock +} + +# Example per-device config +# See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more +#device { +# name = epic-mouse-v1 +# sensitivity = -0.5 +#} + +# $TOUCHPAD_ENABLED = true +# device { +# name = pnp0c50:0d-06cb:cebd-touchpad +# enabled = $TOUCHPAD_ENABLED +# scroll_factor = 1.0 +# natural_scroll = false +# } + +# $KEYBOARD_ENABLED = true +# device { +# name = at-translated-set-2-keyboard +# enabled = $KEYBOARD_ENABLED +# } +device { + name = pnp0c50:0d-06cb:cebd-touchpad + enabled = true + accel_profile = flat + tap-to-click = true + tap-and-drag = true + drag_lock = true + middle_button_emulation = false +} + +# $KEYBOARD_ENABLED = true +# device { +# name = at-translated-set-2-keyboard +# enabled = $KEYBOARD_ENABLED +# } + +################### +### KEYBINDINGS ### +################### + +# See https://wiki.hypr.land/Configuring/Keywords/ +$MOD = SUPER + +# Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more + + +############### +# Imp Utils # +############### +#Terminal +bind = $MOD SHIFT, Return, exec, foot +bind = $MOD, W, killactive +bind = $MOD CTRL SHIFT, Q, exit +bind = $MOD, F, togglefloating +bind = $MOD, Space, togglefloating +bind = $MOD, P, pin +# Move to/Toggle scratchpad +bind = $MOD SHIFT,S,movetoworkspace,special +bind = $MOD,S,togglespecialworkspace, +#bindr= $MOD, D, exec, pkill tofi || tofi-run | xargs hyprctl dispatch exec +bind = $MOD, F1, exec, pidkillall +#rofi +bindr = $MOD, D, exec, pkill rofi || rofi -show run +bindr = $MOD CTRL, D, exec, pkill rofi || rofi -show drun +bind = $MOD, F3, exec, rofi -modi emoji -show emoji -kb-custom-1 Ctrl+C +bind = $MOD, X, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy +bind = ALT, L, exec, ~/.scripts/rofi-beats-linux.sh +# Toggle Touchpad +bind = $MOD ALT, M, exec, toggle-touchpad-hypr + +################ +# Applications # +################ + +##(Perma Launch) +# Launch Brave +bind = $MOD, Q, exec, brave +bind = $MOD CTRL, Q, exec, brave --incognito +bind = $MOD SHIFT, Z, exec, zen-browser +# Launch wa +bind = $MOD SHIFT, W, exec, whatsapp-nativefier --no-sandbox +#Launch emacs +bind = $MOD, E, exec, emacs +# Launch ncloud +bind = $MOD SHIFT, N, exec, qutebrowser https://ncloud.draconyan.xyz +# Launch thunderbird +bind = $MOD SHIFT, E, exec, thunderbird +# Launch protonmail +bind = $MOD ALT, E, exec, qutebrowser https://mail.proton.me/u/0/inbox +# Launch teams +# bind = $MOD SHIFT, T, exec, qutebrowser https://teams.microsoft.com +bind = $MOD SHIFT, T, exec, teams +# Launch spotify +bind = $MOD SHIFT, M, exec, spotify +# Launch memospot +bind = $MOD CTRL, M, exec, memospot +# Launch discord +bind = $MOD SHIFT, D, exec, webcord --enable-features=UseOzonePlatform --ozone-platform=wayland +# Launch telegram +bind = $MOD CTRL, T, exec, telegram-desktop + +##(Temp Launch) +# Launch ranger +bind = $MOD, R, exec, foot --term xterm-256color -e ranger +# Launch pulsemixer +bind = $MOD SHIFT, P, exec, foot -e pulsemixer +#Launch top +bind = $MOD SHIFT, G, exec, foot --term xterm -e gotop +bind = $MOD SHIFT, H, exec, foot -e htop +bind = $MOD SHIFT, B, exec, foot -e btop + + +################### +# Global Hot-keys # +################### +##screenlock +bind = $MOD , L, exec, swaylock + +#screenshot +#bind = ,Print, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim "$GRIM_DEFAULT_DIR/""$IMG" && wl-copy < "$GRIM_DEFAULT_DIR/""$IMG" +#bind = CTRL,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" "$GRIM_DEFAULT_DIR/""$IMG" && wl-copy < "$GRIM_DEFAULT_DIR/""$IMG" +#bind = ALT ,Print, exec, flameshot gui +bind = ,Print, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the whole screen taken" "$IMG" -t 1000 # screenshot of whole screen +bind = $MOD SHIFT,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region +bind = CTRL,Print, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region +bind = ALT,Print, exec, flameshot gui +bind = ,F10, exec, IMG=pic-full-"$(date +%y-%m-%d--%H-%M-%S)".png && grim - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the whole screen taken" "$IMG" -t 1000 # screenshot of whole screen +bind = ,F11, exec, IMG=pic-sel-"$(date +%y-%m-%d--%H-%M-%S)".png && grim -g "$(slurp)" - | wl-copy && wl-paste > "$GRIM_DEFAULT_DIR/""$IMG" && dunstify "Screenshot of the region taken" "$IMG" -t 1000 # screenshot of a region +bind = ,F12, exec, flameshot gui + +#otherkeyb +bind = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && [[ "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep MUTE)" ]] && dunstify "Mute" "Volume set to 0%" -i volume-xmark -t 1000 -r 1234 +#binde = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && dunstify -i volume-high -t 1500 -r 1235 "Volume Changed" "Volume increased by 2%" +binde = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+ && dunstify "Volume Changed" "Volume set to $(volumecurr)" -i volume-high -t 1500 -r 1235 +# binde = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && dunstify -i volume-low -t 1500 -r 1235 "Volume Changed" "Volume decreased by 2%" +binde = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%- && dunstify "Volume Changed" "Volume set to $(volumecurr)" -i volume-low -t 1500 -r 1236 +binde = ,XF86MonBrightnessUp, exec, brillo -A 4 && dunstify -u normal -t 3000 -r 90210 -i brightness "$(printf %.0f%% $( brillo -G) )" +binde = ,XF86MonBrightnessDown, exec, brillo -U 4 && dunstify -u normal -t 3000 -r 90210 -i brightness "$(printf %.0f%% $( brillo -G) )" +#Launch rofi calc mode +bind = $MOD, F2 , exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy" +bind = , XF86Calculator, exec, rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | wl-copy" + +# Toggle play/pause in Spotify or Chromium (fallback) +bind = , XF86AudioPlay, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify play-pause; else playerctl -p chromium play-pause; fi + +# Change tracks in Spotify or Chromium (fallback) +bind = , XF86AudioPrev, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify previous; else playerctl -p chromium previous; fi +bind = , XF86AudioNext, exec, if playerctl -p spotify status > /dev/null 2>&1; then playerctl -p spotify next; else playerctl -p chromium next; fi + +#bluetooth applet +bind = $MOD, F9, exec, blueman-manager + +#master-stack layout +bind = $MOD, Return,layoutmsg, swapwithmaster + +#fullscreen layout toggle +bind = $MOD, H, togglesplit +bind= $MOD, U, fullscreen + +# Move focus with MOD + arrow keys +#bind = $MOD, h, movefocus, l +#bind = $MOD, l, movefocus, r +#bind = $MOD, k, movefocus, u +#bind = $MOD, j, movefocus, d +# Better performed using cycle +bind = $MOD, k, layoutmsg, cycleprev +bind = $MOD, j, layoutmsg, cyclenext + +# Switch workspaces with MOD + [0-9] +bind = $MOD, 1, workspace, 1 +bind = $MOD, 2, workspace, 2 +bind = $MOD, 3, workspace, 3 +bind = $MOD, 4, workspace, 4 +bind = $MOD, 5, workspace, 5 +bind = $MOD, 6, workspace, 6 +bind = $MOD, 7, workspace, 7 +bind = $MOD, 8, workspace, 8 +bind = $MOD, 9, workspace, 9 +bind = $MOD, 0, workspace, 10 + +# Move active window to a workspace with MOD + SHIFT + [0-9] +bind = $MOD SHIFT, 1, movetoworkspace, 1 +bind = $MOD SHIFT, 2, movetoworkspace, 2 +bind = $MOD SHIFT, 3, movetoworkspace, 3 +bind = $MOD SHIFT, 4, movetoworkspace, 4 +bind = $MOD SHIFT, 5, movetoworkspace, 5 +bind = $MOD SHIFT, 6, movetoworkspace, 6 +bind = $MOD SHIFT, 7, movetoworkspace, 7 +bind = $MOD SHIFT, 8, movetoworkspace, 8 +bind = $MOD SHIFT, 9, movetoworkspace, 9 +bind = $MOD SHIFT, 0, movetoworkspace, 10 + +#Switch between recent workspaces +bind = $MOD, TAB, workspace, previous + +# Scroll through existing workspaces with MOD + scroll +bind = ALT, tab, workspace, e+1 +bind = ALT SHIFT, tab, workspace, e-1 +bind = $MOD, mouse_down, workspace, e+1 +bind = $MOD, mouse_up, workspace, e-1 +# Scroll through existing workspaces with just mouse sidebuttons +bind = , mouse:276, workspace, e+1 +bind = , mouse:275, workspace, e-1 + +# Move/resize windows with MOD + LMB/RMB and dragging +bindm = $MOD, mouse:272, movewindow +bindm = $MOD, mouse:273, resizewindow + +# will switch to a submap called resize +bind=ALT,R,submap,resize + +# will start a submap called "resize" +submap=resize + +# sets repeatable binds for resizing the active window +binde=$MOD ,h,resizeactive,-10 0 +binde=$MOD ,l,resizeactive,10 0 +binde=$MOD ,k,resizeactive,0 -10 +binde=$MOD ,j,resizeactive,0 10 + +# use reset to go back to the global submap +bind=,escape,submap,reset + +# will reset the submap, meaning end the current one and return to the global one +submap=reset + +# keybinds further down will be global again... +# +# +############################## +### WINDOWS AND WORKSPACES ### +############################## + +# See https://wiki.hypr.land/Configuring/Window-Rules/ for more +# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules + +# Example windowrules that are useful +# Suppress maximize events +windowrule = suppress_event maximize, match:class .* + + +# Fix some dragging issues with XWayland +windowrule = no_focus on, match:class ^$, match:title ^$, match:xwayland 1, match:float 1, match:fullscreen 0, match:pin 0 + +# Move Hyprland-run +windowrule = move 20 (monitor_h-120), match:class hyprland-run +windowrule = float on, match:class hyprland-run + +# windowrule { +# # Ignore maximize requests from all apps. You'll probably like this. +# name = suppress-maximize-events +# match:class = .* +# suppress_event = maximize +# } + +# windowrule { +# # Fix some dragging issues with XWayland +# name = fix-xwayland-drags +# match:class = ^$ +# match:title = ^$ +# match:xwayland = true +# match:float = true +# match:fullscreen = false +# match:pin = false + +# no_focus = true +# } + +# # Hyprland-run windowrule +# windowrule { +# name = move-hyprland-run + +# match:class = hyprland-run + +# move = 20 monitor_h-120 +# float = yes +# } + +# Spotify to workspace 9 +windowrule = workspace 9, match:class ^(spotify)$ + +# Obsidian opacity +windowrule = opacity 1.0 override 1.0 override, match:class ^(obsidian)$ +windowrule = opacity 1.0 override 1.0 override, match:class ^(code)$ +windowrule = opacity 1.0 override 1.0 override, match:class ^(brave)$ +windowrule = opacity 1.0 override 1.0 override, match:class ^(zen)$ + +# MPV player floating -> spawn bottomright +# windowrule { +# name = mpv-floating-bottomright +# match:class = mpv + +# pin = on +# float = on +# move = 1232 615 +# size = 687 467 +# } + +# "Smart gaps" / "No gaps when only" +workspace = w[t1], gapsout:0, gapsin:0 +workspace = w[tg1], gapsout:0, gapsin:0 +workspace = f[1], gapsout:0, gapsin:0 +windowrulev2 = bordersize 0, floating:0, onworkspace:w[t1] +windowrulev2 = rounding 0, floating:0, onworkspace:w[t1] +windowrulev2 = bordersize 0, floating:0, onworkspace:w[tg1] +windowrulev2 = rounding 0, floating:0, onworkspace:w[tg1] +windowrulev2 = bordersize 0, floating:0, onworkspace:f[1] +windowrulev2 = rounding 0, floating:0, onworkspace:f[1] +# fix some dragging issues with xwayland +windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 + +# See https://wiki.hypr.land/Useful-Utilities/Screen-Sharing/#xwayland +windowrule { + name = xwayland-video-bridge-fixes + match:class = xwaylandvideobridge + no_initial_focus = on + no_focus = on + no_anim = on + no_blur = on + max_size = 1 1 + opacity = 0.0 +} diff --git a/stow/nvim/.config/nvim/init.lua b/stow/nvim/.config/nvim/init.lua new file mode 100644 index 0000000..11ab069 --- /dev/null +++ b/stow/nvim/.config/nvim/init.lua @@ -0,0 +1,19 @@ +require("justsaumit.options") +require("justsaumit.keymaps") +require("justsaumit.plugins") +require("justsaumit.colorscheme") +require("justsaumit.treesitter-config") +require("justsaumit.lualine-config") +require("justsaumit.bufferline-config") +require("justsaumit.nvim-tree-config") +require("justsaumit.lastplace-config") +require("justsaumit.which-key-config") +require("justsaumit.colorizer-config") +require("justsaumit.telescope-config") +require("justsaumit.nvim-comment-config") +require("justsaumit.mason") +require("justsaumit.lsp-config") +require("justsaumit.lspsaga-config") +require("justsaumit.cmp-config") +require("justsaumit.toggleterm-config") +print ("while(!(succeed = try() ) );") diff --git a/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua new file mode 100644 index 0000000..879c669 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/bufferline-config.lua @@ -0,0 +1,71 @@ +--Enable true color support for the terminal +vim.opt.termguicolors = true +--Protected call +local status, bufferline = pcall(require, "bufferline") +if not status then + return +end + +bufferline.setup { + options = { + mode = "buffers", + numbers = "none", + close_command = "bdelete! %d", + right_mouse_command = "bdelete! %d", + left_mouse_command = "buffer %d", + middle_mouse_command = nil, + indicator = { + icon = '▎', + style = 'icon', + }, + --buffer_close_icon = '󰠳', + buffer_close_icon = "", + modified_icon = '●', + close_icon = '', + -- close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 22, + diagnostics = false, + diagnostics_update_in_insert = false, + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + persist_buffer_sort = true, + separator_style = "thin", -- | "thick" | "thin" | slant, + enforce_regular_tabs = true, + always_show_bufferline = true, + -- name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr" + -- -- remove extension from markdown files for example + -- if buf.name:match('%.md') then + -- return vim.fn.fnamemodify(buf.name, ':t:r') + -- end + -- end + } +} +local opts = { noremap = true, silent = true } +local keymap = vim.keymap.set +keymap("", "", "", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +--Leader+number -> tab change +for i = 1, 9 do + keymap("n", "" .. i, function() + require("bufferline").go_to_buffer(i, true) + end, opts) +end + +--Ctrl+W to close a buffer +keymap("n", "W", ":bdelete!", opts) + + +--Tab or Ctrl+Tab for Forward Cycle //terminals don't see a difference between and +--Shift+Tab for Backward Cycle +keymap("n", "", ":BufferLineCycleNext", opts) +keymap("n", "", ":BufferLineCyclePrev", opts) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua new file mode 100644 index 0000000..7e29155 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/cmp-config.lua @@ -0,0 +1,88 @@ +vim.g.completeopt="menu,menuone,noselect,noinsert" + +local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil +end + +local luasnip = require("luasnip") +local cmp = require'cmp' + +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + luasnip.lsp_expand(args.body) + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- they way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + { name = 'buffer' }, + { name = 'path' }, + }), +}) + +-- Set configuration for specific filetype. +cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + }, { + { name = 'buffer' }, + }) +}) + +-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) +}) + diff --git a/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua new file mode 100644 index 0000000..569021d --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/colorizer-config.lua @@ -0,0 +1,27 @@ +require("colorizer").setup { + filetypes = { "*" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue or blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = "background", -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = false, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors + virtualtext = "■", + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua b/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua new file mode 100644 index 0000000..67c166f --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/colorscheme.lua @@ -0,0 +1,33 @@ +--configuration needs to be set BEFORE loading the color scheme with colorscheme tokyonight +vim.g.tokyonight_style = "night" +tokyonight_terminal_colors=true +tokyonight_italic_comments=true +tokyonight_italic_keywords=true +tokyonight_italic_functions=false +tokyonight_italic_variables=false +tokyonight_transparent=false +tokyonight_hide_inactive_statusline=false +tokyonight_sidebars={} +tokyonight_transparent_sidebar=false +tokyonight_dark_sidebar=true +tokyonight_dark_float=true +tokyonight_colors={} +tokyonight_lualine_bold=false + +--protected call +local colorscheme = "tokyonight" +local pywal = require('pywal') + +local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not status_ok then + vim.notify("colorscheme " .. colorscheme .. " not found! :(") + pywal.setup() + return +end + +-- init.lua +vim.g.tokyodark_transparent_background = false +vim.g.tokyodark_enable_italic_comment = true +vim.g.tokyodark_enable_italic = true +vim.g.tokyodark_color_gamma = "1.0" +vim.cmd("colorscheme tokyodark") diff --git a/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua b/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua new file mode 100644 index 0000000..582113c --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/keymaps.lua @@ -0,0 +1,73 @@ +local opts = { noremap = true, silent = true } + +-- Shorten function name +local keymap = vim.keymap.set + +--Remap space as leader key +keymap("", "", "", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +---Autocompile and Execute +--ANSI C +vim.cmd([[autocmd BufEnter *.c map :w :!gcc % -ansi -o %< && ./%< ]]) +--C99 +vim.cmd([[autocmd BufEnter *.c map :w :!gcc -std=c99 % -o %< && ./%< ]]) +--C +vim.cmd([[autocmd BufEnter *.c map :w :!gcc % -o %< && ./%< ]]) + +--C++ +vim.cmd([[autocmd BufEnter *.cpp map :w :!g++ % -o %< && ./%< ]]) + +-- Modes +-- normal_mode = "n", +-- insert_mode = "i", +-- visual_mode = "v", +-- visual_block_mode = "x", +-- command_mode = "c", + +-- Normal -- +-- +-- +--Save file with Ctrl+S +keymap("n", "", ":w", opts) +--Toggle nvim-tree +keymap('n', '', ':NvimTreeToggle', opts) +keymap('n', 'e', ':NvimTreeToggle', opts) +--Disable C-e +-- keymap("n", "", ":", opts) + +-- Better window navigation for split +keymap("n", "", "h", opts) +keymap("n", "", "j", opts) +keymap("n", "", "k", opts) +keymap("n", "", "l", opts) + +-- Resize with arrows +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) + +-- Move text up and down(better implementation in visual mode) +--keymap("n", "", ":m .+1==gi", opts) +--keymap("n", "", ":m .-2==gi", opts) + +-- Insert -- + +-- Visual -- +-- Stay in indent mode +keymap("v", "<", "", ">gv", opts) + +-- Move text up and down +keymap("v", "", ":m .+1==", opts) +keymap("v", "", ":m .-2==", opts) +keymap("v", "p", '"_dP', opts) + +-- Visual Block -- +-- Move text up and down +keymap("x", "J", ":move '>+1gv-gv", opts) +keymap("x", "K", ":move '<-2gv-gv", opts) +keymap("x", "", ":move '>+1gv-gv", opts) +keymap("x", "", ":move '<-2gv-gv", opts) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua new file mode 100644 index 0000000..4fa6a83 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lastplace-config.lua @@ -0,0 +1,5 @@ +require'nvim-lastplace'.setup { + lastplace_ignore_buftype = {"quickfix", "nofile", "help"}, + lastplace_ignore_filetype = {"gitcommit", "gitrebase", "svn", "hgcommit"}, + lastplace_open_folds = true +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua new file mode 100644 index 0000000..2c0d746 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lsp-config.lua @@ -0,0 +1,95 @@ +local lspconfig = require("lspconfig") +local on_attach = function(_, 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 + + buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc") + + local opts = { noremap = true, silent = true } + buf_set_keymap("n", "K", ":lua vim.lsp.buf.hover()", opts) --> information about the symbol under the cursors in a floating window + buf_set_keymap("n", "rn", ":lua vim.lsp.util.rename()", opts) --> rename old_fname to new_fname + buf_set_keymap("n", "ca", ":lua vim.lsp.buf.code_action()", opts) --> selects a code action available at the current cursor position + buf_set_keymap("n", "gd", ":lua vim.lsp.buf.definition()", opts) --> jumps to the definition of the symbol under the cursor + buf_set_keymap("n", "gi", ":lua vim.lsp.buf.implementation()", opts) --> lists all the implementations for the symbol under the cursor in the quickfix window + buf_set_keymap("n", "gr", ":lua vim.lsp.buf.references()", opts) --> lists all the references to the symbl under the cursor in the quickfix window + buf_set_keymap("n", "ld", ":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", "lq", ":lua vim.diagnostic.setloclist()", opts) + buf_set_keymap("n", "lf", ":lua vim.lsp.buf.formatting()", opts) --> formats the current buffer +end + +---@diagnostic disable-next-line: undefined-global +local capabilities = vim.lsp.protocol.make_client_capabilities() +capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) + +--lspconfig x cmp_nvim_lsp +-- Set up lspconfig. +-- require("lspconfig")["clangd"].setup({ +lspconfig.clangd.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.pyright.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.bashls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.cssls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.gopls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.html.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.lua_ls.setup({ + on_attach = on_attach, + capabilities = capabilities, + settings = { + Lua = { + runtime = { version = 'LuaJIT',}, + diagnostics = { + globals = {'vim','require',},}, + workspace = { library = vim.api.nvim_get_runtime_file("", true),}, + telemetry = {enable = false,}, + }, + }, +}) + +lspconfig.marksman.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +lspconfig.rust_analyzer.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) + +-- lspconfig.tsserver.setup({ +-- on_attach = on_attach, +-- capabilities = capabilities, +-- }) + +lspconfig.yamlls.setup({ + on_attach = on_attach, + capabilities = capabilities, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua new file mode 100644 index 0000000..70d3d79 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lspsaga-config.lua @@ -0,0 +1,49 @@ +local lspsaga = require 'lspsaga' +lspsaga.setup { -- defaults ... + debug = false, + use_saga_diagnostic_sign = true, + -- diagnostic sign + error_sign = " ", + warn_sign = " ", + hint_sign = " ", + infor_sign = " ", + diagnostic_header_icon = "  ", + -- code action title icon + code_action_icon = " ", + code_action_prompt = { + enable = true, + sign = true, + sign_priority = 40, + virtual_text = true, + }, + finder_definition_icon = "󰈞 ", + finder_reference_icon = "󰈞 ", + max_preview_lines = 10, + finder_action_keys = { + open = "o", + vsplit = "s", + split = "i", + quit = "q", + scroll_down = "", + scroll_up = "", + }, + code_action_keys = { + quit = "q", + exec = "", + }, + rename_action_keys = { + quit = "", + exec = "", + }, + definition_preview_icon = " ", + border_style = "single", + rename_prompt_prefix = "➤ ", + rename_output_qflist = { + enable = false, + auto_open_qflist = false, + }, + server_filetype_map = {}, + diagnostic_prefix_format = "%d. ", + diagnostic_message_format = "%m %c", + highlight_prefix = false, +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua new file mode 100644 index 0000000..56c426a --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/lualine-config.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/mason.lua b/stow/nvim/.config/nvim/lua/justsaumit/mason.lua new file mode 100644 index 0000000..d651810 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/mason.lua @@ -0,0 +1,39 @@ +require("mason").setup({ + options = { + ensure_installed = { "clangd", "clangd-format", "codelldb", "lua-language-server" }, -- not an option from mason.nvim + PATH = "skip" + }, + ui = { + icons = { + package_pending = " ", + package_installed = "󰄳 ", + package_uninstalled = " 󰚌", + }, + keymaps = { + toggle_server_expand = "", + install_server = "i", + update_server = "u", + check_server_version = "c", + update_all_servers = "U", + check_outdated_servers = "C", + uninstall_server = "X", + cancel_installation = "", + }, + }, + max_concurrent_installers = 10, +}) +require("mason-lspconfig").setup ({ + ensure_installed = { + "lua_ls", + "clangd", + "pyright", + "rust_analyzer", + "bashls", + "cssls", + "html", + "lua_ls", + "marksman", + --"tsserver", + "yamlls", + }, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua new file mode 100644 index 0000000..d71ce14 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/nvim-comment-config.lua @@ -0,0 +1,5 @@ +require('nvim_comment').setup({ + line_mapping = "cl", + operator_mapping = "c", + comment_empty = false +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua new file mode 100644 index 0000000..b499f91 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/nvim-tree-config.lua @@ -0,0 +1,75 @@ +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- empty setup using defaults +-- require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = true, + }, + renderer = { + group_empty = true, + highlight_git = false, + full_name = false, + highlight_opened_files = "none", + root_folder_modifier = ":~", + indent_width = 2, + indent_markers = { + enable = true, + inline_arrows = true, + icons = { + corner = "└", + edge = "│", + item = "│", + bottom = "─", + none = " ", + }, + }, + icons = { + webdev_colors = true, + git_placement = "before", + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + }, + glyphs = { + default = "", + symlink = "", + bookmark = "", + folder = { + arrow_closed = "", + arrow_open = "", + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + symlink_open = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, + }, + filters = { + dotfiles = true, + }, +}) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/options.lua b/stow/nvim/.config/nvim/lua/justsaumit/options.lua new file mode 100644 index 0000000..4eae867 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/options.lua @@ -0,0 +1,46 @@ +local options = { + number=true, -- Shows absolute linenumber + relativenumber=true, -- Shows linenumber relative to cursor + --combination of both^ for hybrid linenumber +-- textwidth=100, + numberwidth=4, + scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance + sidescroll=18, + mouse="a", -- enable mouse support + splitbelow=true, -- on horizontal split instead of opening window to left open it at right + splitright=true, -- on vertical split instead of opening window to left open it at right + termguicolors=true, + showmode=false, -- lualine does the job + cmdheight=1, + wrap=false, + whichwrap='b,s,<,>,[,],h,l', + clipboard="unnamedplus", -- allows neovim to access system clipboard using yank + fileencoding="UTF-8", + --spaces/tabs/indents + softtabstop=4, -- No. of spaces per tab + shiftwidth=4, -- No. of auto-indent space + expandtab=true, -- spaces inplace of tabs + autoindent=true, -- New line copies indentation from past line + smartindent=true, -- Indents in accordance to the syntax/style of the code extension + --searches + ignorecase=true, -- Ignore case-sensitivity during search + smartcase=true, -- If searching capital search only capital + hlsearch=false, -- no perma highlight post search + incsearch=true, -- searches for strings incrementally + showmatch=true, -- Highlight matching braces + --git integration/lsp/diagnostic + signcolumn="yes", + --undo/backup + backup=false, + swapfile=false, + undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir", + undofile=true +-- showbreak="+++", -- wrap broken line prefix +} +--forloop for table 'options' +for key, value in pairs(options) do + vim.opt[key] = value +end + +--to 'cw/'dw' a word containing '-' in between +vim.cmd [[set iskeyword+=-]] diff --git a/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua b/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua new file mode 100644 index 0000000..460d6f3 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/plugins.lua @@ -0,0 +1,113 @@ +local fn = vim.fn + +-- Automatically install packer +local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim" +if fn.empty(fn.glob(install_path)) > 0 then + PACKER_BOOTSTRAP = fn.system { + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + } + print "Installing packer close and reopen Neovim..." + vim.cmd [[packadd packer.nvim]] +end + +-- Autocommand that reloads neovim whenever you save (:w) the plugins.lua file +vim.cmd [[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source | PackerSync + augroup end +]] + +-- Use a protected call so we don't error out! +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +--Actual good stuff +--Install all your plugins here +return packer.startup(function(use) +--Necessities + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins + use "ethanholz/nvim-lastplace" -- Preserve last editing position in nvim +--TreeSitter + use {'nvim-treesitter/nvim-treesitter',run = ':TSUpdate'} +--ColorSchemes + use "folke/tokyonight.nvim" + use "tiagovla/tokyodark.nvim" + use { "catppuccin/nvim", as = "catppuccin" } + use { 'AlphaTechnolog/pywal.nvim', as = 'pywal' } +--Web-devicons + use "kyazdani42/nvim-web-devicons" +--Lualine + use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }} +--Bufferline + use {'akinsho/bufferline.nvim', tag = "*", requires = 'nvim-tree/nvim-web-devicons'} +--Nvim-tree File explorer for nvim + use {'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons'}} +--Which-key - displays a popup with possible key bindings + use 'folke/which-key.nvim' +--mini.nvim - Lua module pack + use 'echasnovski/mini.nvim' +--Mason-nvim Portable Package manager for LSP and DAP servers, linters and formatters + use { "williamboman/mason.nvim", run = ":MasonUpdate"} -- :MasonUpdate updates registry contents +--lsp + use("williamboman/mason-lspconfig.nvim") + use("neovim/nvim-lspconfig") --> Collection of configurations for built-in LSP client + use("kkharji/lspsaga.nvim") --> icons for LSP diagnostics + use("onsails/lspkind-nvim") --> vscode-like pictograms for neovim lsp completion items +--cmp - Autocompletions + use("hrsh7th/nvim-cmp") --completion engine + use("L3MON4D3/LuaSnip") --snippets engine + use("saadparwaiz1/cmp_luasnip") --luasnip completion source for nvim-cmp +--cmp plugins + use("hrsh7th/cmp-nvim-lsp")--nvim-cmp source for neovim's built-in language server client. + use("hrsh7th/cmp-buffer") --nvim-cmp source for buffer words. + use("hrsh7th/cmp-path") --nvim-cmp source for filesystem path + use("hrsh7th/cmp-cmdline") --nvim-cmp source for vim's cmdline + +-- use("jose-elias-alvarez/null-ls.nvim") --> inject lsp diagnistocs, formattings, code actions, and more ... +--HTML + use("windwp/nvim-ts-autotag") -- Use treesitter autotag +--Markdown + Zenmode +--Telescope + use {'nvim-telescope/telescope.nvim', tag = '0.1.2', requires = { {'nvim-lua/plenary.nvim'} }} +-- ToggleTerm + use ('akinsho/toggleterm.nvim') + +-- use "rafamadriz/friendly-snippets" -- a bunch of snippets to use + +-- Dashboard + -- use {'glepnir/dashboard-nvim', event = 'Vimenter'} +-- Comments - Toggle comments in Neovim + use "terrortylor/nvim-comment" + +--Autopairs for HTML + --use {"windwp/nvim-autopairs", wants = "nvim-treesitter", module = { "nvim-autopairs.completion.cmp", "nvim-autopairs" }, config = function() + --require("config.autopairs").setup() end,} +--CSS + use 'NvChad/nvim-colorizer.lua' + + +-- Automatically set up your configuration after cloning packer.nvim +-- Put this at the end after all plugins + if PACKER_BOOTSTRAP then + require("packer").sync() + end +end) diff --git a/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua new file mode 100644 index 0000000..534e663 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/telescope-config.lua @@ -0,0 +1,52 @@ +local actions = require('telescope.actions') +require('telescope').setup { + defaults = { + layout_config = { + width = 0.75, + prompt_position = "top", + preview_cutoff = 120, + horizontal = {mirror = false}, + vertical = {mirror = false} + }, + find_command = { + 'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' + }, + prompt_prefix = " ", + selection_caret = " ", + entry_prefix = " ", + initial_mode = "insert", + selection_strategy = "reset", + sorting_strategy = "descending", + layout_strategy = "horizontal", + file_sorter = require'telescope.sorters'.get_fuzzy_file, + file_ignore_patterns = { + "node_modules", "build", "dist", "yarn.lock", ".local", ".cargo", ".rustup", ".mozilla",".git" + }, + generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter, + path_display = {}, + winblend = 0, + border = {}, + borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'}, + color_devicons = true, + use_less = true, + set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil, + file_previewer = require'telescope.previewers'.vim_buffer_cat.new, + grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new, + qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new, + buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker, + mappings = { + i = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.smart_send_to_qflist + actions.open_qflist, + [""] = actions.close, + [""] = actions.select_default + actions.center + }, + n = { + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.smart_send_to_qflist + actions.open_qflist + } + } + } +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua new file mode 100644 index 0000000..b1579cd --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/toggleterm-config.lua @@ -0,0 +1,16 @@ +require'toggleterm'.setup{ + size = 20, + open_mapping = [[]], + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_filetypes = {}, + autochdir = false, + shade_terminals = true, + shading_factor = 1, + start_in_insert = true, + insert_mappings = true, -- whether or not the open mapping applies in insert mode + terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals + persist_size = true, + direction = 'horizontal', + close_on_exit = true, + shell = '/usr/bin/zsh', +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua new file mode 100644 index 0000000..c64e659 --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/treesitter-config.lua @@ -0,0 +1,26 @@ +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "bash", "c", "cpp", "lua", "rust", "python", "go","html", "javascript", "typescript", "markdown", "solidity", "sxhkdrc" }, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + auto_install = true, + + -- List of parsers to ignore installing (for "all") + highlight = { + -- `false` will disable the whole extension + enable = true, + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + autotag = { + enable = true, + enable_close = true, + enable_close_on_slash = true, + enable_rename = true, + filetypes = { "html" , "xml", + 'javascript', 'typescript', 'svelte', + 'markdown',}, + } +} diff --git a/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua b/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua new file mode 100644 index 0000000..93a42fa --- /dev/null +++ b/stow/nvim/.config/nvim/lua/justsaumit/which-key-config.lua @@ -0,0 +1,69 @@ +local wk = require("which-key") +local Terminal = require('toggleterm.terminal').Terminal +local toggle_float = function() + local float = Terminal:new({ direction = "float" }) + return float:toggle() +end +local toggle_lazygit = function() + local lazygit = Terminal:new({ cmd = "lazygit", direction = "float" }) + return lazygit:toggle() +end +local mappings = { + q = {":q", "Quit"}, + Z = {":wq", "Save and Quit"}, + w = {":w", "Save"}, + x ={":bdelete", "Close"}, + E = { ":e ~/.config/nvim/init.lua", "Edit config" }, + f = { + name = "Telescope", + f = {":Telescope find_files", "Telescope Find Files" }, + h = { ":Telescope find_files hidden=true", "Telescope Find Files" }, + g = { ":Telescope live_grep", "Telescope Live Grep" }, + }, + r = { ":Telescope oldfiles", "Recent files" }, + l = { + name = "LSP", + i = {":LspInfo", "Connected Language Servers"}, + I = {'LspInstallInfo', 'Install language server'}, + f = {'lua vim.lsp.buf.formatting()', "Format File"}, + k = {" lua vim.lsp.buf.signature_help()", "Signature Help"}, + -- K = {'lua vim.lsp.buf.hover()', "Hover"}, + K = {" Lspsaga hover_doc", "Hover Commands"}, + w = {" lua vim.lsp.add_workspace_folder()", "Add Workspace Folder"}, + W = {" lua vim.lsp.remove_workspace_folder()", "Remove Workspace Folder"}, + l = {" lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", "List Workspace Folder"}, + t = {'lua vim.lsp.buf.type_definition()', "Type definition"}, + d = {" lua vim.lsp.buf.definition()", "Go to Definition"}, + D = {" lua vim.lsp.buf.declaration()", "Go to Declaration"}, + r = {" lua vim.lsp.buf.references()", "References"}, + R = {" Lspsaga rename", "Rename"}, + -- R = {'lua vim.lsp.buf.rename()', "Rename"}, + a = {" Lspsaga code_action", "Code Action"}, + -- a = {'lua vim.lsp.buf.code_action()', "Code actions"}, + -- T = {' Telescope diagnostics bufnr=0', "Get Diagnostics"} + go = {"Lspsaga show_line_diagnostics","Show Line Diagnostic"}, + -- e = {'lua vim.diagnostic.show_line_diagnostics()', "Show line diagnostics"}, + gj = {"Lspsaga diagnostic_jump_next","Go to Next Diagnostic"}, + -- n = {'lua vim.diagnostic.goto_next()', "Go to next diagnostic"}, + gk = {"Lspsaga diagnostic_jump_prev","Go to Prev Diagnostic"}, + -- N = {'lua vim.diagnostic.goto_prev()', "Go to previous diagnostic"}, + }, + t = { + name = "ToggleTerm", + t = { ":ToggleTerm", "Split Below" }, + f = { toggle_float, "Floating Terminal" }, + l = { toggle_lazygit, "Lazygit" }, + }, + p = { + name = "Packer", + s = { ":PackerSync", "Sync Plugins" }, + r = { ":PackerClean", "Remove Unused Plugins" }, + c = { ":PackerCompile profile=true", "Recompile Plugins" }, + i = { ":PackerInstall", "Install Plugins" }, + p = { ":PackerProfile", "Packer Profile" }, + S = { ":PackerStatus", "Packer Status" }, + u = { ":PackerUpdate", "Update Plugins" } + }, +} +local opts = {prefix = ''} +wk.register(mappings, opts) diff --git a/stow/nvim/.config/nvim/plugin/packer_compiled.lua b/stow/nvim/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..f5e9107 --- /dev/null +++ b/stow/nvim/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,249 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/share/lua/5.1/?/init.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?.lua;/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/justsaumit/.cache/nvim/packer_hererocks/2.1.1731601260/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + LuaSnip = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["bufferline.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + url = "https://github.com/akinsho/bufferline.nvim" + }, + catppuccin = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/catppuccin", + url = "https://github.com/catppuccin/nvim" + }, + ["cmp-buffer"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-buffer", + url = "https://github.com/hrsh7th/cmp-buffer" + }, + ["cmp-cmdline"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + url = "https://github.com/hrsh7th/cmp-cmdline" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["cmp-path"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp-path", + url = "https://github.com/hrsh7th/cmp-path" + }, + cmp_luasnip = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/cmp_luasnip", + url = "https://github.com/saadparwaiz1/cmp_luasnip" + }, + ["lspkind-nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspkind-nvim", + url = "https://github.com/onsails/lspkind-nvim" + }, + ["lspsaga.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", + url = "https://github.com/kkharji/lspsaga.nvim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["mason-lspconfig.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" + }, + ["mason.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-colorizer.lua"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", + url = "https://github.com/NvChad/nvim-colorizer.lua" + }, + ["nvim-comment"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-comment", + url = "https://github.com/terrortylor/nvim-comment" + }, + ["nvim-lastplace"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace", + url = "https://github.com/ethanholz/nvim-lastplace" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-ts-autotag"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-ts-autotag", + url = "https://github.com/windwp/nvim-ts-autotag" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["popup.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/popup.nvim", + url = "https://github.com/nvim-lua/popup.nvim" + }, + pywal = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/pywal", + url = "https://github.com/AlphaTechnolog/pywal.nvim" + }, + ["telescope.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["toggleterm.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", + url = "https://github.com/akinsho/toggleterm.nvim" + }, + ["tokyodark.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyodark.nvim", + url = "https://github.com/tiagovla/tokyodark.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/justsaumit/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end diff --git a/stow/vim/.config/vim/vimrc b/stow/vim/.config/vim/vimrc new file mode 100644 index 0000000..0832263 --- /dev/null +++ b/stow/vim/.config/vim/vimrc @@ -0,0 +1,20 @@ +syntax on + +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set expandtab +set autoindent +set smartindent +set nu +set relativenumber +"set nowrap +set smartcase +set noswapfile +set nobackup +set undofile +set undodir=~/.cache/vim/undodir +set incsearch +set nohlsearch +"set signcolumn=yes +set mouse=a diff --git a/stow/vscode/.config/Code/User/keybindings.json b/stow/vscode/.config/Code/User/keybindings.json new file mode 100644 index 0000000..ba29206 --- /dev/null +++ b/stow/vscode/.config/Code/User/keybindings.json @@ -0,0 +1,7 @@ +// Place your key bindings in this file to override the defaults +[ + { + "key": "shift+space", + "command": "toggleVim" + } +] \ No newline at end of file diff --git a/stow/vscode/.config/Code/User/settings.json b/stow/vscode/.config/Code/User/settings.json new file mode 100644 index 0000000..6d67f96 --- /dev/null +++ b/stow/vscode/.config/Code/User/settings.json @@ -0,0 +1,87 @@ +{ + // ========================================================= + // CORE EDITOR & APPEARANCE + // ========================================================= + "editor.fontSize": 16, + "editor.insertSpaces": false, + "editor.tabSize": 2, + "editor.detectIndentation": false, + + // Visual Guides + "editor.guides.bracketPairs": true, + "editor.guides.bracketPairsHorizontal": true, + + // Minimap (Small code preview on the right) + "editor.minimap.enabled": false, + "editor.minimap.autohide": "none", // Redundant if enabled is false, but kept for preference + + // ========================================================= + // WORKBENCH & UI + // ========================================================= + "workbench.colorTheme": "Tokyo Night Gogh", + "workbench.iconTheme": "material-icon-theme", + "window.titleBarStyle": "custom", + "workbench.settings.applyToAllProfiles": [], + + // ========================================================= + // FILE SAVING + // ========================================================= + // Replaces the "Auto save while typing" extension + "files.autoSave": "afterDelay", + "files.autoSaveDelay": 1000, // Saves 1 second after you stop typing + + // ========================================================= + // VIM CONFIGURATION + // ========================================================= + "vim.useSystemClipboard": true, + "vim.handleKeys": { + "": false // Allows Ctrl+K chords (like language switching) to bypass Vim + }, + + // ========================================================= + // KEYBOARD & INPUT + // ========================================================= + // Fixes CapsLock remap issues on Linux/Hyprland + "keyboard.dispatch": "keyCode", + + // ========================================================= + // GIT INTEGRATION + // ========================================================= + "git.confirmSync": false, // Don't ask before syncing + "git.enableSmartCommit": true, // Commit all changes if none are staged + + // ========================================================= + // LANGUAGE SPECIFIC FORMATTERS + // ========================================================= + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features" + }, + "[html]": { + "editor.defaultFormatter": "vscode.html-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + + // ========================================================= + // EXTENSIONS & MISC + // ========================================================= + // Spell Checker + "cSpell.userWords": [ + "Bootcamp", + "lmao" + ], + + // Live Server + "liveServer.settings.donotVerifyTags": true, + "liveServer.settings.ChromeDebuggingAttachment": false, + + // Remote SSH + "remote.SSH.remotePlatform": { + "sandbox.vyxff4.csb": "linux" + }, + + // Icons & AI + "vsicons.dontShowNewVersionMessage": true, + "chat.disableAIFeatures": true +} \ No newline at end of file diff --git a/stow/zsh/.zshrc b/stow/zsh/.zshrc new file mode 100644 index 0000000..ed171e4 --- /dev/null +++ b/stow/zsh/.zshrc @@ -0,0 +1,159 @@ +# Path to your Oh My Zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# 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, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="spaceship" +PROMPT='$(kube_ps1)'$PROMPT +export SPACESHIP_KUBECTL_SHOW=true +export SPACESHIP_KUBECTL_VERSION_SHOW=false # Hide version if it's too verbose +export SPACESHIP_KUBECTL_NAMESPACE_SHOW=true # Show current namespace +export SPACESHIP_KUBECTL_PREFIX=" " +export SPACESHIP_KUBECTL_SYMBOL="⎈ " +export SPACESHIP_KUBECTL_COLOR="cyan" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +#ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + zsh-autosuggestions + zsh-syntax-highlighting + jump + dotenv + aliases + colorize + cp + history + pass + tmux + vi-mode + rand-quote + nvm + npm + node + kubectl + kubectx + kube-ps1 + aws + azure + helm + terraform + ansible + fzf + z +) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by Oh My Zsh libs, +# plugins, and themes. Aliases can be placed here, though Oh My Zsh +# users are encouraged to define aliases within a top-level file in +# the $ZSH_CUSTOM folder, with .zsh extension. Examples: +# - $ZSH_CUSTOM/aliases.zsh +# - $ZSH_CUSTOM/macos.zsh +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" +alias kns="kubens" +alias kctx="kubectx" + +export NVM_DIR="$HOME/.nvm" +export PATH=$PATH:/usr/local/x +export PATH="$PATH:$HOME/.scripts" + +export ANDROID_HOME=/home/justsaumit/Android/Sdk +export PATH=$PATH:$ANDROID_HOME/tools +export PATH=$PATH:$ANDROID_HOME/platform-tools +export PATH="$PATH:$ANDROID_HOME/tools/bin" + + +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# Load aliases +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" +# Load shortcut +[ -f "${xdg_config_home:-$home/.config}/shell/shortcutrc" ] && source "${xdg_config_home:-$home/.config}/shell/shortcutrc" +# Load profile +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile" +# Load secrets +[ -f "${XDG_CONFIG_HOME:-$HOME}/.zsh_secrets" ] && source "${XDG_CONFIG_HOME:-$HOME}/.zsh_secrets" diff --git a/tmux/tmux.conf b/tmux/tmux.conf new file mode 100644 index 0000000..0023540 --- /dev/null +++ b/tmux/tmux.conf @@ -0,0 +1,20 @@ +#Unbind default prefix key and bind it to Ctrl+Space +unbind C-b +set -g prefix C-space + +# Start window numbering at 1 +set -g base-index 1 +# mouse support +set -g mouse on + +#george hotz +set -g status-position bottom +set -g status-bg colour234 +set -g status-fg colour137 +set -g status-left '' +set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' +set -g status-right-length 50 +set -g status-left-length 20 + +setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' +setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' -- cgit v1.2.3