diff --git a/apps/de/polybar/config b/apps/de/polybar/config index 4b12073..3f1c973 100644 --- a/apps/de/polybar/config +++ b/apps/de/polybar/config @@ -63,7 +63,7 @@ padding-right = 0 module-margin-left = 1 module-margin-right = 1 -font-0 = iosevka\-lyte:pixelsize=14;1 +font-0 = ${xrdb:polybar.primary_font} font-1 = ${xrdb:polybar.secondary_font} modules-left = bspwm diff --git a/apps/de/x/resources b/apps/de/x/resources index 9f7a8b4..4240c8b 100755 --- a/apps/de/x/resources +++ b/apps/de/x/resources @@ -1,6 +1,7 @@ ! font #define mono_font iosevka-lyte #define mono_font_size 14 +#define bar_font_size 12 #define mono_font_letterspace 0 #define icon_font Font Awesome 5 Free Solid #define icon_font_size 12 @@ -74,7 +75,7 @@ bspwm.start_compton: false bspwm.start_bar: true ! polybar -polybar.primary_font: mono_font:pixelsize=mono_font_size;1 +polybar.primary_font: mono_font:pixelsize=bar_font_size;1 polybar.secondary_font: icon_font:style=Regular:pixelsize=icon_font_size;1 polybar.display_monitor: HDMI-1 polybar.bottom_of_display: true diff --git a/apps/neovim/bindings.vim b/apps/neovim/bindings.vim index 038837a..e88f9f6 100644 --- a/apps/neovim/bindings.vim +++ b/apps/neovim/bindings.vim @@ -155,6 +155,9 @@ nnoremap v :vsplit " fast split closing nnoremap q q +" fast force quit +nnoremap Q :qall! + " clear search higlight nnoremap / :let @/ = "": diff --git a/apps/neovim/settings.vim b/apps/neovim/settings.vim index 274084c..9873c24 100644 --- a/apps/neovim/settings.vim +++ b/apps/neovim/settings.vim @@ -104,6 +104,11 @@ highlight GitGutterChangeDelete ctermbg=black guibg=black hi NonText ctermfg=black guifg=black +hi DiffAdd ctermfg=NONE ctermbg=green +hi DiffChange ctermfg=NONE ctermbg=blue +hi DiffDelete ctermfg=NONE ctermbg=red +hi DiffText ctermfg=NONE ctermbg=yellow + set hidden " allows buffer switching without saving set shortmess+=Ia " hide vim intro, skip lots of file messages/prompts set history=1000 diff --git a/apps/shell/fish/paths.fish b/apps/shell/fish/paths.fish index fb35a4f..7d659a9 100755 --- a/apps/shell/fish/paths.fish +++ b/apps/shell/fish/paths.fish @@ -1,5 +1,7 @@ #!/usr/bin/env fish +set -Ux GOPATH $HOME/.go + set -U fish_user_paths \ $HOME/.go \ $GOPATH/bin \ diff --git a/bin/pipeline b/bin/pipeline index 8b354c2..70d978e 100755 --- a/bin/pipeline +++ b/bin/pipeline @@ -1,12 +1,12 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh SAVED_PIPELINE_DIR="$DOTFILES_PATH/bin/pipelines" mkdir -p "$SAVED_PIPELINE_DIR" -if [[ ! -z "${1+x}" ]]; then +if [ -n "${1+x}" ]; then pdir="$SAVED_PIPELINE_DIR/$1"; shift mkdir -p "$pdir" - if [[ -z ${1+x} ]]; then + if [ -z ${1+x} ]; then td="$(mktemp -p "$pdir" -d "tmp_pipeline.XXXXXXXX")" cleanup_trap="rm -rf \"$td\"" else @@ -20,18 +20,13 @@ else cleanup_trap="rm -rf \"$td\"" fi -if [[ ! -e "$transform" ]]; then - echo -e "#!/usr/bin/env bash\n# for ${td}\n\nbase64" > "$transform" -fi +[ ! -e "$transform" ] && \ + printf "#!/usr/bin/env bash\n# for %s\n\nbase64" "${td}" > "$transform" in="$td/in" -if [[ ! -z "${1+x}" ]]; then - in="${1}"; shift -fi +[ -n "${1+x}" ] && in="${1}" && shift out="$td/out" -if [[ ! -z "${1+x}" ]]; then - out="${1}"; shift -fi +[ -n "${1+x}" ] && out="${1}" && shift # TODO: if no logging, log="/dev/null" log="$td/log" @@ -43,16 +38,17 @@ touch "$log" fswi \ "bash -c 'cd \"$td\" && < \"$in\" \"$transform\" | tee \"$out\"'" \ 'in$|transform$' \ - "$td" "$pdir" &> "$log" & + "$td" "$pdir" > "$log" 2>&1 & + watcher="$!" -if [[ -z ${cleanup_trap+x} ]]; then +if [ -z "${cleanup_trap+x}" ]; then trap "kill \"$watcher\"" EXIT else trap "${cleanup_trap}; kill \"$watcher\"" EXIT fi -job="$(echo "let g:pipeline_job_id = jobstart(['inotifywait', '-m', '-e', 'close_write', '${out}'], {'detach':1,'on_stdout':{j,d,e->execute('checktime')}})")" +job="$(echo "let g:pipeline_job_id = jobstart(['inotifywait', '-m', '-e', 'close_write', '${out}'], {'detach':1,'on_stdout':{j,d,e->execute('checktime')}})" | tr "'" '"')" echo $job >> "$log" @@ -61,76 +57,8 @@ echo $job >> "$log" # very scary nvim -V9"$td/vimlog" \ -o "$in" "$transform" "$out" \ - --cmd 'set autoread' \ + --cmd "$job" \ --cmd 'set updatetime=250' \ --cmd 'autocmd CursorHold,CursorHoldI silent write' \ --cmd 'autocmd VimLeave call jobstop(g:pipeline_job_id)' \ --cmd "$job" - -#!/usr/bin/env bash - -# SAVED_PIPELINE_DIR="$EDFP/pipelines" -# mkdir -p "$SAVED_PIPELINE_DIR" - -# if [[ ! -z "${1+x}" ]]; then -# pdir="$SAVED_PIPELINE_DIR/$1"; shift -# mkdir -p "$pdir" -# if [[ -z ${1+x} ]]; then -# td="$(mktemp -p "$pdir" -d "tmp_pipeline.XXXXXXXX")" -# cleanup_trap="rm -rf \"$td\"" -# else -# td="$pdir/$1"; shift -# mkdir -p "$td" -# fi -# transform="$pdir/transform" -# else -# td="$(mktemp --tmpdir -d pipeline.XXXXXXXX)" -# transform="$td/transform" -# cleanup_trap="rm -rf \"$td\"" -# fi - -# if [[ ! -e "$transform" ]]; then -# echo -e "#!/usr/bin/env bash\n# for ${td}\n\nbase64" > "$transform" -# fi - -# in="$td/in" -# if [[ ! -z "${1+x}" ]]; then -# in="${1}"; shift -# fi -# out="$td/out" -# if [[ ! -z "${1+x}" ]]; then -# out="${1}"; shift -# fi - -# # TODO: if no logging, log="/dev/null" -# log="$td/log" - -# chmod +x "$transform" -# echo "Hello World" > "$in" -# touch "$log" - -# fswi \ -# "bash -c 'cd \"$td\" && < \"$in\" \"$transform\" | tee \"$out\"'" \ -# 'in$|transform$' \ -# "$td" "$pdir" &> "$log" & -# watcher="$!" - -# if [[ -z ${cleanup_trap+x} ]]; then -# trap "kill \"$watcher\"" EXIT -# else -# trap "${cleanup_trap}; kill \"$watcher\"" EXIT -# fi - -# job="call jobstart(['inotifywait', '-m', '-e', 'close_write', '${out}'], {'on_stdout':{j,d,e->execute('checktime')}})" - -# # this will only autosave (and therefore autoreload) for the out buffer (since -# # it was opened last) - autosaving (and therefore autorunning) is potentially -# # very scary -# nvim \ -# --cmd 'set shm+=atIWF' \ -# --cmd 'set shm-=Oo' \ -# -o "$in" "$transform" "$out" \ -# --cmd 'set autoread' \ -# --cmd 'set updatetime=250' \ -# --cmd 'autocmd CursorHold,CursorHoldI silent write' \ -# --cmd "$(<<< "$job" tr "'" '"')" diff --git a/bin/reload-xresources b/bin/reload-xresources new file mode 100755 index 0000000..8d9e6a2 --- /dev/null +++ b/bin/reload-xresources @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +"$DOTFILES_PATH/apps/de/x/loadresources" diff --git a/env/laptop/x/resources b/env/laptop/x/resources index 9617455..fd23b1c 100755 --- a/env/laptop/x/resources +++ b/env/laptop/x/resources @@ -1,3 +1,5 @@ +#define bar_font_size 12 + *.font: xft:Iosevka Nerd Font Mono:pixelsize=12,xft:Noto Emoji,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 *.boldFont: xft:Iosevka Nerd Font Mono:style=bold:pixelsize=12,xft:Font Awesome 5 Free:pixelsize=14,xft:FreeSans:pixelsize=14 @@ -9,5 +11,6 @@ dpi: 190 *dpi: 190 Xft.dpi: 190 -polybar.height: 80 +polybar.height: 70 polybar.display_monitor: eDP1 +polybar.primary_font: iosevka-lyte:pixelsize=bar_font_size;1