This commit is contained in:
Dmitry Zakharchenko 2022-09-19 19:44:07 +03:00
parent 71be463e5c
commit 8881930a2c
13 changed files with 58 additions and 55 deletions

View file

@ -14,6 +14,7 @@ local languages = {
-- If subtitles are found for the first language,
-- other languages will NOT be downloaded,
-- so put your preferred language first:
{ 'Russian', 'ru', 'rus' },
{ 'English', 'en', 'eng' }
}
--=============================================================================

View file

@ -1,10 +1,9 @@
"TECH" "(---)"
https://go.dev/blog/feed.atom "(www)"
https://www.linux.org.ru/section-rss.jsp?section=1 "(www)" "~Linux.org"
https://landchad.net/rss.xml "(www)" "~LandChad"
https://drewdevault.com/blog/index.xml "(www)" "~Drew DeVault"
http://suckless.org/atom.xml "(www)" "~skls"
https://www.phoronix.com/rss.php "(www)"
https://www.gamingonlinux.com/article_rss.php "(www)" "~GamingOnLinux"
https://lobste.rs/top/rss "(www)" "~Lobsters"
https://www.youtube.com/feeds/videos.xml?channel_id=UC3kAbMcYr-JEMSb2xX4OdpA "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg "(ytb)"
@ -24,16 +23,17 @@ https://www.youtube.com./feeds/videos.xml?channel_id=UC2WNW0NZVyMeEPvtLmScgvQ "(
https://lukesmith.xyz/rss.xml "(www)"
https://notrelated.xyz/rss "(www)" "~Not Related"
https://lukesmith.xyz/peertube "(prt)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCq6VFHwMzcMXbuKyG7SQYIg "(ytb)"
https://www.youtube.con/feeds/videos.xml?channel_id=UC3ltptWa0xfrDweghW94Acg "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCfUaZ8Ra7m7BqUEACv2jySw "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCRxPHKOOwFxW2Ej2svBh3lw "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCla6APLHX6W3FeNLc8PYuvg "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCtMVHI3AJD4Qk4hcbZnI9ZQ "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCEMSM2w0EvLcOSIFrv3kNHQ "(ytb)"
"SOC" "(---)"
https://lb.ua/rss/ukr/rss.xml "(www)" "~LB.ua"
https://svtv.org/feed/rss/ "(www)" "~SVTV"
https://www.youtube.com/feeds/videos.xml?channel_id=UCWjEiMNZv4g3P9BWbrtMjyA "(ytb)" "~SVTV"
https://kamilkazani.substack.com/feed "(www)"
https://www.youtube.com/feeds/videos.xml?channel_id=UChvithwOECK5g_19TjldMKw "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCR1D15p_vdP3HkrH8wgjQRw "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCjjElKokwu5KCN2PeHzE9Eg "(ytb)" "~Furydrops"
https://www.youtube.com/feeds/videos.xml?channel_id=UCbWcXB0PoqOsAvAdfzWMf0w "(ytb)"
https://www.youtube.com/feeds/videos.xml?channel_id=UCo4au6lRX4-_gIczBneEZWA "(ytb)"
@ -71,6 +71,8 @@ https://rss.nixnet.services/?action=display&bridge=Bandcamp&context=By+band&band
"DEV" "(---)"
https://repology.org/maintainer/dmitz%40disroot.org/feed-for-repo/alpine_edge/atom "(www)"
https://github.com/djpohly/dwl/commits/main.atom "(ghb)"
https://github.com/riverwm/river/commits/master.atom "(ghb)"
https://github.com/lukesmithxyz/voidrice/commits/master.atom "(ghb)"
https://github.com/LukeSmithxyz/dwmblocks/commits/master.atom "(ghb)"
https://github.com/LukeSmithxyz/dwm/commits/master.atom "(ghb)"

View file

@ -2,8 +2,7 @@ require 'paq' {
'hrsh7th/cmp-buffer';
'hrsh7th/cmp-nvim-lsp';
'hrsh7th/nvim-cmp';
'jiangmiao/auto-pairs';
'lyokha/vim-xkbswitch';
'windwp/nvim-autopairs';
'neovim/nvim-lspconfig';
}

View file

@ -1,3 +1,4 @@
local map = vim.keymap.set
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
@ -27,7 +28,6 @@ cmp.setup({
end,
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-e>'] = cmp.mapping.close(),
},
sources = {
{name = 'nvim_lsp', max_item_count = 10},
@ -38,10 +38,23 @@ cmp.setup({
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
-- LSP
local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap=true, silent=true, buffer=bufnr }
map('n', 'gD', vim.lsp.buf.declaration, bufopts)
map('n', 'gd', vim.lsp.buf.definition, bufopts)
map('n', 'F', vim.lsp.buf.hover, bufopts)
map('n', 'gr', vim.lsp.buf.references, bufopts)
map('n', 'gi', vim.lsp.buf.implementation, bufopts)
map('n', 'gS', vim.lsp.buf.signature_help, bufopts)
map('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
map('n', '<space>cw', vim.lsp.buf.rename, bufopts)
map('n', '<space>f', vim.lsp.buf.formatting, bufopts)
end
-- GoLang

View file

@ -1,32 +1,26 @@
local map = vim.keymap.set
local bmap = vim.api.nvim_buf_set_keymap
local opts = { noremap=true, silent=true }
vim.g.mapleader = ' '
vim.g.XkbSwitchEnabled = 1
-- Move around windows
-- Windows
map('n', '<C-h>', '<C-w>h')
map('n', '<C-j>', '<C-w>j')
map('n', '<C-k>', '<C-w>k')
map('n', '<C-l>', '<C-w>l')
map('n', '<C-r>', '<C-w>r')
map('v', '.', ':normal .<CR>')
-- Tabs
map('n', 'K', ':tabprevious<CR>')
map('n', 'J', ':tabnext<CR>')
-- Buffs
map('n', '<C-o>', ':bprevious<CR>')
map('n', '<C-p>', ':bnext<CR>')
map('n', '<C-x>', ':bdelete<CR>')
-- Leader binds
map('', '<leader>p', ':!opout <c-r>%<CR><CR>')
map('', '<leader>c', ':w! | !compiler "<c-r>%"<CR>')
map('', '<leader>se', ':setlocal spell! spelllang=en_us<CR>')
-- CMP
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
bmap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
bmap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
bmap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
bmap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
bmap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
bmap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
bmap(bufnr, 'n', '<C-n>', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
bmap(bufnr, 'n', '<C-p>', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
end

View file

@ -18,18 +18,18 @@ o.swapfile = false
o.backup = false
o.ignorecase = true
o.smartcase = true
o.mouse = "a"
o.mouse = 'a'
o.showtabline = 2
o.laststatus = 0
o.scrolloff = 8
o.clipboard = "unnamedplus"
o.clipboard = 'unnamedplus'
o.list = true
o.listchars = "nbsp:¬,tab:»·,trail:·,extends:>"
o.completeopt = "menu", "menuone", "noselect"
o.listchars = 'nbsp:¬,tab:»·,trail:·,extends:>'
o.completeopt = 'menu', 'menuone', 'noselect'
-- local options
wo.wrap = false
-- autocmds
au({ "BufWritePre" }, { pattern = { "*" }, command = [[%s/\n\+\%$//e]] })
au({ "FileType" }, { pattern = { "*" }, command = [[setlocal formatoptions-=cro]] })
au({ 'BufWritePre' }, { pattern = { '*' }, command = [[%s/\n\+\%$//e]] })
au({ 'FileType' }, { pattern = { '*' }, command = [[setlocal formatoptions-=cro]] })

View file

@ -11,6 +11,7 @@ c.url.searchengines = {'DEFAULT': 'https://paulgo.io/search?q={}',
'gh': 'https://github.com/search?q={}',
'md': 'https://reelgood.com/search?q={}',
'rtk': 'https://rutracker.org/forum/tracker.php?nm={}',
'prb': 'https://thepiratebay10.org/search/{}',
'rep': 'https://repology.org/projects/?search={}',
'trans': 'https://lingva.pussthecat.org/en/uk/{}'
}

View file

@ -1,5 +1,4 @@
-o $XDG_DOWNLOAD_DIR/%(title)s.%(ext)s
-f bestvideo[height<=?720]+bestaudio/best
--write-subs
--sub-format "srt"
--sub-langs "en"
-S "codec:h264"
--embed-subs

View file

@ -21,6 +21,7 @@ export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0"
export GOPATH="$XDG_DOCUMENTS_DIR/code/go"
export GOBIN="$HOME/.local/bin"
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
@ -39,6 +40,4 @@ export LESS_TERMCAP_us="$(printf '%b' '')"
export LESS_TERMCAP_ue="$(printf '%b' '')"
export LESSHISTFILE="-"
#[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC"
[ "$(tty)" = "/dev/tty1" ] && ! pidof -s dwl >/dev/null 2>&1 && dbus-run-session -- dwl -s somebar

View file

@ -1,10 +1,14 @@
#!/bin/sh
[ -z "$1" ] && { "$BROWSER"; exit; }
if [ -z "$1" ]; then
url="$(wl-copy -o)"
else
url="$1"
fi
case "$1" in
*mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*yewtu.be*|*hooktube.com*|*twitch.tv*|*bitchute.com/embed*|*videos.lukesmith.xyz*)
setsid -f mpv --quiet "$1" >/dev/null 2>&1 ;;
qndl "$1" >/dev/null 2>&1 ;;
*png|*jpg|*jpe|*jpeg|*gif|*svg)
curl -sL "$1" > "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" && sxiv -a "/tmp/$(echo "$1" | sed "s/.*\///;s/%20/ /g")" >/dev/null 2>&1 & ;;
*pdf|*cbz|*cbr)

View file

@ -4,5 +4,5 @@
# music player's status. mpd must be running on X's start for this to work.
while : ; do
mpc idle >/dev/null && kill -46 "$(pidof dwmblocks)" || break
mpc idle >/dev/null && kill -46 "$(pidof someblocks)" || break
done

View file

@ -1,14 +1,5 @@
#!/bin/sh
filter() { mpc -f %title% | sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/[P]/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ';}
mpc -f %title% | sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/[P]/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ';
pidof -x mpdup >/dev/null 2>&1 || mpdup >/dev/null 2>&1 &
case $BLOCK_BUTTON in
1) mpc toggle | filter ;;
3) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;;
4) mpc prev | filter ;;
5) mpc next | filter ;;
6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;;
*) mpc status | filter ;;
esac

View file

@ -17,5 +17,5 @@ case "$1" in
add)
check ; sleep 1 && transmission-remote -a "$2" && notify-send "Torrent added." ;;
*)
notify-send "$TR_TORRENT_NAME downloaded." && sleep 180 && transmission-remote -t ${TR_TORRENT_ID} -r
notify-send "$TR_TORRENT_NAME downloaded." && sleep 60 && transmission-remote -t ${TR_TORRENT_ID} -r
esac