commit 7ec9d79e8efd559c0f774b300d651323b1687b9b Author: desktop Date: Tue Aug 8 16:24:15 2023 +0300 remove history to make repo public. diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..55136b9 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,8 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs diff --git a/.bashrc b/.bashrc new file mode 120000 index 0000000..2be76c7 --- /dev/null +++ b/.bashrc @@ -0,0 +1 @@ +document/linux/config/bash/bashrc.sh \ No newline at end of file diff --git a/.config/gtk-3.0/bookmarks b/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..503bb90 --- /dev/null +++ b/.config/gtk-3.0/bookmarks @@ -0,0 +1,4 @@ +file:///var/home/voronind/tmp +file:///var/mnt +ftp://192.168.1.2/ home ftp +sftp://192.168.1.2:22143/ home sftp diff --git a/.config/gtk-3.0/gtk.css b/.config/gtk-3.0/gtk.css new file mode 100644 index 0000000..11d020f --- /dev/null +++ b/.config/gtk-3.0/gtk.css @@ -0,0 +1,2 @@ +@define-color accent_color #f9f06b; +@define-color accent_bg_color #f5c211; \ No newline at end of file diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini new file mode 100644 index 0000000..7c6461a --- /dev/null +++ b/.config/gtk-3.0/settings.ini @@ -0,0 +1,2 @@ +[Settings] +gtk-application-prefer-dark-theme=0 diff --git a/.config/gtk-4.0/gtk.css b/.config/gtk-4.0/gtk.css new file mode 100644 index 0000000..11d020f --- /dev/null +++ b/.config/gtk-4.0/gtk.css @@ -0,0 +1,2 @@ +@define-color accent_color #f9f06b; +@define-color accent_bg_color #f5c211; \ No newline at end of file diff --git a/.config/gtk-4.0/servers b/.config/gtk-4.0/servers new file mode 100644 index 0000000..06882ce --- /dev/null +++ b/.config/gtk-4.0/servers @@ -0,0 +1,6 @@ + + + \ No newline at end of file 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/htop/htoprc b/.config/htop/htoprc new file mode 100644 index 0000000..aa1891b --- /dev/null +++ b/.config/htop/htoprc @@ -0,0 +1,63 @@ +# Beware! This file is rewritten by htop when settings are changed in the interface. +# The parser is also very primitive, and not human-friendly. +htop_version=3.2.2 +config_reader_min_version=3 +fields=0 48 17 18 38 39 40 2 46 47 49 1 +hide_kernel_threads=1 +hide_userland_threads=1 +hide_running_in_container=0 +shadow_other_users=0 +show_thread_names=0 +show_program_path=1 +highlight_base_name=0 +highlight_deleted_exe=1 +shadow_distribution_path_prefix=0 +highlight_megabytes=1 +highlight_threads=1 +highlight_changes=0 +highlight_changes_delay_secs=5 +find_comm_in_cmdline=1 +strip_exe_from_cmdline=1 +show_merged_command=0 +header_margin=1 +screen_tabs=0 +detailed_cpu_time=0 +cpu_count_from_one=0 +show_cpu_usage=1 +show_cpu_frequency=1 +show_cpu_temperature=1 +degree_fahrenheit=0 +update_process_names=0 +account_guest_in_cpu_meter=0 +color_scheme=0 +enable_mouse=1 +delay=15 +hide_function_bar=0 +header_layout=two_50_50 +column_meters_0=LeftCPUs2 Memory Swap +column_meter_modes_0=1 1 1 +column_meters_1=RightCPUs2 DateTime Tasks LoadAverage DiskIO NetworkIO Uptime +column_meter_modes_1=1 2 2 2 2 2 2 +tree_view=0 +sort_key=46 +tree_sort_key=0 +sort_direction=-1 +tree_sort_direction=1 +tree_view_always_by_pid=0 +all_branches_collapsed=0 +screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command +.sort_key=PERCENT_CPU +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 +screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE +.sort_key=IO_RATE +.tree_sort_key=PID +.tree_view=0 +.tree_view_always_by_pid=0 +.sort_direction=-1 +.tree_sort_direction=1 +.all_branches_collapsed=0 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..248876a --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,24 @@ +require('plugin/init') + +require('config/search') +require('config/tab') +require('config/etc') + +require('key/leader') +require('key/filetree') +require('key/lsp') +require('key/whichkey') +require('key/navigation') +require('key/comment') +require('key/gitsigns') +require('key/trouble') +require('key/terminal') +require('key/autocomplete') +require('key/window') +require('key/telescope') +require('key/common') +require('key/todo') +require('key/align') +require('key/fold') +require('key/update') +require('key/macro') diff --git a/.config/nvim/lua/config/etc.lua b/.config/nvim/lua/config/etc.lua new file mode 100644 index 0000000..a6d6d60 --- /dev/null +++ b/.config/nvim/lua/config/etc.lua @@ -0,0 +1,14 @@ +-- TODO: add comments and separate files. +vim.opt.number = true +vim.opt.wildmode = 'longest,list' +-- vim.opt.completeopt = 'menuone,noselect' +vim.opt.cursorline = true +vim.opt.ttyfast = true +vim.opt.splitright = true +vim.opt.splitbelow = true +vim.opt.clipboard = 'unnamedplus' +vim.opt.fixeol = false +vim.opt.termguicolors = true + +vim.cmd("autocmd BufEnter * set fo-=c fo-=r fo-=o") +vim.cmd("set mouse=") -- disable mouse. diff --git a/.config/nvim/lua/config/search.lua b/.config/nvim/lua/config/search.lua new file mode 100644 index 0000000..c44b89e --- /dev/null +++ b/.config/nvim/lua/config/search.lua @@ -0,0 +1,5 @@ +vim.opt.ignorecase = false +vim.opt.smartcase = false +vim.opt.showmatch = true +vim.opt.hlsearch = true +vim.opt.incsearch = true diff --git a/.config/nvim/lua/config/tab.lua b/.config/nvim/lua/config/tab.lua new file mode 100644 index 0000000..cfecfc4 --- /dev/null +++ b/.config/nvim/lua/config/tab.lua @@ -0,0 +1,6 @@ +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +-- vim.opt.smartindent = true +vim.opt.expandtab = true +vim.opt.autoindent = true diff --git a/.config/nvim/lua/key/align.lua b/.config/nvim/lua/key/align.lua new file mode 100644 index 0000000..96f1ab8 --- /dev/null +++ b/.config/nvim/lua/key/align.lua @@ -0,0 +1,4 @@ +require('key/rekey') + +rekey_visual('A', 'lua require("align").align_to_string(false, false, true)') +rekey_visual('a', 'lua require("align").align_to_string(false, true, true)') diff --git a/.config/nvim/lua/key/autocomplete.lua b/.config/nvim/lua/key/autocomplete.lua new file mode 100644 index 0000000..4e60b2b --- /dev/null +++ b/.config/nvim/lua/key/autocomplete.lua @@ -0,0 +1,4 @@ +require('key/rekey') + +rekey_input('', '') +rekey_normal('', 'lua vim.lsp.buf.code_action()') diff --git a/.config/nvim/lua/key/comment.lua b/.config/nvim/lua/key/comment.lua new file mode 100644 index 0000000..ef0d49b --- /dev/null +++ b/.config/nvim/lua/key/comment.lua @@ -0,0 +1,2 @@ +vim.keymap.set("n", "/", require("SingleComment").SingleComment, { expr = true }) +vim.keymap.set("v", "/", require("SingleComment").Comment, {}) diff --git a/.config/nvim/lua/key/common.lua b/.config/nvim/lua/key/common.lua new file mode 100644 index 0000000..b314fba --- /dev/null +++ b/.config/nvim/lua/key/common.lua @@ -0,0 +1,10 @@ +require('key/rekey') + +rekey_normal('.', '@:') -- repeat command. +rekey_normal(';', ':') -- remap ; to :. +rekey_normal('zz', 'wa') -- save file. +rekey_normal('gh', '0') -- go left. +rekey_normal('gl', '$') -- go right. +rekey_normal('gj', 'G') -- go bottom. +rekey_normal('gk', 'gg') -- go top. +rekey_normal('U', '') -- redo. diff --git a/.config/nvim/lua/key/filetree.lua b/.config/nvim/lua/key/filetree.lua new file mode 100644 index 0000000..39996c6 --- /dev/null +++ b/.config/nvim/lua/key/filetree.lua @@ -0,0 +1,3 @@ +require('key/rekey') + +rekey_normal('1', 'NvimTreeToggle') diff --git a/.config/nvim/lua/key/fold.lua b/.config/nvim/lua/key/fold.lua new file mode 100644 index 0000000..9df6d91 --- /dev/null +++ b/.config/nvim/lua/key/fold.lua @@ -0,0 +1,4 @@ +require('key/rekey') + +remap_normal('o', 'za') +remap_normal('O', 'zx zM') diff --git a/.config/nvim/lua/key/gitsigns.lua b/.config/nvim/lua/key/gitsigns.lua new file mode 100644 index 0000000..0514f81 --- /dev/null +++ b/.config/nvim/lua/key/gitsigns.lua @@ -0,0 +1,3 @@ +require('key/rekey') + +rekey_normal('g', 'Gitsigns toggle_current_line_blameGitsigns toggle_word_diffGitsigns toggle_linehl') diff --git a/.config/nvim/lua/key/leader.lua b/.config/nvim/lua/key/leader.lua new file mode 100644 index 0000000..5acb1a6 --- /dev/null +++ b/.config/nvim/lua/key/leader.lua @@ -0,0 +1,4 @@ +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' +-- vim.api.nvim_set_keymap('', '', '', { noremap = true, silent = true }) +vim.cmd("set notimeout nottimeout") diff --git a/.config/nvim/lua/key/lsp.lua b/.config/nvim/lua/key/lsp.lua new file mode 100644 index 0000000..f930e21 --- /dev/null +++ b/.config/nvim/lua/key/lsp.lua @@ -0,0 +1 @@ +require('key/rekey') diff --git a/.config/nvim/lua/key/macro.lua b/.config/nvim/lua/key/macro.lua new file mode 100644 index 0000000..662d186 --- /dev/null +++ b/.config/nvim/lua/key/macro.lua @@ -0,0 +1,33 @@ +require("key/rekey") + +-- wraps. +rekey_visual('mw"', 's""P') +rekey_visual('mw3"', 's""""""hhP') +rekey_visual('mw\'', 's\'\'P') +rekey_visual('mw(', 's()P') +rekey_visual('mw{', 's{}P') +rekey_visual('mw[', 's[]P') +rekey_visual('mw`', 's``P') +rekey_visual('mw*', 's**P') +rekey_visual('mw2*', 's****hP') +rekey_visual('mw3*', 's******hhP') + +-- markdown. +rekey_visual('mmx', ':s/- \\[ \\]/- \\[x\\]/') +rekey_visual('mm ', ':s/- \\[x\\]/- \\[ \\]/') +rekey_normal('mmx', ':s/- \\[ \\]/- \\[x\\]/') +rekey_normal('mm ', ':s/- \\[x\\]/- \\[ \\]/') + +rekey_visual('mmb', 's****hP') +rekey_visual('mmi', 's**P') +rekey_visual('mms', 's~~~~hP') +-- rekey_visual('mm>', ':s/^') +-- rekey_visual('mm<', '') +-- rekey_normal('mm>', '') +-- rekey_normal('mm<', '') + +-- increment. +rekey_normal('mi', 'yyupj') + +-- select. +rekey_normal('ma', 'ggVG') diff --git a/.config/nvim/lua/key/navigation.lua b/.config/nvim/lua/key/navigation.lua new file mode 100644 index 0000000..7c841b0 --- /dev/null +++ b/.config/nvim/lua/key/navigation.lua @@ -0,0 +1,35 @@ +require('key/rekey') + +-- switch windows. +rekey_normal('w', 'k') +rekey_normal('a', 'h') +rekey_normal('s', 'j') +rekey_normal('d', 'l') + +-- switch buffers. +-- rekey_normal('', 'bnext') +rekey_normal('e', 'BufferLineCycleNext') +rekey_normal('q', 'BufferLineCyclePrev') +rekey_normal('E', 'BufferLineMoveNext') +rekey_normal('Q', 'BufferLineMovePrev') + +-- close buffer. +-- rekey_normal('x', 'bd!') +rekey_normal('x', 'bpspbnbd') + +-- move window. +rekey_normal('m', 'WinShift') + +-- splits. +rekey_normal('|', 'vsplit') +rekey_normal('-', 'split') +rekey_normal('c', 'q') + +-- close all hidden buffers. +rekey_normal('X', 'BDelete hidden') + +-- navigate hjkl in insert mode. +rekey_input('', '') +rekey_input('', '') +rekey_input('', '') +rekey_input('', '') diff --git a/.config/nvim/lua/key/rekey.lua b/.config/nvim/lua/key/rekey.lua new file mode 100644 index 0000000..b699cc9 --- /dev/null +++ b/.config/nvim/lua/key/rekey.lua @@ -0,0 +1,39 @@ +local function rekey(t, key, command) + vim.api.nvim_set_keymap(t, key, command, { noremap = true }) +end + +local function remap(t, key, command) + vim.api.nvim_set_keymap(t, key, command, { noremap = false }) +end + +function rekey_normal(key, command) + rekey('n', key, command) +end + +function rekey_input(key, command) + rekey('i', key, command) +end + +function rekey_visual(key, command) + rekey('v', key, command) +end + +function rekey_terminal(key, command) + rekey('t', key, command) +end + +function remap_normal(key, command) + remap('n', key, command) +end + +function remap_input(key, command) + remap('i', key, command) +end + +function remap_visual(key, command) + remap('v', key, command) +end + +function remap_terminal(key, command) + remap('t', key, command) +end diff --git a/.config/nvim/lua/key/telescope.lua b/.config/nvim/lua/key/telescope.lua new file mode 100644 index 0000000..efd90ff --- /dev/null +++ b/.config/nvim/lua/key/telescope.lua @@ -0,0 +1,8 @@ +require('key/rekey') + +rekey_normal('ff', 'lua require("telescope.builtin").find_files()') +rekey_normal('fg', 'lua require("telescope.builtin").live_grep()') +rekey_normal('fb', 'lua require("telescope.builtin").buffers()') +rekey_normal('fh', 'lua require("telescope.builtin").help_tags()') +rekey_normal('ft', 'Telescope treesitter') +rekey_normal('fa', 'Telescope') diff --git a/.config/nvim/lua/key/terminal.lua b/.config/nvim/lua/key/terminal.lua new file mode 100644 index 0000000..439fea6 --- /dev/null +++ b/.config/nvim/lua/key/terminal.lua @@ -0,0 +1,4 @@ +require('key/rekey') + +rekey_normal('4', 'terminal') +rekey_terminal('', '') diff --git a/.config/nvim/lua/key/todo.lua b/.config/nvim/lua/key/todo.lua new file mode 100644 index 0000000..01fa487 --- /dev/null +++ b/.config/nvim/lua/key/todo.lua @@ -0,0 +1,3 @@ +require('key/rekey') + +rekey_normal('3', 'TroubleToggle todo') diff --git a/.config/nvim/lua/key/trouble.lua b/.config/nvim/lua/key/trouble.lua new file mode 100644 index 0000000..3f04ef5 --- /dev/null +++ b/.config/nvim/lua/key/trouble.lua @@ -0,0 +1,3 @@ +require('key/rekey') + +rekey_normal('2', 'TroubleToggle document_diagnostics') diff --git a/.config/nvim/lua/key/update.lua b/.config/nvim/lua/key/update.lua new file mode 100644 index 0000000..776330f --- /dev/null +++ b/.config/nvim/lua/key/update.lua @@ -0,0 +1,4 @@ +vim.api.nvim_create_user_command('Update', function (args) + vim.cmd('PackerUpdate') + vim.cmd('TSUpdate') +end, { desc = "Update everything." }) diff --git a/.config/nvim/lua/key/whichkey.lua b/.config/nvim/lua/key/whichkey.lua new file mode 100644 index 0000000..50f4f07 --- /dev/null +++ b/.config/nvim/lua/key/whichkey.lua @@ -0,0 +1,3 @@ +require('key/rekey') + +rekey_normal('0', 'WhichKey') diff --git a/.config/nvim/lua/key/window.lua b/.config/nvim/lua/key/window.lua new file mode 100644 index 0000000..13fe088 --- /dev/null +++ b/.config/nvim/lua/key/window.lua @@ -0,0 +1,5 @@ +require('key/rekey') + +rekey_normal('_', '4<') +rekey_normal('-', '2-') +rekey_normal('=', '=') diff --git a/.config/nvim/lua/plugin/autoclose.lua b/.config/nvim/lua/plugin/autoclose.lua new file mode 100644 index 0000000..2bfb336 --- /dev/null +++ b/.config/nvim/lua/plugin/autoclose.lua @@ -0,0 +1,10 @@ +require("autoclose").setup({ + keys = { + ["'"] = { escape = true, close = true, pair = "''", disabled_filetypes = {} }, + ["\""] = { escape = true, close = true, pair = "\"\"", disabled_filetypes = {} }, + ["{"] = { escape = true, close = true, pair = "{}", disabled_filetypes = {} }, + ["("] = { escape = true, close = true, pair = "()", disabled_filetypes = {} }, + ["<"] = { escape = true, close = true, pair = "<>", disabled_filetypes = {} }, + ["`"] = { escape = true, close = true, pair = "``", disabled_filetypes = {} }, + }, +}) diff --git a/.config/nvim/lua/plugin/bufferline.lua b/.config/nvim/lua/plugin/bufferline.lua new file mode 100644 index 0000000..0282c6a --- /dev/null +++ b/.config/nvim/lua/plugin/bufferline.lua @@ -0,0 +1,5 @@ +require("bufferline").setup { + -- options = { + -- numbers = 'buffer_id' + -- } +} diff --git a/.config/nvim/lua/plugin/closebuffers.lua b/.config/nvim/lua/plugin/closebuffers.lua new file mode 100644 index 0000000..8007559 --- /dev/null +++ b/.config/nvim/lua/plugin/closebuffers.lua @@ -0,0 +1,7 @@ +require('close_buffers').setup({ + filetype_ignore = {}, -- Filetype to ignore when running deletions + file_glob_ignore = {}, -- File name glob pattern to ignore when running deletions (e.g. '*.md') + file_regex_ignore = {}, -- File name regex pattern to ignore when running deletions (e.g. '.*[.]md') + preserve_window_layout = { 'this', 'nameless' }, -- Types of deletion that should preserve the window layout + next_buffer_cmd = nil, -- Custom function to retrieve the next buffer when preserving window layout +}) diff --git a/.config/nvim/lua/plugin/filetree.lua b/.config/nvim/lua/plugin/filetree.lua new file mode 100644 index 0000000..d8281da --- /dev/null +++ b/.config/nvim/lua/plugin/filetree.lua @@ -0,0 +1,24 @@ +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- empty setup using defaults +-- require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = false, + git_ignored = false + }, +}) diff --git a/.config/nvim/lua/plugin/fold.lua b/.config/nvim/lua/plugin/fold.lua new file mode 100644 index 0000000..e9c6a34 --- /dev/null +++ b/.config/nvim/lua/plugin/fold.lua @@ -0,0 +1,4 @@ +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "nvim_treesitter#foldexpr()" +vim.opt.foldlevel = 99 +-- vim.api.nvim_create_autocmd({ "BufEnter" }, { pattern = { "*" }, command = "normal zx zR", }) -- telescope fix. diff --git a/.config/nvim/lua/plugin/gitsigns.lua b/.config/nvim/lua/plugin/gitsigns.lua new file mode 100644 index 0000000..2dc08c0 --- /dev/null +++ b/.config/nvim/lua/plugin/gitsigns.lua @@ -0,0 +1,43 @@ +require('gitsigns').setup { + signs = { + add = { text = '│' }, + change = { text = '│' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signcolumn = false, -- Toggle with `:Gitsigns toggle_signs` + numhl = true, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ', - ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = 'single', + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, + yadm = { + enable = false + }, +} + +vim.cmd('highlight gitsignscurrentlineblame guibg=#00000000 guifg=#aaaaaa') diff --git a/.config/nvim/lua/plugin/gruvbox.lua b/.config/nvim/lua/plugin/gruvbox.lua new file mode 100644 index 0000000..89523ab --- /dev/null +++ b/.config/nvim/lua/plugin/gruvbox.lua @@ -0,0 +1 @@ +vim.cmd('colorscheme gruvbox-material') diff --git a/.config/nvim/lua/plugin/init.lua b/.config/nvim/lua/plugin/init.lua new file mode 100644 index 0000000..c678a4b --- /dev/null +++ b/.config/nvim/lua/plugin/init.lua @@ -0,0 +1,86 @@ +local ensure_packer = function() + local fn = vim.fn + local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({'git', 'clone', '--depth', '1', 'https://git.voronind.com/mirror/packer.nvim.git', install_path}) + vim.cmd [[packadd packer.nvim]] + return true + end + return false +end + +local packer_bootstrap = ensure_packer() + +local available = function(commands) + for _, command in ipairs(commands) do + if vim.fn.executable(command) ~= 1 then + return false + end + end + return true +end + +return require('packer').startup(function(use) + --[[ + host requirements + - gcc-c++ + ]]-- + + use 'https://git.voronind.com/mirror/packer.nvim.git' + use 'https://git.voronind.com/mirror/nvim-web-devicons.git' + use 'https://git.voronind.com/mirror/nvim-tree.lua.git' + use 'https://git.voronind.com/mirror/nvim-lspconfig.git' + use 'https://git.voronind.com/mirror/which-key.nvim.git' + use 'https://git.voronind.com/mirror/bufferline.nvim.git' + -- use 'https://git.voronind.com/mirror/Comment.nvim.git' -- TODO: remove mirror before deleting. + use 'https://git.voronind.com/mirror/SingleComment.nvim.git' + use 'https://git.voronind.com/mirror/lualine.nvim.git' + use 'https://git.voronind.com/mirror/autoclose.nvim.git' + use 'https://git.voronind.com/mirror/winshift.nvim.git' + use 'https://git.voronind.com/mirror/mason.nvim.git' + use 'https://git.voronind.com/mirror/mason-lspconfig.nvim.git' + use 'https://git.voronind.com/mirror/gitsigns.nvim.git' + -- use 'https://git.voronind.com/mirror/nvim-scrollbar.git' -- TODO: remove mirror before deleting. + use 'https://git.voronind.com/mirror/trouble.nvim.git' + use 'https://git.voronind.com/mirror/tokyonight.nvim.git' + use 'https://git.voronind.com/mirror/close-buffers.nvim.git' + use 'https://git.voronind.com/mirror/plenary.nvim.git' + use 'https://git.voronind.com/mirror/telescope.nvim.git' + use 'https://git.voronind.com/mirror/nvim-treesitter.git' + use 'https://git.voronind.com/mirror/todo-comments.nvim.git' + use 'https://git.voronind.com/mirror/align.nvim.git' + use 'https://git.voronind.com/mirror/gruvbox-material.git' + + -- Automatically set up your configuration after cloning packer.nvim + -- Put this at the end after all plugins + if packer_bootstrap then + require('packer').sync() + end + + -- plugin toggles. + local treesitter = true + + -- plugin setup. + require('plugin/mason') + require('plugin/lsp/init') + require('plugin/filetree') + require('plugin/bufferline') + require('plugin/lualine') + require('plugin/autoclose') + require('plugin/winshift') + require('plugin/gitsigns') + -- require('plugin/scrollbar') -- TODO: remove mirror before deleting. + require('plugin/trouble') + require('plugin/tokyonight') + require('plugin/gruvbox') + require('plugin/closebuffers') + require('plugin/telescope') + require('plugin/todo') + + if available({'g++'}) then + if treesitter then + require('plugin/treesitter') + require('plugin/fold') + end + end +end) diff --git a/.config/nvim/lua/plugin/lsp/init.lua b/.config/nvim/lua/plugin/lsp/init.lua new file mode 100644 index 0000000..aa45597 --- /dev/null +++ b/.config/nvim/lua/plugin/lsp/init.lua @@ -0,0 +1,4 @@ +require('plugin/lsp/rust') +-- require('plugin/lsp/kotlin') +-- require('plugin/lsp/python') +require('plugin/lsp/tex') diff --git a/.config/nvim/lua/plugin/lsp/kotlin.lua b/.config/nvim/lua/plugin/lsp/kotlin.lua new file mode 100644 index 0000000..06891c4 --- /dev/null +++ b/.config/nvim/lua/plugin/lsp/kotlin.lua @@ -0,0 +1,3 @@ +local lspconfig = require('lspconfig') + +lspconfig.kotlin_language_server.setup {} diff --git a/.config/nvim/lua/plugin/lsp/python.lua b/.config/nvim/lua/plugin/lsp/python.lua new file mode 100644 index 0000000..07fefb3 --- /dev/null +++ b/.config/nvim/lua/plugin/lsp/python.lua @@ -0,0 +1,3 @@ +local lspconfig = require('lspconfig') + +lspconfig.pyright.setup {} diff --git a/.config/nvim/lua/plugin/lsp/rust.lua b/.config/nvim/lua/plugin/lsp/rust.lua new file mode 100644 index 0000000..6515760 --- /dev/null +++ b/.config/nvim/lua/plugin/lsp/rust.lua @@ -0,0 +1,13 @@ +local lspconfig = require('lspconfig') + +lspconfig.rust_analyzer.setup { + settings = { + ['rust-analyzer'] = { + rustfmt = { + extraArgs = { '--config', 'tab_spaces=2' } + } + }, + }, +} + +vim.g.rust_recommended_style = false diff --git a/.config/nvim/lua/plugin/lsp/tex.lua b/.config/nvim/lua/plugin/lsp/tex.lua new file mode 100644 index 0000000..c322028 --- /dev/null +++ b/.config/nvim/lua/plugin/lsp/tex.lua @@ -0,0 +1,52 @@ +local lspconfig = require('lspconfig') +local config = { + filetypes = { 'text', 'bib', 'gitcommit', 'markdown', 'org', 'plaintex', 'rst', 'rnoweb', 'tex', 'pandoc' }, + settings = { + ['ltex'] = { + language = "auto" + } + } +} + +lspconfig.ltex.setup(config) + +vim.api.nvim_create_user_command('SCOn', function (args) + lspconfig.ltex.setup(config) +end, { desc = "Enable spellcheck." }) + +vim.api.nvim_create_user_command('SCOff', function (args) + lspconfig.ltex.setup { filetypes = {} } +end, { desc = "Disable spellcheck." }) + +vim.api.nvim_create_user_command('SCLangRU', function (args) + config.settings['ltex'].language = "ru-RU" + lspconfig.ltex.setup(config) +end, { desc = "Set spellcheck to Russian." }) + +vim.api.nvim_create_user_command('SCLangEN', function (args) + config.settings['ltex'].language = "en-US" + lspconfig.ltex.setup(config) +end, { desc = "Set spellcheck to English." }) + +vim.api.nvim_create_user_command('SCLangAuto', function (args) + config.settings['ltex'].language = "auto" + lspconfig.ltex.setup(config) +end, { desc = "Set spellcheck to Auto." }) + +vim.api.nvim_create_user_command('SCForce', function (args) + vim.cmd("setfiletype text") + vim.cmd("SCOn") +end, { desc = "Set buffer type to text." }) + +vim.api.nvim_create_user_command('SCReset', function (args) + vim.cmd("filetype detect") + vim.cmd("SCLangAuto") +end, { desc = "Set buffer type to auto." }) + +vim.api.nvim_create_user_command('SCInfo', function (args) + vim.cmd("LspInfo") +end, { desc = "Show info about spellcheck." }) + +vim.api.nvim_create_user_command('SCInstall', function (args) + vim.cmd("MasonInstall ltex-ls") +end, { desc = "Install spellcheck (requires Mason)." }) diff --git a/.config/nvim/lua/plugin/lualine.lua b/.config/nvim/lua/plugin/lualine.lua new file mode 100644 index 0000000..8ac4840 --- /dev/null +++ b/.config/nvim/lua/plugin/lualine.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + -- theme = 'ayu_mirage', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/.config/nvim/lua/plugin/mason.lua b/.config/nvim/lua/plugin/mason.lua new file mode 100644 index 0000000..3f024e4 --- /dev/null +++ b/.config/nvim/lua/plugin/mason.lua @@ -0,0 +1,2 @@ +require("mason").setup() +require("mason-lspconfig").setup() diff --git a/.config/nvim/lua/plugin/scrollbar.lua b/.config/nvim/lua/plugin/scrollbar.lua new file mode 100644 index 0000000..fcc7b4a --- /dev/null +++ b/.config/nvim/lua/plugin/scrollbar.lua @@ -0,0 +1,2 @@ +require("scrollbar").setup() +require("scrollbar.handlers.gitsigns").setup() diff --git a/.config/nvim/lua/plugin/telescope.lua b/.config/nvim/lua/plugin/telescope.lua new file mode 100644 index 0000000..9808531 --- /dev/null +++ b/.config/nvim/lua/plugin/telescope.lua @@ -0,0 +1,30 @@ +require('telescope').setup{ + defaults = { + -- Default configuration for telescope goes here: + -- config_key = value, + mappings = { + i = { + -- map actions.which_key to (default: ) + -- actions.which_key shows the mappings for your picker, + -- e.g. git_{create, delete, ...}_branch for the git_branches picker + [""] = "which_key" + } + } + }, + pickers = { + -- Default configuration for builtin pickers goes here: + -- picker_name = { + -- picker_config_key = value, + -- ... + -- } + -- Now the picker_config_key will be applied every time you call this + -- builtin picker + }, + extensions = { + -- Your extension configuration goes here: + -- extension_name = { + -- extension_config_key = value, + -- } + -- please take a look at the readme of the extension you want to configure + } +} diff --git a/.config/nvim/lua/plugin/todo.lua b/.config/nvim/lua/plugin/todo.lua new file mode 100644 index 0000000..b7d838e --- /dev/null +++ b/.config/nvim/lua/plugin/todo.lua @@ -0,0 +1,64 @@ +require('todo-comments').setup { + signs = false, -- show icons in the signs column + sign_priority = 8, -- sign priority + -- keywords recognized as todo comments + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + -- signs = false, -- configure signs for some keywords individually + }, + TODO = { icon = " ", color = "info" }, + HACK = { icon = " ", color = "warning" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, + gui_style = { + fg = "NONE", -- The gui style to use for the fg highlight group. + bg = "BOLD", -- The gui style to use for the bg highlight group. + }, + merge_keywords = true, -- when true, custom keywords will be merged with the defaults + -- highlighting of the line containing the todo comment + -- * before: highlights before the keyword (typically comment characters) + -- * keyword: highlights of the keyword + -- * after: highlights after the keyword (todo text) + highlight = { + multiline = true, -- enable multine todo comments + multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword + multiline_context = 10, -- extra lines that will be re-evaluated when changing a line + before = "", -- "fg" or "bg" or empty + keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) + after = "fg", -- "fg" or "bg" or empty + pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) + comments_only = true, -- uses treesitter to match keywords in comments only + max_line_len = 400, -- ignore lines longer than this + exclude = {}, -- list of file types to exclude highlighting + }, + -- list of named colors where we try to extract the guifg from the + -- list of highlight groups or use the hex color if hl not found as a fallback + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + info = { "DiagnosticInfo", "#2563EB" }, + hint = { "DiagnosticHint", "#10B981" }, + default = { "Identifier", "#7C3AED" }, + test = { "Identifier", "#FF00FF" } + }, + search = { + command = "rg", + args = { + "--color=never", + "--no-heading", + "--with-filename", + "--line-number", + "--column", + }, + -- regex that will be used to match keywords. + -- don't replace the (KEYWORDS) placeholder + pattern = [[\b(KEYWORDS):]], -- ripgrep regex + -- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives + }, +} diff --git a/.config/nvim/lua/plugin/tokyonight.lua b/.config/nvim/lua/plugin/tokyonight.lua new file mode 100644 index 0000000..2266662 --- /dev/null +++ b/.config/nvim/lua/plugin/tokyonight.lua @@ -0,0 +1,37 @@ +require("tokyonight").setup({ + -- your configuration comes here + -- or leave it empty to use the default settings + style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` + light_style = "night", -- The theme is used when the background is set to light + transparent = false, -- Enable this to disable setting the background color + terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) + styles = { + -- Style to be applied to different syntax groups + -- Value is any valid attr-list value for `:help nvim_set_hl` + comments = { italic = true }, + keywords = { italic = true }, + functions = {}, + variables = {}, + -- Background styles. Can be "dark", "transparent" or "normal" + sidebars = "dark", -- style for sidebars, see below + floats = "dark", -- style for floating windows + }, + sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` + day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors + hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. + dim_inactive = false, -- dims inactive windows + lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold + + --- You can override specific color groups to use other groups or a hex color + --- function will be called with a ColorScheme table + ---@param colors ColorScheme + on_colors = function(colors) end, + + --- You can override specific highlights to use other groups or a hex color + --- function will be called with a Highlights and ColorScheme table + ---@param highlights Highlights + ---@param colors ColorScheme + on_highlights = function(highlights, colors) end, +}) + +vim.cmd[[colorscheme tokyonight]] diff --git a/.config/nvim/lua/plugin/treesitter.lua b/.config/nvim/lua/plugin/treesitter.lua new file mode 100644 index 0000000..4bc5cf9 --- /dev/null +++ b/.config/nvim/lua/plugin/treesitter.lua @@ -0,0 +1,23 @@ +require('nvim-treesitter.configs').setup { + ensure_installed = "all", + sync_install = false, + auto_install = false, + -- ignore_install = { "javascript" }, + -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! + highlight = { + enable = true, + use_languagetree = true, + -- disable = { "c" }, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + -- disable = {"python"} + }, + autotag = { + enable = true + }, + rainbow = { + enable = true + }, +} diff --git a/.config/nvim/lua/plugin/trouble.lua b/.config/nvim/lua/plugin/trouble.lua new file mode 100644 index 0000000..20c9bb7 --- /dev/null +++ b/.config/nvim/lua/plugin/trouble.lua @@ -0,0 +1 @@ +require('trouble').setup() diff --git a/.config/nvim/lua/plugin/winshift.lua b/.config/nvim/lua/plugin/winshift.lua new file mode 100644 index 0000000..d11280b --- /dev/null +++ b/.config/nvim/lua/plugin/winshift.lua @@ -0,0 +1,58 @@ +require("winshift").setup({ + highlight_moving_win = true, -- Highlight the window being moved + focused_hl_group = "Visual", -- The highlight group used for the moving window + moving_win_options = { + -- These are local options applied to the moving window while it's + -- being moved. They are unset when you leave Win-Move mode. + wrap = false, + cursorline = false, + cursorcolumn = false, + colorcolumn = "", + }, + keymaps = { + disable_defaults = false, -- Disable the default keymaps + win_move_mode = { + ["h"] = "left", + ["j"] = "down", + ["k"] = "up", + ["l"] = "right", + ["H"] = "far_left", + ["J"] = "far_down", + ["K"] = "far_up", + ["L"] = "far_right", + [""] = "left", + [""] = "down", + [""] = "up", + [""] = "right", + [""] = "far_left", + [""] = "far_down", + [""] = "far_up", + [""] = "far_right", + }, + }, + ---A function that should prompt the user to select a window. + --- + ---The window picker is used to select a window while swapping windows with + ---`:WinShift swap`. + ---@return integer? winid # Either the selected window ID, or `nil` to + --- indicate that the user cancelled / gave an invalid selection. + window_picker = function() + return require("winshift.lib").pick_window({ + -- A string of chars used as identifiers by the window picker. + picker_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + filter_rules = { + -- This table allows you to indicate to the window picker that a window + -- should be ignored if its buffer matches any of the following criteria. + cur_win = true, -- Filter out the current window + floats = true, -- Filter out floating windows + filetype = {}, -- List of ignored file types + buftype = {}, -- List of ignored buftypes + bufname = {}, -- List of vim regex patterns matching ignored buffer names + }, + ---A function used to filter the list of selectable windows. + ---@param winids integer[] # The list of selectable window IDs. + ---@return integer[] filtered # The filtered list of window IDs. + filter_func = nil, + }) + end, +}) diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..bd700a9 --- /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_DOWNLOAD_DIR="$HOME/download" +XDG_TEMPLATES_DIR="$HOME/document/template" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/document" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/media/picture" +XDG_VIDEOS_DIR="$HOME/media/video" diff --git a/.fonts/san_francisco/SF-Pro-Display-Black.otf b/.fonts/san_francisco/SF-Pro-Display-Black.otf new file mode 100755 index 0000000..e621e1b Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Black.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-BlackItalic.otf b/.fonts/san_francisco/SF-Pro-Display-BlackItalic.otf new file mode 100755 index 0000000..b862613 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-BlackItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Bold.otf b/.fonts/san_francisco/SF-Pro-Display-Bold.otf new file mode 100755 index 0000000..025b25c Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Bold.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-BoldItalic.otf b/.fonts/san_francisco/SF-Pro-Display-BoldItalic.otf new file mode 100755 index 0000000..77ee0c2 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-BoldItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Heavy.otf b/.fonts/san_francisco/SF-Pro-Display-Heavy.otf new file mode 100755 index 0000000..8285164 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Heavy.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-HeavyItalic.otf b/.fonts/san_francisco/SF-Pro-Display-HeavyItalic.otf new file mode 100755 index 0000000..c44f865 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-HeavyItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Light.otf b/.fonts/san_francisco/SF-Pro-Display-Light.otf new file mode 100755 index 0000000..b25e3dc Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Light.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-LightItalic.otf b/.fonts/san_francisco/SF-Pro-Display-LightItalic.otf new file mode 100755 index 0000000..74b5e8b Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-LightItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Medium.otf b/.fonts/san_francisco/SF-Pro-Display-Medium.otf new file mode 100755 index 0000000..b2f7dac Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Medium.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-MediumItalic.otf b/.fonts/san_francisco/SF-Pro-Display-MediumItalic.otf new file mode 100755 index 0000000..918709e Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-MediumItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Regular.otf b/.fonts/san_francisco/SF-Pro-Display-Regular.otf new file mode 100755 index 0000000..09aaca9 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Regular.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-RegularItalic.otf b/.fonts/san_francisco/SF-Pro-Display-RegularItalic.otf new file mode 100755 index 0000000..99e34f0 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-RegularItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Semibold.otf b/.fonts/san_francisco/SF-Pro-Display-Semibold.otf new file mode 100755 index 0000000..b1e38ad Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Semibold.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-SemiboldItalic.otf b/.fonts/san_francisco/SF-Pro-Display-SemiboldItalic.otf new file mode 100755 index 0000000..7b65b53 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-SemiboldItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Thin.otf b/.fonts/san_francisco/SF-Pro-Display-Thin.otf new file mode 100755 index 0000000..e4ddd7f Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Thin.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-ThinItalic.otf b/.fonts/san_francisco/SF-Pro-Display-ThinItalic.otf new file mode 100755 index 0000000..0fb2d44 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-ThinItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-Ultralight.otf b/.fonts/san_francisco/SF-Pro-Display-Ultralight.otf new file mode 100755 index 0000000..528c9fd Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-Ultralight.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Display-UltralightItalic.otf b/.fonts/san_francisco/SF-Pro-Display-UltralightItalic.otf new file mode 100755 index 0000000..37d146c Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Display-UltralightItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Bold.otf b/.fonts/san_francisco/SF-Pro-Text-Bold.otf new file mode 100755 index 0000000..840d810 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Bold.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-BoldItalic.otf b/.fonts/san_francisco/SF-Pro-Text-BoldItalic.otf new file mode 100755 index 0000000..3cddfc4 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-BoldItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Heavy.otf b/.fonts/san_francisco/SF-Pro-Text-Heavy.otf new file mode 100755 index 0000000..7d3b413 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Heavy.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-HeavyItalic.otf b/.fonts/san_francisco/SF-Pro-Text-HeavyItalic.otf new file mode 100755 index 0000000..a03d003 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-HeavyItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Light.otf b/.fonts/san_francisco/SF-Pro-Text-Light.otf new file mode 100755 index 0000000..1e16968 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Light.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-LightItalic.otf b/.fonts/san_francisco/SF-Pro-Text-LightItalic.otf new file mode 100755 index 0000000..5bee181 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-LightItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Medium.otf b/.fonts/san_francisco/SF-Pro-Text-Medium.otf new file mode 100755 index 0000000..4982cb5 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Medium.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-MediumItalic.otf b/.fonts/san_francisco/SF-Pro-Text-MediumItalic.otf new file mode 100755 index 0000000..c876a0e Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-MediumItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Regular.otf b/.fonts/san_francisco/SF-Pro-Text-Regular.otf new file mode 100755 index 0000000..65f9ea5 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Regular.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-RegularItalic.otf b/.fonts/san_francisco/SF-Pro-Text-RegularItalic.otf new file mode 100755 index 0000000..af984d5 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-RegularItalic.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-Semibold.otf b/.fonts/san_francisco/SF-Pro-Text-Semibold.otf new file mode 100755 index 0000000..a20e7a0 Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-Semibold.otf differ diff --git a/.fonts/san_francisco/SF-Pro-Text-SemiboldItalic.otf b/.fonts/san_francisco/SF-Pro-Text-SemiboldItalic.otf new file mode 100755 index 0000000..08ee24d Binary files /dev/null and b/.fonts/san_francisco/SF-Pro-Text-SemiboldItalic.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Black.otf b/.fonts/san_francisco/SFNSDisplay-Black.otf new file mode 100644 index 0000000..2ae24e5 Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Black.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Bold.otf b/.fonts/san_francisco/SFNSDisplay-Bold.otf new file mode 100644 index 0000000..afeb837 Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Bold.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Heavy.otf b/.fonts/san_francisco/SFNSDisplay-Heavy.otf new file mode 100644 index 0000000..d22c06c Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Heavy.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Light.otf b/.fonts/san_francisco/SFNSDisplay-Light.otf new file mode 100644 index 0000000..ee840c4 Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Light.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Medium.otf b/.fonts/san_francisco/SFNSDisplay-Medium.otf new file mode 100644 index 0000000..181c07e Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Medium.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Regular.otf b/.fonts/san_francisco/SFNSDisplay-Regular.otf new file mode 100644 index 0000000..132080b Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Regular.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Semibold.otf b/.fonts/san_francisco/SFNSDisplay-Semibold.otf new file mode 100644 index 0000000..40af239 Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Semibold.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Thin.otf b/.fonts/san_francisco/SFNSDisplay-Thin.otf new file mode 100644 index 0000000..4fb2187 Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Thin.otf differ diff --git a/.fonts/san_francisco/SFNSDisplay-Ultralight.otf b/.fonts/san_francisco/SFNSDisplay-Ultralight.otf new file mode 100644 index 0000000..971966a Binary files /dev/null and b/.fonts/san_francisco/SFNSDisplay-Ultralight.otf differ diff --git a/.fonts/san_francisco/SFNSText-Bold.otf b/.fonts/san_francisco/SFNSText-Bold.otf new file mode 100644 index 0000000..197a59e Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Bold.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldG1.otf b/.fonts/san_francisco/SFNSText-BoldG1.otf new file mode 100644 index 0000000..d8959a4 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldG1.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldG2.otf b/.fonts/san_francisco/SFNSText-BoldG2.otf new file mode 100644 index 0000000..50d015b Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldG2.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldG3.otf b/.fonts/san_francisco/SFNSText-BoldG3.otf new file mode 100644 index 0000000..c3afbfe Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldG3.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldItalic.otf b/.fonts/san_francisco/SFNSText-BoldItalic.otf new file mode 100644 index 0000000..dc49240 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldItalic.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldItalicG1.otf b/.fonts/san_francisco/SFNSText-BoldItalicG1.otf new file mode 100644 index 0000000..c3ffb4c Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldItalicG1.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldItalicG2.otf b/.fonts/san_francisco/SFNSText-BoldItalicG2.otf new file mode 100644 index 0000000..60e2a2e Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldItalicG2.otf differ diff --git a/.fonts/san_francisco/SFNSText-BoldItalicG3.otf b/.fonts/san_francisco/SFNSText-BoldItalicG3.otf new file mode 100644 index 0000000..ebef10c Binary files /dev/null and b/.fonts/san_francisco/SFNSText-BoldItalicG3.otf differ diff --git a/.fonts/san_francisco/SFNSText-Heavy.otf b/.fonts/san_francisco/SFNSText-Heavy.otf new file mode 100644 index 0000000..afbae23 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Heavy.otf differ diff --git a/.fonts/san_francisco/SFNSText-HeavyItalic.otf b/.fonts/san_francisco/SFNSText-HeavyItalic.otf new file mode 100644 index 0000000..56d4028 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-HeavyItalic.otf differ diff --git a/.fonts/san_francisco/SFNSText-Light.otf b/.fonts/san_francisco/SFNSText-Light.otf new file mode 100644 index 0000000..6a6e4d1 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Light.otf differ diff --git a/.fonts/san_francisco/SFNSText-LightItalic.otf b/.fonts/san_francisco/SFNSText-LightItalic.otf new file mode 100644 index 0000000..17d7590 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-LightItalic.otf differ diff --git a/.fonts/san_francisco/SFNSText-Medium.otf b/.fonts/san_francisco/SFNSText-Medium.otf new file mode 100644 index 0000000..2dda908 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Medium.otf differ diff --git a/.fonts/san_francisco/SFNSText-MediumItalic.otf b/.fonts/san_francisco/SFNSText-MediumItalic.otf new file mode 100644 index 0000000..ad92f9c Binary files /dev/null and b/.fonts/san_francisco/SFNSText-MediumItalic.otf differ diff --git a/.fonts/san_francisco/SFNSText-Regular.otf b/.fonts/san_francisco/SFNSText-Regular.otf new file mode 100644 index 0000000..a40273d Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Regular.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularG1.otf b/.fonts/san_francisco/SFNSText-RegularG1.otf new file mode 100644 index 0000000..fee72d1 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularG1.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularG2.otf b/.fonts/san_francisco/SFNSText-RegularG2.otf new file mode 100644 index 0000000..f706567 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularG2.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularG3.otf b/.fonts/san_francisco/SFNSText-RegularG3.otf new file mode 100644 index 0000000..9e58a78 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularG3.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularItalic.otf b/.fonts/san_francisco/SFNSText-RegularItalic.otf new file mode 100644 index 0000000..02d69fa Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularItalic.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularItalicG1.otf b/.fonts/san_francisco/SFNSText-RegularItalicG1.otf new file mode 100644 index 0000000..59d5676 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularItalicG1.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularItalicG2.otf b/.fonts/san_francisco/SFNSText-RegularItalicG2.otf new file mode 100644 index 0000000..6740ae1 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularItalicG2.otf differ diff --git a/.fonts/san_francisco/SFNSText-RegularItalicG3.otf b/.fonts/san_francisco/SFNSText-RegularItalicG3.otf new file mode 100644 index 0000000..ff7fc3d Binary files /dev/null and b/.fonts/san_francisco/SFNSText-RegularItalicG3.otf differ diff --git a/.fonts/san_francisco/SFNSText-Semibold.otf b/.fonts/san_francisco/SFNSText-Semibold.otf new file mode 100644 index 0000000..e05a2f6 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-Semibold.otf differ diff --git a/.fonts/san_francisco/SFNSText-SemiboldItalic.otf b/.fonts/san_francisco/SFNSText-SemiboldItalic.otf new file mode 100644 index 0000000..25c0ab2 Binary files /dev/null and b/.fonts/san_francisco/SFNSText-SemiboldItalic.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Black.otf b/.fonts/san_francisco/SFUIDisplay-Black.otf new file mode 100755 index 0000000..6551003 Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Black.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Bold.ttf b/.fonts/san_francisco/SFUIDisplay-Bold.ttf new file mode 100755 index 0000000..4d463a2 Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Bold.ttf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Heavy.otf b/.fonts/san_francisco/SFUIDisplay-Heavy.otf new file mode 100755 index 0000000..d214526 Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Heavy.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Light.ttf b/.fonts/san_francisco/SFUIDisplay-Light.ttf new file mode 100755 index 0000000..1d356dc Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Light.ttf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Medium.otf b/.fonts/san_francisco/SFUIDisplay-Medium.otf new file mode 100755 index 0000000..c39628d Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Medium.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Regular.otf b/.fonts/san_francisco/SFUIDisplay-Regular.otf new file mode 100755 index 0000000..8316e51 Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Regular.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Semibold.otf b/.fonts/san_francisco/SFUIDisplay-Semibold.otf new file mode 100755 index 0000000..874e00e Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Semibold.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Thin.otf b/.fonts/san_francisco/SFUIDisplay-Thin.otf new file mode 100755 index 0000000..46f588a Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Thin.otf differ diff --git a/.fonts/san_francisco/SFUIDisplay-Ultralight.otf b/.fonts/san_francisco/SFUIDisplay-Ultralight.otf new file mode 100755 index 0000000..217c461 Binary files /dev/null and b/.fonts/san_francisco/SFUIDisplay-Ultralight.otf differ diff --git a/.fonts/san_francisco/SFUIText-Bold.otf b/.fonts/san_francisco/SFUIText-Bold.otf new file mode 100755 index 0000000..05fd71c Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Bold.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldG1.otf b/.fonts/san_francisco/SFUIText-BoldG1.otf new file mode 100755 index 0000000..9936555 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldG1.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldG2.otf b/.fonts/san_francisco/SFUIText-BoldG2.otf new file mode 100755 index 0000000..bbf226f Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldG2.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldG3.otf b/.fonts/san_francisco/SFUIText-BoldG3.otf new file mode 100755 index 0000000..37616c4 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldG3.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldItalicG1.otf b/.fonts/san_francisco/SFUIText-BoldItalicG1.otf new file mode 100755 index 0000000..938dd03 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldItalicG1.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldItalicG2.otf b/.fonts/san_francisco/SFUIText-BoldItalicG2.otf new file mode 100755 index 0000000..d5416f3 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldItalicG2.otf differ diff --git a/.fonts/san_francisco/SFUIText-BoldItalicG3.otf b/.fonts/san_francisco/SFUIText-BoldItalicG3.otf new file mode 100755 index 0000000..7f4bc9f Binary files /dev/null and b/.fonts/san_francisco/SFUIText-BoldItalicG3.otf differ diff --git a/.fonts/san_francisco/SFUIText-Heavy.otf b/.fonts/san_francisco/SFUIText-Heavy.otf new file mode 100755 index 0000000..7b4b489 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Heavy.otf differ diff --git a/.fonts/san_francisco/SFUIText-HeavyItalic.otf b/.fonts/san_francisco/SFUIText-HeavyItalic.otf new file mode 100755 index 0000000..ae01079 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-HeavyItalic.otf differ diff --git a/.fonts/san_francisco/SFUIText-Italic.otf b/.fonts/san_francisco/SFUIText-Italic.otf new file mode 100755 index 0000000..b46af5b Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Italic.otf differ diff --git a/.fonts/san_francisco/SFUIText-ItalicG1.otf b/.fonts/san_francisco/SFUIText-ItalicG1.otf new file mode 100755 index 0000000..4bfba84 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-ItalicG1.otf differ diff --git a/.fonts/san_francisco/SFUIText-ItalicG2.otf b/.fonts/san_francisco/SFUIText-ItalicG2.otf new file mode 100755 index 0000000..358e92d Binary files /dev/null and b/.fonts/san_francisco/SFUIText-ItalicG2.otf differ diff --git a/.fonts/san_francisco/SFUIText-ItalicG3.otf b/.fonts/san_francisco/SFUIText-ItalicG3.otf new file mode 100755 index 0000000..091bcbe Binary files /dev/null and b/.fonts/san_francisco/SFUIText-ItalicG3.otf differ diff --git a/.fonts/san_francisco/SFUIText-Light.otf b/.fonts/san_francisco/SFUIText-Light.otf new file mode 100755 index 0000000..dd0d3c1 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Light.otf differ diff --git a/.fonts/san_francisco/SFUIText-LightItalic.otf b/.fonts/san_francisco/SFUIText-LightItalic.otf new file mode 100755 index 0000000..1b0f52f Binary files /dev/null and b/.fonts/san_francisco/SFUIText-LightItalic.otf differ diff --git a/.fonts/san_francisco/SFUIText-Medium.otf b/.fonts/san_francisco/SFUIText-Medium.otf new file mode 100755 index 0000000..dbc620e Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Medium.otf differ diff --git a/.fonts/san_francisco/SFUIText-MediumItalic.otf b/.fonts/san_francisco/SFUIText-MediumItalic.otf new file mode 100755 index 0000000..e890b78 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-MediumItalic.otf differ diff --git a/.fonts/san_francisco/SFUIText-Regular.otf b/.fonts/san_francisco/SFUIText-Regular.otf new file mode 100755 index 0000000..b2aa388 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Regular.otf differ diff --git a/.fonts/san_francisco/SFUIText-RegularG1.otf b/.fonts/san_francisco/SFUIText-RegularG1.otf new file mode 100755 index 0000000..e99f719 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-RegularG1.otf differ diff --git a/.fonts/san_francisco/SFUIText-RegularG2.otf b/.fonts/san_francisco/SFUIText-RegularG2.otf new file mode 100755 index 0000000..78fb08b Binary files /dev/null and b/.fonts/san_francisco/SFUIText-RegularG2.otf differ diff --git a/.fonts/san_francisco/SFUIText-RegularG3.otf b/.fonts/san_francisco/SFUIText-RegularG3.otf new file mode 100755 index 0000000..fb40846 Binary files /dev/null and b/.fonts/san_francisco/SFUIText-RegularG3.otf differ diff --git a/.fonts/san_francisco/SFUIText-Semibold.otf b/.fonts/san_francisco/SFUIText-Semibold.otf new file mode 100755 index 0000000..893bedc Binary files /dev/null and b/.fonts/san_francisco/SFUIText-Semibold.otf differ diff --git a/.fonts/san_francisco/SFUIText-SemiboldItalic.otf b/.fonts/san_francisco/SFUIText-SemiboldItalic.otf new file mode 100755 index 0000000..4fa914e Binary files /dev/null and b/.fonts/san_francisco/SFUIText-SemiboldItalic.otf differ diff --git a/.fonts/san_francisco/san_francisco-webfont.woff b/.fonts/san_francisco/san_francisco-webfont.woff new file mode 100755 index 0000000..373a761 Binary files /dev/null and b/.fonts/san_francisco/san_francisco-webfont.woff differ diff --git a/.fonts/san_francisco/san_francisco-webfont.woff2 b/.fonts/san_francisco/san_francisco-webfont.woff2 new file mode 100755 index 0000000..4a9ec31 Binary files /dev/null and b/.fonts/san_francisco/san_francisco-webfont.woff2 differ diff --git a/.fonts/terminess/LICENSE.txt b/.fonts/terminess/LICENSE.txt new file mode 100644 index 0000000..8cd25e3 --- /dev/null +++ b/.fonts/terminess/LICENSE.txt @@ -0,0 +1,97 @@ +Copyright (c) 2010 Dimitar Toshkov Zhekov, +with Reserved Font Name "Terminus Font". + +Copyright (c) 2011-2021 Tilman Blumenbach, +with Reserved Font Name "Terminus (TTF)". + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/.fonts/terminess/TerminessNerdFont-Bold.ttf b/.fonts/terminess/TerminessNerdFont-Bold.ttf new file mode 100644 index 0000000..c59b3a6 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFont-Bold.ttf differ diff --git a/.fonts/terminess/TerminessNerdFont-BoldItalic.ttf b/.fonts/terminess/TerminessNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..d09f280 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFont-BoldItalic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFont-Italic.ttf b/.fonts/terminess/TerminessNerdFont-Italic.ttf new file mode 100644 index 0000000..387639e Binary files /dev/null and b/.fonts/terminess/TerminessNerdFont-Italic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFont-Regular.ttf b/.fonts/terminess/TerminessNerdFont-Regular.ttf new file mode 100644 index 0000000..86c2660 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFont-Regular.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontMono-Bold.ttf b/.fonts/terminess/TerminessNerdFontMono-Bold.ttf new file mode 100644 index 0000000..f2e7fb6 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontMono-Bold.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontMono-BoldItalic.ttf b/.fonts/terminess/TerminessNerdFontMono-BoldItalic.ttf new file mode 100644 index 0000000..96409f9 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontMono-BoldItalic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontMono-Italic.ttf b/.fonts/terminess/TerminessNerdFontMono-Italic.ttf new file mode 100644 index 0000000..142cb8e Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontMono-Italic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontMono-Regular.ttf b/.fonts/terminess/TerminessNerdFontMono-Regular.ttf new file mode 100644 index 0000000..a729686 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontMono-Regular.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontPropo-Bold.ttf b/.fonts/terminess/TerminessNerdFontPropo-Bold.ttf new file mode 100644 index 0000000..e4540dc Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontPropo-Bold.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontPropo-BoldItalic.ttf b/.fonts/terminess/TerminessNerdFontPropo-BoldItalic.ttf new file mode 100644 index 0000000..dfc23e8 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontPropo-BoldItalic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontPropo-Italic.ttf b/.fonts/terminess/TerminessNerdFontPropo-Italic.ttf new file mode 100644 index 0000000..409e6a6 Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontPropo-Italic.ttf differ diff --git a/.fonts/terminess/TerminessNerdFontPropo-Regular.ttf b/.fonts/terminess/TerminessNerdFontPropo-Regular.ttf new file mode 100644 index 0000000..aa7bd9b Binary files /dev/null and b/.fonts/terminess/TerminessNerdFontPropo-Regular.ttf differ diff --git a/.fonts/terminess/readme.md b/.fonts/terminess/readme.md new file mode 100644 index 0000000..9f2e700 --- /dev/null +++ b/.fonts/terminess/readme.md @@ -0,0 +1,8 @@ + +# Nerd Fonts + +This is an archived font from a Nerd Fonts release. + +For more information see: +* https://github.com/ryanoasis/nerd-fonts/ +* https://github.com/ryanoasis/nerd-fonts/releases/latest/ diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..9e4c3c5 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,6 @@ +[credential] + helper = store +[pull] + rebase = true +[user] + name = Dmitry Voronin diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f8a2db --- /dev/null +++ b/.gitignore @@ -0,0 +1,102 @@ +* + +# git. +!/.gitignore +!/.gitconfig + +# bash. +!/.bashrc + +# tmux. +!/.tmux.conf + +# dir structure +!/app/ +/app/* +!/app/.dir +!/document/ +/document/* +!/document/.dir +!/document/template/ +/document/template/* +!/document/template/.dir +!/download/ +/download/* +!/download/.dir +!/media/ +/media/* +!/media/.dir +!/media/picture/ +/media/picture/* +!/media/picture/.dir +!/media/video/ +/media/video/* +!/media/video/.dir +!/tmp/ +/tmp/* +!/tmp/.dir + +# bash +!/.bash_profile + +# bin +!/app/bin/ +!/app/bin/** + +# linux configs +!/document/linux/ +/document/linux/* +!/document/linux/config/ +!/document/linux/config/** + +# system configs +!/.config/ +/.config/* + +## gtk-3.0 +!/.config/gtk-3.0/ +!/.config/gtk-3.0/* + +## gtk-4.0 +!/.config/gtk-4.0/ +!/.config/gtk-4.0/* + +## htop settings +!/.config/htop/ +!/.config/htop/htoprc + +## user dirs +!/.config/user-dirs.dirs + +## nvim +!/.config/nvim/ +!/.config/nvim/** +/.config/nvim/plugin/ + +# ssh +!/.ssh/ +/.ssh/* + +## ssh config +!/.ssh/config + +# local configs +!/.local/ +/.local/* +!/.local/share/ +/.local/share/* + +## background +!/.local/share/backgrounds/ +!/.local/share/backgrounds/background.jpg + +## flatpak overrides +!/.local/share/flatpak/ +/.local/share/flatpak/* +!/.local/share/flatpak/overrides/ +!/.local/share/flatpak/overrides/* + +# fonts +!/.fonts/ +!/.fonts/** +/.fonts/**/.uuid diff --git a/.local/share/backgrounds/background.jpg b/.local/share/backgrounds/background.jpg new file mode 100644 index 0000000..5316bb7 Binary files /dev/null and b/.local/share/backgrounds/background.jpg differ diff --git a/.local/share/flatpak/overrides/com.usebottles.bottles b/.local/share/flatpak/overrides/com.usebottles.bottles new file mode 100644 index 0000000..7ea06dc --- /dev/null +++ b/.local/share/flatpak/overrides/com.usebottles.bottles @@ -0,0 +1,6 @@ +[Context] +filesystems=!xdg-download;/var/mnt/storage/cold_1/tmp:ro;/var/mnt/storage/hot/media/bottle;/var/mnt/storage/hot/media/game;~/download:ro + +[Environment] +MANGOHUD=1 +MANGOHUD_CONFIG=cpu_temp=1,gpu_temp=1,gpu_junction_temp=1,no_display=1,hud_compact=1,toggle_hud=F1 diff --git a/.local/share/flatpak/overrides/com.valvesoftware.Steam b/.local/share/flatpak/overrides/com.valvesoftware.Steam new file mode 100644 index 0000000..e27d65a --- /dev/null +++ b/.local/share/flatpak/overrides/com.valvesoftware.Steam @@ -0,0 +1,8 @@ +[Context] +devices=shm;kvm;dri +features=canbus +filesystems=!xdg-music;!xdg-pictures;!xdg-run/app/com.discordapp.Discord;/var/mnt/ + +[Environment] +MANGOHUD_CONFIG=cpu_temp=1,gpu_temp=1,gpu_junction_temp=1,no_display=1,hud_compact=1,toggle_hud=F1 +MANGOHUD=1 diff --git a/.local/share/flatpak/overrides/global b/.local/share/flatpak/overrides/global new file mode 100644 index 0000000..2c84f57 --- /dev/null +++ b/.local/share/flatpak/overrides/global @@ -0,0 +1,2 @@ +[Context] +filesystems=xdg-config/gtk-3.0:ro;xdg-config/gtk-4.0:ro; diff --git a/.local/share/flatpak/overrides/org.blender.Blender b/.local/share/flatpak/overrides/org.blender.Blender new file mode 100644 index 0000000..9ca8f97 --- /dev/null +++ b/.local/share/flatpak/overrides/org.blender.Blender @@ -0,0 +1,3 @@ +[Context] +devices=all;shm;kvm +filesystems=home;host-etc;host-os diff --git a/.local/share/flatpak/overrides/org.mozilla.firefox b/.local/share/flatpak/overrides/org.mozilla.firefox new file mode 100644 index 0000000..a3c71bd --- /dev/null +++ b/.local/share/flatpak/overrides/org.mozilla.firefox @@ -0,0 +1,3 @@ +[Context] +devices=dri +filesystems=!xdg-download;~/tmp;~/download;~/.mozilla diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..775dbee --- /dev/null +++ b/.ssh/config @@ -0,0 +1,39 @@ +Host home + HostName 192.168.1.2 + User root + Port 22143 + +Host dasha + HostName 192.168.1.7 + User root + Port 22143 + +Host pi + Hostname 192.168.1.6 + User root + Port 22143 + +Host work + Hostname 192.168.1.5 + User root + Port 22143 + +Host fsight + Hostname 10.30.217.25 + User root + Port 22 + +Host vpn + Hostname 194.113.233.38 + User root + Port 22143 + +Host desktop + Hostname 192.168.1.3 + User root + Port 22143 + +Host fmpmaven + Hostname 10.30.22.10 + User root + Port 22 diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..03ddb14 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,70 @@ +# remap to . +unbind-key C-b +set-option -g prefix C-t +bind-key C-t send-prefix + +# disable escape delay. +set -sg escape-time 0 + +# remap split keys. +bind -n M-| split-window -h +bind -n M-- split-window -v +unbind '"' +unbind % + +# reload config. +bind r source-file ~/.tmux.conf + +# swith panes with alt + hjkl. +bind -n M-a select-pane -L +bind -n M-d select-pane -R +bind -n M-w select-pane -U +bind -n M-s select-pane -D + +# close pane. +bind -n M-c kill-pane + +# create new window. +bind -n M-Escape new-window + +# close window. +bind -n M-x kill-window + +# switch window. +bind -n M-e next-window +bind -n M-q previous-window + +# move window. +bind -n M-E swap-window -t +1\; select-window -t +1 +bind -n M-Q swap-window -t -1\; select-window -t -1 + +# detach. +bind -n M-z detach-client + +# scroll. +bind -n M-p copy-mode -u +bind -n M-n send-keys Pagedown + +# copy mode. +setw -g mode-keys vi +bind -n M-v copy-mode +bind -n M-P paste-buffer +bind -T copy-mode-vi v send -X begin-selection +bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy" + +# statusbar +set -g status-position bottom +set -g status-justify left +set -g status-style 'bg=yellow fg=black dim' +set -g status-left ' #H-#S ' +set -g status-right '#[fg=black,bg=orange] %d/%m %H:%M ' +set -g status-right-length 50 +set -g status-left-length 20 + +setw -g window-status-current-style 'fg=black bg=orange bold' +setw -g window-status-current-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F ' + +setw -g window-status-style 'fg=black bg=darkgray' +setw -g window-status-format ' #I#[fg=black]:#[fg=black]#W#[fg=black]#F ' + +setw -g window-status-bell-style 'fg=black bg=white bold' diff --git a/app/.dir b/app/.dir new file mode 100644 index 0000000..e69de29 diff --git a/app/bin/cargo b/app/bin/cargo new file mode 120000 index 0000000..0bd1166 --- /dev/null +++ b/app/bin/cargo @@ -0,0 +1 @@ +../../.cargo/bin/ \ No newline at end of file diff --git a/app/bin/ffmpeg/ffmpeg b/app/bin/ffmpeg/ffmpeg new file mode 100755 index 0000000..2951e72 --- /dev/null +++ b/app/bin/ffmpeg/ffmpeg @@ -0,0 +1,3 @@ +#!/bin/bash + +flatpak run --command=ffmpeg org.kde.kdenlive "$@" diff --git a/app/bin/ffmpeg/ffprobe b/app/bin/ffmpeg/ffprobe new file mode 100755 index 0000000..5b9208b --- /dev/null +++ b/app/bin/ffmpeg/ffprobe @@ -0,0 +1,3 @@ +#!/bin/bash + +flatpak run --command=ffprobe org.kde.kdenlive "$@" diff --git a/app/bin/home/backup b/app/bin/home/backup new file mode 100755 index 0000000..38d9774 --- /dev/null +++ b/app/bin/home/backup @@ -0,0 +1,54 @@ +#!/bin/bash + +source /var/roothome/app/bin/home/shared.sh + +dow=$(date +%u) # current day of week number. +path_src="/var/mnt/storage/hot" # backup src location. +path_media="/var/mnt/storage/cold_1/media /var/mnt/storage/cold_2/media" # media paths. +path_mount="/var/mnt/backup" # backup mount location. +path_backup="$path_mount/backup" # backup dir location. +path_docker="$path_backup/home" # docker backup location. + +# check if backup drive is mounted. +if [ ! -f "$path_mount"/.mount ]; then + echo "backup : $path_mount not mounted" + notify "backup : $path_mount not mounted" + exit 1 +fi + +# check if hot storage is mounted. +if [ ! -f "$path_src"/.mount ]; then + echo "backup : $path_src not mounted" + notify "backup : $path_src not mounted" + exit 1 +fi + +# tweak bash. +shopt -s globstar +shopt -s dotglob + +# cd to src storage. +builtin cd "$path_src" + +# save media list. +/usr/bin/find $path_media -type d | gzip -1 > media/list/cold.txt.gz || notify 'backup : save media list failed' + +# backup docker. +rm $path_docker/${dow}_*.tar.gz +/usr/bin/tar --exclude-from=docker/.tarignore -c docker | /usr/bin/gzip -1 > $path_docker/docker.tar.gz && mv $path_docker/docker.tar.gz $path_docker/${dow}_$(/usr/bin/sha1sum $path_docker/docker.tar.gz | cut -d\ -f1).tar.gz || notify 'backup : docker failed' + +# copy media. +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/music/ /var/mnt/backup/backup/music/ || notify 'backup : copy music failed' +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/book/ /var/mnt/backup/backup/book/ || notify 'backup : copy book failed' +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/porn/ /var/mnt/backup/backup/porn/ || notify 'backup : copy porn failed' +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/family/ /var/mnt/backup/backup/family/ || notify 'backup : copy family failed' +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/paper/ /var/mnt/backup/backup/paper/ || notify 'backup : copy paper failed' +/usr/bin/rsync -a --delete /var/mnt/storage/hot/media/list/ /var/mnt/backup/backup/list/ || notify 'backup : copy list failed' + +# upload external. +#/usr/bin/rsync -ahP -e 'ssh -p 143 -i /var/roothome/document/key/ssh/pi.key' /var/mnt/backup/ root@192.168.1.6:/var/mnt/backup/ || notify 'backup : failed upload' + +# notify completion & size. +bupsize=$(/usr/bin/du -h $path_docker/${dow}_*.tar.gz | awk '{print $1}') +notify_silent "backup : complete : $bupsize" +echo "backup : complete : $bupsize" diff --git a/app/bin/home/nextcloud b/app/bin/home/nextcloud new file mode 100755 index 0000000..1d3503f --- /dev/null +++ b/app/bin/home/nextcloud @@ -0,0 +1,5 @@ +#!/bin/bash + +source /var/roothome/app/bin/home/shared.sh + +docker exec -u 33 cloud php -f /var/www/html/cron.php || notify 'nextcloud : failed to run cron' diff --git a/app/bin/home/photos_process b/app/bin/home/photos_process new file mode 100755 index 0000000..0917d66 --- /dev/null +++ b/app/bin/home/photos_process @@ -0,0 +1,59 @@ +#!/bin/bash + +source /var/roothome/app/bin/home/shared.sh + +if [ ! -f /mnt/storage/hot/.mount ]; then + echo mount hot storage + notify 'photos_process : hot storage not mounted' + exit 1 +fi + +cd /var/roothome/docker/cloud/data/data/cakee/files/media/photo + +# convert png to jpg +echo "converting png to jpg.." +for img in $(ls *.png) $(ls *.PNG); do + echo "converting $img" + filename=${img%.*} + /usr/bin/convert "$filename.png" "$filename.jpg" +done +rm *.png *.PNG + +# rename bad extensions +echo "renaming jpg.." +for img in $(ls *.jpeg) $(ls *.JPG) $(ls *.JPEG); do + echo "renaming $img" + filename=${img%.*} + mv "$img" "$filename.jpg" +done + +# compress jpg +echo "compressing jpg.." +/usr/bin/mogrify -resize 2073600@ *.jpg +/usr/bin/jpegoptim --size=1000k *.jpg + +# rename to hash +for file in *; do + if [[ -f "$file" ]]; then + extension="${file##*.}" + if [ -f "$file" ] && [ "$extension" != "$file" ]; then + new_name="${file%$extension}" + else + new_name="$file" + extension="" + fi + new_name=$(sha1sum "$file" | cut -d\ -f1) + if [[ "$extension" != "" ]]; then + new_name="${new_name,,}.$extension" + else + new_name="${new_name,,}" + fi + mv "$file" "$new_name" + fi +done + +# move to images +echo "moving.." +total_photos=$(ls | wc -l) +mv *.jpg /mnt/storage/hot/media/family/dima/photo/ +notify_silent "photos processed: $total_photos" diff --git a/app/bin/home/shared.sh b/app/bin/home/shared.sh new file mode 100644 index 0000000..476bec5 --- /dev/null +++ b/app/bin/home/shared.sh @@ -0,0 +1,12 @@ +shopt -s globstar +shopt -s dotglob + +notify() +{ + curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null +} + +notify_silent() +{ + curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null +} diff --git a/app/bin/home/yandex_music b/app/bin/home/yandex_music new file mode 100755 index 0000000..ac2b485 --- /dev/null +++ b/app/bin/home/yandex_music @@ -0,0 +1,19 @@ +#!/bin/bash + +source /var/roothome/app/bin/home/shared.sh + +if [ ! -f /var/mnt/storage/hot/.mount ]; then + echo mount hot storage + notify 'backup: hot storage not mounted' + exit 1 +fi + +cd /var/roothome/app/ru.cakee.music_transfer + +#/usr/bin/python3 -m venv venv +. venv/bin/activate + +python dl_yandex.py > /tmp/yandex_music.log || notify "music download failed" +/usr/bin/sed -i '1,2d' /tmp/yandex_music.log +notify_silent "$(/usr/bin/cat /tmp/yandex_music.log)" + diff --git a/app/bin/java b/app/bin/java new file mode 120000 index 0000000..494452b --- /dev/null +++ b/app/bin/java @@ -0,0 +1 @@ +../java/x64/jdk_11/bin/ \ No newline at end of file diff --git a/app/bin/tex b/app/bin/tex new file mode 120000 index 0000000..4fbffd8 --- /dev/null +++ b/app/bin/tex @@ -0,0 +1 @@ +../tex/app/bin/x86_64-linux/ \ No newline at end of file diff --git a/app/bin/vrrtest b/app/bin/vrrtest new file mode 120000 index 0000000..3da6cf5 --- /dev/null +++ b/app/bin/vrrtest @@ -0,0 +1 @@ +../vrrtest \ No newline at end of file diff --git a/app/bin/yt-dlp b/app/bin/yt-dlp new file mode 120000 index 0000000..4cfd9de --- /dev/null +++ b/app/bin/yt-dlp @@ -0,0 +1 @@ +../yt-dlp_linux \ No newline at end of file diff --git a/document/.dir b/document/.dir new file mode 100644 index 0000000..e69de29 diff --git a/document/linux/config/bash/bashrc.sh b/document/linux/config/bash/bashrc.sh new file mode 100755 index 0000000..8bf8946 --- /dev/null +++ b/document/linux/config/bash/bashrc.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +#home="/var/home/voronind" +home="$HOME" +module="$home/document/linux/config/bash/module" + +# src default +if [[ -f /etc/bashrc ]]; then + source /etc/bashrc +fi + +# src custom +for file in $(ls "$module"); do + source "$module/$file" +done + +# alias to reload +alias bashrc="source ~/.bashrc" diff --git a/document/linux/config/bash/module/android.sh b/document/linux/config/bash/module/android.sh new file mode 100644 index 0000000..746d88b --- /dev/null +++ b/document/linux/config/bash/module/android.sh @@ -0,0 +1 @@ +alias emulator="$ANDROID_SDK_ROOT/emulator/emulator -avd default &> /dev/null & disown" diff --git a/document/linux/config/bash/module/archive.sh b/document/linux/config/bash/module/archive.sh new file mode 100644 index 0000000..97b3b30 --- /dev/null +++ b/document/linux/config/bash/module/archive.sh @@ -0,0 +1,112 @@ +# archive file with maximum compression and checksum. +archive() +{ + local target="$@" # target file(s). + + # set dafult value to target all supported archives. + if [[ "$target" = "" ]]; then + target="*" + fi + + # iterate each file. + for file in $target; do + # print archive name. + echo "$file" + + # create archive. + tar -c "$file" | pv -s $(du -sb "$file" | awk '{print $1}') | xz -9e > "${file%/*}".tar.xz + + # append hash to file name. + mv "${file%/*}".tar.xz "${file%/*}"_$(sha1sum "${file%/*}".tar.xz | cut -d\ -f1).tar.xz + done +} + +# archive file with minimal compression and checksum. +archive_fast() +{ + local target="$@" # target file(s). + + # set dafult value to target all supported archives. + if [[ "$target" = "" ]]; then + target="*" + fi + + # iterate each file. + for file in $target; do + # print archive name. + echo "$file" + + # create archive. + tar -c "$file" | pv -s $(du -sb "$file" | awk '{print $1}') | gzip -1 > "${file%/*}".tar.gz + + # append hash to file name. + mv "${file%/*}".tar.gz "${file%/*}"_$(sha1sum "${file%/*}".tar.gz | cut -d\ -f1).tar.gz + done +} + +# check archive hashes. +archive_check() +{ + local target="$@" # target file(s). + local saved # saved hash value. + local actual # actual file hash value. + + # set dafult value to target all supported archives. + if [[ "$target" = "" ]]; then + target="*_*.tar.*" + fi + + # iterate each file. + for file in $target; do + # extract hash from name. + saved="${file##*_}" + saved="${saved%%.*}" + + # calculate actual hash. + actual="$(sha1sum $file | cut -d\ -f1)" + + # compare hashes, show error on mismatch. + if [[ "$actual" = "$saved" ]]; then + echo "$file: OK." + else + echo "$file: failed." + fi + done +} + +# extract previously created archive with checksum validation. +unarchive() +{ + local target="$@" # target file(s). + local saved # saved hash value. + local actual # actual file hash value. + + # set dafult value to target all supported archives. + if [[ "$target" = "" ]]; then + target="*_*.tar.*" + fi + + # iterate each file. + for file in $target; do + # extract hash from name. + saved="${file##*_}" + saved="${saved%%.*}" + + # calculate actual hash. + actual="$(sha1sum $file | cut -d\ -f1)" + + # extract if hash matched or show error if not. + if [[ "$saved" = "$actual" ]]; then + echo "$file: OK." + tar -xf "$file" + else + echo "$file: failed." + fi + done +} + +# export everything, primarily for use with parallel.. +export -f archive +export -f archive_fast +export -f archive_check +export -f unarchive diff --git a/document/linux/config/bash/module/battery.sh b/document/linux/config/bash/module/battery.sh new file mode 100644 index 0000000..fb2b295 --- /dev/null +++ b/document/linux/config/bash/module/battery.sh @@ -0,0 +1,2 @@ +# check battery level. +alias battery_level="cat /sys/class/power_supply/BAT0/capacity" diff --git a/document/linux/config/bash/module/bootstrap.sh b/document/linux/config/bash/module/bootstrap.sh new file mode 100644 index 0000000..6f0c4e2 --- /dev/null +++ b/document/linux/config/bash/module/bootstrap.sh @@ -0,0 +1,24 @@ +# install Cargo/Rust. +bootstrap_cargo() +{ + curl https://sh.rustup.rs -sSf | sh +} + +# install TeXLive. +bootstrap_texlive() +{ + cd /tmp + wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz + tar -xf install-tl-unx.tar.gz + rm install-tl-unx.tar.gz + cd ./install-tl-* + ./install-tl +} + +# install grub theme. +bootstrap_grub() +{ + wget -O- https://github.com/shvchk/fallout-grub-theme/raw/master/install.sh | bash + echo 'GRUB_HIDDEN_TIMEOUT=' >> /etc/default/grub + grub2-mkconfig -o /etc/grub2.cfg +} diff --git a/document/linux/config/bash/module/checksum.sh b/document/linux/config/bash/module/checksum.sh new file mode 100644 index 0000000..15d511c --- /dev/null +++ b/document/linux/config/bash/module/checksum.sh @@ -0,0 +1,27 @@ +# create or check checksums for all files in current directory. +checksum() +{ + local action="$1" # what to do with checksum. + local file="checksum.sha1" # file name to store checksums. + + if [[ "$action" =~ ^(n|new)$ ]]; then + # create checksums for all files. + find -type f | parallel sha1sum {} > "$file" + + # remove checksum file from resulting hashes. + sed -i "/$file/d" "$file" + + return 0 + fi + + if [[ "$action" =~ ^(c|check)$ ]]; then + # check checsums for all files. + sha1sum --quiet -c ./checksum.sha1 + + return 0 + fi + + # error on wrong action. + echo "supported actions: new (n), check (c)." + return 1 +} diff --git a/document/linux/config/bash/module/chmod.sh b/document/linux/config/bash/module/chmod.sh new file mode 100644 index 0000000..213e3f4 --- /dev/null +++ b/document/linux/config/bash/module/chmod.sh @@ -0,0 +1,2 @@ +# add executable flag to file. +alias x="chmod +x" diff --git a/document/linux/config/bash/module/color.sh b/document/linux/config/bash/module/color.sh new file mode 100644 index 0000000..4060f05 --- /dev/null +++ b/document/linux/config/bash/module/color.sh @@ -0,0 +1,39 @@ +# collection of available CLI colors. +# they may differ depending on the terminal used. +# colors with 'b' prefix are bold colors. + +export color_default="\033[0m" +export color_blue="\033[0;34m" +export color_bblue="\033[1;34m" +export color_cyan="\033[0;36m" +export color_bcyan="\033[1;36m" +export color_green="\033[0;32m" +export color_bgreen="\033[1;32m" +export color_purple="\033[0;35m" +export color_bpurple="\033[1;35m" +export color_red="\033[0;31m" +export color_bred="\033[1;31m" +export color_white="\033[0;37m" +export color_bwhite="\033[1;37m" +export color_yellow="\033[0;33m" +export color_byellow="\033[1;33m" + +# print all available colors with their names colored in corresponding color. +color_test() +{ + echo -e " ${color_default}color_default\n\ + ${color_blue}color_blue\n\ + ${color_bblue}color_bblue\n\ + ${color_cyan}color_cyan\n\ + ${color_bcyan}color_bcyan\n\ + ${color_green}color_green\n\ + ${color_bgreen}color_bgreen\n\ + ${color_purple}color_purple\n\ + ${color_bpurple}color_bpurple\n\ + ${color_red}color_red\n\ + ${color_bred}color_bred\n\ + ${color_white}color_white\n\ + ${color_bwhite}color_bwhite\n\ + ${color_yellow}color_yellow\n\ + ${color_byellow}color_byellow" +} diff --git a/document/linux/config/bash/module/copypaste.sh b/document/linux/config/bash/module/copypaste.sh new file mode 100644 index 0000000..54d830d --- /dev/null +++ b/document/linux/config/bash/module/copypaste.sh @@ -0,0 +1,2 @@ +alias copy="wl-copy" +alias paste="wl-paste" diff --git a/document/linux/config/bash/module/cp.sh b/document/linux/config/bash/module/cp.sh new file mode 100644 index 0000000..10c0c10 --- /dev/null +++ b/document/linux/config/bash/module/cp.sh @@ -0,0 +1,11 @@ +# replace default cp with rsync. +alias cp="rsync -ahP --chmod=u+w" + +# copy and also merge all changes (delete dst files that do not exist in src). +alias cp_merge="rsync -ahP --chmod=u+w --delete" + +# copy by creating hardlinks. +alias cp_link="/usr/bin/cp -lr" + +# default cp, a.k.a builtin cp. +alias bcp="/usr/bin/cp" diff --git a/document/linux/config/bash/module/date.sh b/document/linux/config/bash/module/date.sh new file mode 100644 index 0000000..d33e7d6 --- /dev/null +++ b/document/linux/config/bash/module/date.sh @@ -0,0 +1,5 @@ +# print today date in yyyyMMdd format. +alias today="date +%Y%m%d" + +# current day of week number. +alias dow="date +%u" diff --git a/document/linux/config/bash/module/dconf.sh b/document/linux/config/bash/module/dconf.sh new file mode 100644 index 0000000..c82b956 --- /dev/null +++ b/document/linux/config/bash/module/dconf.sh @@ -0,0 +1,2 @@ +alias dconf_load="dconf load / < $HOME/document/linux/config/gnome.dconf" +alias dconf_save="dconf dump / > $HOME/document/linux/config/_gnome.dconf" diff --git a/document/linux/config/bash/module/disk.sh b/document/linux/config/bash/module/disk.sh new file mode 100644 index 0000000..c4d1f3b --- /dev/null +++ b/document/linux/config/bash/module/disk.sh @@ -0,0 +1,5 @@ +# show only physical drive sizes. +alias df='df --si | sed -e "/^tmpfs/d" -e "/^udev/d" -e "/\.Private/d" -e "/^overlay/d" -e "/^shm/d" -e "/^devtmpfs/d"' + +# show combined size in SI. +alias du="du -sh --si" diff --git a/document/linux/config/bash/module/docker.sh b/document/linux/config/bash/module/docker.sh new file mode 100644 index 0000000..cd136c2 --- /dev/null +++ b/document/linux/config/bash/module/docker.sh @@ -0,0 +1,32 @@ +# show container's volumes. +alias docker_volumes="docker inspect -f '{{ .Mounts }}'" + +# check if container exited. +alias docker_health="docker ps -a | grep Exited" + +# prune everything. +alias docker_prune="docker system prune --volumes --all" + +# short aliases. +alias dc="docker compose" +alias dcu="docker compose up -d" +alias dcd="docker compose down" +alias dcp="docker compose pull" +alias dcl="docker compose logs -f" +alias dcul="docker compose up -d && docker compose logs -f" +alias dcdu="dcd; dcu" +alias dcr="docker compose restart" +alias dcs="docker compose stop" +alias dcpu="dcp; dcu" + +# find out container's IP address. +docker_ip() +{ + docker inspect -f '\''{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'\' $1 | sed "s/^.//" | sed "s/.$//" +} + +# update all docker images. +docker_update() +{ + docker images --format "{{.Repository}}:{{.Tag}}" | xargs -L1 docker pull +} diff --git a/document/linux/config/bash/module/export.sh b/document/linux/config/bash/module/export.sh new file mode 100644 index 0000000..49eb75f --- /dev/null +++ b/document/linux/config/bash/module/export.sh @@ -0,0 +1,25 @@ +# add all links in ~/app/bin/ +PATH=$( find -L $HOME/app/bin/ -type d -printf ":%p" 2> /dev/null ):$PATH + +# specify locale. +#export LC_ALL=C +export LANGUAGE="en_US.UTF-8" + +# specify editor. +export EDITOR=nvim + +# specify man page viewer. +export MANPAGER="nvim +Man!" + +# specify java path. +export JAVA_HOME="$HOME/app/java/x64/jdk_11" + +# specify android sdk root. +export ANDROID_SDK_ROOT="$HOME/.android/sdk" + +# specify tex paths. +#export TEXMFSYSVAR="$HOME/app/tex/data/var" +#export TEXMFSYSCONFIG="$HOME/app/tex/data/config" +export TEXMFVAR="$HOME/app/tex/data/var" +export TEXMFCONFIG="$HOME/app/tex/data/config" +export TEXMFLOCAL="$HOME/app/tex/data/local" diff --git a/document/linux/config/bash/module/ffmpeg.sh b/document/linux/config/bash/module/ffmpeg.sh new file mode 100644 index 0000000..dad645b --- /dev/null +++ b/document/linux/config/bash/module/ffmpeg.sh @@ -0,0 +1,10 @@ +# mux audio into containers. tmp usage for anime downloads. +ffmpeg_mux_audio() +{ + if [[ "$1" = "" ]]; then + echo "usage: $ sound/ result/" + return + fi + + for file in *; do ffmpeg -i "$file" -i "$1"/"$file" -c copy -map 0:v:0 -map 1:a:0 -shortest "$2"/"$file"; done +} diff --git a/document/linux/config/bash/module/file.sh b/document/linux/config/bash/module/file.sh new file mode 100644 index 0000000..4d28af5 --- /dev/null +++ b/document/linux/config/bash/module/file.sh @@ -0,0 +1,2 @@ +# open file/dir in GUI. +alias o="xdg-open" diff --git a/document/linux/config/bash/module/fix.sh b/document/linux/config/bash/module/fix.sh new file mode 100644 index 0000000..adae0a6 --- /dev/null +++ b/document/linux/config/bash/module/fix.sh @@ -0,0 +1,17 @@ +# fix when ethernet mistakenly detects 100 Mb instead of 1000 Mb. +fix_ethernet_speed() +{ + local device="$1" + local speed="$2" + + if [[ "$device" = "" || "$speed" = "" ]]; then + echo "usage: [device] [speed]" + return 1 + fi + + ethtool -s "$device" speed "$speed" +} + +# fix files wrong sftp password. +# alias fix_files_sftp="secret-tool clear protocol sftp server 192.168.1.2" +alias fix_files_sftp="secret-tool clear protocol sftp" diff --git a/document/linux/config/bash/module/git.sh b/document/linux/config/bash/module/git.sh new file mode 100644 index 0000000..cc294df --- /dev/null +++ b/document/linux/config/bash/module/git.sh @@ -0,0 +1,30 @@ +# short aliases. +alias gps="git push" +alias gpl="git pull" +alias gl="git log" +alias gs="git status" +alias gst="git stash" +alias gd="git diff" +alias gc="git commit -m" +alias gch="git checkout" +alias gr="git rebase -i" +alias gb="git branch" +alias gco="git checkout" +alias gf="git fetch" +alias gt="git tag" +alias gi="git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached" +alias gpc="git diff >" +alias gp="git apply" + +# get current git tag. +git_tag() +{ + git log | grep commit -m1 | sed -e "s/.*\ //g" | cut -c 1-11; +} + +# alias to preview diff while adding. +ga() +{ + git diff $@ + git add $@ +} diff --git a/document/linux/config/bash/module/ls.sh b/document/linux/config/bash/module/ls.sh new file mode 100644 index 0000000..ca6e3ef --- /dev/null +++ b/document/linux/config/bash/module/ls.sh @@ -0,0 +1,58 @@ +# unset possible system-defined aliases. +unalias l ll lll llll la laa &> /dev/null +unset l ll lll llll la laa &> /dev/null + +# list files in dir. +l() +{ + ls -lhvt --si --group-directories-first "$@" +} + +# list all files in dir, incl. hidden files. +ll() +{ + ls -lAhvt --si --group-directories-first "$@" +} + +# list files in tree structure. +lll() +{ + local depth="$1" + local paths="${@:2}" + + if [[ "$paths" = "" ]]; then + paths="." + fi + + if [[ "$depth" = "" ]]; then + tree -a -- "$paths" + else + tree -a -L "$depth" -- "$paths" + fi +} + +# list files recursively. +llll() +{ + ls -RlAhvt --si --group-directories-first "$@" +} + +# list files alphabetically. +la() +{ + ls -lh --si --group-directories-first "$@" +} + +# list all files alphabetically. +laa() +{ + ls -lAh --si --group-directories-first "$@" +} + +# export. +export -f l +export -f ll +export -f lll +export -f llll +export -f la +export -f laa diff --git a/document/linux/config/bash/module/name.sh b/document/linux/config/bash/module/name.sh new file mode 100644 index 0000000..c04053d --- /dev/null +++ b/document/linux/config/bash/module/name.sh @@ -0,0 +1,276 @@ +# rename files to strip all special characters. +# usage: name [FILES] +name() +{ + local files="$@" + local count=1 + local total=$# + + # all files except hidden by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + total=$(ls | wc -l) + fi + + # process. + for file in $files; do + local extension + local new_name + + # extract new name. + extension="${file##*.}"; + + if [ -f "$file" ] && [ "$extension" != "$file" ]; then + new_name="${file%$extension}" + else + new_name="$file" + extension="" + fi + + new_name=$(echo "$new_name" | \ + sed -e 's/^0\+//g' \ + -e 's/[ ,-]\+/_/g' \ + -e 's/[][?,:,\!,@,~,&,=,%,+,#,\,,(,),{,}]\+//g' \ + -e s/\'//g \ + -e 's/_\+/_/g' \ + # -e 's/\.\+/_/g' \ + ) + new_name="${new_name,,}$extension" + + # status line. + local status="[$count/$total] $file -> $new_name" + + # check if same name. + if [[ "$file" = "$new_name" ]]; then + echo -e "${color_green}$status: no change.${color_default}" + ((count++)) + continue + fi + + # check if file name already exists. + if [[ -f "$new_name" ]]; then + echo -e "${color_red}$status: already exists!${color_default}" + return 1 + fi + + # rename file. + mv -- "$file" "$new_name" &> /dev/null + + # show change. + echo "$status" + + # increment count. + ((count++)) + done +} + +# rename all files to their hashes while keeping extensions. +# usage: name_hash [FILES] +name_hash() +{ + local files="$@" + local count=1 + local total=$# + + # all files except hidden by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + total=$(ls -p | grep -v / | wc -l) + fi + + # process. + for file in $files; do + local extension + local new_name + + # process only files. + if [[ -f "$file" ]]; then + # extract new name. + extension="${file##*.}" + if [ -f "$file" ] && [ "$extension" != "$file" ]; then + new_name="${file%$extension}" + else + new_name="$file" + extension="" + fi + new_name=$(sha1sum -- "$file" | cut -d\ -f1) + if [[ "$extension" != "" ]]; then + new_name="${new_name,,}.$extension" + else + new_name="${new_name,,}" + fi + + # rename file. + mv -- "$file" "$new_name" &> /dev/null + + # show change. + echo "[$count/$total] $file -> $new_name" + + # increment count. + ((count++)) + fi + done +} + +# check hashes for renamed files. +# usage: name_hash_check [FILES] +name_hash_check() +{ + local stored + local actual + local files="$@" + local count=1 + local total=$# + + # all files by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + total=$(ls -p | grep -v / | wc -l) + fi + + # process. + for file in $files; do + # process only files. + if [[ -f "$file" ]]; then + # extract hashes. + stored="${file%%.*}" + actual=$(sha1sum -- "$file" | cut -d\ -f1) + + # compare hashes. + echo -n "[$count/$total] $file: " + if [[ "$stored" = "$actual" ]]; then + echo "OK." + else + echo "failed." + fi + + # increment count. + ((count++)) + fi + done +} + +# rename files for Jellyfin series, i.e. Episode S01E01.mkv +# usage: name_series SEASON +name_series() +{ + local season="$1" + local files="${@:2}" + local count=1 + + # error when no season number specified. + if [[ "$season" = "" ]]; then + echo "usage: name_series SEASON" + return 1 + fi + + # all files by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + fi + + # process. + for file in $files; do + local new_name + + # process only files. + if [[ -f "$file" ]]; then + # extract new name. + new_name="Episode S${season}E$(printf %02d $count).${file##*.}" + + # rename file. + mv -- "$file" "$new_name" &> /dev/null + echo "$file -> $new_name" + + # increment episode number. + ((count++)) + fi + done +} + +# rename files for Kavita manga format. +# usage: name_manga SEASON +name_manga() +{ + local season="$1" + local files="${@:2}" + local count=1 + local manga="${PWD##*/}" + + # error when no season number specified. + if [[ "$season" = "" ]]; then + echo "usage: name_manga SEASON" + return 1 + fi + + # all files by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + fi + + # process. + for file in $files; do + local new_name + + # process only files. + if [[ -f "$file" ]]; then + # extract new name. + new_name="${manga} Vol.${season} Ch.${count}.${file##*.}" + + # rename file. + mv -- "$file" "$new_name" &> /dev/null + echo "$file -> $new_name" + + # increment episode number. + ((count++)) + fi + done +} + +# rename files for new extension. +# usage: name_ext EXTENSION [FILES] +name_ext() +{ + local extension="$1" + local files="${@:2}" + local count=1 + local total=$# + + # error when no new extension specified. + if [[ "$extension" = "" ]]; then + echo "usage: name_ext EXTENSION [FILES]" + return 1 + fi + + # all files by default. + if [[ "$files" = "" ]]; then + files="[^.]*" + total=$(ls -p | grep -v / | wc -l) + fi + + # process. + for file in $files; do + local new_name + + # process only files. + if [[ -f "$file" ]]; then + # extract new name. + new_name="${file%.*}"."$extension" + + # rename file. + mv -- "$file" "$new_name" &> /dev/null + + # show change. + echo "[$count/$total] $file -> $new_name" + + # increment count. + ((count++)) + fi + done +} + +# export for parallel. +export -f name +export -f name_hash +export -f name_hash_check +export -f name_ext diff --git a/document/linux/config/bash/module/ncdu.sh b/document/linux/config/bash/module/ncdu.sh new file mode 100644 index 0000000..5b51113 --- /dev/null +++ b/document/linux/config/bash/module/ncdu.sh @@ -0,0 +1,2 @@ +# search only on current filesystem. +alias ncdu='ncdu -x' diff --git a/document/linux/config/bash/module/notify.sh b/document/linux/config/bash/module/notify.sh new file mode 100644 index 0000000..1dbdb6f --- /dev/null +++ b/document/linux/config/bash/module/notify.sh @@ -0,0 +1,11 @@ +# send Telegram notification. +notify() +{ + curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null +} + +# send silent Telegram notification. +notify_silent() +{ + curl -X POST -H 'Content-Type: Application/json' -d "{\"chat_id\":\"155897358\",\"text\":\"$1\",\"disable_notification\":\"true\"}" https://api.telegram.org/bot2046849441:AAHQpjRK4xpL8tEUyN4JTSDUUze4J0wSIy4/sendMessage &> /dev/null +} diff --git a/document/linux/config/bash/module/own.sh b/document/linux/config/bash/module/own.sh new file mode 100644 index 0000000..7723792 --- /dev/null +++ b/document/linux/config/bash/module/own.sh @@ -0,0 +1,22 @@ +# change file ownership to specified user id and restrict access to him. +own() +{ + local file="$1" + local user="$2" + + # default to current dir. + if [ "$file" = "" ]; then + file='.' + fi + + # default to current user. + if [ "$user" = "" ]; then + user="$UID" + fi + + # set ownership. + chown "$user":"$user" -R "$file" &> /dev/null + + # remove access from group and others. + chmod -077 -R "$file" +} diff --git a/document/linux/config/bash/module/permissions.sh b/document/linux/config/bash/module/permissions.sh new file mode 100644 index 0000000..d6ec5c2 --- /dev/null +++ b/document/linux/config/bash/module/permissions.sh @@ -0,0 +1,5 @@ +# recursively change permissions to allow read sharing with group and others. +alias perm_share="find . -type d -exec chmod 755 {} \;; find . -type f -exec chmod 644 {} \;" + +# recursively change permissions to restrict access for group and others. +alias perm="find . -type d -exec chmod 700 {} \;; find . -type f -exec chmod 600 {} \;" diff --git a/document/linux/config/bash/module/ps.sh b/document/linux/config/bash/module/ps.sh new file mode 100644 index 0000000..1f58721 --- /dev/null +++ b/document/linux/config/bash/module/ps.sh @@ -0,0 +1 @@ +alias ps="ps aux | grep" diff --git a/document/linux/config/bash/module/ps1.sh b/document/linux/config/bash/module/ps1.sh new file mode 100644 index 0000000..c3b3c60 --- /dev/null +++ b/document/linux/config/bash/module/ps1.sh @@ -0,0 +1,64 @@ +PROMPT_COMMAND=(__prompt_command "${PROMPT_COMMAND[@]}") + +# custom terminal prompt format. +__prompt_command() +{ + local last_status="${?}" + local is_error=false + local is_root=false + + if [[ $last_status != 0 && $last_status != 130 ]]; then + is_error=true + fi + if [[ "$UID" -eq 0 ]]; then + is_root=true + fi + + # add newline + PS1="\n" + + # set error red + if $is_error; then + PS1+="\[${color_red}\]" + PS1+="[" + else + PS1+="\[${color_default}\]" + PS1+="[" + fi + + # add time + PS1+="\[${color_white}\]" + PS1+="$(date +%H:%M) " + + # set root red + if $is_root; then + PS1+="\[${color_red}\]" + else + PS1+="\[${color_cyan}\]" + fi + + # add user, host and working dir + PS1+="\u@\h " + PS1+="\[${color_blue}\]" + PS1+="\w" + + # set error red + if $is_error; then + PS1+="\[${color_red}\]" + PS1+="] " + else + PS1+="\[${color_default}\]" + PS1+="] " + fi + + # command on new line + PS1+="\n" + PS1+="\[${color_default}\]" + + # set user tag + if $is_root; then + PS1+="# " + else + PS1+="$ " + fi +} diff --git a/document/linux/config/bash/module/shopt.sh b/document/linux/config/bash/module/shopt.sh new file mode 100644 index 0000000..3073793 --- /dev/null +++ b/document/linux/config/bash/module/shopt.sh @@ -0,0 +1,7 @@ +# bash extensions. +shopt -s dotglob +shopt -s globstar +shopt -s autocd +# set -o vi +# bind -m vi-command ".":yank-last-argument +exec {BASH_XTRACEFD}>/dev/null diff --git a/document/linux/config/bash/module/su.sh b/document/linux/config/bash/module/su.sh new file mode 100644 index 0000000..8da1a14 --- /dev/null +++ b/document/linux/config/bash/module/su.sh @@ -0,0 +1,2 @@ +# I'm lazy af. +alias s='su' diff --git a/document/linux/config/bash/module/terminal.sh b/document/linux/config/bash/module/terminal.sh new file mode 100644 index 0000000..e4ccdc4 --- /dev/null +++ b/document/linux/config/bash/module/terminal.sh @@ -0,0 +1,6 @@ +tsize() +{ + local width=$(tput cols) + local height=$(tput lines) + echo "${width}x${height}" +} diff --git a/document/linux/config/bash/module/tmux.sh b/document/linux/config/bash/module/tmux.sh new file mode 100644 index 0000000..9bba259 --- /dev/null +++ b/document/linux/config/bash/module/tmux.sh @@ -0,0 +1,49 @@ +# create/attach to named session. +ta() +{ + local name="$1" + + # set default name. + if [[ "$name" = "" ]]; then + name="main" + fi + + # call tmux. + tmux new -s "$name" 2> /dev/null || tmux attach-session -t "$name" +} + +# detach. +alias td="tmux detach-client" + +# list. +alias tl="tmux list-sessions" + +# rename. +alias tr="tmux rename-session" + +# assign name (to window). +alias tn="tmux rename-window" + +# kill specified session or default one. +tk() +{ + local name="$1" + + # set default name. + if [[ "$name" = "" ]]; then + name="main" + fi + + # call tmux. + tmux kill-session -t "$name" +} + +# kill all sessions. +tka() +{ + local sessions=$(tmux list-sessions | sed -e 's/:.*//') + + for session in $sessions; do + tmux kill-session -t "$session" + done +} diff --git a/document/linux/config/bash/module/toolbx.sh b/document/linux/config/bash/module/toolbx.sh new file mode 100644 index 0000000..482a3de --- /dev/null +++ b/document/linux/config/bash/module/toolbx.sh @@ -0,0 +1,68 @@ +# create toolbx container with default or specified name. +tb() +{ + local name="$1" + + # set default name. + if [[ "$name" = "" ]]; then + name="toolbx" + fi + + # start container or run command inside it if specified. + if [[ "$2" = "" ]]; then + # set hostname. + toolbox --container "$name" run sudo hostname "${HOSTNAME}-${name}" + + # try to enter or create if failed. + toolbox enter "$name" || { + # create container. + toolbox create "$name" + + # initialize container. + toolbox --container "$name" run sudo hostname "${HOSTNAME}-${name}" + toolbox --container "$name" run sudo rm /root/.bashrc + toolbox --container "$name" run sudo ln -s $HOME/document /root/document + toolbox --container "$name" run sudo ln -s $HOME/document/linux/config/bash/bashrc.sh /root/.bashrc + + # enter container, finally. + toolbox enter "$name" + } + else + # set hostname. + toolbox --container "$name" run sudo hostname "${HOSTNAME}-${name}" + + # run command inside container. + toolbox --container "$name" run ${@:2} + fi +} + +# remove toolbx container with default or specified name. +tbk() +{ + local name="$1" + + # set default name. + if [[ "$name" = "" ]]; then + name="toolbx" + fi + + # stop and remove podman container. + podman stop "$name" > /dev/null && podman rm "$name" > /dev/null +} + +# install rpm-fusion repository. +tb_rpmfusion() +{ + local name="$1" + + # set default name. + if [[ "$name" = "" ]]; then + name="toolbx" + fi + + # run dnf inside container. + toolbox --container "$name" run sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +} + +# list all containers. +alias tbl="podman ps -a" diff --git a/document/linux/config/bash/module/try.sh b/document/linux/config/bash/module/try.sh new file mode 100644 index 0000000..a98df1d --- /dev/null +++ b/document/linux/config/bash/module/try.sh @@ -0,0 +1,13 @@ +# retry command every 2 sec until it completes. +try() +{ + local result=-1 + + while [ "$result" != 0 ]; do + $@ + result=$? + if [ "$result" != 0 ]; then + sleep 2 + fi + done +} diff --git a/document/linux/config/bash/module/umask.sh b/document/linux/config/bash/module/umask.sh new file mode 100644 index 0000000..388f8c3 --- /dev/null +++ b/document/linux/config/bash/module/umask.sh @@ -0,0 +1,2 @@ +# set global umask. +umask 077 diff --git a/document/linux/config/bash/module/vdl.sh b/document/linux/config/bash/module/vdl.sh new file mode 100644 index 0000000..46cb891 --- /dev/null +++ b/document/linux/config/bash/module/vdl.sh @@ -0,0 +1,30 @@ +# download video from URL in background. +vdl() +{ + echo "$@" > src.txt + yt-dlp -f 'bestvideo[height<=?1081]+bestaudio/best' --download-archive index.txt --embed-thumbnail --embed-subs --write-auto-subs --embed-metadata --merge-output-format mkv -cio '%(playlist_index)000006d_%(id)s.%(ext)s' "$@" +} + +# download all videos from file. +alias vdl_file="vdl -a" + +# update playlist. +vdl_update() +{ + local src="$(cat src.txt)" + vdl "$src" +} + +# update all playlists recursively. +vdl_update_all() +{ + local root="$PWD" + local dir + for file in **/src.txt; do + dir="${file%/*}" + cd "$dir" + echo "$PWD" + vdl_update + cd "$root" + done +} diff --git a/document/linux/config/bash/module/vi.sh b/document/linux/config/bash/module/vi.sh new file mode 100644 index 0000000..80f74d8 --- /dev/null +++ b/document/linux/config/bash/module/vi.sh @@ -0,0 +1,4 @@ +# vim configuration. +#export vim_args='-c "filetype plugin indent on" -c "set autoindent" -c "set tabstop=2" -c "set shiftwidth=2" -c "set expandtab" -c "set number"' +#alias vi="vi $vim_args" +alias vi="nvim" diff --git a/document/linux/config/bash/module/wallpaper.sh b/document/linux/config/bash/module/wallpaper.sh new file mode 100644 index 0000000..4895ca0 --- /dev/null +++ b/document/linux/config/bash/module/wallpaper.sh @@ -0,0 +1,7 @@ +# set specified file as a wallpaper. +wallpaper() +{ + path_wallpaper=~/.local/share/backgrounds/background.jpg + cp "$1" $path_wallpaper + chmod 644 $path_wallpaper +} diff --git a/document/linux/config/bash/module/watch.sh b/document/linux/config/bash/module/watch.sh new file mode 100644 index 0000000..f4fd0a4 --- /dev/null +++ b/document/linux/config/bash/module/watch.sh @@ -0,0 +1,3 @@ +# short aliases. +alias w='watch -x bash -c' +alias ww='watch -n 0 -x bash -c' diff --git a/document/linux/config/flatpak.txt b/document/linux/config/flatpak.txt new file mode 100644 index 0000000..74265d2 --- /dev/null +++ b/document/linux/config/flatpak.txt @@ -0,0 +1,17 @@ +Jellyfin Media Player com.github.iwalton3.jellyfin-media-player 1.9.1 stable system +Tor Browser Launcher com.github.micahflee.torbrowser-launcher 0.3.6 stable system +Flatseal com.github.tchx84.Flatseal 2.0.2 stable system +Android Studio com.google.AndroidStudio 2022.3.1.18 stable system +IntelliJ IDEA Community com.jetbrains.IntelliJ-IDEA-Community 2023.2 stable system +OBS Studio com.obsproject.Studio 29.1.3 stable system +Bottles com.usebottles.bottles 51.6 stable system +Steam com.valvesoftware.Steam 1.0.0.78 stable system +mpv io.mpv.Mpv 0.36.0 stable system +GNU Image Manipulation Program org.gimp.GIMP 2.10.34 stable system +Document Viewer org.gnome.Evince 44.3 stable system +GHex org.gnome.GHex 44.1 stable system +Text Editor org.gnome.TextEditor 44.0 stable system +Image Viewer org.gnome.eog 44.2 stable system +Kdenlive org.kde.kdenlive 23.04.3 stable system +Firefox org.mozilla.firefox 117.0.1 stable system +ONLYOFFICE Desktop Editors org.onlyoffice.desktopeditors 7.4.1 stable system diff --git a/document/linux/config/gnome.dconf b/document/linux/config/gnome.dconf new file mode 100644 index 0000000..bfde237 --- /dev/null +++ b/document/linux/config/gnome.dconf @@ -0,0 +1,284 @@ +[org/gnome/desktop/a11y] +always-show-universal-access-status=true + +[org/gnome/desktop/a11y/applications] +screen-keyboard-enabled=false +screen-magnifier-enabled=false + +[org/gnome/desktop/a11y/interface] +high-contrast=false + +[org/gnome/desktop/background] +color-shading-type='solid' +picture-options='zoom' +picture-uri='file:///var/home/voronind/.local/share/backgrounds/background.jpg' +picture-uri-dark='file:///var/home/voronind/.local/share/backgrounds/background.jpg' +primary-color='#000000000000' +secondary-color='#000000000000' + +[org/gnome/desktop/input-sources] +current=uint32 0 +mru-sources=[('xkb', 'us'), ('xkb', 'ru')] +per-window=false +sources=[('xkb', 'us'), ('xkb', 'ru')] +xkb-options=['grp:caps_toggle', 'lv3:ralt_switch'] + +[org/gnome/desktop/interface] +clock-show-date=true +clock-show-weekday=true +color-scheme='prefer-dark' +cursor-blink=false +cursor-size=24 +cursor-theme='Adwaita' +document-font-name='SF Pro Text 11' +enable-animations=false +enable-hot-corners=false +font-antialiasing='rgba' +font-hinting='full' +font-name='SF Pro Display 10' +gtk-enable-primary-paste=false +gtk-theme='Adwaita-dark' +icon-theme='Adwaita' +monospace-font-name='Terminess Nerd Font Mono Medium 12' +show-battery-percentage=false +text-scaling-factor=1.25 +toolbar-style='text' +toolkit-accessibility=false + +[org/gnome/desktop/media-handling] +automount=false +automount-open=false +autorun-never=true + +[org/gnome/desktop/peripherals/mouse] +accel-profile='flat' +natural-scroll=true +speed=0.0 + +[org/gnome/desktop/peripherals/touchpad] +tap-to-click=true +two-finger-scrolling-enabled=true + +[org/gnome/desktop/privacy] +disable-camera=false +disable-microphone=false +old-files-age=uint32 30 +recent-files-max-age=30 +remove-old-temp-files=true +remove-old-trash-files=true +report-technical-problems=true + +[org/gnome/desktop/remote-desktop/rdp] +enable=false +tls-cert='/var/home/voronind/.local/share/gnome-remote-desktop/tls.crt' +tls-key='/var/home/voronind/.local/share/gnome-remote-desktop/tls.key' +view-only=true + +[org/gnome/desktop/screensaver] +color-shading-type='solid' +idle-activation-enabled=false +lock-delay=uint32 0 +picture-options='zoom' +picture-uri='file:///var/home/voronind/.local/share/backgrounds/background.jpg' +primary-color='#000000000000' +secondary-color='#000000000000' + +[org/gnome/desktop/sound] +allow-volume-above-100-percent=false +event-sounds=false +theme-name='freedesktop' + +[org/gnome/desktop/wm/keybindings] +activate-window-menu=@as [] +begin-move=@as [] +begin-resize=['r'] +close=['x'] +cycle-group=@as [] +cycle-group-backward=@as [] +cycle-panels=@as [] +cycle-panels-backward=@as [] +cycle-windows=@as [] +cycle-windows-backward=@as [] +maximize=@as [] +maximize-horizontally=@as [] +minimize=['s'] +move-to-monitor-down=@as [] +move-to-monitor-left=@as [] +move-to-monitor-right=@as [] +move-to-monitor-up=@as [] +move-to-workspace-1=@as [] +move-to-workspace-2=@as [] +move-to-workspace-3=@as [] +move-to-workspace-4=@as [] +move-to-workspace-last=@as [] +move-to-workspace-left=['q'] +move-to-workspace-right=['e'] +panel-run-dialog=['space'] +show-desktop=[''] +switch-applications=['Tab'] +switch-applications-backward=['Tab'] +switch-group=['Tab'] +switch-group-backward=['Tab'] +switch-input-source=[''] +switch-input-source-backward=[''] +switch-panels=@as [] +switch-panels-backward=@as [] +switch-to-workspace-1=@as [] +switch-to-workspace-2=[''] +switch-to-workspace-3=[''] +switch-to-workspace-4=[''] +switch-to-workspace-last=@as [] +switch-to-workspace-left=['q'] +switch-to-workspace-right=['e'] +switch-windows=@as [] +switch-windows-backward=@as [] +toggle-fullscreen=['f'] +toggle-maximized=['w'] +unmaximize=@as [] + +[org/gnome/desktop/wm/preferences] +action-middle-click-titlebar='minimize' +action-right-click-titlebar='menu' +button-layout='appmenu:close' +focus-mode='click' +titlebar-font='SF Pro Display 11' + +[org/gnome/gnome-system-monitor] +graph-update-interval=100 +kill-dialog=false +maximized=false +network-in-bits=true +network-total-in-bits=true +show-dependencies=false +show-whose-processes='user' +update-interval=1500 + +[org/gnome/mutter] +attach-modal-dialogs=true +center-new-windows=true +dynamic-workspaces=true +edge-tiling=true +workspaces-only-on-primary=true + +[org/gnome/mutter/keybindings] +toggle-tiled-left=['a'] +toggle-tiled-right=['d'] + +[org/gnome/mutter/wayland/keybindings] +restore-shortcuts=[''] + +[org/gnome/nautilus/icon-view] +default-zoom-level='larger' + +[org/gnome/nautilus/list-view] +default-zoom-level='small' +use-tree-view=false + +[org/gnome/nautilus/preferences] +click-policy='single' +default-folder-viewer='list-view' +default-sort-in-reverse-order=true +default-sort-order='mtime' +migrated-gtk-settings=true +search-filter-time-type='last_modified' +search-view='list-view' +show-image-thumbnails='local-only' + +[org/gnome/settings-daemon/plugins/color] +night-light-enabled=false +night-light-schedule-automatic=false +night-light-schedule-from=0.0 +night-light-schedule-to=0.0 +night-light-temperature=uint32 3700 + +[org/gnome/settings-daemon/plugins/media-keys] +custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'] +magnifier=@as [] +magnifier-zoom-in=@as [] +magnifier-zoom-out=@as [] +screenreader=@as [] + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0] +binding='Escape' +command='gnome-terminal' +name='gnome-terminal' + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2] +binding='Escape' +command='gnome-system-monitor' +name='gnome-system-monitor' + +[org/gnome/settings-daemon/plugins/power] +power-button-action='nothing' +sleep-inactive-ac-timeout=900 +sleep-inactive-ac-type='nothing' +sleep-inactive-battery-type='nothing' + +[org/gnome/shell] +disable-extension-version-validation=true +disable-user-extensions=false +favorite-apps=@as [] +had-bluetooth-devices-setup=true +last-selected-power-profile='power-saver' +remember-mount-password=false + +[org/gnome/shell/app-switcher] +current-workspace-only=true + +[org/gnome/shell/keybindings] +focus-active-notification=@as [] +open-application-menu=@as [] +switch-to-application-1=@as [] +switch-to-application-2=@as [] +switch-to-application-3=@as [] +switch-to-application-4=@as [] +switch-to-application-5=[''] +switch-to-application-6=[''] +switch-to-application-7=[''] +switch-to-application-8=[''] +switch-to-application-9=[''] +toggle-application-view=[''] +toggle-message-tray=@as [] +toggle-overview=[''] + +[org/gnome/shell/overrides] +edge-tiling=false + +[org/gnome/software] +download-updates=false +download-updates-notify=false +first-run=false +show-nonfree-prompt=false + +[org/gnome/system/location] +enabled=false + +[org/gtk/gtk4/settings/file-chooser] +date-format='regular' +location-mode='path-bar' +show-hidden=false +show-size-column=true +show-type-column=true +sidebar-width=166 +sort-column='modified' +sort-directories-first=true +sort-order='descending' +type-format='category' +view-type='list' + +[org/gtk/settings/file-chooser] +date-format='regular' +location-mode='path-bar' +show-hidden=false +show-size-column=true +show-type-column=true +sort-column='modified' +sort-directories-first=true +sort-order='descending' +type-format='category' + +[system/locale] +region='ru_RU.UTF-8' + +[system/proxy] +mode='none' diff --git a/document/linux/config/rpm-ostree.txt b/document/linux/config/rpm-ostree.txt new file mode 100644 index 0000000..6c99e94 --- /dev/null +++ b/document/linux/config/rpm-ostree.txt @@ -0,0 +1,13 @@ +State: idle +Deployments: + fedora:fedora/38/x86_64/silverblue + Version: 38.20230926.0 (2023-09-26T00:51:28Z) + BaseCommit: 5e160c863556300aa1f62a1173766af62fcd7609c945ff1db9823a9a1347a3ea + GPGSignature: Valid signature by 6A51BBABBA3D5467B6171221809A8D7CEB10B464 + RemovedBasePackages: firefox firefox-langpacks 117.0.1-1.fc38 + gnome-software gnome-software-rpm-ostree 44.5-1.fc38 + LayeredPackages: 'gcc-c++' android-tools binwalk containerd.io ddrescue docker-ce + docker-ce-cli docker-compose-plugin gnome-tweaks htop jpegoptim + lm_sensors lshw ncdu neovim nmap parallel pv ripgrep + rpmfusion-free-release rpmfusion-nonfree-release scanmem + smartmontools sqlite testdisk tmux virt-manager vsftpd waydroid diff --git a/document/linux/config/sshd_config b/document/linux/config/sshd_config new file mode 100644 index 0000000..1521494 --- /dev/null +++ b/document/linux/config/sshd_config @@ -0,0 +1,23 @@ +Port 22143 +AddressFamily any +ListenAddress 0.0.0.0 +ListenAddress :: + +AllowUsers root +LoginGraceTime 1m +PermitRootLogin yes +StrictModes no +MaxAuthTries 1 +MaxSessions 10 +PermitEmptyPasswords no + +PasswordAuthentication yes +KbdInteractiveAuthentication yes +PubkeyAuthentication no +HostbasedAuthentication no +KerberosAuthentication no +GSSAPIAuthentication no +UsePAM yes +UseDNS no + +Subsystem sftp /usr/libexec/openssh/sftp-server diff --git a/document/linux/config/sysctl.conf b/document/linux/config/sysctl.conf new file mode 100644 index 0000000..e7afe8f --- /dev/null +++ b/document/linux/config/sysctl.conf @@ -0,0 +1,96 @@ +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See /etc/sysctl.d/ for additional system variables. +# See sysctl.conf (5) for information. +# + +#kernel.domainname = example.com + +# Uncomment the following to stop low-level messages on console +#kernel.printk = 3 4 1 3 + +##############################################################3 +# Functions previously found in netbase +# + +# Uncomment the next two lines to enable Spoof protection (reverse-path filter) +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +net.ipv4.conf.default.rp_filter=1 +net.ipv4.conf.all.rp_filter=1 + +# Uncomment the next line to enable TCP/IP SYN cookies +# See http://lwn.net/Articles/277146/ +# Note: This may impact IPv6 TCP sessions too +#net.ipv4.tcp_syncookies=1 + +# Uncomment the next line to enable packet forwarding for IPv4 +net.ipv4.ip_forward=1 + +# Uncomment the next line to enable packet forwarding for IPv6 +# Enabling this option disables Stateless Address Autoconfiguration +# based on Router Advertisements for this host +#net.ipv6.conf.all.forwarding=1 + + +################################################################### +# Additional settings - these settings can improve the network +# security of the host and prevent against some network attacks +# including spoofing attacks and man in the middle attacks through +# redirection. Some network environments, however, require that these +# settings are disabled so review and enable them as needed. +# +# Do not accept ICMP redirects (prevent MITM attacks) +net.ipv4.conf.all.accept_redirects = 0 +net.ipv6.conf.all.accept_redirects = 0 +# _or_ +# Accept ICMP redirects only for gateways listed in our default +# gateway list (enabled by default) +# net.ipv4.conf.all.secure_redirects = 1 +# +# Do not send ICMP redirects (we are not a router) +net.ipv4.conf.all.send_redirects = 0 +# +# Do not accept IP source route packets (we are not a router) +net.ipv4.conf.all.accept_source_route = 0 +net.ipv6.conf.all.accept_source_route = 0 +# +# Log Martian Packets +#net.ipv4.conf.all.log_martians = 1 +# + +################################################################### +# Magic system request Key +# 0=disable, 1=enable all +# Debian kernels have this set to 0 (disable the key) +# See https://www.kernel.org/doc/Documentation/sysrq.txt +# for what other values do +kernel.sysrq=1 + +################################################################### +# Protected links +# +# Protects against creating or following links under certain conditions +# Debian kernels have both set to 1 (restricted) +# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt +#fs.protected_hardlinks=0 +#fs.protected_symlinks=0 + +net.ipv4.ip_default_ttl=65 + +#lynis +kernel.core_uses_pid=1 +kernel.kptr_restrict=2 +net.ipv4.conf.all.log_martians=1 +net.ipv4.conf.default.accept_redirects=0 +net.ipv4.conf.default.accept_source_route=0 +net.ipv4.conf.default.log_martians=0 +net.ipv4.tcp_timestamps=0 +net.ipv6.conf.default.accept_redirects=0 +fs.inotify.max_user_instances=999999 +fs.inotify.max_user_watches=999999 +fs.inotify.max_user_event=999999 +net.ipv6.conf.all.disable_ipv6=1 +net.ipv6.conf.default.disable_ipv6=1 +net.ipv6.conf.lo.disable_ipv6=1 +net.ipv6.conf.eth0.disable_ipv6=1 diff --git a/document/linux/config/systemd/hdd/hdd_no_sleep.service b/document/linux/config/systemd/hdd/hdd_no_sleep.service new file mode 100644 index 0000000..62767e1 --- /dev/null +++ b/document/linux/config/systemd/hdd/hdd_no_sleep.service @@ -0,0 +1,12 @@ +[Unit] +Description=dont spin HDD drives down + +[Service] +Type=oneshot +ExecStart=/usr/sbin/hdparm -S 0 /dev/disk/by-id/ata-ST20000NM007D-3DJ103_ZVT8BJJF +ExecStart=/usr/sbin/hdparm -S 0 /dev/disk/by-id/ata-ST20000NM007D-3DJ103_ZVT8MLLQ +ExecStart=/usr/sbin/hdparm -S 0 /dev/disk/by-id/usb-WDC_WD20_SPZX-22UA7T0_20170930-0:0 +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/hdd/hdd_sleep.service b/document/linux/config/systemd/hdd/hdd_sleep.service new file mode 100644 index 0000000..62a52e5 --- /dev/null +++ b/document/linux/config/systemd/hdd/hdd_sleep.service @@ -0,0 +1,10 @@ +[Unit] +Description=spin HDD drives down + +[Service] +Type=oneshot +ExecStart=/var/roothome/app/bin/hdd_sleep +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/hdd/hdd_sleep.timer b/document/linux/config/systemd/hdd/hdd_sleep.timer new file mode 100644 index 0000000..032cd6e --- /dev/null +++ b/document/linux/config/systemd/hdd/hdd_sleep.timer @@ -0,0 +1,9 @@ +[Unit] +Description=spin drives down at night + +[Timer] +OnCalendar=*-*-* 07:00:00 +Persistent=false + +[Install] +WantedBy=timers.target diff --git a/document/linux/config/systemd/home/backup.service b/document/linux/config/systemd/home/backup.service new file mode 100644 index 0000000..8157701 --- /dev/null +++ b/document/linux/config/systemd/home/backup.service @@ -0,0 +1,10 @@ +[Unit] +Description=backup system + +[Service] +Type=oneshot +ExecStart=/var/roothome/app/bin/home/backup +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/home/backup.timer b/document/linux/config/systemd/home/backup.timer new file mode 100644 index 0000000..9ccd0c1 --- /dev/null +++ b/document/linux/config/systemd/home/backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=backup system + +[Timer] +OnCalendar=*-*-* 06:00:00 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/document/linux/config/systemd/home/nextcloud.service b/document/linux/config/systemd/home/nextcloud.service new file mode 100644 index 0000000..6e810b5 --- /dev/null +++ b/document/linux/config/systemd/home/nextcloud.service @@ -0,0 +1,10 @@ +[Unit] +Description=nextcloud maintenance + +[Service] +Type=oneshot +ExecStart=/var/roothome/app/bin/home/nextcloud +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/home/nextcloud.timer b/document/linux/config/systemd/home/nextcloud.timer new file mode 100644 index 0000000..bad7977 --- /dev/null +++ b/document/linux/config/systemd/home/nextcloud.timer @@ -0,0 +1,9 @@ +[Unit] +Description=nextcloud maintenance + +[Timer] +OnCalendar=hourly +Persistent=false + +[Install] +WantedBy=timers.target diff --git a/document/linux/config/systemd/home/photos_process.service b/document/linux/config/systemd/home/photos_process.service new file mode 100644 index 0000000..11b5436 --- /dev/null +++ b/document/linux/config/systemd/home/photos_process.service @@ -0,0 +1,10 @@ +[Unit] +Description=photos processing + +[Service] +Type=oneshot +ExecStart=/var/roothome/app/bin/home/photos_process +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/home/photos_process.timer b/document/linux/config/systemd/home/photos_process.timer new file mode 100644 index 0000000..8137033 --- /dev/null +++ b/document/linux/config/systemd/home/photos_process.timer @@ -0,0 +1,9 @@ +[Unit] +Description=process photos + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/document/linux/config/systemd/home/yandex_music.service b/document/linux/config/systemd/home/yandex_music.service new file mode 100644 index 0000000..47e193f --- /dev/null +++ b/document/linux/config/systemd/home/yandex_music.service @@ -0,0 +1,10 @@ +[Unit] +Description=download music + +[Service] +Type=oneshot +ExecStart=/var/roothome/app/bin/home/yandex_music +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/home/yandex_music.timer b/document/linux/config/systemd/home/yandex_music.timer new file mode 100644 index 0000000..f381bcb --- /dev/null +++ b/document/linux/config/systemd/home/yandex_music.timer @@ -0,0 +1,9 @@ +[Unit] +Description=download music + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/document/linux/config/systemd/power/powerlimit.service b/document/linux/config/systemd/power/powerlimit.service new file mode 100644 index 0000000..c322f99 --- /dev/null +++ b/document/linux/config/systemd/power/powerlimit.service @@ -0,0 +1,12 @@ +[Unit] +Description=limit battery charge to 40-80 percent + +[Service] +Type=simple +RemainAfterExit=yes +ExecStart=/usr/bin/bash -c '/usr/bin/echo 40 > /sys/class/power_supply/BAT0/charge_control_start_threshold; /usr/bin/echo 80 > /sys/class/power_supply/BAT0/charge_control_end_threshold;' +ExecStop=/usr/bin/bash -c '/usr/bin/echo 95 > /sys/class/power_supply/BAT0/charge_control_end_threshold; /usr/bin/echo 90 > /sys/class/power_supply/BAT0/charge_control_start_threshold;' +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/power/powersave_amd.service b/document/linux/config/systemd/power/powersave_amd.service new file mode 100644 index 0000000..f682ffb --- /dev/null +++ b/document/linux/config/systemd/power/powersave_amd.service @@ -0,0 +1,12 @@ +[Unit] +Description=disable amd boost + +[Service] +Type=simple +RemainAfterExit=yes +ExecStart=/usr/bin/bash -c '/usr/bin/echo 0 > /sys/devices/system/cpu/cpufreq/boost' +ExecStop=/usr/bin/bash -c '/usr/bin/echo 1 > /sys/devices/system/cpu/cpufreq/boost' +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/systemd/power/powersave_intel.service b/document/linux/config/systemd/power/powersave_intel.service new file mode 100644 index 0000000..343e9c9 --- /dev/null +++ b/document/linux/config/systemd/power/powersave_intel.service @@ -0,0 +1,12 @@ +[Unit] +Description=disable intel boost + +[Service] +Type=simple +RemainAfterExit=yes +ExecStart=/usr/bin/bash -c '/usr/bin/echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo' +ExecStop=/usr/bin/bash -c '/usr/bin/echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo' +#Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/document/linux/config/vsftpd.conf b/document/linux/config/vsftpd.conf new file mode 100644 index 0000000..8df6e75 --- /dev/null +++ b/document/linux/config/vsftpd.conf @@ -0,0 +1,15 @@ +listen=YES +anonymous_enable=YES +local_enable=NO +write_enable=YES +anon_upload_enable=YES +dirmessage_enable=YES +use_localtime=YES +xferlog_enable=NO +connect_from_port_20=YES +anon_root=/var/mnt/storage/hot/ftp +#pam_service_name=vsftpd +allow_writeable_chroot=YES +anon_mkdir_write_enable=YES +anon_other_write_enable=YES +anon_umask=000 diff --git a/document/template/.dir b/document/template/.dir new file mode 100644 index 0000000..e69de29 diff --git a/download/.dir b/download/.dir new file mode 100644 index 0000000..e69de29 diff --git a/media/.dir b/media/.dir new file mode 100644 index 0000000..e69de29 diff --git a/media/picture/.dir b/media/picture/.dir new file mode 100644 index 0000000..e69de29 diff --git a/media/video/.dir b/media/video/.dir new file mode 100644 index 0000000..e69de29 diff --git a/tmp/.dir b/tmp/.dir new file mode 100644 index 0000000..e69de29