From abeb2dcdf2f2e6ca3ed1836d8cf3d6edf93129f3 Mon Sep 17 00:00:00 2001 From: awy Date: Thu, 28 Nov 2024 17:49:11 +0300 Subject: upload --- .config/btop/btop.conf | 1 + .config/dunst/dunstrc | 28 ++++ .config/fontconfig/fonts.conf | 39 +++++ .config/foot/foot.ini | 262 ++++++++++++++++++++++++++++++++ .config/i3blocks/config | 54 +++++++ .config/lf/cleaner | 4 + .config/lf/icons | 77 ++++++++++ .config/lf/lfrc | 25 +++ .config/lf/scope | 13 ++ .config/newsboat/config | 57 +++++++ .config/nvim/init.lua | 20 +++ .config/nvim/lazy-lock.json | 14 ++ .config/nvim/lua/plugins.lua | 1 + .config/nvim/lua/plugins/lsp-config.lua | 28 ++++ .config/nvim/lua/plugins/lualine.lua | 11 ++ .config/nvim/lua/plugins/neo-tree.lua | 12 ++ .config/nvim/lua/plugins/nord.lua | 8 + .config/nvim/lua/plugins/telescope.lua | 9 ++ .config/nvim/lua/plugins/treesitter.lua | 11 ++ .config/nvim/lua/vim-options.lua | 4 + .config/shell/aliasrc | 14 ++ .config/shell/profile | 22 +++ .config/sway/config | 122 +++++++++++++++ .config/zsh/.zshrc | 59 +++++++ 24 files changed, 895 insertions(+) create mode 100644 .config/btop/btop.conf create mode 100644 .config/dunst/dunstrc create mode 100644 .config/fontconfig/fonts.conf create mode 100644 .config/foot/foot.ini create mode 100644 .config/i3blocks/config create mode 100755 .config/lf/cleaner create mode 100644 .config/lf/icons create mode 100644 .config/lf/lfrc create mode 100755 .config/lf/scope create mode 100644 .config/newsboat/config create mode 100644 .config/nvim/init.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/plugins.lua create mode 100644 .config/nvim/lua/plugins/lsp-config.lua create mode 100644 .config/nvim/lua/plugins/lualine.lua create mode 100644 .config/nvim/lua/plugins/neo-tree.lua create mode 100644 .config/nvim/lua/plugins/nord.lua create mode 100644 .config/nvim/lua/plugins/telescope.lua create mode 100644 .config/nvim/lua/plugins/treesitter.lua create mode 100644 .config/nvim/lua/vim-options.lua create mode 100644 .config/shell/aliasrc create mode 100644 .config/shell/profile create mode 100644 .config/sway/config create mode 100644 .config/zsh/.zshrc (limited to '.config') diff --git a/.config/btop/btop.conf b/.config/btop/btop.conf new file mode 100644 index 0000000..1935df2 --- /dev/null +++ b/.config/btop/btop.conf @@ -0,0 +1 @@ +color_theme = "/usr/share/btop/themes/nord.theme" diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc new file mode 100644 index 0000000..00edf24 --- /dev/null +++ b/.config/dunst/dunstrc @@ -0,0 +1,28 @@ +[global] + monitor = 0 + follow = keyboard + width = 400 + height = 400 + offset = 0x19 + padding = 2 + horizontal_padding = 2 + transparency = 25 + font = monospace 14 + format = "%s\n%b" + +[urgency_low] + background = "#2e3440" + foreground = "#d8dee9" + timeout = 3 + +[urgency_normal] + background = "#2e3440" + foreground = "#d8dee9" + frame_color = "#5e81ac" + timeout = 5 + +[urgency_critical] + background = "#2e3440" + foreground = "#d8dee9" + frame_color = "#5e81ac" + timeout = 10 diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf new file mode 100644 index 0000000..3d1d626 --- /dev/null +++ b/.config/fontconfig/fonts.conf @@ -0,0 +1,39 @@ + + + + + serif + + SourceSerif + Noto Color Emoji + FontAwesome + SymbolsNerdFont + + + + sans-serif + + SourceSans + Noto Color Emoji + FontAwesome + SymbolsNerdFont + + + + sans + + SourceSans + Noto Color Emoji + FontAwesome + SymbolsNerdFont + + + + monospace + + SourceCodePro + FontAwesome + SymbolsNerdFont + + + diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini new file mode 100644 index 0000000..f76e697 --- /dev/null +++ b/.config/foot/foot.ini @@ -0,0 +1,262 @@ +# -*- conf -*- + +# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd) +# term=foot (or xterm-256color if built with -Dterminfo=disabled) +# login-shell=no + +# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode +# title=foot +# locked-title=no + +font=monospace:size=14 +# font-bold= +# font-italic= +# font-bold-italic= +font-size-adjustment=2 +# line-height= +# letter-spacing=0 +# horizontal-letter-offset=0 +# vertical-letter-offset=0 +# underline-offset= +# underline-thickness= +# strikeout-thickness= +# box-drawings-uses-font-glyphs=no +# dpi-aware=no + +# initial-window-size-pixels=700x500 # Or, +# initial-window-size-chars= +# initial-window-mode=windowed +pad=10x10 # optionally append 'center' +# resize-by-cells=yes +# resize-keep-grid=yes +# resize-delay-ms=100 + +# bold-text-in-bright=no +# word-delimiters=,│`|:"'()[]{}<> +# selection-target=primary +# workers= +# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux) +# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD) + +[environment] +# name=value + +[bell] +# urgent=no +# notify=no +# visual=no +# command= +# command-focused=no + +[desktop-notifications] +# command=notify-send --wait --app-name ${app-id} --icon ${app-id} --category ${category} --urgency ${urgency} --expire-time ${expire-time} --hint STRING:image-path:${icon} --hint BOOLEAN:suppress-sound:${muted} --hint STRING:sound-name:${sound-name} --replace-id ${replace-id} ${action-argument} --print-id -- ${title} ${body} +# command-action-argument=--action ${action-name}=${action-label} +# close="" +# inhibit-when-focused=yes + + +[scrollback] +# lines=1000 +# multiplier=3.0 +# indicator-position=relative +# indicator-format="" + +[url] +# launch=xdg-open ${url} +# label-letters=sadfjklewcmpgh +# osc8-underline=url-mode +# protocols=http, https, ftp, ftps, file, gemini, gopher +# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[] + +[cursor] +style=beam +color = 2e3440 d8dee9 +# blink=yes +# blink-rate=500 +# beam-thickness=1.5 +# underline-thickness= + +[mouse] +# hide-when-typing=no +# alternate-scroll-mode=yes + +[touch] +# long-press-delay=400 + +[colors] +foreground = d8dee9 +background = 2e3440 + +# selection-foreground = d8dee9 +# selection-background = 4c566a + +regular0 = 3b4252 +regular1 = bf616a +regular2 = a3be8c +regular3 = ebcb8b +regular4 = 81a1c1 +regular5 = b48ead +regular6 = 88c0d0 +regular7 = e5e9f0 + +bright0 = 4c566a +bright1 = bf616a +bright2 = a3be8c +bright3 = ebcb8b +bright4 = 81a1c1 +bright5 = b48ead +bright6 = 8fbcbb +bright7 = eceff4 + +dim0 = 373e4d +dim1 = 94545d +dim2 = 809575 +dim3 = b29e75 +dim4 = 68809a +dim5 = 8c738c +dim6 = 6d96a5 +dim7 = aeb3bb +## dimmed colors (see foot.ini(5) man page) +# dim0= +# ... +# dim7= + +## The remaining 256-color palette +# 16 = <256-color palette #16> +# ... +# 255 = <256-color palette #255> + +## Sixel colors +# sixel0 = 000000 +# sixel1 = 3333cc +# sixel2 = cc2121 +# sixel3 = 33cc33 +# sixel4 = cc33cc +# sixel5 = 33cccc +# sixel6 = cccc33 +# sixel7 = 878787 +# sixel8 = 424242 +# sixel9 = 545499 +# sixel10 = 994242 +# sixel11 = 549954 +# sixel12 = 995499 +# sixel13 = 549999 +# sixel14 = 999954 +# sixel15 = cccccc + +## Misc colors +# selection-foreground= +# selection-background= +# jump-labels= # black-on-yellow +# scrollback-indicator= # black-on-bright-blue +# search-box-no-match= # black-on-red +# search-box-match= # black-on-yellow +# urls= + +[csd] +# preferred=server +# size=26 +# font= +# color= +# hide-when-maximized=no +# double-click-to-maximize=yes +# border-width=0 +# border-color= +# button-width=26 +# button-color= +# button-minimize-color= +# button-maximize-color= +# button-close-color= + +[key-bindings] +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none +# clipboard-copy=Control+Shift+c XF86Copy +# clipboard-paste=Control+Shift+v XF86Paste +# primary-paste=Shift+Insert +# search-start=Control+Shift+r +# font-increase=Control+plus Control+equal Control+KP_Add +# font-decrease=Control+minus Control+KP_Subtract +# font-reset=Control+0 Control+KP_0 +# spawn-terminal=Control+Shift+n +# minimize=none +# maximize=none +# fullscreen=none +# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none +# pipe-selected=[xargs -r firefox] none +# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard +# show-urls-launch=Control+Shift+o +# show-urls-copy=none +# show-urls-persistent=none +# prompt-prev=Control+Shift+z +# prompt-next=Control+Shift+x +# unicode-input=Control+Shift+u +# noop=none + +[search-bindings] +# cancel=Control+g Control+c Escape +# commit=Return +# find-prev=Control+r +# find-next=Control+s +# cursor-left=Left Control+b +# cursor-left-word=Control+Left Mod1+b +# cursor-right=Right Control+f +# cursor-right-word=Control+Right Mod1+f +# cursor-home=Home Control+a +# cursor-end=End Control+e +# delete-prev=BackSpace +# delete-prev-word=Mod1+BackSpace Control+BackSpace +# delete-next=Delete +# delete-next-word=Mod1+d Control+Delete +# extend-char=Shift+Right +# extend-to-word-boundary=Control+w Control+Shift+Right +# extend-to-next-whitespace=Control+Shift+w +# extend-line-down=Shift+Down +# extend-backward-char=Shift+Left +# extend-backward-to-word-boundary=Control+Shift+Left +# extend-backward-to-next-whitespace=none +# extend-line-up=Shift+Up +# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste +# primary-paste=Shift+Insert +# unicode-input=none +# quit=none +# scrollback-up-page=Shift+Page_Up +# scrollback-up-half-page=none +# scrollback-up-line=none +# scrollback-down-page=Shift+Page_Down +# scrollback-down-half-page=none +# scrollback-down-line=none +# scrollback-home=none +# scrollback-end=none + +[url-bindings] +# cancel=Control+g Control+c Control+d Escape +# toggle-url-visible=t + +[text-bindings] +# \x03=Mod4+c # Map Super+c -> Ctrl+c + +[mouse-bindings] +# scrollback-up-mouse=BTN_WHEEL_BACK +# scrollback-down-mouse=BTN_WHEEL_FORWARD +# font-increase=Control+BTN_WHEEL_BACK +# font-decrease=Control+BTN_WHEEL_FORWARD +# selection-override-modifiers=Shift +# primary-paste=BTN_MIDDLE +# select-begin=BTN_LEFT +# select-begin-block=Control+BTN_LEFT +# select-extend=BTN_RIGHT +# select-extend-character-wise=Control+BTN_RIGHT +# select-word=BTN_LEFT-2 +# select-word-whitespace=Control+BTN_LEFT-2 +# select-quote = BTN_LEFT-3 +# select-row=BTN_LEFT-4 + +# vim: ft=dosini diff --git a/.config/i3blocks/config b/.config/i3blocks/config new file mode 100644 index 0000000..0ccbb8b --- /dev/null +++ b/.config/i3blocks/config @@ -0,0 +1,54 @@ +[packages] +command=sb-pacpackages +interval=once +signal=8 + +[news] +command=sb-news +interval=once +signal=6 + +[memory] +command=sb-memory +interval=10 +signal=14 + +[doppler] +command=sb-doppler +interval=once +signal=13 + +[weather] +command=sb-forecast +interval=3600 +signal=5 + +[mail] +command=sb-mailbox +interval=180 +signal=12 + +[nettraf] +command=sb-nettraf +interval=1 +signal=16 + +[microphone] +command=sb-microphone +interval=once +signal=23 + +[volume] +command=sb-volume +interval=once +signal=10 + +[clock] +command=sb-clock +interval=60 +signal=1 + +[internet] +command=sb-internet +interval=5 +signal=4 diff --git a/.config/lf/cleaner b/.config/lf/cleaner new file mode 100755 index 0000000..1227249 --- /dev/null +++ b/.config/lf/cleaner @@ -0,0 +1,4 @@ +#!/bin/sh +#rm ~/.cache/lf/* -f +exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file /dev/tty + diff --git a/.config/lf/icons b/.config/lf/icons new file mode 100644 index 0000000..aad068c --- /dev/null +++ b/.config/lf/icons @@ -0,0 +1,77 @@ +di 📁 +fi 📃 +tw 🤝 +ow 📂 +ln ⛓ +or ❌ +ex 🎯 +*.txt ✍ +*.mom ✍ +*.me ✍ +*.ms ✍ +*.avif 🖼 +*.png 🖼 +*.webp 🖼 +*.ico 🖼 +*.jpg 📸 +*.jpe 📸 +*.jpeg 📸 +*.gif 🖼 +*.svg 🗺 +*.tif 🖼 +*.tiff 🖼 +*.xcf 🖌 +*.html 🌎 +*.xml 📰 +*.gpg 🔒 +*.css 🎨 +*.pdf 📚 +*.djvu 📚 +*.epub 📚 +*.csv 📓 +*.xlsx 📓 +*.tex 📜 +*.md 📘 +*.r 📊 +*.R 📊 +*.rmd 📊 +*.Rmd 📊 +*.m 📊 +*.mp3 🎵 +*.opus 🎵 +*.ogg 🎵 +*.m4a 🎵 +*.flac 🎼 +*.wav 🎼 +*.mkv 🎥 +*.mp4 🎥 +*.webm 🎥 +*.mpeg 🎥 +*.avi 🎥 +*.mov 🎥 +*.mpg 🎥 +*.wmv 🎥 +*.m4b 🎥 +*.flv 🎥 +*.zip 📦 +*.rar 📦 +*.7z 📦 +*.tar 📦 +*.z64 🎮 +*.v64 🎮 +*.n64 🎮 +*.gba 🎮 +*.nes 🎮 +*.gdi 🎮 +*.1 ℹ +*.nfo ℹ +*.info ℹ +*.log 📙 +*.iso 📀 +*.img 📀 +*.bib 🎓 +*.ged 👪 +*.part 💔 +*.torrent 🔽 +*.jar ♨ +*.java ♨ diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..56ca258 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,25 @@ +set ifs "\n" +set icons +set sixel true +set cleaner ~/.config/lf/cleaner +set previewer ~/.config/lf/scope + +cmd open ${{ + case $(file --mime-type "$(readlink -f $f)" -b) in + text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;; + video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; + audio/*|video/x-ms-asf) mpv --audio-display=no $f ;; + *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;; + esac +}} + +cmd delete ${{ + clear; tput cup $(($(tput lines)/3)); tput bold + set -f + printf "%s\n\t" "$fx" + printf "delete?[y/N]" + read ans + [ $ans = "y" ] && rm -rf -- $fx +}} + +map D delete diff --git a/.config/lf/scope b/.config/lf/scope new file mode 100755 index 0000000..b79c4b6 --- /dev/null +++ b/.config/lf/scope @@ -0,0 +1,13 @@ +#!/bin/sh +case "$(file -Lb --mime-type -- "$1")" in + image/*) + chafa -f sixel -s "$2x$3" --animate off --polite on "$1" + exit 1 + ;; + text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;; + audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;; + video/*) + CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)" + [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0 + chafa -f sixel -s "$2x$3" --animate off --polite on "$CACHE" +esac diff --git a/.config/newsboat/config b/.config/newsboat/config new file mode 100644 index 0000000..3feffa5 --- /dev/null +++ b/.config/newsboat/config @@ -0,0 +1,57 @@ +#show-read-feeds no +auto-reload yes +notify-program notify-send +notify-always yes + +external-url-viewer "urlscan -dc -r 'linkhandler {}'" + +bind-key j down +bind-key k up +bind-key j next articlelist +bind-key k prev articlelist +bind-key J next-feed articlelist +bind-key K prev-feed articlelist +bind-key G end +bind-key g home +bind-key d pagedown +bind-key u pageup +bind-key l open +bind-key h quit +bind-key a toggle-article-read +bind-key n next-unread +bind-key N prev-unread +bind-key D pb-download +bind-key U show-urls +bind-key x pb-delete + +color listnormal cyan default +color listfocus black yellow standout bold +color listnormal_unread blue default +color listfocus_unread yellow default bold +color info red black bold +color article white default bold + +browser linkhandler +macro , open-in-browser +macro t set browser "qndl" ; open-in-browser ; set browser linkhandler +macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best --restrict-filenames" ; open-in-browser ; set browser linkhandler +macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler +macro w set browser "lynx" ; open-in-browser ; set browser linkhandler +macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler +macro c set browser "echo %u | xclip -r -sel c" ; open-in-browser ; set browser linkhandler +macro C set browser "youtube-viewer --comments=%u" ; open-in-browser ; set browser linkhandler +macro p set browser "peertubetorrent %u 480" ; open-in-browser ; set browser linkhandler +macro P set browser "peertubetorrent %u 1080" ; open-in-browser ; set browser linkhandler + +highlight all "---.*---" yellow +highlight feedlist ".*(0/0))" black +highlight article "(^Feed:.*|^Title:.*|^Author:.*)" cyan default bold +highlight article "(^Link:.*|^Date:.*)" default default +highlight article "https?://[^ ]+" green default +highlight article "^(Title):.*$" blue default +highlight article "\\[[0-9][0-9]*\\]" magenta default bold +highlight article "\\[image\\ [0-9]+\\]" green default bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" green default bold +highlight article ":.*\\(link\\)$" cyan default +highlight article ":.*\\(image\\)$" blue default +highlight article ":.*\\(embedded flash\\)$" magenta default diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..431b0af --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,20 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +local otps = {} + +require("vim-options") +require("lazy").setup("plugins") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..8eb77b0 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,14 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" }, + "nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-lspconfig": { "branch": "master", "commit": "59a6766cbf32c7e4cf3ed685ccad7ffe1dde8c40" }, + "nvim-treesitter": { "branch": "master", "commit": "1c111e3e8f42c85b16cb4bf30e4254fcb5607817" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" } +} diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/.config/nvim/lua/plugins.lua @@ -0,0 +1 @@ +return {} diff --git a/.config/nvim/lua/plugins/lsp-config.lua b/.config/nvim/lua/plugins/lsp-config.lua new file mode 100644 index 0000000..7178d3e --- /dev/null +++ b/.config/nvim/lua/plugins/lsp-config.lua @@ -0,0 +1,28 @@ +return { + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { "lua_ls", "clangd", "html", "cssls" } + }) + end + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities.textDocument.completion.completionItem.snippetSupport = true + lspconfig.lua_ls.setup({}) + lspconfig.clangd.setup({}) + lspconfig.html.setup({capabilities = capabilities,}) + lspconfig.cssls.setup({capabilities = capabilities,}) + end + } +} diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..6975bb8 --- /dev/null +++ b/.config/nvim/lua/plugins/lualine.lua @@ -0,0 +1,11 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup({ + options = { + theme = 'nord' + } + }) + end +} diff --git a/.config/nvim/lua/plugins/neo-tree.lua b/.config/nvim/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..65f280d --- /dev/null +++ b/.config/nvim/lua/plugins/neo-tree.lua @@ -0,0 +1,12 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) + end +} diff --git a/.config/nvim/lua/plugins/nord.lua b/.config/nvim/lua/plugins/nord.lua new file mode 100644 index 0000000..d586f1a --- /dev/null +++ b/.config/nvim/lua/plugins/nord.lua @@ -0,0 +1,8 @@ +return { + "shaunsingh/nord.nvim", + priority = 1000 , + config = function() + -- require("nord").setup({}) + vim.cmd.colorscheme "nord" + end +} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..c646155 --- /dev/null +++ b/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,9 @@ +return { + 'nvim-telescope/telescope.nvim', tag = '0.1.8', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set('n', '', builtin.find_files, {}) + vim.keymap.set('n', 'fg', builtin.live_grep, {}) + end +} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..0e5b9fe --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,11 @@ +return {"nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local config = require("nvim-treesitter.configs") + config.setup({ + ensure_installed = { "c", "lua", "html", "css" }, + highlight = { enable = true }, + indent = { enable = true }, + }) + end +} diff --git a/.config/nvim/lua/vim-options.lua b/.config/nvim/lua/vim-options.lua new file mode 100644 index 0000000..8068602 --- /dev/null +++ b/.config/nvim/lua/vim-options.lua @@ -0,0 +1,4 @@ +vim.cmd("set title") +vim.cmd("set clipboard+=unnamedplus") +vim.cmd("set relativenumber") +vim.g.mapleader = " " diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc new file mode 100644 index 0000000..b7da08e --- /dev/null +++ b/.config/shell/aliasrc @@ -0,0 +1,14 @@ +# Verbosity and settings that you pretty much just always are going to want. +alias \ + cp="cp -iv" \ + mv="mv -iv" \ + rm="rm -vI" + +# Colorize commands +alias \ + ls="ls -hN --color=auto" \ + grep="grep --color=auto" \ + ip="ip -color=auto" + +alias \ + v="nvim" diff --git a/.config/shell/profile b/.config/shell/profile new file mode 100644 index 0000000..6e19541 --- /dev/null +++ b/.config/shell/profile @@ -0,0 +1,22 @@ +export PATH="$PATH:$(find ~/.local/bin -type d | paste -sd ':' -)" +export ZDOTDIR="$HOME/.config/zsh" +export BROWSER="firefox" +export EDITOR="nvim" +export MANPAGER='nvim +Man!' +export TERMINAL="foot" +export TERMINAL_PROG="foot" + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_STATE_HOME="$HOME/.local/state" +export XDG_DOWNLOAD_DIR="$HOME/downloads" + +export GIT_CONFIG="$XDG_CONFIG_HOME/git/config" +export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass +export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc +export CARGO_HOME="$XDG_DATA_HOME"/cargo + +export BEMENU_OPTS='--fb "#2e3440" --ff "#d8dee9" --nb "#2e3440" --nf "#d8dee9" --tb "#2e3440" --hb "#2e3440" --tf "#bf616a" --hf "#ebcb8b" --af "d8dee9" --ab "#2e3440" --fn "monospace 14"' + +[ "$(tty)" = "/dev/tty1" ] && ! pidof -s sway >/dev/null 2>&1 && exec dbus-run-session sway --unsupported-gpu diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..5d3ce70 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,122 @@ +exec dbus-update-activation-environment --all + +set $mod Mod4 +set $term foot +set $browser firefox +set $menu bemenu-run + +font pango:monospace 10 + +# AUTOSTART +exec start-pipewire +exec reloadsingbox +exec dunst +exec foot --server + +# WORKSPACES +workspace 1 output DP-2 +workspace 2 output DP-3 + +output DP-3 mode 2560x1440@240Hz position 2560 0 +output DP-2 mode 2560x1440@165Hz position 0 0 +# output * bg /mnt/ssd/papes/thiemeyer_road_to_samarkand.jpg fill +exec_always swaybg -c 4C566A +# COLORS +client.focused #5e81ac #5e81ac #d8dee9 #5e81ac #5e81ac +client.focused_inactive #3b4252 #3b4252 #d8dee9 #3b4252 #3b4252 +client.unfocused #2e3440 #2e3440 #d8dee9 #2e3440 #2e3440 +client.urgent #bf616a #bf616a #d8dee9 #bf616a #bf616a +client.placeholder #000000 #0c0c0c #d8dee9 #000000 #0c0c0c +client.background #2e3440 + +# STYLE +gaps inner 10 +default_border pixel 3 +default_floating_border pixel 3 +for_window [class=.*] border pixel 3 + +floating_modifier $mod normal +# floating window assigments +for_window [window_role = "pop-up"] floating enable +for_window [window_role = "bubble"] floating enable +for_window [window_role = "dialog"] floating enable +for_window [window_type = "dialog"] floating enable +for_window [window_role = "task_dialog"] floating enable +for_window [window_type = "menu"] floating enable +for_window [app_id = "floating"] floating enable +for_window [app_id = "floating_update"] floating enable, resize set width 1000px height 600px +for_window [class = "(?i)pinentry"] floating enable +for_window [title = "Administrator privileges required"] floating enable +for_window [title = "About Mozilla Firefox"] floating enable +for_window [window_role = "About"] floating enable +for_window [app_id="firefox" title="Library"] floating enable, border pixel 1, sticky enable + +# BINDS +bindsym $mod+h focus left +bindsym $mod+k focus down +bindsym $mod+j focus up +bindsym $mod+l focus right +bindsym $mod+f fullscreen +bindsym $mod+s layout toggle split +bindsym $mod+Shift+space floating toggle +bindsym $mod+Return exec $term +bindsym $mod+w exec $browser +bindsym $mod+d exec $menu +bindsym $mod+Shift+d exec tessen +bindsym $mod+grave exec bookmarks +bindsym $mod+m exec $term -e spotify_player +bindsym $mod+e exec 'sh -c "$term -e neomutt; pkill -RTMIN+12 i3blocks"' +bindsym $mod+Shift+n exec 'sh -c "$term -e newsboat; pkill -RTMIN+6 i3blocks"' +bindsym $mod+Shift+s exec sh -c slurp | grim -t jpeg -g - - | wl-copy +bindsym $mod+Shift+r exec $term -e btop + +# 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 +bindsym $mod+0 workspace number 10 +# 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 +bindsym $mod+Shift+0 move container to workspace number 10 + +bindsym $mod+q kill + +bindsym $mod+Shift+e reload +bindsym $mod+Shift+q exec sysact + +# INPUT +input * { + xkb_layout "us,ru" + xkb_options "grp:win_space_toggle" + accel_profile flat +} + +# BAR +bar { + position top + # swaybar_command waybar + status_command i3blocks + + separator_symbol " | " + colors + { + background #2e3440 + active_workspace #2e3440 #2e3440 #d8dee9 + focused_workspace #2e3440 #2e3440 #d8dee9 + inactive_workspace #2e3440 #2e3440 #3b4252 + } +} diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc new file mode 100644 index 0000000..a98b25a --- /dev/null +++ b/.config/zsh/.zshrc @@ -0,0 +1,59 @@ +# Enable colors and change prompt: + +autoload -U colors && colors # Load colors +autoload -Uz vcs_info +precmd_vcs_info() { vcs_info } +precmd_functions+=( precmd_vcs_info ) +# neovim beam cursor fix +function precmd { print -Pn "\e[ q" } +zstyle ':vcs_info:git:*' formats "[%b]%{$fg[yellow]%}%u" +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' unstagedstr '*' +setopt PROMPT_SUBST +PROMPT='%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$fg[red]%}${vcs_info_msg_0_}%{$reset_color%}$%b ' +setopt autocd # Automatically cd into typed directory. +stty stop undef # Disable ctrl-s to freeze terminal. +setopt interactive_comments + +HISTSIZE=10000000 +SAVEHIST=10000000 +HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history" +setopt append_history +setopt inc_append_history +setopt share_history +setopt hist_ignore_dups +setopt hist_ignore_all_dups +setopt hist_expire_dups_first +setopt hist_find_no_dups +setopt hist_save_no_dups +setopt hist_reduce_blanks +setopt hist_verify +[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" + +autoload -U compinit; compinit +zstyle ':completion:*' menu select +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +source "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" + +lfcd () { + tmp="$(mktemp -uq)" + trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' '^ulfcd\n' + +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi + +export PASSWORD_STORE_CLIP_TIME=5 +# Load syntax highlighting; should be last. +source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null -- cgit v1.2.3