Skip to content

Commit

Permalink
Messy update
Browse files Browse the repository at this point in the history
  • Loading branch information
A committed Jul 20, 2023
1 parent ec45240 commit 558f504
Show file tree
Hide file tree
Showing 28 changed files with 506 additions and 137 deletions.
3 changes: 3 additions & 0 deletions bin/add-todo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

echo "- [ ] $@" >> "/home/a8ka/Dev/@A/notes/todo - inbox.md"
11 changes: 6 additions & 5 deletions bin/docking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ set -e

INT=eDP-1
EXT_1=DP-1-1
EXT_2=DP-1-3
# EXT_2=DP-1-3

MODELINE=$(cvt 3840 2160 30 | grep -i modeline | sed "s/Modeline\ //")
MODENAME=$(echo $MODELINE | awk -F" " '{print $1}')

xrandr --newmode ${MODELINE} || true

xrandr --addmode ${EXT_1} ${MODENAME}
xrandr --addmode ${EXT_2} ${MODENAME}
# xrandr --addmode ${EXT_2} ${MODENAME}

xrandr --output ${EXT_1} --mode ${MODENAME} --scale 1 --pos 0x0 --primary
xrandr --output ${EXT_2} --mode ${MODENAME} --scale 1 --pos 5790x0
# xrandr --output ${INT} --mode ${MODENAME} --scale 1 --pos 0x0
xrandr --output ${EXT_1} --mode ${MODENAME} --scale 1 --right-of $INT --primary
# xrandr --output ${EXT_2} --mode ${MODENAME} --scale 1 --pos 5790x0

INTERNAL_MODELINE=$(cvt 2560 1440 60 | grep -i modeline | sed "s/Modeline\ //")
INTERNAL_MODENAME=$(echo $INTERNAL_MODELINE | awk -F" " '{print $1}')

xrandr --newmode ${INTERNAL_MODELINE} || true
#
xrandr --verbose --addmode ${INT} ${INTERNAL_MODENAME}
xrandr --verbose --output ${INT} --mode ${INTERNAL_MODENAME} --scale 1 --pos 1690x3240
xrandr --verbose --output ${INT} --mode ${INTERNAL_MODENAME} --scale 1 --pos 0x1200
56 changes: 53 additions & 3 deletions bin/finder
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh

fzf --height 100% --layout reverse --info inline --border \
--preview 'bat {}' --preview-window right,60%,border-horizontal | xargs -I{} sh -c 'nohup xdg-open {} &'
SEARCH_MODULES_DIR=~/.bin/fzf-search
find $SEARCH_MODULES_DIR -type f | grep -v '_main' | xargs -I{} basename {} .sh | fzf | xargs -I{} zsh $SEARCH_MODULES_DIR/{}.sh


# IFS=: read -ra selected < <(
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \
# fzf --ansi \
# --color "hl:-1:underline,hl+:-1:underline:reverse" \
# --disabled --query "$INITIAL_QUERY" \
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
# --bind "ctrl-d:change-prompt(Docs> )+reload($RG_PREFIX --type docs {q} || true)" \
# --prompt 'All> ' \
# --delimiter : \
# --preview 'bat --color=always {1} --highlight-line {2}' \
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
# )
# [ -n "${selected[0]}" ] && ${EDITOR} "${selected[0]}" "+${selected[1]}"

# --header '╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \
# --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(fzf> )+enable-search+clear-query+rebind(ctrl-r)" \
# --bind "ctrl-r:unbind(ctrl-r)+change-prompt(ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \



# Use fzf and ripgrep to parse directories and find patterns of text
# and open selected files in vim
# Switch between Ripgrep launcher mode (CTRL-R) and fzf filtering mode (CTRL-F)
# See more: https://github.com/junegunn/fzf/blob/master/ADVANCED.md#switching-between-ripgrep-mode-and-fzf-mode

# Ignore auto-generated files and folders
# RG_IGNORE="'!{.git,node_modules,package-lock.json,yarn.lock,.cache}'"
# RG_IGNORE=""
# RG_PREFIX="rg --column --line-number --no-heading --hidden -g $RG_IGNORE --color=always --smart-case "
# INITIAL_QUERY="${*:-}"
#
# IFS=: read -ra selected < <(
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \
# fzf --ansi \
# --color "hl:-1:underline,hl+:-1:underline:reverse" \
# --disabled --query "$INITIAL_QUERY" \
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
# --bind "ctrl-d:change-prompt(Docs> )+reload($RG_PREFIX --type docs {q} || true)" \
# --prompt 'All> ' \
# --delimiter : \
# --preview 'bat --color=always {1} --highlight-line {2}' \
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
# )
# [ -n "${selected[0]}" ] && ${EDITOR} "${selected[0]}" "+${selected[1]}"
#
# # --header '╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱' \
# # --bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(fzf> )+enable-search+clear-query+rebind(ctrl-r)" \
# # --bind "ctrl-r:unbind(ctrl-r)+change-prompt(ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \
31 changes: 31 additions & 0 deletions bin/fzf-search/_main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/zsh

RG_PREFIX="rg --column --no-heading --hidden --color=always $RG_ARGS "
INITIAL_QUERY="${*:-}"

FZF_WORKING_DIR=${FZF_WORKING_DIR:-~}
cd $FZF_WORKING_DIR

read -r selected < <(
FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \
fzf --ansi \
--exact \
--color "hl:-1:underline,hl+:-1:underline:reverse" \
--disabled --query "$INITIAL_QUERY" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--bind "ctrl-f:unbind(change,ctrl-f)+change-prompt(2. fzf> )+enable-search+clear-query+rebind(ctrl-r)" \
--bind "ctrl-r:unbind(ctrl-r)+change-prompt(1. ripgrep> )+disable-search+reload($RG_PREFIX {q} || true)+rebind(change,ctrl-f)" \
--prompt "$FZF_PROMPT> " \
--delimiter : \
--header "$FZF_PROMPT: ╱ CTRL-R (Ripgrep mode) ╱ CTRL-F (fzf mode) ╱" \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'\
)

if [ -n "${selected[0]}" ]; then
FILE=$(echo "$selected" | cut -d ':' -f1)
FILE=$(echo "${FZF_WORKING_DIR}/${FILE}")

zsh -c "$FZF_EXEC '$FILE'"
fi

7 changes: 7 additions & 0 deletions bin/fzf-search/code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/zsh

FZF_WORKING_DIR=~/Dev/ \
FZF_PROMPT="Code" \
RG_ARGS="-g '*.{js,ts,py,rs,css,html,tsx,jsx,sh,zsh,md}'" \
FZF_EXEC=$EDITOR \
zsh ~/.bin/fzf-search/_main.sh
7 changes: 7 additions & 0 deletions bin/fzf-search/docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/zsh

FZF_WORKING_DIR=~ \
FZF_PROMPT="Docs" \
RG_ARGS="-g '*.{md}'" \
FZF_EXEC="$EDITOR" \
zsh ~/.bin/fzf-search/_main.sh
8 changes: 8 additions & 0 deletions bin/fzf-search/notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/zsh

FZF_WORKING_DIR=~/Dev/@A/notes \
FZF_PROMPT="Notes" \
RG_ARGS="-g '*.{md}'" \
FZF_EXEC="$EDITOR" \
zsh ~/.bin/fzf-search/_main.sh

28 changes: 16 additions & 12 deletions bin/search
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh

# 1. Search for text in files using Ripgrep
# 2. Interactively restart Ripgrep with reload action
# 3. Open the file in Vim
RIPGREP_CONFIG_PATH=/home/a8ka/.config/ripgrep/ripgreprc
RG_PREFIX="rg --column --line-number --no-heading --color=always --smart-case "
INITIAL_QUERY="${*:-}"
IFS=: read -ra selected < <(
FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \
fzf --ansi \
--disabled --query "$INITIAL_QUERY" \
--bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
--delimiter : \
--preview 'bat --color=always {1} --highlight-line {2}' \
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
)
[ -n "${selected[0]}" ] && vim "${selected[0]}" "+${selected[1]}"

echo 123

# INITIAL_QUERY="${*:-}"
# IFS=: read -ra selected < <(
# FZF_DEFAULT_COMMAND="$RG_PREFIX $(printf %q "$INITIAL_QUERY")" \
# fzf --ansi \
# --disabled --query "$INITIAL_QUERY" \
# --bind "change:reload:sleep 0.1; $RG_PREFIX {q} || true" \
# --delimiter : \
# --preview 'bat --color=always {1} --highlight-line {2}' \
# --preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
# )
# [ -n "${selected[0]}" ] && vim "${selected[0]}" "+${selected[1]}"
55 changes: 0 additions & 55 deletions bin/today

This file was deleted.

Empty file added bin/xmessage
Empty file.
2 changes: 1 addition & 1 deletion configs/alacritty/alacritty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ colors:

font:
normal:
family: Hack Nerd Font Mono
family: Iosevka Nerd Font
size: 14.0
6 changes: 4 additions & 2 deletions configs/kitty/kitty.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
allow_remote_control yes

cursor_blink_interval 0
background_opacity 0.9
background_opacity 0.6
dynamic_background_opacity no


sync_to_monitor yes

enable_audio_bell no
Expand All @@ -14,7 +15,7 @@ bold_font auto
italic_font auto
bold_italic_font auto

font size 11.0
font_size 12.0

include themes/trash-polka.conf

Expand All @@ -34,5 +35,6 @@ map cmd+home no-op
map ctrl+shift+end no-op
map cmd+end no-op
map ctrl+shift+h no-op

map ctrl+shift+l set_colors --configured /home/a8ka/.config/kitty/themes/trash-polka-light.conf
map ctrl+shift+k set_colors --configured /home/a8ka/.config/kitty/themes/trash-polka.conf
38 changes: 22 additions & 16 deletions configs/newsboat/urls
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ file:///var/feeds/lambdablob.com.xml "~Lambda Blob" blogs
# Blogs
https://blog.kamyshev.me/rss/ "~Kamyshev" blogs frontend
http://blog.mozilla.com/nnethercote/feed/ "~Nicholas Nethercote, Mozilla" blogs
https://nnethercote.github.io/feed.xml "~Nicholas Nethercote, Personal" blogs
# https://nnethercote.github.io/feed.xml "~Nicholas Nethercote, Personal" blogs
http://philcalcado.com/feed.xml "~Phil Calçado" blogs
https://100r.co/links/rss.xml "~100 Rabbints" blogs
# https://100r.co/links/rss.xml "~100 Rabbints" blogs
https://addyosmani.com/feed.xml "~Addy Osmani" blogs frontend
https://humanwhocodes.com/feeds/blog.xml "~Nicholas Zakas" blogs frontend
# https://humanwhocodes.com/feeds/blog.xml "~Nicholas Zakas" blogs frontend
https://vitkarpov.me/index.xml "~Vitaly Karpov" algorithms
https://jakearchibald.com/posts.rss "~Jake Archibald" blogs frontend
https://www.mnot.net/blog/index.atom blogs architecture
# https://jakearchibald.com/posts.rss "~Jake Archibald" blogs frontend
# https://www.mnot.net/blog/index.atom blogs architecture
# https://daniel.haxx.se/blog/feed "~Daniel Stenberg" blogs
https://infrequently.org/feed/ "~Alex Russel" blogs frontend
# https://infrequently.org/feed/ "~Alex Russel" blogs frontend
https://junegunn.kr/atom.xml blogs linux
https://www.distrotube.com/videos/index.xml linux
https://blog.jessfraz.com/index.xml linux blogs docker
https://usesthis.com/feed.atom linux blogs
# https://usesthis.com/feed.atom linux blogs

https://trends.vc/feed/ startups

Expand All @@ -52,19 +52,25 @@ https://www.techatbloomberg.com/feed/ techcompanies
https://engineering.fb.com/feed/ techcompanies
https://deepsource.io/blog/index.xml techcompanies

# https://www.reddit.com/r/archlinux/.rss "~/r/archlinux"
# https://www.reddit.com/r/xmonad/.rss "~/r/xmonad"
# https://www.reddit.com/r/unixporn/.rss "~/r/unixporn"
# https://www.reddit.com/r/thinkpad/.rss "~/r/thinkpad"
# https://www.reddit.com/r/neovim/.rss "~/r/neovim"
# https://www.reddit.com/r/zsh/.rss "~/r/zsh"
# https://www.reddit.com/r/typescript/.rss "~/r/typescript"
# https://www.reddit.com/r/javascript/.rss "~/r/javascript"
# https://www.reddit.com/r/commandline/.rss "~/r/commandline"

https://www.reddit.com/r/archlinux/.rss "~/r/archlinux"
https://www.reddit.com/r/ManjaroLinux/new.rss "~/r/manjaro"
https://www.reddit.com/r/xmonad/.rss "~/r/xmonad"
https://www.reddit.com/r/unixporn/.rss "~/r/unixporn"
https://www.reddit.com/r/thinkpad/.rss "~/r/thinkpad"
https://www.reddit.com/r/neovim/.rss "~/r/neovim"
https://www.reddit.com/r/zsh/.rss "~/r/zsh"
https://www.reddit.com/r/typescript/.rss "~/r/typescript"
https://www.reddit.com/r/javascript/.rss "~/r/javascript"
https://www.reddit.com/r/commandline/.rss "~/r/commandline"

https://github.com/neovim/neovim/tags.atom "~/gh/neovim"

https://blog.mozilla.org/ux/feed/

https://tg.i-c-a.su/rss/iamakulov_channel "Ivan Akulov"
https://tg.i-c-a.su/rss/defront
https://tg.i-c-a.su/rss/valya_reads_issue
https://xn--gckvb8fzb.comindex.xml blogs linux

https://news.ycombinator.com/rss news
6 changes: 6 additions & 0 deletions configs/nvim/after/syntax/lsp_markdown.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
" markdownWikiLink is a new region
syn region markdownWikiLink matchgroup=markdownLinkDelimiter start="\[\[" end="\]\]" contains=markdownText keepend oneline concealends
" markdownLinkText is copied from runtime files with 'concealends' appended
syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\%(\_[^][]\|\[\_[^][]*\]\)*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends
" markdownLink is copied from runtime files with 'conceal' appended
syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal
8 changes: 5 additions & 3 deletions configs/nvim/lua/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ local enabled_packages = {
'packages/null-ls',
'packages/trouble',
'packages/todo-comments',
'packages/nvim-obsidian',
-- 'packages/nvim-obsidian',
'packages/extended-syntax',
'packages/close-buffers',
'packages/import-cost',
'packages/todo-txt',
'packages/glow'
'packages/glow',
'packages/obsidian'
}

local enabled_treesitter_configs = {
Expand All @@ -41,11 +42,12 @@ local enabled_lsp_servers = {
'efm',
'pyright',
'rust_analyzer',
'sumneko_lua',
'lua_ls',
'taplo',
'tsserver',
'vimls',
'yamlls',
'hls',
}

-- base whichkeys config. Mutated in `<package>.keybindings_hook`
Expand Down
5 changes: 4 additions & 1 deletion configs/nvim/lua/opts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ g.markdown_fenced_languages = {
}

-- opt.verbose = 2
opt.verbosefile = "/Users/anton/.logs/nvim.log"
-- opt.verbosefile = "/Users/anton/.logs/nvim.log"
opt.backup = false
opt.clipboard = 'unnamedplus'
opt.colorcolumn = '120'
Expand Down Expand Up @@ -55,3 +55,6 @@ opt.viewoptions = 'cursor,folds'
opt.wildignore = {'package-lock.json','yarn.lock'}
opt.wrap = false
opt.writebackup = false


vim.cmd([[iabbrev <expr> ymd% strftime("%Y%m%d")]])
Loading

0 comments on commit 558f504

Please sign in to comment.