From 9e70b84b625851b6b0871ad7bac89750ca4303d0 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Wed, 8 May 2019 15:21:57 -0400 Subject: [PATCH] Compile/run/test Java --- dot_config/chezmoi/chezmoi-template.toml.tmpl | 2 ++ dot_config/fish/config.fish.tmpl | 15 +++++---------- dot_config/fish/functions/java-compile-run.fish | 6 ++++++ dot_config/fish/functions/java-compile-test.fish | 4 ++++ dot_config/i3/config.tmpl | 2 +- .../spotify/Users/polarbier-user/prefs.tmpl | 4 ++++ key_aliases.tmpl | 3 +++ key_dirs.tmpl | 8 ++------ 8 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 dot_config/fish/functions/java-compile-run.fish create mode 100644 dot_config/fish/functions/java-compile-test.fish diff --git a/dot_config/chezmoi/chezmoi-template.toml.tmpl b/dot_config/chezmoi/chezmoi-template.toml.tmpl index c215e61..cf7acd4 100755 --- a/dot_config/chezmoi/chezmoi-template.toml.tmpl +++ b/dot_config/chezmoi/chezmoi-template.toml.tmpl @@ -2,3 +2,5 @@ sourceDir = "~/linux-config" [data] gui = true + ext_kb = true + # ext_kb = false diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index ca89116..4d1cb9a 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -22,6 +22,7 @@ set -U mfs_dir "/home/kevin/coding/mf-site" {{ end }} set -x PATH $PATH ~/scripts ~/scripts/colors ~/go/bin +set -x CLASSPATH $CLASSPATH /home/kevin/java/*.jar set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64 set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig @@ -59,6 +60,9 @@ abbr ff "cd $fish_fxn_dir" for fxn in (find $fish_fxn_dir -name '*.fish') source $fxn end + +abbr ab "abbr" +abbr abe "abbr -e" abbr rf "chezmoi apply && sync-shortcuts && source ~/.config/fish/key_abbr.fish > /dev/null" abbr rfc "chezmoi apply && source ~/.config/fish/config.fish" abbr xf "fish_config" @@ -100,20 +104,11 @@ abbr hm "cd $mfs_dir && hugo serve -D --disableFastRender" # school [[[ # -# 309 -# abbr r0t "./revert-e3-json restaurants" -# abbr r0s "./revert-e3-json reservations" - # 369 abbr grc "grep-c" abbr grh "grep-headers" abbr rgh "rg-headers" -abbr r6 "run-a4 h e" - -# abbr r6 "run-a3 f d o" -# abbr r6g "run-a3 f d g" -# abbr r6s "run-a3 s c o" -# abbr g6 "source $fish_fxn_dir/369/a3/gdb-a3-break.fish && gdb-a3-break c c" +abbr jcp "java-compile-run Percolation" # ]]] school # diff --git a/dot_config/fish/functions/java-compile-run.fish b/dot_config/fish/functions/java-compile-run.fish new file mode 100644 index 0000000..3a14176 --- /dev/null +++ b/dot_config/fish/functions/java-compile-run.fish @@ -0,0 +1,6 @@ +function java-compile-run + # javac -cp .:../algs4.jar $argv[1].java + # and java -cp .:../algs4.jar $argv[1] + javac $argv[1].java + and java $argv[1] +end diff --git a/dot_config/fish/functions/java-compile-test.fish b/dot_config/fish/functions/java-compile-test.fish new file mode 100644 index 0000000..c1dc3f4 --- /dev/null +++ b/dot_config/fish/functions/java-compile-test.fish @@ -0,0 +1,4 @@ +function java-compile-test + javac -d out *.java + and java -jar /home/kevin/java/junit-platform-console-standalone-1.5.0-M1.jar --class-path "$CLASSPATH:out" --scan-class-path +end diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index 53e428c..0c37be8 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -6,7 +6,7 @@ exec compton exec imwheel exec numlockx on exec xbacklight -set 10 -exec wal -i "$(/home/kevin/scripts/shuffler \"$HOME/Pictures/Backgrounds/dim/non-editing\")" +exec wal -i "$(/home/kevin/scripts/shuffler \"/home/kevin/Pictures/Backgrounds/dim/non-editing\")" {{ end }} # exec --no-startup-id i3-msg 'workspace $ws2; exec $term' exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' diff --git a/dot_config/spotify/Users/polarbier-user/prefs.tmpl b/dot_config/spotify/Users/polarbier-user/prefs.tmpl index ed1b795..9550d0e 100644 --- a/dot_config/spotify/Users/polarbier-user/prefs.tmpl +++ b/dot_config/spotify/Users/polarbier-user/prefs.tmpl @@ -3,4 +3,8 @@ audio.sync_bitrate_enumeration=4 ui.track_notifications_enabled=false ui.show_friend_feed=false audio.play_bitrate_enumeration=4 +{{ if eq .chezmoi.fullHostname "x1-carbon" }} app.browser.zoom-level=300 +{{ else }} +app.browser.zoom-level=75 +{{ end }} diff --git a/key_aliases.tmpl b/key_aliases.tmpl index dbb5b8a..ec1f2bf 100755 --- a/key_aliases.tmpl +++ b/key_aliases.tmpl @@ -475,4 +475,7 @@ gpsh "git push heroku" # ]]] 309 # +jc "javac *.java" +j "java" + # ]]] school # diff --git a/key_dirs.tmpl b/key_dirs.tmpl index dd12305..c10551f 100755 --- a/key_dirs.tmpl +++ b/key_dirs.tmpl @@ -52,24 +52,20 @@ wo ~/Documents/workout-logs/11 # sch [[[ # +sc ~/school lt ~/school/latex-notes # 309 [[[ # -sc ~/school 0c ~/school/309-proj/css 0d ~/school/309 0j ~/school/309-proj/public/js 0l ~/school/309/l 0p ~/school/309-proj 0m ~/school/309-proj/mongo -e4 ~/school/309/e4 # ]]] 309 # -6 ~/school/369 -6l ~/school/369/notes/lectures - -hp ~/school/hps +al1 ~/school/algorithms/w1-union-find # ]]] sch #