diff --git a/.config/colorschemes/jellybeans.json b/.config/colorschemes/jellybeans.json new file mode 100644 index 0000000..2342820 --- /dev/null +++ b/.config/colorschemes/jellybeans.json @@ -0,0 +1,25 @@ +{ + "special": { + "background":"#121212", + "foreground":"#adadad", + "cursor":"#d7d7d7" + }, + "colors": { + "color0":"#1c1c1c", + "color1":"#d75f5f", + "color2":"#72a15a", + "color3":"#d8ad4c", + "color4":"#597bc5", + "color5":"#8787af", + "color6":"#4a8382", + "color7":"#adadad", + "color8":"#3b3b3b", + "color9":"#ffb964", + "color10":"#99ad6a", + "color11":"#fad07a", + "color12":"#8197bf", + "color13":"#d7afff", + "color14":"#8fbfdc", + "color15":"#e8e8de" + } +} diff --git a/.config/colorschemes/vscode.json b/.config/colorschemes/vscode.json new file mode 100644 index 0000000..2145a7a --- /dev/null +++ b/.config/colorschemes/vscode.json @@ -0,0 +1,25 @@ +{ + "special": { + "background":"#1e1e1e", + "foreground":"#d4d4d4", + "cursor":"#d4d4d4" + }, + "colors": { + "color0":"#1e1e1e", + "color1":"#f44747", + "color2":"#608b4e", + "color3":"#dcdcaa", + "color4":"#569cd6", + "color5":"#c678dd", + "color6":"#56b6c2", + "color7":"#d4d4d4", + "color8":"#808080", + "color9":"#f44747", + "color10":"#608b4e", + "color11":"#dcdcaa", + "color12":"#569cd6", + "color13":"#c678dd", + "color14":"#56b6c2", + "color15":"#d4d4d4" + } +} diff --git a/.config/conky/conky.conf b/.config/conky/conky.conf new file mode 100644 index 0000000..05af5fd --- /dev/null +++ b/.config/conky/conky.conf @@ -0,0 +1,89 @@ +conky.config = { + -- Положение + alignment = 'top_right', + + -- Не мерцает + double_buffer = true, + + -- Отступы + gap_x = 10, + gap_y = 40, + + -- Шрифт + font = 'Code New Roman Nerd Font:size=10', + + -- Виджет + own_window = true, + own_window_class = 'Conky', + own_window_type = 'desktop', + + -- Прозрачность + own_window_transparent = true, + own_window_argb_visual = true, + + -- own_window_transparent = false, + -- own_window_colour = '171717', + -- own_window_argb_value = 180, + + -- Скорость обновления + update_interval = 1, + + + cpu_avg_samples = 2, + draw_borders = false, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + extra_newline = false, + minimum_height = 5, + minimum_width = 5, + net_avg_samples = 2, + no_buffers = true, + out_to_console = false, + out_to_ncurses = false, + out_to_stderr = false, + out_to_x = true, + show_graph_range = false, + show_graph_scale = false, + stippled_borders = 0, + update_interval = 1.0, + uppercase = false, + use_spacer = 'none', + use_xft = true, + + color0='fbf1c7', + color1='b8bb26', +} + +conky.text = [[ +${color1}${goto 25}Date/Time${color0} $hr $color +${color0}Day: ${time %A}${goto 160}Date: ${time %d.%m.%y}$color +${color0}Time: ${time %H:%M:%S}${goto 160}Uptime: ${uptime_short}$color + +${color1}${goto 25}Battery${color0} $hr $color +${color0}Battery \#1: $alignr \ +${execi 60 cat /sys/class/power_supply/BAT0/status} \ +${execibar 60 5,50 cat /sys/class/power_supply/BAT0/capacity} \ +${execi 60 cat /sys/class/power_supply/BAT0/capacity}%$color +${color0}Battery \#2: $alignr \ +${execi 60 cat /sys/class/power_supply/BAT1/status} \ +${execibar 60 5,50 cat /sys/class/power_supply/BAT1/capacity} \ +${execi 60 cat /sys/class/power_supply/BAT1/capacity}%$color + +${color1}󰡰${goto 25}Network${color0} $hr $color +${color0}Hostname: $alignr${exec cat /etc/hostname}$color +${color0}Connection: $alignr\ +${if_match "${exec nmcli -f name c s --active | awk 'FNR == 2' | xargs}" == "Wired connection 1"}Wired${else}${exec nmcli -f name c s --active | awk 'FNR == 2' | xargs}${endif}\ +$color +${color0}Network speed: $alignr${upspeed}/${downspeed}$color + +${color1}${goto 25}CPU${color0} $hr $color +${color0}Frequency (GHz): $alignr$freq_g$color +${color0}CPU: $alignr$cpu% ${cpugraph 15,180} +${color0}RAM: $mem/$memmax${goto 160}SWAP: $swap/$swapmax$color +${color0}$memperc%${goto 32}${memgraph 15,105}${goto 160}$swapperc% ${swapbar 5,85}$color +${color0}Active processes: $running_processes ($processes)$color + +${color1}${goto 25}Storage${color0} $hr $color + / $alignc${fs_used /}/${fs_size /}$alignr${fs_bar 5,120 /} +]] diff --git a/.config/conky/icon.conf b/.config/conky/icon.conf new file mode 100644 index 0000000..0f46bb3 --- /dev/null +++ b/.config/conky/icon.conf @@ -0,0 +1,60 @@ +conky.config = { + -- Положение + alignment = 'middle_middle', + + -- Не мерцает + double_buffer = true, + + -- Отступы + gap_x = 0, + gap_y = 0, + + -- Шрифт + font = 'Code New Roman Nerd Font:size=10', + + -- Виджет + own_window = true, + own_window_class = 'Conky', + own_window_type = 'desktop', + + -- Прозрачность + own_window_transparent = true, + own_window_argb_visual = true, + + -- own_window_transparent = false, + -- own_window_colour = '171717', + -- own_window_argb_value = 180, + + -- Скорость обновления + update_interval = 1, + + + cpu_avg_samples = 2, + draw_borders = false, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + extra_newline = false, + minimum_height = 5, + minimum_width = 5, + net_avg_samples = 2, + no_buffers = true, + out_to_console = false, + out_to_ncurses = false, + out_to_stderr = false, + out_to_x = true, + show_graph_range = false, + show_graph_scale = false, + stippled_borders = 0, + update_interval = 1.0, + uppercase = false, + use_spacer = 'none', + use_xft = true, + + color0='fbf1c7', + color1='b8bb26', +} + +conky.text = [[ +${exec ~/.scripts/artix} +]] diff --git a/.config/conky/weather.conf b/.config/conky/weather.conf new file mode 100644 index 0000000..4ed4599 --- /dev/null +++ b/.config/conky/weather.conf @@ -0,0 +1,60 @@ +conky.config = { + -- Положение + alignment = 'top_left', + + -- Не мерцает + double_buffer = true, + + -- Отступы + gap_x = 10, + gap_y = 40, + + -- Шрифт + font = 'Code New Roman Nerd Font:size=10', + + -- Виджет + own_window = true, + own_window_class = 'Conky', + own_window_type = 'desktop', + + -- Прозрачность + own_window_transparent = true, + own_window_argb_visual = true, + + -- own_window_transparent = false, + -- own_window_colour = '171717', + -- own_window_argb_value = 180, + + -- Скорость обновления + update_interval = 1, + + + cpu_avg_samples = 2, + draw_borders = false, + draw_graph_borders = true, + draw_outline = false, + draw_shades = false, + extra_newline = false, + minimum_height = 5, + minimum_width = 5, + net_avg_samples = 2, + no_buffers = true, + out_to_console = false, + out_to_ncurses = false, + out_to_stderr = false, + out_to_x = true, + show_graph_range = false, + show_graph_scale = false, + stippled_borders = 0, + update_interval = 1.0, + uppercase = false, + use_spacer = 'none', + use_xft = true, + + color0='fbf1c7', + color1='b8bb26', +} + +conky.text = [[ +${texeci 3600 curl -s wttr.in/Samara?Mm | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'} +]] diff --git a/.config/mpd/database b/.config/mpd/database new file mode 100644 index 0000000..609abcc Binary files /dev/null and b/.config/mpd/database differ diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf new file mode 100644 index 0000000..ed00d96 --- /dev/null +++ b/.config/mpd/mpd.conf @@ -0,0 +1,25 @@ +# Recommended location for database +db_file "~/.config/mpd/database" + +# If running mpd using systemd, delete this line to log directly to systemd. +log_file "syslog" + +# The music directory is by default the XDG directory, uncomment to amend and choose a different directory +music_directory "~/Music" +music_directory "~/Data/Music" +music_directory "~/Sync/Music" +music_directory "~/Mount/Sync/Music" + +# Uncomment to refresh the database whenever files in the music_directory are changed +#auto_update "yes" + +# Uncomment to enable the functionalities +playlist_directory "~/.config/mpd/playlists" +pid_file "~/.config/mpd/pid" +state_file "~/.local/state/mpd/state" +sticker_file "~/.config/mpd/sticker.sql" + +audio_output { + type "pulse" + name "pulse audio" +} diff --git a/.config/mpd/pid b/.config/mpd/pid new file mode 100644 index 0000000..bba0bc8 --- /dev/null +++ b/.config/mpd/pid @@ -0,0 +1 @@ +1073 diff --git a/.config/mpd/sticker.sql b/.config/mpd/sticker.sql new file mode 100644 index 0000000..5061d76 Binary files /dev/null and b/.config/mpd/sticker.sql differ diff --git a/.config/nvim/lua/plugins/autocomplete.lua b/.config/nvim/lua/plugins/autocomplete.lua new file mode 100644 index 0000000..8f56695 --- /dev/null +++ b/.config/nvim/lua/plugins/autocomplete.lua @@ -0,0 +1,71 @@ +return { + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + }, + config = function() + local luasnip = require("luasnip") + local cmp = require("cmp") + + require("luasnip.loaders.from_vscode").lazy_load() + + 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 + + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then cmp.select_next_item() + 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" }), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + }, { + { name = 'buffer' }, + }) + }) + cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources( + {{ name = 'git' }}, + {{ name = 'buffer' }} + ) + }) + cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = {{ name = 'buffer' }} + }) + cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources( + {{ name = 'path' }}, + {{ name = 'cmdline' }} + ) + }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua index eb5c2e1..55248e4 100644 --- a/.config/nvim/lua/plugins/git.lua +++ b/.config/nvim/lua/plugins/git.lua @@ -18,26 +18,25 @@ return { vim.schedule(function() gs.next_hunk() end) return '' end, {expr=true}) - map('n', '[c', function() if vim.wo.diff then return '[c' end vim.schedule(function() gs.prev_hunk() end) return '' end, {expr=true}) - -- map('n', 'gs', gs.stage_hunk) - -- map('n', 'gr', gs.reset_hunk) - -- map('v', 'hs', function() gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) - -- map('v', 'hr', function() gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end) - -- map('n', 'gS', gs.stage_buffer) - -- map('n', 'gu', gs.undo_stage_hunk) - -- map('n', 'hR', gs.reset_buffer) - -- map('n', 'gp', gs.preview_hunk) - -- map('n', 'gb', function() gs.blame_line{full=true} end) - -- map('n', 'tb', gs.toggle_current_line_blame) - -- map('n', 'gd', gs.diffthis) - -- map('n', 'gD', function() gs.diffthis('~') end) - -- map('n', 'gtd', gs.toggle_deleted) + map('n', 'gs', gs.stage_hunk) + map('n', 'gr', gs.reset_hunk) + map('v', 'gs', function() gs.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) + map('v', 'gr', function() gs.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end) + map('n', 'gS', gs.stage_buffer) + map('n', 'gu', gs.undo_stage_hunk) + map('n', 'gR', gs.reset_buffer) + map('n', 'gp', gs.preview_hunk) + map('n', 'gb', function() gs.blame_line{full=true} end) + map('n', 'gtb', gs.toggle_current_line_blame) + map('n', 'gd', gs.diffthis) + map('n', 'gD', function() gs.diffthis('~') end) + map('n', 'gtd', gs.toggle_deleted) end } } diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 4daac37..a65b8bd 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -43,89 +43,11 @@ return { }) end }, - { - "j-hui/fidget.nvim", - opts = {} - }, - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - }, - config = function() - local luasnip = require("luasnip") - local cmp = require("cmp") - - require("luasnip.loaders.from_vscode").lazy_load() - - cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = { - [""] = cmp.mapping(function(fallback) - if cmp.visible() then cmp.select_next_item() - 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" }), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), - }, - -- 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 }), - -- }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - }, { - { name = 'buffer' }, - }) - }) - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources( - {{ name = 'git' }}, - {{ name = 'buffer' }} - ) - }) - cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = {{ name = 'buffer' }} - }) - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources( - {{ name = 'path' }}, - {{ name = 'cmdline' }} - ) - }) - end, - }, { "neovim/nvim-lspconfig", event = { "BufReadPre", "BufNewFile" }, dependencies = { "williamboman/mason-lspconfig.nvim", - -- "ms-jpq/coq_nvim", - -- "ms-jpq/coq.artifacts", - -- "ms-jpq/coq.thirdparty" "hrsh7th/cmp-nvim-lsp", }, keys = { @@ -188,4 +110,8 @@ return { ) end, }, + { + "j-hui/fidget.nvim", + opts = {} + }, } diff --git a/.scripts/artix b/.scripts/artix new file mode 100755 index 0000000..887c46a --- /dev/null +++ b/.scripts/artix @@ -0,0 +1,16 @@ +#!/bin/sh +c0="${reset}${blue}" # first color + +## OUTPUT + +cat < /dev/null | cut -d ' ' -f 2)" + [ -n "${wm}" ] && echo "${wm}" && return + done +} + +rcwm="$(parse_rcs "${HOME}/.xinitrc" "${HOME}/.xsession")" + +ui='unknown' +uitype='UI' +if [ -n "${DE}" ]; then + ui="${DE}" + uitype='DE' +elif [ -n "${WM}" ]; then + ui="${WM}" + uitype='WM' +elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then + ui="${XDG_CURRENT_DESKTOP}" + uitype='DE' +elif [ -n "${DESKTOP_SESSION}" ]; then + ui="${DESKTOP_SESSION}" + uitype='DE' +elif [ -n "${rcwm}" ]; then + ui="${rcwm}" + uitype='WM' +elif [ -n "${XDG_SESSION_TYPE}" ]; then + ui="${XDG_SESSION_TYPE}" +fi + +ui="$(basename "${ui}")" + +## DEFINE COLORS + +# probably don't change these +if [ -x "$(command -v tput)" ]; then + bold="$(tput bold 2> /dev/null)" + black="$(tput setaf 0 2> /dev/null)" + red="$(tput setaf 1 2> /dev/null)" + green="$(tput setaf 2 2> /dev/null)" + yellow="$(tput setaf 3 2> /dev/null)" + blue="$(tput setaf 4 2> /dev/null)" + magenta="$(tput setaf 5 2> /dev/null)" + cyan="$(tput setaf 6 2> /dev/null)" + white="$(tput setaf 7 2> /dev/null)" + reset="$(tput sgr0 2> /dev/null)" +fi + +# you can change these +lc="${reset}${bold}${blue}" # labels +nc="${reset}${bold}${blue}" # user and hostname +ic="${reset}" # info +c0="${reset}${blue}" # first color + +## OUTPUT + +cat <