diff --git a/.chezmoiignore b/.chezmoiignore index f2ada34..cf28439 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -1,4 +1,5 @@ README.md +commit-msg.txt {{ if not .gui }} .config/i3/ diff --git a/key_aliases.tmpl b/aliases/key_aliases.tmpl similarity index 98% rename from key_aliases.tmpl rename to aliases/key_aliases.tmpl index 09f4aff..1123325 100644 --- a/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -44,9 +44,11 @@ ctld "sudo systemctl disable" ctla "sudo systemctl start" ctls "sudo systemctl stop" ctlt "sudo systemctl status" -ctltd "sudo systemctl status dhcpcd" ctlr "sudo systemctl restart" +ctltd "sudo systemctl status dhcpcd" +ctlas "sudo systemctl start sshd" + nct "sudo netctl" nctf "sudo ip link set dev wlp3s0 down" nctr "sudo systemctl restart netctl-auto@wlp4s0.service" @@ -71,10 +73,13 @@ vdr "vidir --verbose" # directory-related [[[ # {{ if not (eq .linux_os "termux") }} -l "lsd -a" -ll "lsd -al" +# l "lsd --group-dirs first" +l "lsd" +la "lsd -A --group-dirs first" +ll "lsd -Al --group-dirs first --size short" {{ else }} -l "ls -a" +l "ls" +la "ls -a" ll "ls -al" {{ end }} cwd "echo (pwd) | xclip -selection clipboard" @@ -326,6 +331,7 @@ gr "git remote -v" gra "git remote add origin" grr "git remote remove origin" grs "git remote show origin" +gru "git branch --set-upstream-to=origin/master master" # ]]] branch # diff --git a/key_dirs.tmpl b/aliases/key_dirs.tmpl similarity index 96% rename from key_dirs.tmpl rename to aliases/key_dirs.tmpl index 75221b3..8c724ba 100644 --- a/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -77,8 +77,9 @@ lt ~/school/latex-notes 6 ~/school/263 63 ~/school/263/a5 -# 631 ~/school/263/a4/q1 -# 632 ~/school/263/a4/q2 +# 631 ~/school/263/a5/q1 +# 632 ~/school/263/a5/q2 +633 ~/school/263/a5/q3 63t ~/school/latex-notes/263/a5 al1 ~/school/algorithms/w1-union-find diff --git a/key_files.tmpl b/aliases/key_files.tmpl similarity index 93% rename from key_files.tmpl rename to aliases/key_files.tmpl index 8a18984..9053206 100644 --- a/key_files.tmpl +++ b/aliases/key_files.tmpl @@ -3,10 +3,10 @@ # sys [[[ # 3 ~/linux-config/dot_config/i3/config.tmpl -a ~/linux-config/key_aliases.tmpl -d ~/linux-config/key_dirs.tmpl +a ~/linux-config/aliases/key_aliases.tmpl +d ~/linux-config/aliases/key_dirs.tmpl dw ~/dwm/config.def.h -f ~/linux-config/key_files.tmpl +f ~/linux-config/aliases/key_files.tmpl hs ~/.local/share/fish/fish_history p ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt r ~/linux-config/dot_config/ranger/rc.conf.tmpl diff --git a/dot_bashrc b/dot_bashrc index 9f56e09..5f38228 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -204,4 +204,4 @@ fi # Both PC/Laptop }}} [ -f ~/.fzf.bash ] && source ~/.fzf.bash -source /home/kevin/.key_aliases +source ~/aliases/.key_aliases diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 0b3aefe..db5025c 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -57,7 +57,8 @@ set -x EDITOR nvim set -x VISUAL nvim set -U fish_help_browser firefox -builtin cd $last_dir +builtin cd $last_dir && ls > /dev/null +# builtin cd $last_dir bind \ce edit_command_buffer bind \cr forward-word diff --git a/dot_config/fish/functions/cd.fish.tmpl b/dot_config/fish/functions/cd.fish.tmpl index f7f1060..1e4d80c 100755 --- a/dot_config/fish/functions/cd.fish.tmpl +++ b/dot_config/fish/functions/cd.fish.tmpl @@ -47,9 +47,11 @@ function cd --description "Change directory" set -U last_dir $PWD {{ if (not (eq .linux_os "termux")) }} - lsd -a + # lsd -a + lsd {{ else }} - ls -a + # ls -a + ls {{ end }} end diff --git a/dot_config/fish/functions/grep-aliases.fish b/dot_config/fish/functions/grep-aliases.fish index 055c737..97c5a26 100755 --- a/dot_config/fish/functions/grep-aliases.fish +++ b/dot_config/fish/functions/grep-aliases.fish @@ -1,5 +1,5 @@ function grep-aliases - set key_aliases ~/key_aliases - rg $argv[1] $key_aliases + set key_aliases ~/aliases/key_aliases # rg "^$argv[1]" $key_aliases + rg $argv[1] $key_aliases end diff --git a/dot_config/fish/functions/man-vim.fish b/dot_config/fish/functions/man-vim.fish index dd56788..2f053e2 100644 --- a/dot_config/fish/functions/man-vim.fish +++ b/dot_config/fish/functions/man-vim.fish @@ -1,3 +1,9 @@ function man-vim - nvim -c ":Man $argv[1]" -c "only" + if count $argv > /dev/null + set prog $argv[1] + else + set prog (apropos . | awk '{ print $1 }' | fzf -e) + end + + nvim -c ":Man $prog" -c "only" end diff --git a/dot_config/fish/functions/refresh-config.fish b/dot_config/fish/functions/refresh-config.fish index 013d82e..d590587 100644 --- a/dot_config/fish/functions/refresh-config.fish +++ b/dot_config/fish/functions/refresh-config.fish @@ -1,8 +1,8 @@ function refresh-config chezmoi apply and echo 'Applied chezmoi.' - and tmux source-file ~/.tmux.conf - and echo 'Sourced tmux config.' + # and tmux source-file ~/.tmux.conf + # and echo 'Sourced tmux config.' sync-shortcuts echo 'Synced shortcuts.' diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index 62b7ebb..b2971d8 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -146,7 +146,8 @@ set $inner_gaps 20 # set $inner_gaps 0 set $outer_gaps 0 -set $border_radius 15 +# set $border_radius 15 +set $border_radius 0 # remove window titlebars # for_window [class="^.*"] border pixel 2 for_window [class="^.*"] border pixel 3 diff --git a/dot_config/ranger/rc.conf.tmpl b/dot_config/ranger/rc.conf.tmpl index 4a52e67..0806978 100755 --- a/dot_config/ranger/rc.conf.tmpl +++ b/dot_config/ranger/rc.conf.tmpl @@ -36,7 +36,8 @@ set column_ratios 1,3,4 set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ # Show hidden files? You can toggle this by typing 'zh' -set show_hidden true +# set show_hidden true +set show_hidden false # Ask for a confirmation when running the "delete" command? # Valid values are "always", "never", "multiple" (default) diff --git a/dot_tmux.conf b/dot_tmux.conf index a41ec58..e5486a3 100644 --- a/dot_tmux.conf +++ b/dot_tmux.conf @@ -41,6 +41,9 @@ bind-key -T copy-mode-vi M-\ select-pane -l bind-key -n M-Enter split-window -h # bind-key -n M-v split-window -h +bind-key m select-pane -m +bind-key j join-pane \; select-layout main-vertical + bind-key -n M-q kill-pane # }}} panes # diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index 92d1e46..e9dc784 100644 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -524,6 +524,7 @@ autocmd Filetype fish inoremap 2 $argv[2] autocmd Filetype javascript inoremap x process.exit() autocmd Filetype markdown inoremap cb - [ ] +autocmd Filetype markdown nnoremap j :set tw=9999999gggqG autocmd Filetype markdown nnoremap x 0f[lrx " nnoremap x 0f[lrx diff --git a/dot_zshrc b/dot_zshrc index a1579df..87dc0be 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -174,7 +174,6 @@ fi export GPG_TTY=$(tty) export PASSWORD_STORE_CLIP_TIME=120 -source /home/kevin/.shortcuts #exec fish -source /home/kevin/.key_aliases +source ~/aliases/.key_aliases diff --git a/scripts/executable_sync-shortcuts b/scripts/executable_sync-shortcuts index 8a5b8ca..5dbb59f 100755 --- a/scripts/executable_sync-shortcuts +++ b/scripts/executable_sync-shortcuts @@ -19,7 +19,7 @@ fish_config="$HOME/.config/fish/config.fish" ranger_config="$HOME/.config/ranger/rc.conf" # Output locations -aliases="$HOME/.key_aliases" +aliases="$HOME/aliases/.key_aliases" fish_abbr="$HOME/.config/fish/key_abbr.fish" ranger_mappings="$HOME/.config/ranger/key_mappings.conf" @@ -30,9 +30,9 @@ ensure "source $aliases" "$zshrc" ensure "source $ranger_mappings" "$ranger_config" # key files -key_dirs="$HOME/key_dirs" -key_files="$HOME/key_files" -key_aliases="$HOME/key_aliases" +key_dirs="$HOME/aliases/key_dirs" +key_files="$HOME/aliases/key_files" +key_aliases="$HOME/aliases/key_aliases" # Remove, prepare files rm -f "$ranger_mappings" 2>/dev/null