From 762994e6484ed01f995f909e9ccb178ce6925aec Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 26 Apr 2019 00:48:31 -0400 Subject: [PATCH] Fix template folding --- dot_Xresources.tmpl | 54 +- ...i.toml.tmpl => chezmoi-template.toml.tmpl} | 0 dot_config/i3/config.tmpl | 915 +++++++++--------- ...ocks.conf => i3blocks-secondary.conf.tmpl} | 29 +- dot_config/i3blocks/i3blocks.conf.tmpl | 36 +- dot_config/private_fish/config.fish | 6 +- .../private_functions/find-vim-filetype.fish | 2 +- dot_vimrc | 13 +- key_aliases.tmpl | 834 ++++++++-------- key_dirs.tmpl | 122 +-- key_files.tmpl | 105 +- txt/todo.md | 1 - 12 files changed, 1157 insertions(+), 960 deletions(-) rename dot_config/chezmoi/{chezmoi.toml.tmpl => chezmoi-template.toml.tmpl} (100%) rename dot_config/i3blocks/{sam-i3blocks.conf => i3blocks-secondary.conf.tmpl} (59%) diff --git a/dot_Xresources.tmpl b/dot_Xresources.tmpl index 8de33d5..5ea813f 100644 --- a/dot_Xresources.tmpl +++ b/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,32 +9,48 @@ 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 - ! URxvt*transparent: false - ! URxvt*shading: 0 (blackest) to 99 black, 101 to 200 (whitest) white - URxvt*shading: 40 - ! URxvt*shading: 35 +URxvt*inheritPixmap: true +! URxvt*transparent: false +! URxvt*shading: 0 (blackest) to 99 black, 101 to 200 (whitest) white +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 +/* ]]] Clickable URLs */ + +/* HiDPI [[[ */ + +{{ if eq .chezmoi.fullHostname "x1-carbon" }} +Xft.dpi: 210 +{{ else }} +Xft.dpi: 101 +{{ end }} +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintfull +Xft.hinting: 1 +Xft.antialias: 1 Xft.rgba: rgb -/* HiDPI */ - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - Xft.dpi: 210 - {{ else }} - Xft.dpi: 101 - {{ end }} - Xft.autohint: 0 - Xft.lcdfilter: lcddefault - Xft.hintstyle: hintfull - Xft.hinting: 1 - Xft.antialias: 1 + +/* ]]] HiDPI */ diff --git a/dot_config/chezmoi/chezmoi.toml.tmpl b/dot_config/chezmoi/chezmoi-template.toml.tmpl similarity index 100% rename from dot_config/chezmoi/chezmoi.toml.tmpl rename to dot_config/chezmoi/chezmoi-template.toml.tmpl diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index e963253..ccc11ca 100644 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -1,473 +1,514 @@ -# vim: fdm=indent ft=i3.tmpl - -# startup # - set $browser "firefox" - # set $browser "chromium" - set $term "urxvt" - set $scripts_path "/home/kevin/scripts" - exec redshift -O 2000 - # exec redshift -O 3000 - # random bg - exec compton - exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") - exec imwheel - exec xmodmap ~/.Xmodmap - exec xset r rate $XSET_DELAY $XSET_RATE - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - exec xbacklight -set 10 - {{ end }} - exec xrdb ~/.Xresources - exec --no-startup-id dunst - exec --no-startup-id start-pulseaudio-x11 - exec --no-startup-id i3-msg 'workspace $ws2; exec $term' - exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' - # exec --no-startup-id i3-msg 'workspace $ws11; exec $swex' - exec_always --no-startup-id numlockx on +# vim: fdm=marker ft=i3.go-template + +# startup [[[ # + +set $browser "firefox" +# set $browser "chromium" +set $term "urxvt" +set $scripts_path "/home/kevin/scripts" +exec redshift -O 2000 +# exec redshift -O 3000 +# random bg +exec compton +exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") +exec imwheel +exec xmodmap ~/.Xmodmap +exec xset r rate $XSET_DELAY $XSET_RATE +{{ if eq .chezmoi.fullHostname "x1-carbon" }} +exec xbacklight -set 10 +{{ end }} +exec xrdb ~/.Xresources +exec --no-startup-id dunst +exec --no-startup-id start-pulseaudio-x11 +exec --no-startup-id i3-msg 'workspace $ws2; exec $term' +exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' +# exec --no-startup-id i3-msg 'workspace $ws11; exec $swex' +exec_always --no-startup-id numlockx on + +# ]]] startup # + +# applications [[[ # + +set $mod Mod1 +set $sch_dir "$HOME/Documents/School" + +# app shortcuts [[[ # bindsym control+Return exec $term -# applications # - set $mod Mod1 - set $sch_dir "$HOME/Documents/School" - - # app shortcuts # - # 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 - # There also is the (new) i3-dmenu-desktop which only displays applications - # 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+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+f exec firefox - bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard - bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard - bindsym Mod4+$mod+m exec pass -c uoft/markus - bindsym Mod4+n exec urxvt -e nvim - bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail - bindsym Mod4+$mod+o exec xset dpms force off - # bindsym Mod4+p workspace $ws4; exec pgadmin3 - # bindsym Mod4+p exec pycharm - bindsym Mod4+p exec passmenu - # bindsym Mod4+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)" - 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 Mod4+x exec $swex - bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE - bindsym Mod4+z exec cliqz - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - 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'" - {{ else }} - 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 # - - 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 # +# 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 +# There also is the (new) i3-dmenu-desktop which only displays applications +# 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+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+f exec firefox +bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard +bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard +bindsym Mod4+$mod+m exec pass -c uoft/markus +bindsym Mod4+n exec urxvt -e nvim +bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail +bindsym Mod4+$mod+o exec xset dpms force off +# bindsym Mod4+p workspace $ws4; exec pgadmin3 +# bindsym Mod4+p exec pycharm +bindsym Mod4+p exec passmenu +# bindsym Mod4+$mod+p exec notify-send "ping" "$(ping -c 3 -W 1 8.8.8.8)" +bindsym Mod4+q exec qdirstat +bindsym Mod4+r exec urxvt -e ranger +bindsym Mod4+$mod+r exec notify-send "watson restart" "$(watson restart)" +# 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)" +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 eq .chezmoi.fullHostname "x1-carbon" }} +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'" +{{ else }} +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 }} - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - bindsym Shift+F1 exec xbacklight -set 10 - bindsym Shift+F2 exec xbacklight -set 20 - bindsym Shift+F3 exec xbacklight -set 30 - bindsym Shift+F4 exec xbacklight -set 40 - bindsym Shift+F5 exec xbacklight -set 50 - bindsym Shift+F6 exec xbacklight -set 60 - bindsym Shift+F7 exec xbacklight -set 70 - 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 $mod+w exec sudo systemctl start netctl-auto@wlp3s0.service - bindsym $mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service - {{ end }} +# ]]] app shortcuts # - # Use Mouse+$mod to drag floating windows to their wanted position - floating_modifier $mod - for_window [class="Peek"] floating enable +# redshift [[[ # + +bindsym $mod+Mod4+1 exec redshift -x && redshift -O 1100 +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 # + +# backlight [[[ # -# changing/focusing/moving windows # -bindsym control+h focus left - # change focus - 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 - - # 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 - - # split in vertical orientation - bindsym $mod+v split v - bindsym Mod4+$mod+v split v; exec $term - - # bindsym control+Shift+x kill - bindsym shift+x kill -# changing/focusing/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 - bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/dim/editing"; exec ~/.cache/wal/colors.sh - # bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"; exec ~/.cache/wal/colors.sh - 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") - bindsym $mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") - # bindsym $mod+w exec ~/linux-config/scripts/bg-chooser - 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") +bindsym Shift+F1 exec xbacklight -set 10 +bindsym Shift+F2 exec xbacklight -set 20 +bindsym Shift+F3 exec xbacklight -set 30 +bindsym Shift+F4 exec xbacklight -set 40 +bindsym Shift+F5 exec xbacklight -set 50 +bindsym Shift+F6 exec xbacklight -set 60 +bindsym Shift+F7 exec xbacklight -set 70 +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 $mod+w exec sudo systemctl start netctl-auto@wlp3s0.service +bindsym $mod+q exec sudo systemctl stop netctl-auto@wlp3s0.service {{ end }} -# backgrounds -# container display # +# ]]] 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 +# 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 - # enter fullscreen mode for the focused container - bindsym $mod+f fullscreen toggle +# ]]] other gaps # - # toggle tiling /floating - bindsym $mod+Shift+space floating toggle +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 - # change focus between tiling / floating windows - bindsym $mod+space focus mode_toggle +# ]]] gaps # - # focus the parent container - bindsym $mod+a focus parent - # focus the child container - #bindsym $mod+d focus child -# container display # +# colors from pywal [[[ # -# 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 - - # 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 # -set $ws1 "1 " - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - set $secondary "HDMI2" - set $main "eDP1" - {{ else if eq .chezmoi.fullHostname "nzxt" }} - set $secondary "DVI-I-1" - set $main "HDMI-0" - {{ end }} +# 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 - workspace $ws1 output $main - bindsym $mod+F1 workspace $ws1; exec $term - - set $ws2 "2 " - workspace $ws2 output $secondary - bindsym $mod+F2 workspace $ws2; exec $term - - set $ws3 "3 " - # set $ws3 "3 " - workspace $ws3 output $main - bindsym $mod+F3 workspace $ws3; exec $browser - - set $ws4 "4 " - workspace $ws4 output $secondary - bindsym $mod+F4 workspace $ws4; exec $term - - set $ws5 "5 " - # 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+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 - for_window [class="Move_mouse_with_head"] floating enable - - set $ws6 "6 " - workspace $ws6 output $secondary - assign [class="Slack"] $ws6 - bindsym Mod4+d workspace $ws6; exec discord - # bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home - bindsym Mod4+k workspace $ws6; exec slack - - set $ws7 "7 " - # set $ws7 "7 📤" - workspace $ws7 output $secondary - bindsym $mod+F7 workspace $ws7; exec $term - # bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" - - set $ws8 "8 " - # set $ws8 "8 📊" - # assign [class="jetbrains-"] $ws8 - workspace $ws8 output $secondary - bindsym $mod+F8 workspace $ws8; exec $term - - set $ws9 "9 " - # set $ws9 "9 🔧" - workspace $ws9 output $secondary - bindsym $mod+F9 workspace $ws9; exec $term - - set $ws10 "10 " - # set $ws10 "10 🎵" - assign [class="spotify"] $ws10 - workspace $ws10 output $secondary - set $hp 2 - # bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0 - bindsym Mod4+v workspace $ws10; exec urxvt -e cava - # bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp - bindsym Mod4+s workspace $ws10; exec spotify - - set $ws11 "11 " - # set $ws11 "11 📊" - # assign [class="Summoners War Exporter"] $ws11 - workspace $ws11 output $secondary - bindsym $mod+F11 workspace $ws11; exec urxvt -e htop -s PERCENT_CPU - - set $ws12 "12 " - bindsym $mod+F12 workspace $ws12; exec $term - - set $ws13 "13 " - bindsym Mod4+F3 workspace $ws13; exec $term - - set $ws14 "14" - set $ws15 "15" - -# ws bindings # -bindsym $mod+h workspace prev - bindsym $mod+l workspace next - - bindsym $mod+1 workspace $ws1 - bindsym $mod+2 workspace $ws2 - bindsym $mod+3 workspace $ws3 - bindsym $mod+4 workspace $ws4 - bindsym $mod+5 workspace $ws5 - bindsym $mod+6 workspace $ws6 - bindsym $mod+7 workspace $ws7 - bindsym $mod+8 workspace $ws8 - bindsym $mod+9 workspace $ws9 - bindsym $mod+0 workspace $ws10 - bindsym Mod4+1 workspace $ws11 - # bindsym Mod4+2 workspace $ws12 - # bindsym Mod4+3 workspace $ws13 - # bindsym Mod4+4 workspace $ws14 - # bindsym Mod4+5 workspace $ws15 -# ws bindings # - -# 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+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 - 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 # -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 +# 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 - # exit i3 (logs you out of your X session) - 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'" +# ]]] colors from pywal # + +# ]]] container display # + +# moving windows [[[ # + +# Use Mouse+$mod to drag floating windows to their wanted position +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 + +# 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 + +# split in horizontal orientation +bindsym $mod+b split h +bindsym Mod4+$mod+b split h; exec $term + +# split in vertical orientation +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+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 -# gaps # -for_window [class="^.*"] border pixel 3 - set $inner_gaps 40 - set $outer_gaps 0 - # remove window titlebars - # for_window [class="^.*"] border pixel 1 +# bindsym control+Shift+x kill +bindsym shift+x kill + +# ]]] 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 +bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/dim/editing"; exec ~/.cache/wal/colors.sh +# bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"; exec ~/.cache/wal/colors.sh +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") +bindsym $mod+w exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") +# bindsym $mod+w exec ~/linux-config/scripts/bg-chooser +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 # + +# ws names [[[ # + +set $ws1 "1 " +{{ if eq .chezmoi.fullHostname "x1-carbon" }} +set $secondary "HDMI2" +set $main "eDP1" +{{ else if eq .chezmoi.fullHostname "nzxt" }} +set $secondary "DVI-I-1" +set $main "HDMI-0" +{{ end }} + +workspace $ws1 output $main +bindsym $mod+F1 workspace $ws1; exec $term + +set $ws2 "2 " +workspace $ws2 output $secondary +bindsym $mod+F2 workspace $ws2; exec $term + +set $ws3 "3 " +# set $ws3 "3 " +workspace $ws3 output $main +bindsym $mod+F3 workspace $ws3; exec $browser + +set $ws4 "4 " +workspace $ws4 output $secondary +bindsym $mod+F4 workspace $ws4; exec $term + +set $ws5 "5 " +# 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+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 +for_window [class="Move_mouse_with_head"] floating enable + +set $ws6 "6 " +workspace $ws6 output $secondary +assign [class="Slack"] $ws6 +bindsym Mod4+d workspace $ws6; exec discord +# bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home +bindsym Mod4+k workspace $ws6; exec slack + +set $ws7 "7 " +# set $ws7 "7 📤" +workspace $ws7 output $secondary +bindsym $mod+F7 workspace $ws7; exec $term +# bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" + +set $ws8 "8 " +# set $ws8 "8 📊" +# assign [class="jetbrains-"] $ws8 +workspace $ws8 output $secondary +bindsym $mod+F8 workspace $ws8; exec $term + +set $ws9 "9 " +# set $ws9 "9 🔧" +workspace $ws9 output $secondary +bindsym $mod+F9 workspace $ws9; exec $term + +set $ws10 "10 " +# set $ws10 "10 🎵" +assign [class="spotify"] $ws10 +workspace $ws10 output $secondary +set $hp 2 +# bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0 +bindsym Mod4+v workspace $ws10; exec urxvt -e cava +# bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp +bindsym Mod4+s workspace $ws10; exec spotify + +set $ws11 "11 " +# set $ws11 "11 📊" +# assign [class="Summoners War Exporter"] $ws11 +workspace $ws11 output $secondary +bindsym $mod+F11 workspace $ws11; exec urxvt -e htop -s PERCENT_CPU + +set $ws12 "12 " +bindsym $mod+F12 workspace $ws12; exec $term + +set $ws13 "13 " +bindsym Mod4+F3 workspace $ws13; exec $term + +set $ws14 "14" +set $ws15 "15" + +# ]]] ws names # + +# ws bindings [[[ # + +bindsym $mod+h workspace prev +bindsym $mod+l workspace next + +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 +bindsym Mod4+1 workspace $ws11 +# bindsym Mod4+2 workspace $ws12 +# bindsym Mod4+3 workspace $ws13 +# bindsym Mod4+4 workspace $ws14 +# bindsym Mod4+5 workspace $ws15 + +# 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+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 +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 # + +# ]]] 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 - # gaps inner $inner_gaps - # gaps outer $outer_gaps - # gaps bottom 0 - gaps inner 0 - gaps outer 0 +# 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'" - # other gaps # +# ]]] reload config # - # gaps horizontal 20 - # gaps vertical 10 - # gaps top - # gaps left 20 - # gaps right 20 - # gaps bottom +# status bar [[[ # - # 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 +# bar vars [[[ # -# status bar # # set $sb_font Hack NF Bold # set $sb_font EmojiOne set $sb_font DejaVuSansMono Nerd Font Mono Bold - set $black #000000 - set $white #ffffff - for_window [class="Yad"] floating enable - - # set $inactive_ws_bg $white - set $inactive_ws_bg #444c52 - # set $inactive_ws_trans 96 - set $inactive_ws_trans 00 - - # set $active_ws_trans 91 - set $active_ws_trans 4b - - set $focused_ws_text #ffffff - - # 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" }} - font pango:$sb_font 17 - {{ else }} - font pango:$sb_font 21 - {{ end }} - colors { - # 0 (transparent) -> 255 (opaque) in hex - background $black$bar_trans - # border, bg, text color - # focused_workspace $inactive_ws_bg $bg $focused_ws_text - focused_workspace $inactive_ws_bg $bg $fg - # active = focused on other screen - active_workspace $inactive_ws_bg $fg$active_ws_trans $fg - inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg - } - tray_output none - # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf - status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out - output $main - wheel_up_cmd nop - wheel_down_cmd nop +set $black #000000 +set $white #ffffff +for_window [class="Yad"] floating enable + +# set $inactive_ws_bg $white +set $inactive_ws_bg #444c52 +# set $inactive_ws_trans 96 +set $inactive_ws_trans 00 + +# set $active_ws_trans 91 +set $active_ws_trans 4b + +set $focused_ws_text #ffffff + +# ]]] bar vars # + +# main bar [[[ # + +# set $bar_trans 64 +set $bar_trans 00 +set $main_ws_trans aa +bar { + i3bar_command i3bar -t + {{ if eq .chezmoi.fullHostname "x1-carbon" }} + font pango:$sb_font 17 + {{ else }} + font pango:$sb_font 21 + {{ end }} + colors { + # 0 (transparent) -> 255 (opaque) in hex + background $black$bar_trans + # border, bg, text color + # focused_workspace $inactive_ws_bg $bg $focused_ws_text + focused_workspace $inactive_ws_bg $bg $fg + # active = focused on other screen + active_workspace $inactive_ws_bg $fg$active_ws_trans $fg + inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg } + tray_output none + # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf + status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out + output $main + wheel_up_cmd nop + wheel_down_cmd nop +} + +# ]]] main bar # - # sam bar - bar { - output $secondary - {{ if eq .chezmoi.fullHostname "x1-carbon" }} - font pango:$sb_font 18 - {{ else }} - font pango:$sb_font 25 - {{ end }} - # output $main - i3bar_command i3bar -t - colors { - background $black$bar_trans - # border, bg, text color - # focused_workspace $inactive_ws_bg $bg $focused_ws_text - focused_workspace $inactive_ws_bg $bg $fg - 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 - tray_output none - wheel_up_cmd nop - wheel_down_cmd nop +# secondary bar [[[ # + +bar { + output $secondary + {{ if eq .chezmoi.fullHostname "x1-carbon" }} + font pango:$sb_font 18 + {{ else }} + font pango:$sb_font 25 + {{ end }} + # output $main + i3bar_command i3bar -t + colors { + background $black$bar_trans + # border, bg, text color + # focused_workspace $inactive_ws_bg $bg $focused_ws_text + focused_workspace $inactive_ws_bg $bg $fg + active_workspace $inactive_ws_bg $fg$active_ws_trans $fg + inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg } - # # # display # - # bar { - # i3bar_command i3bar -t - # font pango:$sb_font 23 - # tray_output none - # status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf - # output $secondary - # wheel_up_cmd nop - # wheel_down_cmd nop - # } - # # display # -# status bar # + 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 +} -# Font for window titles -font pango:$sb_font 11 +# ]]] secondary bar # + +# display bar [[[ # + +# bar { +# i3bar_command i3bar -t +# font pango:$sb_font 23 +# tray_output none +# status_command i3blocks -c ~/.config/i3blocks/i3blocks-display.conf +# output $secondary +# wheel_up_cmd nop +# wheel_down_cmd nop +# } + +# ]]] 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 - - 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" +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 +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 # diff --git a/dot_config/i3blocks/sam-i3blocks.conf b/dot_config/i3blocks/i3blocks-secondary.conf.tmpl similarity index 59% rename from dot_config/i3blocks/sam-i3blocks.conf rename to dot_config/i3blocks/i3blocks-secondary.conf.tmpl index 97a1c17..dfdf014 100644 --- a/dot_config/i3blocks/sam-i3blocks.conf +++ b/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 }} diff --git a/dot_config/i3blocks/i3blocks.conf.tmpl b/dot_config/i3blocks/i3blocks.conf.tmpl index 907ef0d..2de5842 100644 --- a/dot_config/i3blocks/i3blocks.conf.tmpl +++ b/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 # diff --git a/dot_config/private_fish/config.fish b/dot_config/private_fish/config.fish index a25ad65..5dafe93 100644 --- a/dot_config/private_fish/config.fish +++ b/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" diff --git a/dot_config/private_fish/private_functions/find-vim-filetype.fish b/dot_config/private_fish/private_functions/find-vim-filetype.fish index 2122662..2eb0b5f 100644 --- a/dot_config/private_fish/private_functions/find-vim-filetype.fish +++ b/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 diff --git a/dot_vimrc b/dot_vimrc index d5c4e3c..0fb5e12 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -66,7 +66,7 @@ autocmd FileType tex set updatetime=3000 autocmd FileType tex map :VimtexCompile 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 << < | let mapleader="\" " find alias -nnoremap a / +nnoremap a /^ " replace until end of line nnoremap c c$ " delete entire buffer @@ -414,6 +413,6 @@ autocmd Filetype javascript inoremap x process.exit() autocmd Filetype markdown nnoremap x 0f[lrx " nnoremap x 0f[lrx -autocmd Filetype tmpl inoremap e {{ else }} +autocmd Filetype go-template inoremap e {{ else }} " }}} Local Mappings " diff --git a/key_aliases.tmpl b/key_aliases.tmpl index be34014..d3ebefe 100644 --- a/key_aliases.tmpl +++ b/key_aliases.tmpl @@ -1,391 +1,459 @@ -# vim: fdm=indent - -# system - # clear screen - c "printf '\033c'" - hst "history" - ## nf "printf '\033c' && neofetch | lolcat" - nf "printf '\033c' && neofetch" - fi "fish" - # reload urxvt - ru "xrdb ~/.Xresources" - # list file sizes in megabytes with depth 1 - duh "sudo du -d 1 -h --apparent-size | sort -hr" - dum "sudo du -d 1 -m --apparent-size | sort -hr" - m "man" - 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}'" - - vgb "sudo nvim /etc/default/grub" - mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" - - b "bat" - ba "bat *" - grep "grep --color=auto -n" - grr "grep -r" - # pk "pkill -f" - cld "colordiff -wy --suppress-common-lines" - - mkpk "makepkg -sri" - ex "chmod 777" - ex "chmod 777" - - # systemctl # - ctl "sudo systemctl" - ctle "sudo systemctl enable" - 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" - - wm "sudo wifi-menu" - - # mounting - udm "udisksctl mount -b" - udmb "udisksctl mount -b /dev/sdc2" - udu "udisksctl unmount -b" - udub "udisksctl unmount -b /dev/sdc2" - - tc "touch" - vd "vidir --verbose" - - # directory-related # - ls "lsd" - l "lsd -a" - ll "lsd -al" - smv "sudo mv" - f "cd" - fz "fzf" - fnd "find . -type f -name" - - rmr "rm -rf" - rmd "rm ~/Downloads/*" - rmw "rm ~/.local/share/nvim/swap/" - md "mkdir -p" - rsy "rsync -Pr" - - # list all (un)mounted drives - lhd "sudo fdisk -l" - # get disc space for mounted drives - # ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null" - ds "df -h | head -n 1 && df -h | grep sd" - chownw "sudo chown -R {{ .chezmoi.group }}:wheel" - chwnm "sudo chown -R {{ .chezmoi.group }}:wheel /run/media/{{ .chezmoi.username }}" - # cd into backup folder and show backup sizes - nbu "cd /run/media/{{ .chezmoi.group }}/backup-hd/{{ .chezmoi.fullHostname }}/tar && lsd -l" - - # directory-related # - - # power options # - s "systemctl suspend" - so "xset dpms force off" - sd "systemctl poweroff" - rb "systemctl reboot" - lo "i3-msg exit" - x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" - X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" - - # sound - vlm "alsamixer -c 0" - vlh "alsamixer -c 2" - - # apt - # apti "sudo apt install" - # aptr "sudo apt remove" - # aptu "sudo apt upgrade" - - # pacman # - - # pc "sudo pacman -S" - # pcq "sudo pacman -Qi" - # pcr "sudo pacman -Rns" - # pcud "sudo pacman -Sy" - # 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 " - - # tri "trizen -S --noconfirm" - tri "trizen -S --noedit" - - # install - ya "yay -S --answerclean=None --answerdiff=None --answeredit=None" - # info - yaq "yay -Qi" - # remove - yar "yay -Rns" - # sync - yaud "yay -Sy" - # sync and download - yaugd "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None" - # sync and update - yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None" - # export packages - xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && yay -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt " - - py "python" - pipi "sudo pip install" - - # internet - pg "ping -c 3 -W 1 8.8.8.8" - dh "sudo dhcpcd" - kdh "sudo killall dhcpcd" - rdh "sudo killall dhcpcd && sudo dhcpcd" - - id "identify" - # rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases" -# system - +# vim: fdm=marker ft=go-template.sh syntax=sh + +# system [[[ +# clear screen +c "printf '\033c'" +hst "history" +## nf "printf '\033c' && neofetch | lolcat" +nf "printf '\033c' && neofetch" +fi "fish" +# reload urxvt +ru "xrdb ~/.Xresources" +# list file sizes in megabytes with depth 1 +duh "sudo du -d 1 -h --apparent-size | sort -hr" +dum "sudo du -d 1 -m --apparent-size | sort -hr" +m "man" +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" + +b "bat" +ba "bat *" +grep "grep --color=auto -n" +grr "grep -r" +# pk "pkill -f" +cld "colordiff -wy --suppress-common-lines" + +mkpk "makepkg -sri" +ex "chmod 777" +ex "chmod 777" + +# systemctl [[[ # +ctl "sudo systemctl" +ctle "sudo systemctl enable" +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" +# ]]] systemctl # + +wm "sudo wifi-menu" + +# 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 [[[ # + +ls "lsd" +l "lsd -a" +ll "lsd -al" +smv "sudo mv" +f "cd" +fz "fzf" +fnd "find . -type f -name" + +rmr "rm -rf" +rmd "rm ~/Downloads/*" +rmw "rm ~/.local/share/nvim/swap/" +md "mkdir -p" +rsy "rsync -Pr" + +# list all (un)mounted drives +lhd "sudo fdisk -l" +# get disc space for mounted drives +# ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null" +ds "df -h | head -n 1 && df -h | grep sd" +chownw "sudo chown -R {{ .chezmoi.group }}:wheel" +chwnm "sudo chown -R {{ .chezmoi.group }}:wheel /run/media/{{ .chezmoi.username }}" +# cd into backup folder and show backup sizes +nbu "cd /run/media/{{ .chezmoi.group }}/backup-hd/{{ .chezmoi.fullHostname }}/tar && lsd -l" + +# ]]] directory-related # + +# power options [[[ # + +s "systemctl suspend" +so "xset dpms force off" +sd "systemctl poweroff" +rb "systemctl reboot" +lo "i3-msg exit" +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 [[[ # + +# apti "sudo apt install" +# aptr "sudo apt remove" +# aptu "sudo apt upgrade" + +# ]]] apt # + +# pacman [[[ # + +# pc "sudo pacman -S" +# pcq "sudo pacman -Qi" +# pcr "sudo pacman -Rns" +# pcud "sudo pacman -Sy" +# 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 +yaq "yay -Qi" +# remove +yar "yay -Rns" +# sync +yaud "yay -Sy" +# sync and download +yaugd "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None" +# sync and update +yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None" +# 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" + +# internet +pg "ping -c 3 -W 1 8.8.8.8" +dh "sudo dhcpcd" +kdh "sudo killall dhcpcd" +rdh "sudo killall dhcpcd && sudo dhcpcd" + +id "identify" +# rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases" +# system ]]] + +# applications [[[ # + +# silent="> /dev/null 2>&1& " chr "google-chrome" -# applications # - # silent="> /dev/null 2>&1& " - clc "cloc ." - cv "cava" - dg "dragon-drag-and-drop -x" - fh "feh" - gpd "gpg --decrypt" - gpe "gpg --encrypt --recipient" - htc "htop -s PERCENT_CPU" - htm "htop -s PERCENT_MEM" - i "sxiv" - ig "sxiv -a" - it "sxiv -t *" - ka "killall" - kd "killall Discord && killall Discord && killall slack" - kt "killall thunderbird" - mp "mpv --volume=50" - mra "man ranger" - n "nvim" - p3 "python3" - pdft "pdftotext" - pipes "pipes.sh -t 3" - py "python" - r "ranger" - rx "redshift -x" - sn "sudo nvim" - vmd "vimdiff" - wg "wego" - wp "grep wallpaper ~/.cache/wal/colors.sh" - z "zathura --fork" - - lz "unzip -l" - - # rsl "java -jar ~/Downloads/RuneLite.jar" - # swex "sudo nohup ~/Downloads/swex.appimage $silent" - - # pass # - ps "pass" - psc "pass -c" - pse "pass edit" - psi "pass insert -m" - psg "pass generate -c" - pss "pass show" - - xc "xclip -selection clipboard" - yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard" - yg "xclip -selection clipboard ~/.password-store/social/gmail" - yt "xclip -selection clipboard ~/.password-store/social/trapbot" - yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard" - - w "watson" - wa "watson start" - wae "watson start && watson edit" - we "watson edit" - wl "watson log --day" - wla "watson log --all --tag=" - ww "watson log" - # wlm "watson log --project coding --tag mfs" - wr "watson report --day" - wra "watson report --all" - wrw "watson report" - wre "watson restart" - wree "watson restart && watson edit" - ws "watson status && watson stop" - wse "watson stop && watson edit" - wsc "watson cancel" - wsl "watson stop && watson log --day" - wt "watson status" -# applications # +clc "cloc ." +cv "cava" +dg "dragon-drag-and-drop -x" +fh "feh" +gpd "gpg --decrypt" +gpe "gpg --encrypt --recipient" +htc "htop -s PERCENT_CPU" +htm "htop -s PERCENT_MEM" +i "sxiv" +ig "sxiv -a" +it "sxiv -t *" +ka "killall" +kd "killall Discord && killall Discord && killall slack" +kt "killall thunderbird" +mp "mpv --volume=50" +mra "man ranger" +n "nvim" +p3 "python3" +pdft "pdftotext" +pipes "pipes.sh -t 3" +py "python" +r "ranger" +rx "redshift -x" +sn "sudo nvim" +vmd "vimdiff" +wg "wego" +wp "grep wallpaper ~/.cache/wal/colors.sh" +z "zathura --fork" + +lz "unzip -l" + +# pass [[[ # + +ps "pass" +psc "pass -c" +pse "pass edit" +psi "pass insert -m" +psg "pass generate -c" +pss "pass show" + +xc "xclip -selection clipboard" +yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard" +yg "xclip -selection clipboard ~/.password-store/social/gmail" +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" +we "watson edit" +wl "watson log --day" +wla "watson log --all --tag=" +ww "watson log" +# wlm "watson log --project coding --tag mfs" +wr "watson report --day" +wra "watson report --all" +wrw "watson report" +wre "watson restart" +wree "watson restart && watson edit" +ws "watson status && watson stop" +wse "watson stop && watson edit" +wsc "watson cancel" +wsl "watson stop && watson log --day" +wt "watson status" + +# ]]] watson # + +# ]]] applications # + +# git [[[ # g "git" -# git # - gstr "git config credential.helper store" - - # branch # - gb "git branch" - gbd "git branch -D" - gba "git branch --no-merged && echo '' && git branch --merged" - gbu "git branch --no-merged" - gbm "git branch --merged" - - gmg "git merge" - gmgt "git mergetool" - - gr "git remote -v" - gro "git remote show origin" - - # add/remove # - ga "git add -A && git status -u" - gac "git add -A && git commit -S" - gaf "git add -f" - # unsigned commt - gacu "git add -A && git commit" - - grm "git rm" - grmf "git rm -f" - grmc "git rm --cached" - grmfc "git rm -f --cached" - grmor "rm (fd -e orig --no-ignore -H)" - # add # - - gd "git difftool -w --tool=vimdiff" - # diff/log # - gdc "git difftool -w --cached --tool=vimdiff" - gdl "git diff -w" - gdlc "git diff --cached -w" - gdh "git diff --cached -w HEAD~1" - gds "git diff --stat" - gl "git log" - gsl "git shortlog" - # diff/log # - - gs "git status -u" - # update # - gchom "git checkout master" - gchnw "git checkout -b wip" - gchw "git checkout wip" - gheadm1 "git reset --hard HEAD~1" - # show files in git repo - # gls "git ls-tree -r HEAD --name-only" - gls "git ls-tree HEAD --name-only" - - # push # - gst "git stash" - gstl "git stash list" - gstp "git stash pop" - - gc "git commit -S" - gcu "git commit" - gca "git add -A && git commit --amend --no-edit -S" - gcam "git add -A && git commit --amend -S" - # gcamp "git add -A && git commit --amend --no-edit -S && gpsf" - - psgi "git add -A && git commit -m 'Update' -S && git push" - gps "git push" - gpsi "git config credential.helper store && git push" - # gpsn "git push --set-upstream origin master" - gpsn "eval (git push 2>&1 | tail -n 2)" - gpsf "git push --force" - gclear "git stash clear" - - gpl "git pull --rebase" - grba "git rebase --abort" - grbc "git rebase --continue" - - crm "mrk README.md" - - gcho "git checkout" - gchon "git checkout -b" - gf "git fetch origin" - - gcln "git clone" - gchp "git cherry-pick" - gchpc "git cherry-pick --continue" - - # assume file unchanged - gunc "git update-index --assume-unchanged" -# git # +gstr "git config credential.helper store" + +# branch [[[ # + +gb "git branch" +gbd "git branch -D" +gba "git branch --no-merged && echo '' && git branch --merged" +gbu "git branch --no-merged" +gbm "git branch --merged" + +gmg "git merge" +gmgt "git mergetool" + +gr "git remote -v" +gro "git remote show origin" + +# ]]] branch # + +# add/remove [[[ # + +ga "git add -A && git status -u" +gac "git add -A && git commit -S" +gaf "git add -f" +# unsigned commt +gacu "git add -A && git commit" + +grm "git rm" +grmf "git rm -f" +grmc "git rm --cached" +grmfc "git rm -f --cached" +grmor "rm (fd -e orig --no-ignore -H)" + +# ]]] add/remove # + +# diff/log [[[ # + +gd "git difftool -w --tool=vimdiff" +gdc "git difftool -w --cached --tool=vimdiff" +gdl "git diff -w" +gdlc "git diff --cached -w" +gdh "git diff --cached -w HEAD~1" +gds "git diff --stat" +gl "git log" +gsl "git shortlog" + +# ]]] diff/log # + +# pull [[[ # + +gcln "git clone" +gs "git status -u" +gf "git fetch origin" +gcho "git checkout" +gchon "git checkout -b" +gchom "git checkout master" +gchnw "git checkout -b wip" +gchw "git checkout wip" +gheadm1 "git reset --hard HEAD~1" +# show files in git repo +# gls "git ls-tree -r HEAD --name-only" +gls "git ls-tree HEAD --name-only" + +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" +gcam "git add -A && git commit --amend -S" +# gcamp "git add -A && git commit --amend --no-edit -S && gpsf" + +psgi "git add -A && git commit -m 'Update' -S && git push" +gps "git push" +gpsi "git config credential.helper store && git push" +# gpsn "git push --set-upstream origin master" +gpsn "eval (git push 2>&1 | tail -n 2)" +gpsf "git push --force" +gclear "git stash clear" + +# assume file unchanged +gunc "git update-index --assume-unchanged" + +# ]]] push # + +# ]]] git # + +# coding projs [[[ # rgt "rg TODO" -# coding projs # - ## 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 # - # start spv server outside dir - # open spv db in psql - spvdb "psql -d spotifyvis -U django" - mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv" - cldb "python manage.py flush --no-input && ssv" - # django shell - djs "python manage.py shell" - # update pip - upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" - # update pip req's. - ureq "pip freeze > requirements.txt" - - # show last history scan - hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" - # scan history - # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" - # scan cron log for hs cmd - crnl "grep \"({{ .chezmoi.group }}) CMD\" /var/log/syslog | tail -n 1 && hlg" - # removes all but newest file - # rmol "ls -t | tail -n +2 | xargs rm -- && l" - - snw "spotify-now -i '%artist - %title'" - - shc "shellcheck" - pdl "pdflatex" - tcl "tex-clean" - - # mfs - mfs "nvim {{ .chezmoi.homedir }}/coding/best-mf-site-personal/index.html" - ht "python3 -m http.server" - # j "jekyll" - # js "jekyll serve" - h "hugo" - he "hugo serve -D --disableFastRender" - - ss "ssh {{ .chezmoi.group }}@192.168.0.100" - ssb "ssh-bandit" - - rt "python ~/coding/rt-scraper/!rt-scraper.py" - - med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head" -# coding projs # + +# chezmoi [[[ # + +zm "chezmoi" +za "chezmoi add" +zar "chezmoi add -r" +zd "chezmoi data" +zp "chezmoi -v apply" + +# ]]] 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" +cldb "python manage.py flush --no-input && ssv" +# django shell +djs "python manage.py shell" +# update pip +upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" +# update pip req's. +ureq "pip freeze > requirements.txt" + +# show last history scan +hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" +# scan history +# hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" +# scan cron log for hs cmd +crnl "grep \"({{ .chezmoi.group }}) CMD\" /var/log/syslog | tail -n 1 && hlg" +# removes all but newest file +# rmol "ls -t | tail -n +2 | xargs rm -- && l" + +snw "spotify-now -i '%artist - %title'" + +# ]]] spotify-lib-vis # + +shc "shellcheck" +pdl "pdflatex" +tcl "tex-clean" + +# mfs [[[ # + +mfs "nvim {{ .chezmoi.homedir }}/coding/best-mf-site-personal/index.html" +ht "python3 -m http.server" +# j "jekyll" +# js "jekyll serve" +h "hugo" +he "hugo serve -D --disableFastRender" + +ss "ssh {{ .chezmoi.group }}@192.168.0.100" +ssb "ssh-bandit" + +rt "python ~/coding/rt-scraper/!rt-scraper.py" + +# ]]] mfs # + +med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head" + +# ]]] 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" - mc "bear make clean" - mca "bear make clean && printf '\033c' && bear make" - - rmc "rm compile_commands.json" - rms "rm swapfile.*" - - wl0 "watson log --all --project=309 --tag=phase2" - wr0 "watson report --all --project=309 --tag=phase2" - # 309 - # apps - 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 - hr "heroku" - hrs "heroku local web" - hrt "heroku ps" - hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" - gpsh "git push heroku" - - 0c "node collections.js" -# school # +ssc "ssh mokkar@teach.cs.utoronto.ca" + +ma "printf '\033c' && bear make" +mc "bear make clean" +mca "bear make clean && printf '\033c' && bear make" + +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" + +# server [[[ # + +nd "node" +ndm "nodemon" +knd "killall node" +mg "mongo" + +0ht "cd ~/school/309-proj && python3 -m http.server" +mgd "mongod --dbpath mongo-data" +# nds "killall node && nodemon server.js" +nds "nodemon server.js" + +# ]]] server # + +# heroku [[[ # + +hr "heroku" +hrs "heroku local web" +hrt "heroku ps" +hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" +gpsh "git push heroku" + +0c "node collections.js" + +# ]]] heroku # + +# ]]] 309 # + +# ]]] school # diff --git a/key_dirs.tmpl b/key_dirs.tmpl index c033ce4..2b164f4 100644 --- a/key_dirs.tmpl +++ b/key_dirs.tmpl @@ -1,60 +1,70 @@ -# vim: fdm=indent - -# sys * - bg {{ .chezmoi.homedir }}/Pictures/Backgrounds - cf {{ .chezmoi.homedir }}/.config - d {{ .chezmoi.homedir }}/Downloads - D {{ .chezmoi.homedir }}/Documents - fo {{ .chezmoi.homedir }}/.config/fish - k {{ .chezmoi.homedir }}/ - lc {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config - lf /mnt/{{ .chezmoi.os }}-files - lfv /mnt/{{ .chezmoi.os }}-files/Videos - me /run/media/{{ .chezmoi.group }} - o / - p {{ .chezmoi.homedir }}/.password-store - P {{ .chezmoi.homedir }}/Pictures - sw {{ .chezmoi.homedir }}/.local/share/nvim/swap/ - tm /tmp -# sys * +# vim: fdm=marker ft=sh.go-template syntax=sh + +# sys [[[ # + +bg {{ .chezmoi.homedir }}/Pictures/Backgrounds +cf {{ .chezmoi.homedir }}/.config +d {{ .chezmoi.homedir }}/Downloads +D {{ .chezmoi.homedir }}/Documents +fo {{ .chezmoi.homedir }}/.config/fish +k {{ .chezmoi.homedir }}/ +lc {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config +lf /mnt/{{ .chezmoi.os }}-files +lfv /mnt/{{ .chezmoi.os }}-files/Videos +me /run/media/{{ .chezmoi.group }} +o / +p {{ .chezmoi.homedir }}/.password-store +P {{ .chezmoi.homedir }}/Pictures +sw {{ .chezmoi.homedir }}/.local/share/nvim/swap/ +tm /tmp + +# ]]] 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 - ib {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/i3blocks/.config/i3blocks/scripts - j {{ .chezmoi.homedir }}/Documents/journal - lh {{ .chezmoi.homedir }}/Documents/listening-history - mm {{ .chezmoi.homedir }}/coding/move-mouse-with-head - ms {{ .chezmoi.homedir }}/coding/mf-site - mh {{ .chezmoi.homedir }}/coding/mf-site/layouts - # mg {{ .chezmoi.homedir }}/coding/best-mf-site-personal - ra {{ .chezmoi.homedir }}/.config/ranger - sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/scripts - snp {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips - sv {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src - svg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/graphs/static/graphs/scripts - swa {{ .chezmoi.homedir }}/.local/share/nvim/swap - tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt - wd {{ .chezmoi.homedir }}/.config/watson - wo {{ .chezmoi.homedir }}/Documents/workout-logs/11 -# cdn * +2d {{ .chezmoi.homedir }}/coding/godot-demos/2d-plat +ad {{ .chezmoi.homedir }}/coding/ada-mario-prep +cn {{ .chezmoi.homedir }}/coding +ib {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/i3blocks/.config/i3blocks/scripts +j {{ .chezmoi.homedir }}/Documents/journal +lh {{ .chezmoi.homedir }}/Documents/listening-history +mm {{ .chezmoi.homedir }}/coding/move-mouse-with-head +ms {{ .chezmoi.homedir }}/coding/mf-site +mh {{ .chezmoi.homedir }}/coding/mf-site/layouts +# mg {{ .chezmoi.homedir }}/coding/best-mf-site-personal +ra {{ .chezmoi.homedir }}/.config/ranger +sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/scripts +snp {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips +sv {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src +svg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/graphs/static/graphs/scripts +swa {{ .chezmoi.homedir }}/.local/share/nvim/swap +tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt +wd {{ .chezmoi.homedir }}/.config/watson +wo {{ .chezmoi.homedir }}/Documents/workout-logs/11 + +# ]]] cdn # + +# sch [[[ # lt {{ .chezmoi.homedir }}/school/latex-notes -# sch * - # 309 - sc {{ .chezmoi.homedir }}/school - 0c {{ .chezmoi.homedir }}/school/309-proj/css - 0d {{ .chezmoi.homedir }}/school/309 - 0j {{ .chezmoi.homedir }}/school/309-proj/public/js - 0l {{ .chezmoi.homedir }}/school/309/l - 0p {{ .chezmoi.homedir }}/school/309-proj - 0m {{ .chezmoi.homedir }}/school/309-proj/mongo - e4 {{ .chezmoi.homedir }}/school/309/e4 - - 6 {{ .chezmoi.homedir }}/school/369 - 6l {{ .chezmoi.homedir }}/school/369/notes/lectures - - hp {{ .chezmoi.homedir }}/school/hps -# sch * + +# 309 [[[ # + +sc {{ .chezmoi.homedir }}/school +0c {{ .chezmoi.homedir }}/school/309-proj/css +0d {{ .chezmoi.homedir }}/school/309 +0j {{ .chezmoi.homedir }}/school/309-proj/public/js +0l {{ .chezmoi.homedir }}/school/309/l +0p {{ .chezmoi.homedir }}/school/309-proj +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 # diff --git a/key_files.tmpl b/key_files.tmpl index e5b903c..2189a5b 100644 --- a/key_files.tmpl +++ b/key_files.tmpl @@ -1,52 +1,61 @@ -# vim: fdm=indent - -# sys * - 3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config.tmpl - a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl - dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl - f ~/{{ .chezmoi.os }}-config/key_files.tmpl - i {{ .chezmoi.homedir }}/.config/i3blocks/i3blocks.conf - p {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/pacman-pkgs/pacman-pkgs.txt - r {{ .chezmoi.homedir }}/linux-config/dot_config/ranger/rc.conf - sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf - ss {{ .chezmoi.homedir }}/.shortcuts - u {{ .chezmoi.homedir }}/.Xresources - v {{ .chezmoi.homedir }}/linux-config/dot_vimrc - x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish - y {{ .chezmoi.homedir }}/.zshrc - z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases -# sys * +# vim: fdm=marker ft=sh.go-template syntax=sh + +# sys [[[ # + +3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config.tmpl +a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl +dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl +f ~/{{ .chezmoi.os }}-config/key_files.tmpl +i {{ .chezmoi.homedir }}/.config/i3blocks/i3blocks.conf +p {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/pacman-pkgs/pacman-pkgs.txt +r {{ .chezmoi.homedir }}/linux-config/dot_config/ranger/rc.conf +sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf +ss {{ .chezmoi.homedir }}/.shortcuts +u {{ .chezmoi.homedir }}/.Xresources +v {{ .chezmoi.homedir }}/linux-config/dot_vimrc +x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish +y {{ .chezmoi.homedir }}/.zshrc +z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases + +# ]]] 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 - hlg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/api/management/commands/update-history.log - id {{ .chezmoi.homedir }}/coding/project-ideas/ideas.md - ig ./.gitignore - jn {{ .chezmoi.homedir }}/Documents/journal/todo/2.md - jt {{ .chezmoi.homedir }}/Documents/journal/todo/todo.md - lh {{ .chezmoi.homedir }}/Documents/listening-history/polarbier.csv - mc {{ .chezmoi.homedir }}/coding/mf-site/assets/sass/main.scss - mi {{ .chezmoi.homedir }}/coding/mf-site/ideas.md - ne {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/neofetch/config.conf - re README.md - t todo.md - tt txt/todo.md - 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 * +bid {{ .chezmoi.homedir }}/coding/project-ideas/blog.md +ci {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/ideas.md +cmd ./commit-msg.txt +hlg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/api/management/commands/update-history.log +id {{ .chezmoi.homedir }}/coding/project-ideas/ideas.md +ig ./.gitignore +jn {{ .chezmoi.homedir }}/Documents/journal/todo/2.md +jt {{ .chezmoi.homedir }}/Documents/journal/todo/todo.md +lh {{ .chezmoi.homedir }}/Documents/listening-history/polarbier.csv +mc {{ .chezmoi.homedir }}/coding/mf-site/assets/sass/main.scss +mi {{ .chezmoi.homedir }}/coding/mf-site/ideas.md +ne {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/neofetch/config.conf +re README.md +t todo.md +tt txt/todo.md +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 # + +# 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 - 0f {{ .chezmoi.homedir }}/school/309-proj/public/js/food.js - 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 * +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 +0f {{ .chezmoi.homedir }}/school/309-proj/public/js/food.js +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 + +# ]]] 309 # + +# ]]] sch # diff --git a/txt/todo.md b/txt/todo.md index c111197..496acf0 100644 --- a/txt/todo.md +++ b/txt/todo.md @@ -1,5 +1,4 @@ # chezmoi -- merge laptop - root - shortcut script - fish config template