Increase DPI, various fish functions

This commit is contained in:
2019-08-20 05:34:28 -04:00
parent 704fb6665c
commit 1ef5633357
15 changed files with 495 additions and 38 deletions

View File

@@ -22,10 +22,11 @@ set -U mfs_dir "/home/kevin/coding/mf-site"
source /home/kevin/coding/spotify-lib-vis/src/scripts/api-keys-fish.sh
{{ end }}
set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin ~/.minetest/minetest/bin
set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin ~/.minetest/minetest/bin ~/.gem/ruby/2.6.0/bin
set -x CLASSPATH $CLASSPATH /home/kevin/java/*.jar
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
set -x HASTE_SERVER https://pste.gq
{{ if eq .linux_os "termux" }}
# set SPACEFISH_PROMPT_ORDER time user dir host git package node docker ruby golang php rust haskell julia aws conda pyenv kubecontext exec_time line_sep battery jobs exit_code vi_mode char
@@ -88,9 +89,10 @@ abbr xf "fish_config"
abbr ! "sudo !!"
abbr ag "grep-aliases"
abbr bf "buku-fzf"
abbr bff "buku-fzf fq"
abbr b "buku-fzf"
abbr bf "buku-fzf fq"
abbr bq "benq-brightness"
abbr bupp "backup-phone-pics"
abbr cpc "copy cat"
abbr cpe "copy echo"
abbr cpp "copy echo (pwd)"
@@ -98,6 +100,7 @@ abbr cff "create-fish-function"
abbr def "define"
abbr ev "evince-silent"
# abbr fbg "find-bg"
abbr fvft "find-vim-filetype"
abbr fzv "fzf-vim"
# git [[[ #
@@ -110,11 +113,12 @@ abbr gro "git-replace-origin"
# ]]] git #
abbr hs "scan-history"
abbr hst "$EDITOR ~/.local/share/fish/fish_history"
abbr mn "man-vim"
abbr mat "math"
abbr pgr "grep-pdf"
abbr pgrf "grep-pdf-file"
abbr png "git-push-new-gitea"
abbr pst "pastebin"
abbr rf "refresh-config"
abbr rs "redshift-set"
abbr shrm "shred-rm"
@@ -122,7 +126,7 @@ abbr thes "thesaurus"
abbr ut "unix-timestamp"
abbr uzr "unzip-rm"
abbr vsnp "vim-snippet"
abbr fvft "find-vim-filetype"
abbr xya "export-pkgs"
# school [[[ #

View File

@@ -0,0 +1,4 @@
function backup-phone-pics
rsync -rave 'ssh -p 8022' 192.168.0.12:/data/data/com.termux/files/home/storage/dcim/Camera /mnt/linux-files/Pictures/pixel
and rsync -rave 'ssh -p 8022' 192.168.0.12:/data/data/com.termux/files/home/storage/pictures/ /mnt/linux-files/Pictures/pixel/pictures
end

View File

@@ -1,9 +1,13 @@
function buku-fzf
# buku -p -f 5 | awk -F '\t' 'BEGIN { OFS=FS }; { $2=substr($2, 1, 90); print }' | column -t -s (printf '\t') | fzf --multi | awk '{ print $1 }'
if test $argv[1] = "fq"
set ids (buku -t fq -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 50); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
# if test (count $argv) -ge 1 -a "$argv[1]" = "fq"
# set ids (buku -t fq -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 50); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
if test (count $argv) -eq 1
# TODO: column width? #
set ids (buku -t + "$argv" -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 50); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
# echo buku -t + "$argv" -f4
else
set ids (buku -p -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 45); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
set ids (buku -p -f4 | awk -F '\t' 'BEGIN { OFS=FS }; { sub(/https?:\/\/(www\.)?/, "", $2); $2=substr($2, 1, 45); $3=substr($3, 1, 50); print }' | column -t -s (printf '\t') | fzf --multi --tiebreak end | awk '{ print $1 }')
end
for id in $ids

View File

@@ -0,0 +1,5 @@
function export-pkgs
yay -Qqne > ~/linux-config/txt/(hostname)-pkgs.txt
and yay -Qqme > ~/linux-config/txt/(hostname)-aur.txt
and yay -Qqe > ~/linux-config/txt/(hostname)-all.txt
end

View File

@@ -0,0 +1,4 @@
function git-push-new-gitea
git remote add gitea git@git.ataraxy.tk:Kevin-Mok/$argv[1].git
and git push --set-upstream gitea master
end

View File

@@ -1,3 +1,5 @@
function pastebin
cat $argv[1] | curl -F 'sprunge=<-' http://sprunge.us
# cat $argv[1] | curl -F 'sprunge=<-' http://sprunge.us
# set -x HASTE_SERVER https://pste.gq
cat $argv[1] | haste --raw
end

View File

@@ -40,7 +40,7 @@ bindsym Mod4+Return exec /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym Mod4+b layout tabbed; exec zathura
# bindsym Mod4+b layout tabbed; exec zathura
bindsym Mod4+c exec $browser
# bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)"
bindsym Mod4+e exec emacs
@@ -232,7 +232,7 @@ bindsym Control+Shift+l move right
# split in horizontal orientation
bindsym $mod+b split h
bindsym Mod4+$mod+b split h; exec $term
bindsym Control+$mod+b split h; exec $term
# split in vertical orientation
bindsym $mod+v split v
@@ -286,6 +286,12 @@ set $ws3 "3 "
# set $ws3 "3 "
workspace $ws3 output $main
bindsym $mod+F3 workspace $ws3; exec $browser
# bindsym Mod4+b workspace $ws3; layout stacked; exec urxvt -e fish -c "buku-fzf"
# bindsym Mod4+$mod+b workspace $ws3; layout stacked; exec urxvt -e fish -c "buku-fzf fq"
# bindsym Mod4+b layout stacked; exec urxvt -e fish -c "buku-fzf"
# bindsym Mod4+$mod+b layout stacked; exec urxvt -e fish -c "buku-fzf fq"
bindsym Mod4+b layout tabbed; exec urxvt -e fish -c "buku-fzf"
bindsym Mod4+$mod+b layout tabbed; exec urxvt -e fish -c "buku-fzf fq"
set $ws4 "4 "
workspace $ws4 output $secondary
@@ -451,8 +457,8 @@ bar {
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
font pango:$sb_font 17
{{ else }}
font pango:$sb_font 21
# font pango:$sb_font 19
font pango:$sb_font 17
{{ end }}
colors {
# 0 (transparent) -> 255 (opaque) in hex
@@ -481,8 +487,8 @@ bar {
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
font pango:$sb_font 18
{{ else }}
font pango:$sb_font 25
# font pango:$sb_font 20
# font pango:$sb_font 22
font pango:$sb_font 20
{{ end }}
# output $main
i3bar_command i3bar -t

View File

@@ -93,7 +93,7 @@ handle_extension() {
# JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
jq --color-output '.' "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
# txt)