diff --git a/.chezmoiignore b/.chezmoiignore index a68186d..f734e9b 100755 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -12,3 +12,6 @@ txt/ .xinitrc .Xresources {{ end }} +{{ if not (eq .chezmoi.fullHostname "x1-carbon") }} +.Xmodmap-laptop +{{ end }} diff --git a/dot_Xmodmap b/dot_Xmodmap new file mode 100755 index 0000000..2efaa1c --- /dev/null +++ b/dot_Xmodmap @@ -0,0 +1,4 @@ +clear Lock + +keycode 22 = Caps_Lock +keycode 66 = BackSpace diff --git a/dot_Xmodmap-laptop b/dot_Xmodmap-laptop new file mode 100755 index 0000000..84749ce --- /dev/null +++ b/dot_Xmodmap-laptop @@ -0,0 +1,7 @@ +clear Lock + +keycode 115 = BackSpace +keycode 110 = Delete + +keycode 22 = Home +keycode 119 = End diff --git a/dot_Xmodmap.tmpl b/dot_Xmodmap.tmpl deleted file mode 100755 index ae7dfca..0000000 --- a/dot_Xmodmap.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -clear Lock - -{{ if and (eq .chezmoi.fullHostname "x1-carbon") (not .ext_kb) }} -keycode 115 = BackSpace -keycode 110 = Delete - -keycode 22 = Home -keycode 119 = End -{{ else }} -keycode 22 = Caps_Lock -keycode 66 = BackSpace -{{ end }} diff --git a/dot_Xresources.tmpl b/dot_Xresources.tmpl index f6f6c8e..a868dde 100755 --- a/dot_Xresources.tmpl +++ b/dot_Xresources.tmpl @@ -1,7 +1,8 @@ /* font [[[ */ {{ if eq .chezmoi.fullHostname "x1-carbon" }} -URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=11 +! URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=11 +URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=12 {{ else }} URxvt.font: xft:DejaVuSansMono Nerd Font Mono:size=14 {{ end }} diff --git a/dot_config/chezmoi/chezmoi-template.toml.tmpl b/dot_config/chezmoi/chezmoi-template.toml.tmpl index 505115e..c215e61 100755 --- a/dot_config/chezmoi/chezmoi-template.toml.tmpl +++ b/dot_config/chezmoi/chezmoi-template.toml.tmpl @@ -2,5 +2,3 @@ sourceDir = "~/linux-config" [data] gui = true - # ext_kb = true - ext_kb = false diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index 2cf13d9..805314a 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -11,18 +11,20 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' # applications [[[ # set $mod Mod1 -set $browser "firefox" -# set $browser "chromium" -# set $term "urxvt" -set $term "st" +# set $browser "firefox" +set $browser "chromium" +set $term "urxvt" +set $term_alt "st" +# set $term "st" +# set $term_alt "urxvt" set $scripts_path "/home/kevin/scripts" set $sch_dir "$HOME/Documents/School" # app shortcuts [[[ # -bindsym control+Return exec $term -bindsym control+$mod+Return exec urxvt -# bindsym control+$mod+Return exec st +bindsym Control+Return exec $term +bindsym Control+$mod+Return exec $term_alt +# bindsym Control+$mod+Return exec st # 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 @@ -52,16 +54,16 @@ bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboa 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)" -bindsym control+Mod4+w exec urxvt -e nvim /home/kevin/.config/watson/state.tmp +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 {{ if .ext_kb }} 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'" +bindsym Control+Print --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" {{ else }} bindsym $mod+p --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" -bindsym control+$mod+p --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" +bindsym Control+$mod+p --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" {{ end }} # ]]] app shortcuts # @@ -91,8 +93,8 @@ bindsym Shift+F8 exec xbacklight -set 80 bindsym Shift+F9 exec xbacklight -set 90 bindsym Shift+F0 exec xbacklight -set 100 -bindsym control+$mod+plus exec xbacklight -inc 2 -bindsym control+$mod+minus exec xbacklight -dec 2 +bindsym Control+$mod+plus exec xbacklight -inc 2 +bindsym Control+$mod+minus exec xbacklight -dec 2 bindsym $mod+w exec sudo systemctl start netctl-auto@wlp3s0.service bindsym $mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service @@ -153,8 +155,8 @@ gaps outer 0 # ]]] 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 +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 # @@ -186,20 +188,20 @@ client.focused $bg $bg $fg $bg $bg floating_modifier $mod # change focus -bindsym control+h focus left -bindsym control+j focus down -bindsym control+k focus up -bindsym control+l focus right +bindsym Control+h focus left +bindsym Control+j focus down +bindsym Control+k focus up +bindsym Control+l focus right # move workspace to other monitor bindsym $mod+minus move workspace to output left bindsym $mod+plus move workspace to output 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 +bindsym Control+Shift+h move left 50px +bindsym Control+Shift+j move down 50px +bindsym Control+Shift+k move up 50px +bindsym Control+Shift+l move right 50px # split in horizontal orientation bindsym $mod+b split h @@ -210,12 +212,12 @@ 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 $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 Control+Shift+x kill bindsym shift+x kill # ]]] moving windows # @@ -225,9 +227,9 @@ bindsym shift+x kill set $make_st_script "/home/kevin/st/make-st.sh" {{ if eq .chezmoi.fullHostname "x1-carbon" }} -bindsym control+$mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") -bindsym control+$mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") -bindsym control+$mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg +bindsym Control+$mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") && $make_st_script +bindsym Control+$mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") && $make_st_script +bindsym Control+$mod+z exec feh --bg-fill ~/Pictures/Backgrounds/dim/black.jpg {{ else }} bindsym $mod+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") && $make_st_script bindsym $mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") && $make_st_script @@ -269,11 +271,16 @@ set $ws5 "5 " workspace $ws5 output $secondary assign [class="Steam"] $ws5 bindsym $mod+F5 workspace $ws5; exec $browser -bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam +# bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam +bindsym Mod4+g workspace $ws5; layout tabbed; exec gimp bindsym Mod4+t workspace $ws5; exec thunderbird -bindsym Mod4+5 workspace $ws5; exec cd ~/coding/ada-mario-prep && godot -e -for_window [class="ada-mario-prep"] floating enable +bindsym Mod4+F5 workspace $ws5; exec cd ~/coding/ada-mario-prep && godot -e +# for_window [class="Move_mouse_with_head"] floating enable; move absolute position 0 0 for_window [class="Move_mouse_with_head"] floating enable +for_window [class="Move_mouse_with_head"] move absolute position 0 0 +# for_window [class="ada-mario-prep"] floating enable; move absolute position 1000 700 +for_window [class="ada-mario-prep"] floating enable +for_window [class="ada-mario-prep"] move absolute position 930 480 set $ws6 "6 " workspace $ws6 output $secondary @@ -346,16 +353,16 @@ bindsym Mod4+1 workspace $ws11 # 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 -bindsym $mod+control+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+control+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+control+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8 -bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9 -bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10 +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 +bindsym $mod+Control+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Control+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Control+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Control+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Control+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+Control+9 move container to workspace $ws9; workspace $ws9 +bindsym $mod+Control+0 move container to workspace $ws10; workspace $ws10 bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11 bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12 bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13 @@ -368,13 +375,13 @@ bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15 # reload config [[[ # -bindsym $mod+control+r exec i3-msg restart +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 +# 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 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'" # ]]] reload config # @@ -484,9 +491,9 @@ bar { # 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 +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 diff --git a/dot_config/st/config.def.h.tmpl b/dot_config/st/config.def.h.tmpl index da435c8..5939682 100644 --- a/dot_config/st/config.def.h.tmpl +++ b/dot_config/st/config.def.h.tmpl @@ -8,7 +8,7 @@ * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html */ {{ if eq .chezmoi.fullHostname "x1-carbon" }} -static char *font = "DejaVuSansMono Nerd Font Mono:pixelsize=30:antialias=true:autohint=true"; +static char *font = "DejaVuSansMono Nerd Font Mono:pixelsize=33:antialias=true:autohint=true"; {{ else }} static char *font = "DejaVuSansMono Nerd Font Mono:pixelsize=20:antialias=true:autohint=true"; {{ end }} diff --git a/dot_gdbinit b/dot_gdbinit new file mode 100644 index 0000000..9569b3d --- /dev/null +++ b/dot_gdbinit @@ -0,0 +1,3 @@ +define hook-quit + set confirm off +end diff --git a/dot_gitconfig b/dot_gitconfig index 90a018f..3710e31 100755 --- a/dot_gitconfig +++ b/dot_gitconfig @@ -13,6 +13,7 @@ conflictstyle = diff3 [mergetool] prompt = false + keepBackup = false [diff] tool = vimdiff [commit] diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index 91b9453..a17f400 100755 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -23,8 +23,8 @@ set shiftwidth=4 set tabstop=4 " set t_Co=256 " set termguicolors -" set timeoutlen=500 -set timeoutlen=350 +" set timeoutlen=350 +set timeoutlen=200 " set tw=80 set tw=75 set undodir=~/.vim/undo @@ -36,7 +36,8 @@ autocmd VimResized * wincmd = filetype plugin on filetype indent on syntax on -au CursorHold * checktime +" au CursorHold * checktime +autocmd CursorHold * if !bufexists("[Command Line]") | checktime | endif " cursor indicator [[[ " @@ -130,7 +131,7 @@ Plug 'vim-scripts/L9' " automatically save buffers upon returning to normal mode Plug '907th/vim-auto-save' let g:auto_save = 1 - let g:auto_save_events = ["CursorHold", "CursorHoldI"] + " let g:auto_save_events = ["CursorHold", "CursorHoldI"] " autocmd VimEnter *.tex let g:auto_save = 0 " provides various functionality for writing LaTeX in Vim @@ -424,6 +425,7 @@ autocmd Filetype fish inoremap 2 $argv[2] autocmd Filetype javascript inoremap x process.exit() +autocmd Filetype markdown inoremap cb - [ ] autocmd Filetype markdown nnoremap x 0f[lrx " nnoremap x 0f[lrx diff --git a/dot_xinitrc b/dot_xinitrc index 732ddf2..1f9ca62 100755 --- a/dot_xinitrc +++ b/dot_xinitrc @@ -12,7 +12,7 @@ imwheel & numlockx on & start-pulseaudio-x11 & -wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") && /home/kevin/st/make-st.sh & +wal -i "$(/home/kevin/scripts/shuffler \"$HOME/Pictures/Backgrounds/dim/non-editing\")" && /home/kevin/st/make-st.sh & exec i3 # # Statusbar loop diff --git a/key_aliases.tmpl b/key_aliases.tmpl index b8e08b3..667bc04 100755 --- a/key_aliases.tmpl +++ b/key_aliases.tmpl @@ -18,9 +18,10 @@ 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" +xro "xrandr --output HDMI2 --off" xrr "xrandr --output HDMI2 --auto --right-of eDP1 --scale 1.33x1.33" xrm "xrandr --output HDMI2 --auto --same-as eDP1 --scale 1.33x1.33" +xrs "xrandr -s 0" {{ end }} vgb "sudo nvim /etc/default/grub" @@ -305,6 +306,7 @@ gchon "git checkout -b" gchom "git checkout master" gchnw "git checkout -b wip" gchw "git checkout wip" +grom "git reset --hard origin/master" gheadm1 "git reset --hard HEAD~1" # show files in git repo # gls "git ls-tree -r HEAD --name-only" @@ -410,7 +412,7 @@ rt "python ~/coding/rt-scraper/!rt-scraper.py" # ]]] mfs # -med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head" +mm "printf '\033c' && bear make clean move_mouse_with_head && ./move_mouse_with_head" # ]]] coding projs # diff --git a/key_dirs.tmpl b/key_dirs.tmpl index 5cbf313..3b8a0c0 100755 --- a/key_dirs.tmpl +++ b/key_dirs.tmpl @@ -27,11 +27,12 @@ tm /tmp b1 ~/coding/mf-site/themes/base16 2d ~/coding/godot-demos/2d-plat ad ~/coding/ada-mario-prep +ads ~/coding/ada-mario-prep/scripts cn ~/coding ib ~/linux-config/dot_config/i3blocks/scripts j ~/Documents/journal lh ~/Documents/listening-history -mm ~/coding/move-mouse-with-head +mmd ~/coding/move-mouse-with-head ms ~/coding/mf-site mh ~/coding/mf-site/layouts # mg ~/coding/best-mf-site-personal diff --git a/key_files.tmpl b/key_files.tmpl index 43c884e..f20b007 100755 --- a/key_files.tmpl +++ b/key_files.tmpl @@ -24,6 +24,7 @@ z ~/linux-config/aliases/zsh_aliases # cdn [[[ # +adt ~/coding/ada-mario-prep/txt/todo.md cm /tmp/commit-msg.txt bid ~/coding/project-ideas/blog.md ci ~/linux-config/txt/ideas.md diff --git a/scripts/executable_backup b/scripts/executable_backup index 3d9f0b5..ae05c73 100755 --- a/scripts/executable_backup +++ b/scripts/executable_backup @@ -1,18 +1,18 @@ #!/bin/bash -mount_dir="/run/media/kevin" +mount_dir="/run/media/kevin/backup-hd" # Backup destination case $1 in nzxt ) - backup_dest="$mount_dir/backup-hd/nzxt" + backup_dest="$mount_dir/nzxt" # backup_dest="$mount_dir/backup-usb/nzxt" ;; x1 ) - backup_dest="$mount_dir/laptop-backup" + backup_dest="$mount_dir/laptop" ;; esac -exclude_dirs_list="/home/kevin/linux-config/txt/exclude-dirs-backup.txt" -exclude_dirs_list_full="/home/kevin/linux-config/txt/exclude-dirs-backup-full.txt" +exclude_dirs_list="/home/kevin/txt/exclude-dirs-backup.txt" +exclude_dirs_list_full="/home/kevin/txt/exclude-dirs-backup-full.txt" case $2 in tar ) diff --git a/txt/exclude-dirs-backup-full.txt b/txt/exclude-dirs-backup-full.txt.tmpl similarity index 100% rename from txt/exclude-dirs-backup-full.txt rename to txt/exclude-dirs-backup-full.txt.tmpl diff --git a/txt/exclude-dirs-backup.txt b/txt/exclude-dirs-backup.txt.tmpl similarity index 74% rename from txt/exclude-dirs-backup.txt rename to txt/exclude-dirs-backup.txt.tmpl index e091064..16fe99f 100755 --- a/txt/exclude-dirs-backup.txt +++ b/txt/exclude-dirs-backup.txt.tmpl @@ -4,6 +4,9 @@ /home/kevin/.android /home/kevin/.AndroidStudio3.3 /home/kevin/Android +{{ if eq .chezmoi.fullHostname "x1-carbon" }} +/home/kevin/coding/opencv +{{ end }} /lost+found /mnt /proc