diff options
author | Freya Murphy <freya@freyacat.org> | 2023-11-27 13:03:12 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2023-11-27 13:03:12 -0500 |
commit | 849ab46bd68fd8e8c275cfa8b918a16cfcd59642 (patch) | |
tree | 0e6d10d74c6e5096ab8b6c725eb475949edb20fb /.config | |
download | dotfiles-arch-849ab46bd68fd8e8c275cfa8b918a16cfcd59642.tar.gz dotfiles-arch-849ab46bd68fd8e8c275cfa8b918a16cfcd59642.tar.bz2 dotfiles-arch-849ab46bd68fd8e8c275cfa8b918a16cfcd59642.zip |
initial
Diffstat (limited to '.config')
58 files changed, 1992 insertions, 0 deletions
diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..b13c567 --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,31 @@ +# Colorscheme +import: +- ~/.config/alacritty/catppuccin-mocha.yml + +# Window settings +window: + opacity: 0.85 + padding: + x: 10 + y: 10 + +# Set font +font: + normal: + family: monospace # FiraCode Nerd Font Mono + style: Regular + bold: + style: Bold + italic: + style: Italic + bold_italic: + style: Bold Italic + size: 11 + offset: + x: 0 + y: 0 + +colors: + primary: + background: '0x14171d' + foreground: '0xc7c6c3' diff --git a/.config/alacritty/catppuccin-mocha.yml b/.config/alacritty/catppuccin-mocha.yml new file mode 100644 index 0000000..74ea60c --- /dev/null +++ b/.config/alacritty/catppuccin-mocha.yml @@ -0,0 +1,78 @@ +colors: + primary: + background: "#1d1d2d" # base + foreground: "#CDD6F4" # text + # Bright and dim foreground colors + dim_foreground: "#CDD6F4" # text + bright_foreground: "#CDD6F4" # text + + # Cursor colors + cursor: + text: "#1E1E2E" # base + cursor: "#F5E0DC" # rosewater + vi_mode_cursor: + text: "#1E1E2E" # base + cursor: "#B4BEFE" # lavender + + # Search colors + search: + matches: + foreground: "#1E1E2E" # base + background: "#A6ADC8" # subtext0 + focused_match: + foreground: "#1E1E2E" # base + background: "#A6E3A1" # green + footer_bar: + foreground: "#1E1E2E" # base + background: "#A6ADC8" # subtext0 + + # Keyboard regex hints + hints: + start: + foreground: "#1E1E2E" # base + background: "#F9E2AF" # yellow + end: + foreground: "#1E1E2E" # base + background: "#A6ADC8" # subtext0 + + # Selection colors + selection: + text: "#1E1E2E" # base + background: "#F5E0DC" # rosewater + + # Normal colors + normal: + black: "#45475A" # surface1 + red: "#F38BA8" # red + green: "#A6E3A1" # green + yellow: "#F9E2AF" # yellow + blue: "#89B4FA" # blue + magenta: "#F5C2E7" # pink + cyan: "#94E2D5" # teal + white: "#BAC2DE" # subtext1 + + # Bright colors + bright: + black: "#585B70" # surface2 + red: "#F38BA8" # red + green: "#A6E3A1" # green + yellow: "#F9E2AF" # yellow + blue: "#89B4FA" # blue + magenta: "#F5C2E7" # pink + cyan: "#94E2D5" # teal + white: "#A6ADC8" # subtext0 + + # Dim colors + dim: + black: "#45475A" # surface1 + red: "#F38BA8" # red + green: "#A6E3A1" # green + yellow: "#F9E2AF" # yellow + blue: "#89B4FA" # blue + magenta: "#F5C2E7" # pink + cyan: "#94E2D5" # teal + white: "#BAC2DE" # subtext1 + + indexed_colors: + - { index: 16, color: "#FAB387" } + - { index: 17, color: "#F5E0DC" } diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..4167bc3 --- /dev/null +++ b/.config/fontconfig/fonts.conf @@ -0,0 +1,36 @@ +<?xml version='1.0'?> +<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> +<fontconfig> + <dir>/usr/share/fonts</dir> + <dir>/home/freya/.local/share/fonts</dir> + <alias> + <family>serif</family> + <prefer> + <family>Twemoji</family> + <family>Font Awesome 6 Pro Regular</family> + <family>Times New Roman</family> + <family>DejaVu Serif</family> + </prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer> + <family>Twemoji</family> + <family>Font Awesome 6 Pro Regular</family> + <family>Cantarell</family> + <family>Noto Sans</family> + <family>DejaVu Sans</family> + </prefer> + </alias> + <alias> + <family>monospace</family> + <prefer> + <family>Fira Mono</family> + <family>Fira Mono Nerd Font</family> + <family>Font Awesome 6 Pro Regular</family> + <family>Twemoji</family> + <family>DejaVu Sans Mono</family> + </prefer> + </alias> +</fontconfig> + diff --git a/.config/gtk-3.0/bookmarks b/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..f5462c9 --- /dev/null +++ b/.config/gtk-3.0/bookmarks @@ -0,0 +1,3 @@ +file:///home/freya/downloads +file:///home/tylerm/code +file:///home/tylerm/sync diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..4d0cd17 --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,18 @@ +[Settings] +gtk-application-prefer-dark-theme=0 +#gtk-theme-name=Catppuccin-Mocha-Standard-Blue-dark +gtk-theme-name=Lavanda-Sea-Dark +gtk-font-name=sans-serif +gtk-cursor-theme-name=Adwaita +gtk-cursor-theme-size=10 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb +gtk-icon-theme-name=Adwaita diff --git a/.config/gtk-4.0/settings.ini b/.config/gtk-4.0/settings.ini new file mode 100644 index 0000000..7c6461a --- /dev/null +++ b/.config/gtk-4.0/settings.ini @@ -0,0 +1,2 @@ +[Settings] +gtk-application-prefer-dark-theme=0 diff --git a/.config/hypr/config.d/autostart.sh b/.config/hypr/config.d/autostart.sh new file mode 100755 index 0000000..9b18715 --- /dev/null +++ b/.config/hypr/config.d/autostart.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +pipewire & &> ~/.log/pipewire +pipewire-pulse & &> ~/.log/pipewire-pulse +wireplumber & &> ~/.log/wireplumber + +/usr/lib/xdg-desktop-portal -r & +/usr/lib/xdg-desktop-portal-hyprland -r & + +waybar & + +mako & + +hyprpaper & + +nm-applet --indicator & + +/usr/bin/gnome-keyring-daemon --foreground & + +discord --enable-features=UseOzonePlatform --ozone-platform=wayland & +element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland & diff --git a/.config/hypr/config.d/input.conf b/.config/hypr/config.d/input.conf new file mode 100644 index 0000000..947ae3d --- /dev/null +++ b/.config/hypr/config.d/input.conf @@ -0,0 +1,24 @@ + +monitor= eDP-1, 3072x1920, 0x0, $scale + +env = XCURSOR_SIZE, 24 + +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = gtp:alt_shit_toggle, compose:rctrl + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = yes + } + + sensitivity = 0 +} + +device:epic-mouse-v1 { + sensitivity = -0.5 +} diff --git a/.config/hypr/config.d/keybinds.conf b/.config/hypr/config.d/keybinds.conf new file mode 100644 index 0000000..3351e85 --- /dev/null +++ b/.config/hypr/config.d/keybinds.conf @@ -0,0 +1,34 @@ + +bind = $mod, Return, exec, $term +bind = $mod, W, exec, $browser +bind = $mod SHIFT, SPACE, togglefloating +bind = $mod, D, exec, $menu +bind = $mod, J, togglesplit +bind = $mod, F, fullscreen +bind = $mod, L, exec, killall wlogout || wlogout --css ~/scripts/power/style.css -l ~/scripts/power/layout +bind = $mod, P, exec, killall wlogout || wlogout --css ~/scripts/monitor/style.css -l ~/scripts/monitor/layout -b 2 -L 400 -R 400 +bind = $mod SHIFT, B, exec, killall waybar && waybar +bind = $mod SHIFT, Q, killactive +bind = $mod SHIFT, W, exec, hyprpaper + +$monitor_sh = ~/scripts/monitor +bind = $mod ALT, right, exec, $monitor_sh right +bind = $mod ALT, left, exec, $monitor_sh left +bind = $mod ALT, up, exec, $monitor_sh mirror +bind = $mod ALT, down, exec, $monitor_sh disable + +binde =, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+ +binde =, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- +binde =, XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle +binde =, XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle + +binde =, XF86MonBrightnessDown, exec, brightnessctl set 5%- +binde =, XF86MonBrightnessUp, exec, brightnessctl set 5%+ + +binde =, XF86AudioPlay, exec, playerctl play-pause +binde =, XF86AudioNext, exec, playerctl next +binde =, XF86AudioPrev, exec, playerctl previous + +bind = ,Print, exec, grim -g "$(slurp)" - | wl-copy +bind = SHIFT, Print, exec, slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy +bind = CONTROL, Print, exec, diff --git a/.config/hypr/config.d/theme.conf b/.config/hypr/config.d/theme.conf new file mode 100644 index 0000000..90e23e8 --- /dev/null +++ b/.config/hypr/config.d/theme.conf @@ -0,0 +1,40 @@ +general { + gaps_in = $radius + gaps_out = $gaps + border_size = $border + col.active_border = rgba(aaaaaa90) + col.inactive_border = rgba(77777790) + col.group_border_active = rgba(aaaaaa90) + col.group_border = rgba(77777790) + + layout = dwindle +} + +decoration { + + rounding = 5 + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + #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 +} + +windowrule = float, ^(wlogout)$ +windowrule = move 12.5% 12.5%, ^(wlogout)$ +windowrule = size 75% 75%, ^(wlogout)$ +windowrule = noborder, ^(wlogout)$ +windowrule = noshadow, ^(wlogout)$ +windowrule = nofullscreenrequest, ^(wlogout)$ diff --git a/.config/hypr/config.d/workspaces.conf b/.config/hypr/config.d/workspaces.conf new file mode 100644 index 0000000..2f3e81c --- /dev/null +++ b/.config/hypr/config.d/workspaces.conf @@ -0,0 +1,58 @@ + +dwindle { + pseudotile = yes + preserve_split = yes +} + +gestures { + workspace_swipe = on +} + +# Move focus with mod + arrow keys + +bind = $mod, left, movefocus, l +bind = $mod, right, movefocus, r +bind = $mod, up, movefocus, u +bind = $mod, down, movefocus, d + +# Move window across workspace with mod + arrow keys + +bind = $mod SHIFT, left, movewindow, l +bind = $mod SHIFT, right, movewindow, r +bind = $mod SHIFT, up, movewindow, u +bind = $mod SHIFT, down, movewindow, d + +# 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 + +# Move active window to a workspace with mod + SHIFT + [0-9] + +bind = $mod SHIFT, 1, movetoworkspacesilent, 1 +bind = $mod SHIFT, 2, movetoworkspacesilent, 2 +bind = $mod SHIFT, 3, movetoworkspacesilent, 3 +bind = $mod SHIFT, 4, movetoworkspacesilent, 4 +bind = $mod SHIFT, 5, movetoworkspacesilent, 5 +bind = $mod SHIFT, 6, movetoworkspacesilent, 6 +bind = $mod SHIFT, 7, movetoworkspacesilent, 7 +bind = $mod SHIFT, 8, movetoworkspacesilent, 8 +bind = $mod SHIFT, 9, movetoworkspacesilent, 9 +bind = $mod SHIFT, 0, movetoworkspacesilent, 10 + +# Scroll through existing workspaces with mod + scroll + +bind = $mod, mouse_down, workspace, e+1 +bind = $mod, mouse_up, workspace, e-1 + +# Move/resize windows with mod + LMB/RMB and dragging + +bindm = $mod, mouse:272, movewindow +bindm = $mod, mouse:273, resizewindow diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf new file mode 100644 index 0000000..743fa37 --- /dev/null +++ b/.config/hypr/hyprland.conf @@ -0,0 +1,22 @@ +exec-once = dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=Hyprland + +$mod = SUPER + +$term = alacritty + +$menu = wofi --allow-images --show drun --prompt "Search Program" + +$scale = 1.5 + +$radius = 5 +$gaps = 10 +$border = 3 + +$browser = firefox + +source = ~/.config/hypr/config.d/theme.conf +source = ~/.config/hypr/config.d/keybinds.conf +source = ~/.config/hypr/config.d/input.conf +source = ~/.config/hypr/config.d/workspaces.conf + +exec-once = ~/.config/hypr/config.d/autostart.sh diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf new file mode 100644 index 0000000..1bfca3c --- /dev/null +++ b/.config/hypr/hyprpaper.conf @@ -0,0 +1,2 @@ +preload = ~/sync/wallpapers/nya0.png +wallpaper = ,~/sync/wallpapers/nya0.png diff --git a/.config/mako/config b/.config/mako/config new file mode 100644 index 0000000..862f2e5 --- /dev/null +++ b/.config/mako/config @@ -0,0 +1,24 @@ +font=Fira Mono 10 +background-color=#1d1b2b +border-size=2 +border-radius=5 +margin=6 +padding=5,8 +progress-color=#373c47 +layer=overlay +icons=1 + +[urgency=low] +text-color=#98c379 +border-color=#98c379 +default-timeout=10000 + +[urgency=normal] +text-color=#61afef +border-color=#61afef +default-timeout=10000 + +[urgency=critical] +text-color=#e06c75 +border-color=#e06c75 +default-timeout=0 diff --git a/.config/mako/config.bak b/.config/mako/config.bak new file mode 100644 index 0000000..88da911 --- /dev/null +++ b/.config/mako/config.bak @@ -0,0 +1,23 @@ +font=Source Code Pro Medium 10 +background-color=#272b33 +border-size=2 +margin=6 +padding=5,8 +progress-color=#373c47 +layer=overlay +icons=1 + +[urgency=low] +text-color=#98c379 +border-color=#98c379 +default-timeout=10000 + +[urgency=normal] +text-color=#61afef +border-color=#61afef +default-timeout=10000 + +[urgency=critical] +text-color=#e06c75 +border-color=#e06c75 +default-timeout=0 diff --git a/.config/mimeapps.list b/.config/mimeapps.list new file mode 100644 index 0000000..1e346ed --- /dev/null +++ b/.config/mimeapps.list @@ -0,0 +1,63 @@ +[Default Applications] +text/html=firefox.desktop +x-scheme-handler/http=firefox.desktop +x-scheme-handler/https=firefox.desktop +x-scheme-handler/about=firefox.desktop +x-scheme-handler/unknown=firefox.desktop +image/png=imv.desktop +image/jpeg=imv.desktop +image/webp=imv.desktop +image/tga=imv.desktop +image/bmp=imv.desktop +image/gif=imv.desktop +video/mp4=mpv.desktop +video/x-msvideo=mpv.desktop +audio/mp3=mpv.desktop +audio/wav=mpv.desktop +video/mkv=mpv.desktop +video/webm=mpv.desktop +application/pdf=org.pwmt.zathura.desktop +text/plain=nvim.desktop +text/markdown=nvim.desktop +text/x-makefile=nvim.desktop +text/x-c++hdr=nvim.desktop +text/x-c++src=nvim.desktop +text/x-chdr=nvim.desktop +text/x-csrc=nvim.desktop +text/x-java=nvim.desktop +text/x-moc=nvim.desktop +text/x-pascal=nvim.desktop +text/x-tcl=nvim.desktop +text/x-tex=nvim.desktop +application/x-shellscript=nvim.desktop +text/x-c=nvim.desktop +text/x-c++=nvim.desktop +application/gzip=org.gnome.Nautilus.desktop +application/zip=org.gnome.Nautilus.desktop +application/x-bzip2=org.gnome.Nautilus.desktop +application/vnd.ms-opentype=org.gnome.Nautilus.desktop +font/sfnt=org.gnome.Nautilus.desktop +application/java-archive=org.gnome.Nautilus.desktop +application/x-iso9660-image=org.gnome.Nautilus.desktop +application/x-xz=org.gnome.Nautilus.desktop +application/x-zerosize=nvim.desktop +x-scheme-handler/mailto=userapp-Thunderbird-Y667E2.desktop +message/rfc822=userapp-Thunderbird-Y667E2.desktop +x-scheme-handler/mid=userapp-Thunderbird-Y667E2.desktop +x-scheme-handler/webcal=userapp-Thunderbird-9WQSA2.desktop +text/calendar=userapp-Thunderbird-9WQSA2.desktop +application/x-extension-ics=userapp-Thunderbird-9WQSA2.desktop +x-scheme-handler/webcals=userapp-Thunderbird-9WQSA2.desktop +x-scheme-handler/mspa=unofficial-homestuck-collection.desktop + +[Added Associations] +application/x-zerosize=nvim.desktop; +x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-4IZTA2.desktop; +x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-4IZTA2.desktop; +x-scheme-handler/webcal=userapp-Thunderbird-9WQSA2.desktop; +x-scheme-handler/webcals=userapp-Thunderbird-9WQSA2.desktop; +x-scheme-handler/mailto=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-Y667E2.desktop; +message/rfc822=userapp-Thunderbird-E9G491.desktop; +x-scheme-handler/mid=userapp-Thunderbird-E9G491.desktop;userapp-Thunderbird-Y667E2.desktop; +x-scheme-handler/discord=discord.desktop; +x-scheme-handler/slack=slack.desktop; diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..fd623bf --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,7 @@ +require('plugin') +require('theme') +require('vimopt') +require('tree') +require('keybinds') +require('treesitter') +require('lsp') diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua new file mode 100644 index 0000000..c5732b5 --- /dev/null +++ b/.config/nvim/lua/keybinds.lua @@ -0,0 +1,22 @@ +local opts = { noremap = true, silent = true } +local keymap = vim.keymap.set +local builtin = require('telescope.builtin') +local Terminal = require('toggleterm.terminal').Terminal +local term_float = Terminal:new({ direction = 'float', hidden = 'true' }) + +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +keymap('', '<leader>', '<Nop>', opts) +keymap('n', '<leader>e', vim.cmd.NvimTreeToggle) +keymap('n', '<leader>m', vim.cmd.Mason) +keymap('n', '<leader>h', vim.cmd.noh) +keymap('n', '<leader>p', vim.cmd.PlugUpdate) +keymap('n', '<leader>ff', builtin.find_files, {}) +keymap('n', '<leader>fg', builtin.live_grep, {}) +keymap('n', '<leader>fb', builtin.buffers, {}) +keymap('n', '<leader>fh', builtin.help_tags, {}) +keymap('n', '<leader>u', vim.cmd.UndotreeToggle) +keymap('n', '<leader>gs', vim.cmd.Git) +keymap('n', '<leader>t', function() require('trouble').toggle() end) +keymap('', '<A-s>', function() term_float:toggle() end) diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua new file mode 100644 index 0000000..6896146 --- /dev/null +++ b/.config/nvim/lua/lsp.lua @@ -0,0 +1,77 @@ +local lsp = require('lsp-zero') + +lsp.preset('recommended') + +require('mason').setup({}) +require('mason-lspconfig').setup({ + ensure_installed = { + 'tsserver', + 'eslint', + 'rust_analyzer', + 'clangd', + 'html', + 'cssls', + 'pyright', + 'vimls', + 'yamlls', + 'jdtls', + 'bashls', + 'lua_ls' + }, + handlers = { + lsp.default_setup, + }, +}) + +local cmp = require('cmp') + +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local cmp_mappings = cmp.mapping.preset.insert({ + ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), + ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), + ['<CR>'] = cmp.mapping.confirm({ select = true }), + ["<C-Space>"] = cmp.mapping.complete(), +}) + +cmp_mappings['<Tab>'] = nil +cmp_mappings['<S-Tab>'] = nil + +cmp.setup({ + mapping = cmp_mappings +}) + +lsp.set_preferences({ + suggest_lsp_servers = false, + sign_icons = { + error = 'E', + warn = 'W', + hint = 'H', + info = 'I' + } +}) + +lsp.on_attach(function(client, bufnr) + local opts = {buffer = bufnr, remap = false} + local keymap = vim.keymap.set + + keymap("n", "gd", function() vim.lsp.buf.definition() end, opts) + keymap("n", "K", function() vim.lsp.buf.hover() end, opts) + keymap("n", "<leader>ls", function() vim.lsp.buf.workspace_symbol() end, opts) + keymap("n", "<leader>lf", function() vim.diagnostic.open_float() end, opts) + keymap("n", "[d", function() vim.diagnostic.goto_next() end, opts) + keymap("n", "]d", function() vim.diagnostic.goto_prev() end, opts) + keymap("n", "<leader>la", function() vim.lsp.buf.code_action() end, opts) + keymap("n", "<leader>lr", function() vim.lsp.buf.references() end, opts) + keymap("n", "<leader>ln", function() vim.lsp.buf.rename() end, opts) + keymap("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts) +end) + +lsp.setup() + +vim.diagnostic.config({ + virtual_text = true +}) + +require("neodev").setup() +require("nvim-surround").setup() +require("toggleterm").setup() diff --git a/.config/nvim/lua/menu.lua b/.config/nvim/lua/menu.lua new file mode 100644 index 0000000..ff8e1e3 --- /dev/null +++ b/.config/nvim/lua/menu.lua @@ -0,0 +1,261 @@ +local path_ok, plenary_path = pcall(require, "plenary.path") +if not path_ok then + return +end + +local dashboard = require("alpha.themes.dashboard") +local cdir = vim.fn.getcwd() +local if_nil = vim.F.if_nil + +local nvim_web_devicons = { + enabled = true, + highlight = true, +} + +local function get_extension(fn) + local match = fn:match("^.+(%..+)$") + local ext = "" + if match ~= nil then + ext = match:sub(2) + end + return ext +end + +local function icon(fn) + local nwd = require("nvim-web-devicons") + local ext = get_extension(fn) + return nwd.get_icon(fn, ext, { default = true }) +end + +local function file_button(fn, sc, short_fn,autocd) + short_fn = short_fn or fn + local ico_txt + local fb_hl = {} + + if nvim_web_devicons.enabled then + local ico, hl = icon(fn) + local hl_option_type = type(nvim_web_devicons.highlight) + if hl_option_type == "boolean" then + if hl and nvim_web_devicons.highlight then + table.insert(fb_hl, { hl, 0, #ico }) + end + end + if hl_option_type == "string" then + table.insert(fb_hl, { nvim_web_devicons.highlight, 0, #ico }) + end + ico_txt = ico .. " " + else + ico_txt = "" + end + local cd_cmd = (autocd and " | cd %:p:h" or "") + local file_button_el = dashboard.button(sc, ico_txt .. short_fn, "<cmd>e " .. vim.fn.fnameescape(fn) .. cd_cmd .." <CR>") + local fn_start = short_fn:match(".*[/\\]") + if fn_start ~= nil then + table.insert(fb_hl, { "Comment", #ico_txt - 2, #fn_start + #ico_txt }) + end + file_button_el.opts.hl = fb_hl + return file_button_el +end + +local default_mru_ignore = { "gitcommit" } + +local mru_opts = { + ignore = function(path, ext) + return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext)) + end, + autocd = false +} + +--- @param start number +--- @param cwd string? optional +--- @param items_number number? optional number of items to generate, default = 10 +local function mru(start, cwd, items_number, opts) + opts = opts or mru_opts + items_number = if_nil(items_number, 10) + + local oldfiles = {} + for _, v in pairs(vim.v.oldfiles) do + if #oldfiles == items_number then + break + end + local cwd_cond + if not cwd then + cwd_cond = true + else + cwd_cond = vim.startswith(v, cwd) + end + local ignore = (opts.ignore and opts.ignore(v, get_extension(v))) or false + if (vim.fn.filereadable(v) == 1) and cwd_cond and not ignore then + oldfiles[#oldfiles + 1] = v + end + end + local target_width = 35 + + local tbl = {} + for i, fn in ipairs(oldfiles) do + local short_fn + if cwd then + short_fn = vim.fn.fnamemodify(fn, ":.") + else + short_fn = vim.fn.fnamemodify(fn, ":~") + end + + if #short_fn > target_width then + short_fn = plenary_path.new(short_fn):shorten(1, { -2, -1 }) + if #short_fn > target_width then + short_fn = plenary_path.new(short_fn):shorten(1, { -1 }) + end + end + + local shortcut = tostring(i + start - 1) + + local file_button_el = file_button(fn, shortcut, short_fn,opts.autocd) + tbl[i] = file_button_el + end + return { + type = "group", + val = tbl, + opts = {}, + } +end + +local cats = { + { + [[ ,-. _,---._ __ / \]], + [[ / ) .-' `./ / \]], + [[( ( ,' `/ /|]], + [[ \ `-" \'\ / |]], + [[ `. , \ \ / |]], + [[ /`. ,'-`----Y |]], + [[ ( ; | ']], + [[ | ,-. ,-' | /]], + [[ | | ( | hjw | /]], + [[ ) | \ `.___________|/]], + [[ `--' `--']], + }, + { + [[ _]], + [[ \`*-. ]], + [[ ) _`-. ]], + [[ . : `. . ]], + [[ : _ ' \ ]], + [[ ; *` _. `*-._ ]], + [[ `-.-' `-. ]], + [[ ; ` `. ]], + [[ :. . \ ]], + [[ . \ . : .-' . ]], + [[ ' `+.; ; ' : ]], + [[ : ' | ; ;-. ]], + [[ ; ' : :`-: _.`* ;]], + [[[bug] .*' / .*' ; .*`- +' `*' ]], + [[ `*-* `*-* `*-*']], + }, + { + [[ .-o=o-.]], + [[ , /=o=o=o=\ .--.]], + [[ _|\|=o=O=o=O=| \]], + [[ __.' a`\=o=o=o=(`\ /]], + [[ '. a 4/`|.-""'`\ \ ;'`) .---.]], + [[ \ .' / .--' |_.' / .-._)]], + [[ `) _.' / /`-.__.' /]], + [[ jgs `'-.____; /'-.___.-']], + [[ `"""`]], + }, + { + [[ (`.]], + [[ ) )]], + [[ ( (]], + [[ \ \]], + [[ \ \]], + [[ .-' `-.]], + [[ / `.]], + [[ ( ) `-._ , _]], + [[ ) ,' (.\--'(]], + [[ \ ( ) / \]], + [[ \ \_( / ( <0 (0]], + [[ \_)))\ ( `._ ::Y)__]], + [[ ''' \ `-._.'`---^_)))]], + [[ `-._ ))) ```]], + [[ ``` hjw]], + } +} + +math.randomseed(os.time()) +local header = { + type = "text", + val = cats[math.random(1, #cats)], + opts = { + position = "center", + hl = "Type", + }, +} + +local section_mru = { + type = "group", + val = { + { + type = "text", + val = "Recent files", + opts = { + hl = "SpecialComment", + shrink_margin = false, + position = "center", + }, + }, + { type = "padding", val = 1 }, + { + type = "group", + val = function() + return { mru(0, cdir) } + end, + opts = { shrink_margin = false }, + }, + }, +} + +local buttons = { + type = "group", + val = { + { type = "text", val = "Quick links", opts = { hl = "SpecialComment", position = "center" } }, + { type = "padding", val = 1 }, + dashboard.button("e", " New file", "<cmd>ene<CR>"), + dashboard.button("SPC f f", " Find file"), + dashboard.button("SPC f g", " Live grep"), + dashboard.button("SPC p", " Update plugins", "<cmd>PlugUpdate<CR>"), + dashboard.button("c", " Configuration", "<cmd>cd ~/.config/nvim/ <CR>"), + dashboard.button("q", " Quit", "<cmd>qa<CR>"), + }, + position = "center", +} + +local config = { + layout = { + { type = "padding", val = 2 }, + header, + { type = "padding", val = 2 }, + section_mru, + { type = "padding", val = 2 }, + buttons, + }, + opts = { + margin = 5, + setup = function() + vim.api.nvim_create_autocmd('DirChanged', { + pattern = '*', + group = "alpha_temp", + callback = function () require('alpha').redraw() end, + }) + end, + }, +} + +return { + header = header, + buttons = buttons, + mru = mru, + config = config, + -- theme specific config + mru_opts = mru_opts, + leader = dashboard.leader, + nvim_web_devicons = nvim_web_devicons, +} diff --git a/.config/nvim/lua/plugin.lua b/.config/nvim/lua/plugin.lua new file mode 100644 index 0000000..00bc00d --- /dev/null +++ b/.config/nvim/lua/plugin.lua @@ -0,0 +1,39 @@ +local Plug = vim.fn['plug#'] + +vim.call('plug#begin') + +Plug('nvim-tree/nvim-web-devicons') +Plug('nvim-tree/nvim-tree.lua') +Plug('nvim-lualine/lualine.nvim') +Plug('ryanoasis/vim-devicons') +Plug('SirVer/ultisnips') +Plug('honza/vim-snippets') +Plug('preservim/nerdcommenter') +Plug('neoclide/coc.nvim', { branch = 'release' }) +Plug('nvim-telescope/telescope.nvim', { tag = '0.1.3' }) +Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) +Plug('nvim-lua/plenary.nvim') +Plug('mbbill/undotree') +Plug('catppuccin/nvim', { as = 'catppuccin' }) +Plug('tpope/vim-fugitive') +Plug('neovim/nvim-lspconfig') +Plug('hrsh7th/nvim-cmp') +Plug('hrsh7th/cmp-nvim-lsp') +Plug('L3MON4D3/LuaSnip') +Plug('williamboman/mason.nvim') +Plug('williamboman/mason-lspconfig.nvim') +Plug('VonHeikemen/lsp-zero.nvim', { branch = 'v3.x' }) +Plug('akinsho/bufferline.nvim', { tag = '*' }) +Plug('folke/neodev.nvim') +Plug('RRethy/vim-illuminate') +Plug('SmiteshP/nvim-navic') +Plug('utilyre/barbecue.nvim') +Plug('j-hui/fidget.nvim', { tag = 'legacy' }) +Plug('rcarriga/nvim-notify') +Plug('folke/trouble.nvim') +Plug('kylechui/nvim-surround') +Plug('akinsho/toggleterm.nvim', {tag = '*'}) +Plug('goolord/alpha-nvim') +Plug('Darazaki/indent-o-matic') + +vim.call('plug#end') diff --git a/.config/nvim/lua/theme.lua b/.config/nvim/lua/theme.lua new file mode 100644 index 0000000..c826410 --- /dev/null +++ b/.config/nvim/lua/theme.lua @@ -0,0 +1,64 @@ +local catppuccin = require('catppuccin') + +catppuccin.setup({ + transparent_background = true, + integrations = { + cmp = true, + nvimtree = true, + treesitter = true, + illuminate = { + enabled = true, + lsp = false + }, + barbecue = { + dim_dirname = true, -- directory name is dimmed by default + bold_basename = true, + dim_context = false, + alt_background = false, + }, + coc_nvim = true, + fidget = true, + markdown = true, + notify = true, + lsp_trouble = true, + }, +}) + +local colorscheme = "catppuccin" +local ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +vim.o.background = "dark" -- or "light" for light mode +if not ok then + vim.notify("colorscheme " .. colorscheme .. " not found!") + return +end + +require('lualine').setup { + options = { + theme = colorscheme, + icons_enabled = true, + globalstatus = true, + }, +} + +require('indent-o-matic').setup { + max_lines = 2048, + standard_widths = { 2, 4, 8 }, + skip_multiline = true, +} + +vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) +vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" }) + +vim.opt.termguicolors = true +require("bufferline").setup{} +require("barbecue").setup() +require("barbecue.ui").toggle(true) +require("fidget").setup { + window = { + blend = 0, + }, +} + +local theme = require('menu') +require('alpha').setup(theme.config) diff --git a/.config/nvim/lua/tree.lua b/.config/nvim/lua/tree.lua new file mode 100644 index 0000000..aef5023 --- /dev/null +++ b/.config/nvim/lua/tree.lua @@ -0,0 +1,120 @@ +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +local function on_attach(bufnr) + local api = require("nvim-tree.api") + + local function opts(desc) + return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } + end + + local function edit_or_open() + local node = api.tree.get_node_under_cursor() + + if node.nodes ~= nil then + -- expand or collapse folder + api.node.open.edit() + else + -- open file + api.node.open.edit() + -- Close the tree if file was opened + api.tree.close() + end + end + + api.config.mappings.default_on_attach(bufnr) + vim.keymap.set("n", "<CR>", edit_or_open, opts("Open")) +end + +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = false, + centralize_selection = true, + width = 30, + side = "left", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "yes", + float = { + enable = false, + quit_on_focus_loss = true, + open_win_config = { + relative = "editor", + border = "rounded", + width = 30, + height = 30, + row = 1, + col = 1, + }, + }, + }, + renderer = { + group_empty = true, + }, + actions = { + use_system_clipboard = true, + change_dir = { + enable = true, + global = false, + restrict_above_cwd = false, + }, + expand_all = { + max_folder_discovery = 300, + exclude = {}, + }, + file_popup = { + open_win_config = { + col = 1, + row = 1, + relative = "cursor", + border = "shadow", + style = "minimal", + }, + }, + open_file = { + window_picker = { + enable = false, + picker = "default", + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "lazy", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + } + }, + remove_file = { + close_window = true, + }, + + }, + tab = { + sync = { + open = false, + close = false, + ignore = {}, + }, + }, + git = { + enable = true, + ignore = false, + show_on_dirs = true, + show_on_open_dirs = true, + timeout = 200, + }, + filters = { + dotfiles = false, + git_clean = false, + no_buffer = false, + custom = { "node_modules", "\\.cache" }, + exclude = {}, + }, + update_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_cwd = true + }, + on_attach = on_attach +}) diff --git a/.config/nvim/lua/treesitter.lua b/.config/nvim/lua/treesitter.lua new file mode 100644 index 0000000..268ec0e --- /dev/null +++ b/.config/nvim/lua/treesitter.lua @@ -0,0 +1,30 @@ +local lsps = { + "c", + "lua", + "rust", + "typescript", + "javascript", + "python", + "vim", + "vimdoc", + "query" +}; + +require('nvim-treesitter.configs').setup { + ensure_installed = lsps, + sync_install = false, + auto_install = true, + ignore_install = { "javascript" }, + highlight = { + enable = true, + disable = { "c", "rust" }, + disable = function(lang, buf) + local max_filesize = 100 * 1024 -- 100 KB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + if ok and stats and stats.size > max_filesize then + return true + end + end, + additional_vim_regex_highlighting = false, + }, +} diff --git a/.config/nvim/lua/vimopt.lua b/.config/nvim/lua/vimopt.lua new file mode 100644 index 0000000..16269d9 --- /dev/null +++ b/.config/nvim/lua/vimopt.lua @@ -0,0 +1,14 @@ +local set = vim.opt +set.tabstop = 4 +set.softtabstop = 4 +set.shiftwidth = 4 +--set.noexpandtab = true +set.mouse = "a" +set.clipboard = "unnamedplus" +set.hlsearch = true +set.autoindent = true +set.ttyfast = true +set.number = true +set.relativenumber = true +set.rnu = true +set.swapfile = false diff --git a/.config/pfetch_logos b/.config/pfetch_logos new file mode 100644 index 0000000..65c8488 --- /dev/null +++ b/.config/pfetch_logos @@ -0,0 +1,10 @@ +[Aa]rch*) + read_ascii 4 <<- EOF + ${c6} /\\ + ${c6} / \\ + ${c6} /\\ \\ + ${c4} / ^ w ^\\ + ${c4} / ,, \\ + ${c4} / | | \\ + ${c4} /_-'' ''-_\\ + EOF diff --git a/.config/starship.toml b/.config/starship.toml new file mode 100644 index 0000000..ad76d5f --- /dev/null +++ b/.config/starship.toml @@ -0,0 +1,32 @@ +format = """ +╭─ \ +$username\ +$hostname\ +$git_branch\ +$directory\ +$line_break\ +╰─ +""" + +[username] +style_user = 'bold purple' +style_root = 'bold purple' +format = '[$user]($style) ' +disabled = false +show_always = true + +[hostname] +ssh_only = false +format = 'on [$hostname](bold blue) ' +disabled = false + +[directory] +format = '[$path]($style)[$read_only]($read_only_style) ' +truncation_length = -1 +truncate_to_repo = false +truncation_symbol = '…/' + +[git_branch] +style = 'bold fg:97' +format = 'at [$symbol$branch(:$remote_branch)]($style) ' + diff --git a/.config/sway/config b/.config/sway/config new file mode 100755 index 0000000..effb3cd --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,35 @@ +# xdg desktop portal fix +exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP + +# Set super key +set $mod Mod4 + +# Set terminal +set $term alacritty + +# Set app launcher +set $menu wofi --allow-images --show=drun --prompt "Search Program" + +# Set scale +set $scale 1.25 + +# Set background +set $bg ~/.config/sway/wallpapers/blue.jpg + +# Set Efects +set $gaps 10 +set $radius 0 +set $shadows on +set $shadow_blur 15 +set $blur enable +set $blur_radius 10 +set $blur_passes 3 + +# Set browser +set $browser firefox + +# Autostart apps +exec $HOME/.config/sway/scripts.d/auto.sh + +# Local configs +include $HOME/.config/sway/config.d/* diff --git a/.config/sway/config.d/gestures b/.config/sway/config.d/gestures new file mode 100644 index 0000000..4bdb136 --- /dev/null +++ b/.config/sway/config.d/gestures @@ -0,0 +1,4 @@ +### Gestures + +bindgesture swipe:right workspace prev +bindgesture swipe:left workspace next diff --git a/.config/sway/config.d/idle b/.config/sway/config.d/idle new file mode 100644 index 0000000..fb13083 --- /dev/null +++ b/.config/sway/config.d/idle @@ -0,0 +1,5 @@ +# Turn off display after tiemout +exec swayidle -w \ + timeout 300 'swaylock -f -c 14171d' \ + timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 14171d' diff --git a/.config/sway/config.d/input b/.config/sway/config.d/input new file mode 100644 index 0000000..8ee6ba7 --- /dev/null +++ b/.config/sway/config.d/input @@ -0,0 +1,20 @@ +### Input configuration + +# Enable numlock on startup +input * xkb_numlock enable + +# Keyboard layout, change as you wish +input * { + xkb_layout "us" + xkb_options compose:ralt +} + +# Touchpad input settings +input type:touchpad { + tap enabled + natural_scroll enabled + middle_emulation enabled +} + +# Screen settings +output eDP-1 resolution 3072x1920 scale $scale diff --git a/.config/sway/config.d/keybinds b/.config/sway/config.d/keybinds new file mode 100644 index 0000000..0543339 --- /dev/null +++ b/.config/sway/config.d/keybinds @@ -0,0 +1,58 @@ +### Key bindings + +# Start a terminal +bindsym $mod+Return exec $term + +# Kill focused window +bindsym $mod+Shift+q kill + +# Start your launcher +bindsym $mod+d exec $menu + +# Start your browesr +bindsym $mod+w exec $browser + +# Lock screen +bindsym $mod+Shift+l exec $lock + +# Exit sway +bindsym Ctrl+Alt+Delete exec killall sway + +# Power menu +bindsym $mod+L exec killall wlogout || wlogout --css ~/.config/sway/logout.d/power/style.css -l ~/.config/sway/logout.d/power/layout + +# Drag floating windows by holding down $mod and left mouse button. +# Resize them with right mouse button + $mod. +# Despite the name, also works for non-floating windows. +# Change normal to inverse to use left mouse button for resizing and right +# mouse button for dragging. +floating_modifier $mod normal + +# Reload the configuration file +bindsym $mod+F5 reload + +# Audio keybinds +bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% +bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% +bindsym Shift+XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ 10000% +bindsym Shift+XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ 0% +bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle +bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle + +# Brightness keybinds +bindsym XF86MonBrightnessDown exec brightnessctl set 5%- +bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ + +# Player keybinds +bindsym XF86AudioPlay exec playerctl play-pause +bindsym XF86AudioNext exec playerctl next +bindsym XF86AudioPrev exec playerctl previous + +# Screenshot +bindsym $mod+Shift+s exec grim -g "$(slurp)" - | wl-copy && notify-send -t 1000 "Screenshot copied to clipboard" +bindsym Print exec grim - | wl-copy && notify-send -t 1000 "Screenshot copied to clipboard" +bindsym Shift+Print exec slurp -p | grim -g - - | convert - txt:- | tail -n 1 | awk '{print $3}' | wl-copy + +# Michelsoft Binbows +bindsym Ctrl+$mod+Shift+L exec firefox "https://linkedin.com" +bindsym Ctrl+$mod+Shift+S exec alacritty -e sl diff --git a/.config/sway/config.d/project b/.config/sway/config.d/project new file mode 100644 index 0000000..3cb1049 --- /dev/null +++ b/.config/sway/config.d/project @@ -0,0 +1,6 @@ +### Project + +bindsym $mod+Alt+Left exec ~/.config/sway/scripts.d/project.sh LEFT +bindsym $mod+Alt+Right exec ~/.config/sway/scripts.d/project.sh RIGHT +bindsym $mod+Alt+Up exec ~/.config/sway/scripts.d/project.sh EXTERNAL_ONLY +bindsym $mod+Alt+Down exec ~/.config/sway/scripts.d/project.sh PRIMARY_ONLY diff --git a/.config/sway/config.d/scratch b/.config/sway/config.d/scratch new file mode 100644 index 0000000..0337319 --- /dev/null +++ b/.config/sway/config.d/scratch @@ -0,0 +1,14 @@ +### Scratchpad: + +# Move the currently focused window to the scratchpad +bindsym $mod+Shift+minus move scratchpad + +# Show the next scratchpad window or hide the focused scratchpad window. +# If there are multiple scratchpad windows, this command cycles through them. +bindsym $mod+minus scratchpad show + +for_window [app_id="scratch_term"] move scratchpad, resize set 960 640 +for_window [app_id="scratch_htop"] move scratchpad, resize set 960 640 + +bindsym $mod+y exec ~/.config/sway/scripts.d/scratchpads.sh scratch_term zsh +bindsym $mod+h exec ~/.config/sway/scripts.d/scratchpads.sh scratch_htop htop diff --git a/.config/sway/config.d/theme b/.config/sway/config.d/theme new file mode 100644 index 0000000..e8d2822 --- /dev/null +++ b/.config/sway/config.d/theme @@ -0,0 +1,32 @@ +### Set borders +gaps inner $gaps +for_window [class="^.*"] border pixel 2 +default_border pixel 2 +default_floating_border pixel 2 + +### Colors + +# class border backgr. text indicator child_border +client.background #14171d +client.focused #4d4754 #14171d #ffffff #4d4754 #4d4754 +client.focused_inactive #4d4754 #14171d #ffffff #14171d #14171d +client.focused_tab_title #4d4754 #14171d #ffffff +client.unfocused #14171d #14171d #ffffff #14171d #14171d +client.urgent #cc5c5c #a63a3a #ffffff #a63a3a #a63a3a + +### SwayFX + +corner_radius $radius +smart_corner_radius $radius +shadows $shadows +shadows_on_csd $shadows +shadow_blur_radius $shadow_blur +shadow_color #14171dff +blur $blur +blur_radius $blur_radius +blur_passes $blur_passes +layer_effects "waybar" blur enable; shadows enable +layer_effects "wofi" blur enable; shadows enable + +### Output configuration +output * bg $bg fill diff --git a/.config/sway/config.d/workspaces b/.config/sway/config.d/workspaces new file mode 100644 index 0000000..2d5b378 --- /dev/null +++ b/.config/sway/config.d/workspaces @@ -0,0 +1,68 @@ + +# Move your focus around +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Move the focused window with the same, but add Shift +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Switch to workspace +bindsym $mod+1 workspace number 1 +bindsym $mod+2 workspace number 2 +bindsym $mod+3 workspace number 3 +bindsym $mod+4 workspace number 4 +bindsym $mod+5 workspace number 5 +bindsym $mod+6 workspace number 6 +bindsym $mod+7 workspace number 7 +bindsym $mod+8 workspace number 8 +bindsym $mod+9 workspace number 9 + +# Move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number 1 +bindsym $mod+Shift+2 move container to workspace number 2 +bindsym $mod+Shift+3 move container to workspace number 3 +bindsym $mod+Shift+4 move container to workspace number 4 +bindsym $mod+Shift+5 move container to workspace number 5 +bindsym $mod+Shift+6 move container to workspace number 6 +bindsym $mod+Shift+7 move container to workspace number 7 +bindsym $mod+Shift+8 move container to workspace number 8 +bindsym $mod+Shift+9 move container to workspace number 9 + +# Layout stuff: + +# Set the new window positioning mode +bindsym $mod+Shift+b layout splith +bindsym $mod+Shift+v layout splitv +bindsym $mod+Shift+c layout tabbed + +# Make the current focus fullscreen +bindsym $mod+f fullscreen + +# Toggle the current focus between tiling and floating mode +bindsym $mod+Shift+space floating toggle + +# Swap focus between the tiling area and the floating area +bindsym $mod+space focus mode_toggle + +# Move focus to the parent container +bindsym $mod+a focus parent + +# Resize windows +mode "resize" { + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" diff --git a/.config/sway/logout.d/power/img/lock-hover.png b/.config/sway/logout.d/power/img/lock-hover.png Binary files differnew file mode 100644 index 0000000..46c51b0 --- /dev/null +++ b/.config/sway/logout.d/power/img/lock-hover.png diff --git a/.config/sway/logout.d/power/img/lock.png b/.config/sway/logout.d/power/img/lock.png Binary files differnew file mode 100644 index 0000000..f1ec4a2 --- /dev/null +++ b/.config/sway/logout.d/power/img/lock.png diff --git a/.config/sway/logout.d/power/img/logout-hover.png b/.config/sway/logout.d/power/img/logout-hover.png Binary files differnew file mode 100644 index 0000000..b34a150 --- /dev/null +++ b/.config/sway/logout.d/power/img/logout-hover.png diff --git a/.config/sway/logout.d/power/img/logout.png b/.config/sway/logout.d/power/img/logout.png Binary files differnew file mode 100644 index 0000000..59a5aeb --- /dev/null +++ b/.config/sway/logout.d/power/img/logout.png diff --git a/.config/sway/logout.d/power/img/power-hover.png b/.config/sway/logout.d/power/img/power-hover.png Binary files differnew file mode 100644 index 0000000..a65e429 --- /dev/null +++ b/.config/sway/logout.d/power/img/power-hover.png diff --git a/.config/sway/logout.d/power/img/power.png b/.config/sway/logout.d/power/img/power.png Binary files differnew file mode 100644 index 0000000..6aac455 --- /dev/null +++ b/.config/sway/logout.d/power/img/power.png diff --git a/.config/sway/logout.d/power/img/restart-hover.png b/.config/sway/logout.d/power/img/restart-hover.png Binary files differnew file mode 100644 index 0000000..7921398 --- /dev/null +++ b/.config/sway/logout.d/power/img/restart-hover.png diff --git a/.config/sway/logout.d/power/img/restart.png b/.config/sway/logout.d/power/img/restart.png Binary files differnew file mode 100644 index 0000000..5851243 --- /dev/null +++ b/.config/sway/logout.d/power/img/restart.png diff --git a/.config/sway/logout.d/power/img/sleep-hover.png b/.config/sway/logout.d/power/img/sleep-hover.png Binary files differnew file mode 100644 index 0000000..7c9b6b3 --- /dev/null +++ b/.config/sway/logout.d/power/img/sleep-hover.png diff --git a/.config/sway/logout.d/power/img/sleep.png b/.config/sway/logout.d/power/img/sleep.png Binary files differnew file mode 100644 index 0000000..164f5fb --- /dev/null +++ b/.config/sway/logout.d/power/img/sleep.png diff --git a/.config/sway/logout.d/power/layout b/.config/sway/logout.d/power/layout new file mode 100644 index 0000000..2b53986 --- /dev/null +++ b/.config/sway/logout.d/power/layout @@ -0,0 +1,30 @@ +{ + "label" : "lock", + "action" : "swaylock -f -c 14171d", + "text" : "Lock", + "keybind" : "l" +} +{ + "label" : "logout", + "action" : "loginctl terminate-user $USER", + "text" : "Logout", + "keybind" : "e" +} +{ + "label" : "shutdown", + "action" : "loginctl poweroff", + "text" : "Shutdown", + "keybind" : "s" +} +{ + "label" : "suspend", + "action" : "loginctl suspend", + "text" : "Suspend", + "keybind" : "u" +} +{ + "label" : "reboot", + "action" : "reboot", + "text" : "Reboot", + "keybind" : "r" +} diff --git a/.config/sway/logout.d/power/style.css b/.config/sway/logout.d/power/style.css new file mode 100644 index 0000000..e80dd33 --- /dev/null +++ b/.config/sway/logout.d/power/style.css @@ -0,0 +1,76 @@ +nk* { + font-family: "Fira Mono", "Font Awesome 6 Pro", monospace; + font-size: 16px; + font-weight: bold; +} + +window { + background-color: rgba(0, 0, 0, 0); +} + +button { + background-color: #242434; + background-image: none; + color: #89ADF8; + border: 1px solid rgba(0, 0, 0, 0); + margin: 5px; + border-radius: 10px; + background-repeat: no-repeat; + background-position: center; + background-size: 35%; +} + +button:focus, button:active { + background-color: #89B4FA; + color: #242434; + font-weight: 500; + outline-style: none; +} + +#lock { + background-image: image(url("img/lock.png")); +} + +#logout { + background-image: image(url("img/logout.png")); +} + +#suspend { + background-image: image(url("img/sleep.png")); +} + +#hibernate { + background-image: image(url("img/hibernate.png")); +} + +#shutdown { + background-image: image(url("img/power.png")); +} + +#reboot { + background-image: image(url("img/restart.png")); +} + +#lock:focus { + background-image: image(url("img/lock-hover.png")); +} + +#logout:focus { + background-image: image(url("img/logout-hover.png")); +} + +#suspend:focus { + background-image: image(url("img/sleep-hover.png")); +} + +#hibernate:focus { + background-image: image(url("img/hibernate-hover.png")); +} + +#shutdown:focus { + background-image: image(url("img/power-hover.png")); +} + +#reboot:focus { + background-image: image(url("img/restart-hover.png")); +} diff --git a/.config/sway/scripts.d/auto.sh b/.config/sway/scripts.d/auto.sh new file mode 100755 index 0000000..c149f79 --- /dev/null +++ b/.config/sway/scripts.d/auto.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +/usr/lib/xdg-desktop-portal -r & +/usr/lib/xdg-desktop-portal-wlr -r & + +mako & + +GTK_THEME="Lavanda-Sea-Dark" nm-applet --indicator & + +autotiling & + +/usr/bin/gnome-keyring-daemon --foreground & + +GTK_THEME="Adwaita-dark" waybar & + +discord & +element-desktop & +#thunderbird & + diff --git a/.config/sway/scripts.d/project.sh b/.config/sway/scripts.d/project.sh new file mode 100755 index 0000000..f7353e1 --- /dev/null +++ b/.config/sway/scripts.d/project.sh @@ -0,0 +1,119 @@ +#!/usr/bin/env bash + +PID=$$ + +get_mode() { + swaymsg -t get_outputs -r | jq ".[$1].modes[0]" +} + +get_name() { + swaymsg -t get_outputs -r | jq -r ".[$1].name" +} + +get_width() { + get_mode "$1" | jq ".width" +} + +get_height() { + get_mode "$1" | jq ".width" +} + +get_refresh() { + get_mode "$1" | jq ".refresh" | rev | cut -c 4- | rev +} + +get_placement() { + # $1 - monitor placement + # $2 - monitor index compared + # $3 - monitor compared scale + WIDTH="$(jq -n "$(get_width $2)/$3" | awk -F. '{print $1}')" + case $1 in + "NONE") + echo "0 0" + ;; + "RIGHT") + echo "$WIDTH 0" + ;; + *) + echo "0 0" + ;; + esac +} + +update() { + # $1 - monitor index + # $2 - monitor scale + # $3 - monitor placement + # $4 - monitor index compared + # $5 - monitor compared scale + swaymsg output "$(get_name $1)" "enable" + swaymsg output "$(get_name $1)" resolution "$(get_width $1)x$(get_height $1)@$(get_refresh $1)hz" scale $2 position "$(get_placement $3 $4 $5)" +} + +off() { + swaymsg output "$(get_name $1)" "disable" +} + +get_id() { + i=0 + while true; do + NAME="$(get_name $i)" + if [ "$NAME" == "$1" ]; then + echo "$i" + exit 0 + elif [ "$NAME" == "null" ]; then + notify-send -u critical -t 3000 "Sway" "Failed to get display" + kill $PID + exit 1 + fi + ((i=i+1)) + done +} + +PRIMARY=$(get_id "eDP-1") +EXTERNAL=$(get_id "DP-1" || get_id "HDMI-1" || get_id "HDMI-A-1") + +PRIMARY_SCALE=1.5 +EXTERNAL_SCALE=1 + +set_monitors() { + update $EXTERNAL $EXTERNAL_SCALE $1 $PRIMARY $PRIMARY_SCALE + update $PRIMARY $PRIMARY_SCALE $2 $EXTERNAL $EXTERNAL_SCALE +} + +set_left() { + set_monitors "NONE" "RIGHT" +} + +set_right() { + set_monitors "RIGHT" "NONE" +} + +set_primary_only() { + set_monitors "NONE" "NONE" + off $EXTERNAL +} + +set_external_only() { + set_monitors "NONE" "NONE" + off $PRIMARY +} + +case $1 in + "LEFT") + set_left + notify-send -t 3000 "Sway" "External display set to left aligned" + ;; + "RIGHT") + set_right + notify-send -t 3000 "Sway" "External display set to right aligned" + ;; + "PRIMARY_ONLY") + set_primary_only + notify-send -t 3000 "Sway" "Set to primary display only" + ;; + "EXTERNAL_ONLY") + set_external_only + notify-send -t 3000 "Sway" "Set to external display only" + ;; +esac diff --git a/.config/sway/scripts.d/scratchpads.sh b/.config/sway/scripts.d/scratchpads.sh new file mode 100755 index 0000000..bb8e361 --- /dev/null +++ b/.config/sway/scripts.d/scratchpads.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +( swaymsg -t get_tree | /bin/grep '"app_id": "'$1'"' ) || ( ( $TERMINAL --class=$1 -e $2 & ) && sleep 0.2 ) +swaymsg "[app_id=\"$1\"]" scratchpad show diff --git a/.config/sway/wallpapers/blue.jpg b/.config/sway/wallpapers/blue.jpg Binary files differnew file mode 100755 index 0000000..acd376b --- /dev/null +++ b/.config/sway/wallpapers/blue.jpg diff --git a/.config/sway/wallpapers/nya0.png b/.config/sway/wallpapers/nya0.png Binary files differnew file mode 100644 index 0000000..e9da5d5 --- /dev/null +++ b/.config/sway/wallpapers/nya0.png diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..8f61014 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/" +XDG_DOWNLOAD_DIR="$HOME/" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/" diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..b98b070 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,81 @@ +{ + "height": 24, + "position": "top", + "spacing": 4, + "modules-left": [ + "sway/workspaces", + "sway/window" + ], + "modules-center": [], + "modules-right": [ + "cpu", + "memory", + "temperature", + "battery", + "backlight", + "wireplumber", + "network", + "clock", + "tray" + ], + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "tray": { + "spacing": 10 + }, + "clock": { + "interval": 1, + "format": "{:%Y-%m-%d %a %H:%M:%S}" + }, + "cpu": { + "interval": 1, + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "interval": 1, + "format": " {}%", + "tooltip": false + }, + "temperature": { + "interval": 1, + "thermal-zone": 0, + "critical-threshold": 80, + "format": " {temperatureC}°" + }, + "battery": { + "interval": 1, + "states": { + "warning": 30, + "critical": 15 + }, + "format": " {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-full": " {capacity}%", + "format-warning": " {capacity}%", + "format-critical": " {capacity}%" + }, + "backlight": { + "format": " {percent}%" + }, + "wireplumber": { + "format": " {volume}%", + "format-bluetooth": " {volume}%", + "format-muted": " muted", + "scroll-step": 1, + "on-click": "pavucontrol", + "ignored-sinks": ["Easy Effects Sink"] + }, + "network": { + "format": " disconnected", + "format-wifi": " {essid}", + "format-ethernet": " {ipaddr}/{cidr}", + "format-disconnected": " disconnected", + "max-length": 50, + "on-click": "nm-connection-editor", + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..0ca11f2 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,151 @@ +* { + font-family: "Fira Mono", "Font Awesome 6 Pro", monospace; + font-size: 13.5px; + transition: none; + margin: 0; + padding: 0; +} + +/* +#waybar { + background-color: rgba(20, 23, 29, 0.85); + color: #c7c6c3; +} +*/ + +window#waybar { + background-color: rgba(20, 23, 29, 0.85); + color: #c7c6c3; +} + +/* +window#waybar > box { + margin-bottom: 8px; + color: #c7c6c3; + box-shadow: 0px 0px 3px 2px rgba(20, 23, 29, 0.70); +} +*/ + +button { + border: none; + border-radius: 0; +} + +#workspaces button { + margin: 1px 0px; + padding: 0px 5px; + color: #c7c6c3; + background-color: rgba(0, 0, 0, 0); +} + +#workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; +} + +#workspaces button.focused { + background-color: #789ebf; + color: #14171d; + box-shadow: inherit; + text-shadow: inherit; +} + +#workspaces button.urgent { + background-color: #cc5c5c; + box-shadow: inherit; + text-shadow: inherit; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#custom-cmus, +#custom-newsboat, +#mpd { + padding: 0 10px; + border-right: 1px solid #4d4754; + color: #c7c6c3; +} + +#tray { + border: none; +} + +#window { + padding: 0 10px; + border-left: 1px solid #4d4754; + color: #c7c6c3; +} + +#window, +#workspaces { + margin: 0 4px; +} + + +#battery { + color: #97bd5e; +} + +#battery.warning:not(.charging) { + color: #f0c767; +} + +#battery.critical:not(.charging) { + color: #cc5c5c; +} + +#network.disconnected, #wireplumber.muted { + color: #cc5c5c; +} + +#network.wifi, #network.ethernet { + color: #789ebf; +} + +#wireplumber { + color: #E0DB5F; +} + +#backlight { + color: #E05F91; +} + +#cpu { + color: #789ebf; +} + +#memory { + color: #a97fb3; +} + +#temperature { + color: #97bd5e; +} + +#temperature.critical { + color: #cc5c5c; +} + +#custom-newsboat { + color: #de7e54; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; +} diff --git a/.config/wofi/config b/.config/wofi/config new file mode 100644 index 0000000..6b28876 --- /dev/null +++ b/.config/wofi/config @@ -0,0 +1,6 @@ +key_expand=Tab +term=alacritty +matching=multi-contains +insensitive=true +gtk_dark=true +hide_scroll=true diff --git a/.config/wofi/style.css b/.config/wofi/style.css new file mode 100644 index 0000000..2ef5f5a --- /dev/null +++ b/.config/wofi/style.css @@ -0,0 +1,94 @@ +/* Mocha Blue */ +@define-color accent #89b4fa; +@define-color txt #cad3f5; +@define-color bg #24273a; +@define-color bg2 #494d64; + + * { + font-family: 'FiraCode Nerd Font Mono', monospace; + font-size: 14px; + } + + /* Window */ + window { + margin: 0px; + padding: 5px; + /*border: 3px solid @accent;*/ + /*border-radius: 7px;*/ + background-color: @bg; + animation: slideIn 0.1s ease-in-out both; + } + + /* Slide In */ + @keyframes slideIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Inner Box */ + #inner-box { + margin: 5px; + padding: 5px; + border: none; + background-color: @bg; + animation: fadeIn 0.1s ease-in-out both; + } + + /* Fade In */ + @keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Outer Box */ + #outer-box { + margin: 5px; + padding: 5px; + border: none; + background-color: @bg; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: 5px; + border: none; + } + + /* Input */ + #input { + margin: 5px; + padding: 5px; + border: none; + color: @accent; + background-color: @bg2; + animation: fadeIn 0.1s ease-in-out both; + } + + /* Text */ + #text { + margin: 5px; + padding: 5px; + border: none; + color: @txt; + animation: fadeIn 0.1s ease-in-out both; + } + + /* Selected Entry */ + #entry:selected { + background-color: @accent; + } + + #entry:selected #text { + color: @bg; + } |