Browse Source

Fix template folding

red-hat-laptop
Kevin Mok 5 years ago
parent
commit
762994e648
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 26
      dot_Xresources.tmpl
  2. 0
      dot_config/chezmoi/chezmoi-template.toml.tmpl
  3. 269
      dot_config/i3/config.tmpl
  4. 29
      dot_config/i3blocks/i3blocks-secondary.conf.tmpl
  5. 36
      dot_config/i3blocks/i3blocks.conf.tmpl
  6. 6
      dot_config/private_fish/config.fish
  7. 2
      dot_config/private_fish/private_functions/find-vim-filetype.fish
  8. 13
      dot_vimrc
  9. 172
      key_aliases.tmpl
  10. 26
      key_dirs.tmpl
  11. 25
      key_files.tmpl
  12. 1
      txt/todo.md

26
dot_Xresources.tmpl

@ -1,3 +1,7 @@
# vim: fdm=marker ft=xdefaults.go-template
/* font [[[ */
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=11
{{ else }}
@ -5,6 +9,10 @@ URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14
{{ end }}
! URxvt.font: xft:Hack:size=18
/* ]]] font */
/* transparency [[[ */
URxvt*transparent: true
/* transparency */
URxvt*inheritPixmap: true
@ -13,17 +21,26 @@ URxvt*transparent: true
URxvt*shading: 40
! URxvt*shading: 35
/* ]]] transparency */
/* scrollBar [[[ */
URxvt.scrollBar: false
! URxvt.scrollBar: true
! URxvt*scrollBar_right: true
! Clickable URLs
/* ]]] scrollBar */
/* Clickable URLs [[[ */
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
Xft.rgba: rgb
/* HiDPI */
/* ]]] Clickable URLs */
/* HiDPI [[[ */
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
Xft.dpi: 210
{{ else }}
@ -34,3 +51,6 @@ Xft.rgba: rgb
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
/* ]]] HiDPI */

0
dot_config/chezmoi/chezmoi.toml.tmpl → dot_config/chezmoi/chezmoi-template.toml.tmpl

269
dot_config/i3/config.tmpl

@ -1,6 +1,7 @@
# vim: fdm=indent ft=i3.tmpl
# vim: fdm=marker ft=i3.go-template
# startup [[[ #
# startup #
set $browser "firefox"
# set $browser "chromium"
set $term "urxvt"
@ -24,12 +25,16 @@
# exec --no-startup-id i3-msg 'workspace $ws11; exec $swex'
exec_always --no-startup-id numlockx on
bindsym control+Return exec $term
# applications #
# ]]] startup #
# applications [[[ #
set $mod Mod1
set $sch_dir "$HOME/Documents/School"
# app shortcuts #
# app shortcuts [[[ #
bindsym control+Return exec $term
# PROTIP: You can also dynamically set dmenu's colors this way:
bindsym Mod4+Return exec dmenu_run -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg"
# bindsym Mod4+Return exec dmenu_run
@ -54,16 +59,13 @@ bindsym control+Return exec $term
bindsym Mod4+q exec qdirstat
bindsym Mod4+r exec urxvt -e ranger
bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)"
bindsym control+$mod+s exec systemctl suspend
# bindsym Mod4+t exec st
bindsym Mod4+$mod+t exec xclip -selection clipboard ~/.password-store/social/trapbot
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
bindsym Mod4+$mod+u exec pass -c uoft/acorn
bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
bindsym Mod4+$mod+w exec notify-send "watson stop" "$(watson status && watson stop)"
{{ if eq .chezmoi.fullHostname "nzxt" }}
bindsym control+$mod+w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp
{{ end }}
bindsym control+Mod4+w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp
# bindsym Mod4+x exec $swex
bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
bindsym Mod4+z exec cliqz
@ -74,16 +76,21 @@ bindsym control+Return exec $term
bindsym Print --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
bindsym control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
{{ end }}
# app shortcuts #
# ]]] app shortcuts #
# redshift [[[ #
bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1100
# redshift #
bindsym $mod+Mod4+2 exec redshift -x && redshift -O 2000
bindsym $mod+Mod4+3 exec redshift -x && redshift -O 3000
bindsym $mod+Mod4+4 exec redshift -x && redshift -O 4000
bindsym $mod+Mod4+5 exec redshift -x && redshift -O 5000
bindsym $mod+Mod4+grave exec redshift -x
# redshift #
# ]]] redshift #
# backlight [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
bindsym Shift+F1 exec xbacklight -set 10
@ -104,13 +111,94 @@ bindsym control+Return exec $term
bindsym $mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service
{{ end }}
# ]]] backlight #
for_window [class="Peek"] floating enable
# ]]] applications #
# container display [[[ #
# Font for window titles
font pango:$sb_font 11
bindsym $mod+s layout stacking
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle tiling /floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# gaps [[[ #
for_window [class="^.*"] border pixel 3
set $inner_gaps 40
set $outer_gaps 0
# remove window titlebars
# for_window [class="^.*"] border pixel 1
# gaps inner $inner_gaps
# gaps outer $outer_gaps
# gaps bottom 0
gaps inner 0
gaps outer 0
# other gaps [[[ #
# gaps horizontal 20
# gaps vertical 10
# gaps top
# gaps left 20
# gaps right 20
# gaps bottom
# ]]] other gaps #
bindsym control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
# ]]] gaps #
# colors from pywal [[[ #
set_from_resource $fg i3wm.color7 #f0f0f0
# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use
# from the generated scheme.
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $bg i3wm.color2 #f0f0f0
# class border backgr. text indicator child_border
client.focused $bg $bg $fg $bg $bg
# client.unfocused $fg $bg $fg $bg $fg
# client.urgent $bg $bg $fg $bg $bg
# client.placeholder $bg $bg $fg $bg $bg
# client.background $bg
# ]]] colors from pywal #
# ]]] container display #
# moving windows [[[ #
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
for_window [class="Peek"] floating enable
# changing/focusing/moving windows #
bindsym control+h focus left
# change focus
bindsym control+h focus left
bindsym control+j focus down
bindsym control+k focus up
bindsym control+l focus right
@ -119,24 +207,12 @@ bindsym control+h focus left
bindsym $mod+minus move workspace to output left
bindsym $mod+plus move workspace to output right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym control+Shift+h move left
bindsym control+Shift+j move down
bindsym control+Shift+k move up
bindsym control+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+b split h
bindsym Mod4+$mod+b split h; exec $term
@ -145,11 +221,19 @@ bindsym control+h focus left
bindsym $mod+v split v
bindsym Mod4+$mod+v split v; exec $term
# resizing windows #
bindsym $mod+control+h resize grow width 5 px or 5 ppt
bindsym $mod+control+k resize grow height 5 px or 5 ppt
bindsym $mod+control+j resize shrink height 5 px or 5 ppt
bindsym $mod+control+l resize shrink width 5 px or 5 ppt
# bindsym control+Shift+x kill
bindsym shift+x kill
# changing/focusing/moving windows #
# backgrounds
# ]]] moving windows #
# backgrounds [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
bindsym control+$mod+q exec wal -i "$HOME/Pictures/Backgrounds/bright/editing"; exec ~/.cache/wal/colors.sh
bindsym control+$mod+w exec /home/kevin/linux-config/scripts/bg-chooser; exec ~/.cache/wal/colors.sh
@ -163,47 +247,11 @@ bindsym control+h focus left
bindsym $mod+r exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/editing")
bindsym $mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/non-editing")
{{ end }}
# backgrounds
# container display #
bindsym $mod+s layout stacking
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+t layout tabbed
bindsym $mod+e layout toggle split
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# toggle tiling /floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# container display #
# change container colors from pywal #
set_from_resource $fg i3wm.color7 #f0f0f0
# Set colors from Xresources
# Change 'color7' and 'color2' to whatever colors you want i3 to use
# from the generated scheme.
# NOTE: The '#f0f0f0' in the lines below is the color i3 will use if
# it fails to get colors from Xresources.
set_from_resource $bg i3wm.color2 #f0f0f0
# ]]] backgrounds #
# class border backgr. text indicator child_border
client.focused $bg $bg $fg $bg $bg
# client.unfocused $fg $bg $fg $bg $fg
# client.urgent $bg $bg $fg $bg $bg
# client.placeholder $bg $bg $fg $bg $bg
# client.background $bg
# change container colors from pywal #
# ws names [[[ #
# ws names #
set $ws1 "1 "
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
set $secondary "HDMI2"
@ -289,7 +337,10 @@ set $ws1 "1 "
set $ws14 "14"
set $ws15 "15"
# ws bindings #
# ]]] ws names #
# ws bindings [[[ #
bindsym $mod+h workspace prev
bindsym $mod+l workspace next
@ -308,9 +359,9 @@ bindsym $mod+h workspace prev
# bindsym Mod4+3 workspace $ws13
# bindsym Mod4+4 workspace $ws14
# bindsym Mod4+5 workspace $ws15
# ws bindings #
# move container to ws #
# move container to ws [[[ #
bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+control+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+control+3 move container to workspace $ws3; workspace $ws3
@ -326,51 +377,29 @@ bindsym $mod+control+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13
bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14
bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15
# move container to ws #
# reload config/computer #
# ]]] move container to ws #
# ]]] ws bindings #
# reload config [[[ #
bindsym $mod+control+r exec i3-msg restart
bindsym $mod+Shift+c reload
# bindsym $mod+control+r reload
bindsym $mod+control+u exec xrdb ~/.Xresources
# exit i3 (logs you out of your X session)
bindsym control+$mod+s exec systemctl suspend
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resizing windows #
bindsym $mod+control+h resize grow width 5 px or 5 ppt
bindsym $mod+control+k resize grow height 5 px or 5 ppt
bindsym $mod+control+j resize shrink height 5 px or 5 ppt
bindsym $mod+control+l resize shrink width 5 px or 5 ppt
# ]]] reload config #
# gaps #
for_window [class="^.*"] border pixel 3
set $inner_gaps 40
set $outer_gaps 0
# remove window titlebars
# for_window [class="^.*"] border pixel 1
# status bar [[[ #
# gaps inner $inner_gaps
# gaps outer $outer_gaps
# gaps bottom 0
gaps inner 0
gaps outer 0
# other gaps #
# bar vars [[[ #
# gaps horizontal 20
# gaps vertical 10
# gaps top
# gaps left 20
# gaps right 20
# gaps bottom
# other gaps #
bindsym control+shift+plus gaps inner all set $inner_gaps;gaps outer all set $outer_gaps
bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
# status bar #
# set $sb_font Hack NF Bold
# set $sb_font EmojiOne
set $sb_font DejaVuSansMono Nerd Font Mono Bold
@ -388,10 +417,13 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
set $focused_ws_text #ffffff
# ]]] bar vars #
# main bar [[[ #
# set $bar_trans 64
set $bar_trans 00
set $main_ws_trans aa
# main bar
bar {
i3bar_command i3bar -t
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
@ -417,7 +449,10 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
wheel_down_cmd nop
}
# sam bar
# ]]] main bar #
# secondary bar [[[ #
bar {
output $secondary
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
@ -435,13 +470,17 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
}
# status_command i3blocks -c ~/.config/i3blocks/sam-i3blocks.conf
status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
status_command i3blocks -c ~/.config/i3blocks/i3blocks-secondary.conf
# status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
tray_output none
wheel_up_cmd nop
wheel_down_cmd nop
}
# # # display #
# ]]] secondary bar #
# display bar [[[ #
# bar {
# i3bar_command i3bar -t
# font pango:$sb_font 23
@ -451,23 +490,25 @@ set $sb_font DejaVuSansMono Nerd Font Mono Bold
# wheel_up_cmd nop
# wheel_down_cmd nop
# }
# # display #
# status bar #
# Font for window titles
font pango:$sb_font 11
# ]]] display bar #
# ]]] status bar #
# media keys [[[ #
# media keys #
# sink
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks
bindsym control+d exec ~/linux-config/scripts/change-sink dac
# bindsym control+shift+d exec ~/linux-config/scripts/change-sink dac2
bindsym control+o exec ~/linux-config/scripts/change-sink line-out
# media
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+1 i3blocks
# Media player controls
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"
bindsym XF86AudioStop exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop"
bindsym XF86AudioPrev exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
bindsym XF86AudioNext exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
# ]]] media keys #

29
dot_config/i3blocks/sam-i3blocks.conf → dot_config/i3blocks/i3blocks-secondary.conf.tmpl

@ -1,4 +1,6 @@
# Global properties {{{ #
# vim: fdm=marker ft=conf.go-template
# Global properties [[[ #
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
align=center
@ -7,7 +9,9 @@ separator=true
separator_block_width=25
markup=pango
color=#cbe4ff
# }}} Global properties #
# ]]] Global properties #
# volume/spotify [[[ #
[spotify]
# command=python ~/linux-config/configs/i3blocks-scripts/spotify.py
@ -25,12 +29,31 @@ interval=once
signal=1
interval=60
# ]]] volume/spotify #
# time [[[ #
[calendar]
interval=30
label=
{{ if eq .chezmoi.fullHostname "nzxt" }}
DATEFMT=+%H:%M.%a-%m-%d
{{ else }}
DATEFMT=+%H:%M
{{ end }}
# SHORTFMT=+%H:%M:%S
SHORTFMT=+%H:%M.%a-%m-%d
# SHORTFMT=+%H:%M.%a-%m-%d
HEIGHT=180
WIDTH=220
# ]]] time #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
[temperature]
label=
interval=5
[name]
label=
interval=30
{{ end }}

36
dot_config/i3blocks/i3blocks.conf.tmpl

@ -1,3 +1,7 @@
# vim: fdm=marker ft=conf.go-template
# global [[[ #
# The top properties below are applied to every block, but can be overridden.
# Each block command defaults to the script name to avoid boilerplate.
align=center
@ -7,6 +11,10 @@ separator_block_width=25
markup=pango
color=#cbe4ff
# ]]] global #
# volume/spotify [[[ #
{{ if eq .chezmoi.fullHostname "nzxt" }}
[volume]
interval=once
@ -20,6 +28,10 @@ SHORT_NAME=
interval=5
{{ end }}
# ]]] volume/spotify #
# laptop [[[ #
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
[battery]
label=⚡
@ -35,6 +47,10 @@ label=
interval=5
{{ end }}
# ]]] laptop #
# time [[[ #
[calendar]
interval=30
label=
@ -47,6 +63,10 @@ DATEFMT=+%H:%M.%a-%m-%d
HEIGHT=180
WIDTH=220
# ]]] time #
# sys.monitoring [[[ #
{{ if eq .chezmoi.fullHostname "nzxt" }}
[temperature]
label=
@ -69,12 +89,18 @@ label=
# color=#3da061
interval=5
# ]]] sys.monitoring #
# name [[[ #
[name]
label=
interval=30
{{ end }}
# unused blocks #
# ]]] name #
# unused blocks [[[ #
# [memory]
# label=SWAP
@ -154,9 +180,11 @@ interval=30
#instance=NUM
#interval=once
#signal=11
# unused blocks #
# list of properties #
# ]]] unused blocks #
# properties [[[ #
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
@ -178,5 +206,5 @@ interval=30
# short_text
# signal
# urgent
# properties #
# ]]] properties #

6
dot_config/private_fish/config.fish

@ -22,7 +22,7 @@ bind \cr forward-word
chezmoi apply
/home/kevin/scripts/sync-shortcuts
source /home/kevin/.config/fish/key_abbr.fish
# source /home/kevin/.config/fish/key_abbr.fish > /dev/null
set -U fish_fxn_dir "/home/kevin/linux-config/dot_config/private_fish/private_functions"
# set -U fish_fxn_dir "/home/kevin/.config/fish/functions"
abbr ff "cd $fish_fxn_dir"
@ -30,7 +30,7 @@ for fxn in (find $fish_fxn_dir -name '*.fish')
source $fxn
end
abbr rf "chezmoi apply && source ~/.config/fish/config.fish"
abbr rfs "sync-shortcuts && chezmoi apply && source ~/.config/fish/config.fish"
abbr rfs "sync-shortcuts && chezmoi apply && source /home/kevin/.config/fish/key_abbr.fish > /dev/null"
abbr xf "fish_config"
abbr f. "cd .."
abbr f.. "cd ../.."
@ -52,7 +52,7 @@ set -xU XSET_RATE 90
set -xU XSET_DELAY 200
# causes xmodmap to have issues when opening terminal sometimes
# xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE
# xset r rate $XSET_DELAY $XSET_RATE
xset r rate $XSET_DELAY $XSET_RATE
# set -U BROWSER "chromium"
set -U BROWSER "firefox"

2
dot_config/private_fish/private_functions/find-vim-filetype.fish

@ -1,3 +1,3 @@
function find-vim-filetype
fd $argv[1] /usr/share/nvim/runtime/ftplugin
fd $argv[1] /usr/share/nvim/runtime/ftplugin /usr/share/nvim/runtime/syntax
end

13
dot_vimrc

@ -66,7 +66,7 @@ autocmd FileType tex set updatetime=3000
autocmd FileType tex map <F8> :VimtexCompile<CR>
autocmd VimEnter *.tex VimtexCompile
autocmd VimLeave *.tex !tex-clean %:p
autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 ft=tmpl
autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 ft=go-template fmr=[[[,]]]
" " auto-reload vimrc {{{ "
@ -226,15 +226,14 @@ Plug 'djoshea/vim-autoread'
" Plug 'mustache/vim-mustache-handlebars'
" Plug 'trapd00r/vim-syntax-vidir-ls'
Plug 'calviken/vim-gdscript3'
call plug#end()
" }}} vim-plug "
" Mappings {{{ "
call plug#end()
" colorscheme gotham256
colorscheme wal
" Mappings {{{ "
nnoremap > >>
nnoremap < <<
inoremap << <Esc><<A
@ -270,7 +269,7 @@ nnoremap <C-w> <C-W>|
let mapleader="\<Space>"
" find alias
nnoremap <leader>a / <Left>
nnoremap <leader>a /^ <Left>
" replace until end of line
nnoremap <leader>c c$
" delete entire buffer
@ -414,6 +413,6 @@ autocmd Filetype javascript inoremap <localleader>x process.exit()
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx
autocmd Filetype tmpl inoremap <localleader>e {{ else }}
autocmd Filetype go-template inoremap <localleader>e {{ else }}
" }}} Local Mappings "

172
key_aliases.tmpl

@ -1,6 +1,6 @@
# vim: fdm=indent
# vim: fdm=marker ft=go-template.sh syntax=sh
# system
# system [[[
# clear screen
c "printf '\033c'"
hst "history"
@ -16,6 +16,12 @@
tl "tldr"
nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
{{ if eq .chezmoi.fullHostname "x1-carbon" }}
xr "xrandr"
xrs "xrandr -s 0"
xrr "xrandr --output HDMI2 --auto --right-of eDP1 --scale 1.33x1.33"
xrm "xrandr --output HDMI2 --auto --same-as eDP1 --scale 1.33x1.33"
{{ end }}
vgb "sudo nvim /etc/default/grub"
mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
@ -31,7 +37,7 @@
ex "chmod 777"
ex "chmod 777"
# systemctl #
# systemctl [[[ #
ctl "sudo systemctl"
ctle "sudo systemctl enable"
ctld "sudo systemctl disable"
@ -40,19 +46,22 @@
ctlt "sudo systemctl status"
ctltd "sudo systemctl status dhcpcd"
ctlr "sudo systemctl restart"
# ]]] systemctl #
wm "sudo wifi-menu"
# mounting
# mounting [[[ #
udm "udisksctl mount -b"
udmb "udisksctl mount -b /dev/sdc2"
udu "udisksctl unmount -b"
udub "udisksctl unmount -b /dev/sdc2"
# ]]] mounting #
tc "touch"
vd "vidir --verbose"
# directory-related #
# directory-related [[[ #
ls "lsd"
l "lsd -a"
ll "lsd -al"
@ -77,9 +86,10 @@
# cd into backup folder and show backup sizes
nbu "cd /run/media/{{ .chezmoi.group }}/backup-hd/{{ .chezmoi.fullHostname }}/tar && lsd -l"
# directory-related #
# ]]] directory-related #
# power options [[[ #
# power options #
s "systemctl suspend"
so "xset dpms force off"
sd "systemctl poweroff"
@ -88,16 +98,25 @@
x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE"
# ]]] power options #
# sound
{{ if eq .chezmoi.fullHostname "nzxt" }}
vlm "alsamixer -c 0"
vlh "alsamixer -c 2"
{{ else }}
vlm "alsamixer -c 1"
{{ end }}
# apt [[[ #
# apt
# apti "sudo apt install"
# aptr "sudo apt remove"
# aptu "sudo apt upgrade"
# pacman #
# ]]] apt #
# pacman [[[ #
# pc "sudo pacman -S"
# pcq "sudo pacman -Qi"
@ -106,9 +125,13 @@
# pcug "sudo pacman -Syu"
# xpc "pacman -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && pacman -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt "
# ]]] pacman #
# tri "trizen -S --noconfirm"
tri "trizen -S --noedit"
# yay [[[ #
# install
ya "yay -S --answerclean=None --answerdiff=None --answeredit=None"
# info
@ -124,6 +147,8 @@
# export packages
xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && yay -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt "
# ]]] yay #
py "python"
pipi "sudo pip install"
@ -135,11 +160,12 @@
id "identify"
# rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases"
# system
# system ]]]
# applications [[[ #
chr "google-chrome"
# applications #
# silent="> /dev/null 2>&1& "
chr "google-chrome"
clc "cloc ."
cv "cava"
dg "dragon-drag-and-drop -x"
@ -171,10 +197,8 @@ chr "google-chrome"
lz "unzip -l"
# rsl "java -jar ~/Downloads/RuneLite.jar"
# swex "sudo nohup ~/Downloads/swex.appimage $silent"
# pass [[[ #
# pass #
ps "pass"
psc "pass -c"
pse "pass edit"
@ -188,6 +212,10 @@ chr "google-chrome"
yt "xclip -selection clipboard ~/.password-store/social/trapbot"
yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard"
# ]]] pass #
# watson [[[ #
w "watson"
wa "watson start"
wae "watson start && watson edit"
@ -206,13 +234,18 @@ chr "google-chrome"
wsc "watson cancel"
wsl "watson stop && watson log --day"
wt "watson status"
# applications #
# ]]] watson #
# ]]] applications #
# git [[[ #
g "git"
# git #
gstr "git config credential.helper store"
# branch #
# branch [[[ #
gb "git branch"
gbd "git branch -D"
gba "git branch --no-merged && echo '' && git branch --merged"
@ -225,7 +258,10 @@ g "git"
gr "git remote -v"
gro "git remote show origin"
# add/remove #
# ]]] branch #
# add/remove [[[ #
ga "git add -A && git status -u"
gac "git add -A && git commit -S"
gaf "git add -f"
@ -237,10 +273,12 @@ g "git"
grmc "git rm --cached"
grmfc "git rm -f --cached"
grmor "rm (fd -e orig --no-ignore -H)"
# add #
# ]]] add/remove #
# diff/log [[[ #
gd "git difftool -w --tool=vimdiff"
# diff/log #
gdc "git difftool -w --cached --tool=vimdiff"
gdl "git diff -w"
gdlc "git diff --cached -w"
@ -248,10 +286,16 @@ g "git"
gds "git diff --stat"
gl "git log"
gsl "git shortlog"
# diff/log #
# ]]] diff/log #
# pull [[[ #
gcln "git clone"
gs "git status -u"
# update #
gf "git fetch origin"
gcho "git checkout"
gchon "git checkout -b"
gchom "git checkout master"
gchnw "git checkout -b wip"
gchw "git checkout wip"
@ -260,11 +304,21 @@ g "git"
# gls "git ls-tree -r HEAD --name-only"
gls "git ls-tree HEAD --name-only"
# push #
gchp "git cherry-pick"
gchpc "git cherry-pick --continue"
gst "git stash"
gstl "git stash list"
gstp "git stash pop"
gpl "git pull --rebase"
grba "git rebase --abort"
grbc "git rebase --continue"
# ]]] pull #
# push [[[ #
gc "git commit -S"
gcu "git commit"
gca "git add -A && git commit --amend --no-edit -S"
@ -279,37 +333,31 @@ g "git"
gpsf "git push --force"
gclear "git stash clear"
gpl "git pull --rebase"
grba "git rebase --abort"
grbc "git rebase --continue"
crm "mrk README.md"
# assume file unchanged
gunc "git update-index --assume-unchanged"
gcho "git checkout"
gchon "git checkout -b"
gf "git fetch origin"
# ]]] push #
gcln "git clone"
gchp "git cherry-pick"
gchpc "git cherry-pick --continue"
# ]]] git #
# assume file unchanged
gunc "git update-index --assume-unchanged"
# git #
# coding projs [[[ #
rgt "rg TODO"
# coding projs #
## chezmoi
# chezmoi [[[ #
zm "chezmoi"
za "chezmoi add"
zar "chezmoi add -r"
zd "chezmoi data"
ze "chezmoi edit"
zp "chezmoi -v apply"
ssv "source ../bin/activate.fish && python manage.py runserver"
# spotify-lib-vis #
# ]]] chezmoi #
# spotify-lib-vis [[[ #
# start spv server outside dir
ssv "source ../bin/activate.fish && python manage.py runserver"
# open spv db in psql
spvdb "psql -d spotifyvis -U django"
mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv"
@ -332,11 +380,14 @@ rgt "rg TODO"
snw "spotify-now -i '%artist - %title'"
# ]]] spotify-lib-vis #
shc "shellcheck"
pdl "pdflatex"
tcl "tex-clean"
# mfs
# mfs [[[ #
mfs "nvim {{ .chezmoi.homedir }}/coding/best-mf-site-personal/index.html"
ht "python3 -m http.server"
# j "jekyll"
@ -349,13 +400,18 @@ rgt "rg TODO"
rt "python ~/coding/rt-scraper/!rt-scraper.py"
# ]]] mfs #
med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head"
# coding projs #
# ]]] coding projs #
# school [[[ #
# 369 [[[ #
wlf "watson log --all --tag=final"
wrf "watson report --all --tag=final"
# school #
# 369 #
ssc "ssh mokkar@teach.cs.utoronto.ca"
ma "printf '\033c' && bear make"
@ -365,22 +421,29 @@ wrf "watson report --all --tag=final"
rmc "rm compile_commands.json"
rms "rm swapfile.*"
# ]]] 369 #
# 309 [[[ #
wl0 "watson log --all --project=309 --tag=phase2"
wr0 "watson report --all --project=309 --tag=phase2"
# 309
# apps
# server [[[ #
nd "node"
ndm "nodemon"
knd "killall node"
mg "mongo"
# server
0ht "cd ~/school/309-proj && python3 -m http.server"
mgd "mongod --dbpath mongo-data"
# nds "killall node && nodemon server.js"
nds "nodemon server.js"
# heroku
# ]]] server #
# heroku [[[ #
hr "heroku"
hrs "heroku local web"
hrt "heroku ps"
@ -388,4 +451,9 @@ wrf "watson report --all --tag=final"
gpsh "git push heroku"
0c "node collections.js"
# school #
# ]]] heroku #
# ]]] 309 #
# ]]] school #

26
key_dirs.tmpl

@ -1,6 +1,7 @@
# vim: fdm=indent
# vim: fdm=marker ft=sh.go-template syntax=sh
# sys [[[ #
# sys *
bg {{ .chezmoi.homedir }}/Pictures/Backgrounds
cf {{ .chezmoi.homedir }}/.config
d {{ .chezmoi.homedir }}/Downloads
@ -16,10 +17,12 @@
P {{ .chezmoi.homedir }}/Pictures
sw {{ .chezmoi.homedir }}/.local/share/nvim/swap/
tm /tmp
# sys *
# ]]] sys #
# cdn [[[ #
b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16
# cdn *
2d {{ .chezmoi.homedir }}/coding/godot-demos/2d-plat
ad {{ .chezmoi.homedir }}/coding/ada-mario-prep
cn {{ .chezmoi.homedir }}/coding
@ -39,11 +42,15 @@ b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16
tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt
wd {{ .chezmoi.homedir }}/.config/watson
wo {{ .chezmoi.homedir }}/Documents/workout-logs/11
# cdn *
# ]]] cdn #
# sch [[[ #
lt {{ .chezmoi.homedir }}/school/latex-notes
# sch *
# 309
# 309 [[[ #
sc {{ .chezmoi.homedir }}/school
0c {{ .chezmoi.homedir }}/school/309-proj/css
0d {{ .chezmoi.homedir }}/school/309
@ -53,8 +60,11 @@ lt {{ .chezmoi.homedir }}/school/latex-notes
0m {{ .chezmoi.homedir }}/school/309-proj/mongo
e4 {{ .chezmoi.homedir }}/school/309/e4
# ]]] 309 #
6 {{ .chezmoi.homedir }}/school/369
6l {{ .chezmoi.homedir }}/school/369/notes/lectures
hp {{ .chezmoi.homedir }}/school/hps
# sch *
# ]]] sch #

25
key_files.tmpl

@ -1,6 +1,7 @@
# vim: fdm=indent
# vim: fdm=marker ft=sh.go-template syntax=sh
# sys [[[ #
# sys *
3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config.tmpl
a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl
dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl
@ -15,10 +16,12 @@
x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish
y {{ .chezmoi.homedir }}/.zshrc
z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases
# sys *
# ]]] sys #
# cdn [[[ #
cm /tmp/commit-msg.txt
# cdn *
bid {{ .chezmoi.homedir }}/coding/project-ideas/blog.md
ci {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/ideas.md
cmd ./commit-msg.txt
@ -37,11 +40,14 @@ cm /tmp/commit-msg.txt
tm {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
wh {{ .chezmoi.homedir }}/Documents/journal/todo/work-habit.md
wt {{ .chezmoi.homedir }}/.config/watson/state.tmp
# cdn *
# ]]] cdn #
# sch [[[ #
# 309 [[[ #
0c {{ .chezmoi.homedir }}/school/309-proj/sass/main.scss
# sch *
# 309 *
0h {{ .chezmoi.homedir }}/school/309-proj/public/js/helpers.js
0i {{ .chezmoi.homedir }}/school/309-proj/public/index.html
0m {{ .chezmoi.homedir }}/school/309-proj/public/js/main.js
@ -49,4 +55,7 @@ cm /tmp/commit-msg.txt
0s {{ .chezmoi.homedir }}/school/309-proj/server.js
0t {{ .chezmoi.homedir }}/school/309-proj/public/js/stores.js
0k {{ .chezmoi.homedir }}/school/309-proj/json/{{ .chezmoi.group }}.md
# sch *
# ]]] 309 #
# ]]] sch #

1
txt/todo.md

@ -1,5 +1,4 @@
# chezmoi
- merge laptop
- root
- shortcut script
- fish config template

Loading…
Cancel
Save