From 15fad27d7895a4a840478a0b837da082591e24cb Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 27 Oct 2020 16:50:13 -0400 Subject: [PATCH] Initial Red Hat laptop config commit --- aliases/key_aliases.tmpl | 89 +++++++++--- aliases/key_dirs.tmpl | 14 +- dot_Xmodmap-laptop-work | 7 + dot_Xmodmap-laptop-work-old | 7 + dot_config/fish/completions/kogito.fish | 137 ++++++++++++++++++ dot_config/fish/config.fish.tmpl | 23 +-- dot_config/fish/functions/debug-operator.fish | 7 + dot_config/fish/functions/oc-get-events.fish | 3 + .../fish/functions/redeploy-operator.fish | 5 + dot_config/i3/config.tmpl | 33 +++-- dot_config/i3blocks/i3blocks.conf.tmpl | 18 +-- .../i3blocks/scripts/executable_backlight | 4 +- .../i3blocks/scripts/executable_calendar | 2 +- .../i3blocks/scripts/executable_cpu_usage | 5 +- dot_config/i3blocks/scripts/executable_memory | 2 +- .../{executable_time => executable_time.tmpl} | 1 - dot_config/i3blocks/scripts/executable_volume | 2 +- dot_config/i3blocks/scripts/executable_wifi | 2 +- dot_config/kitty/kitty.conf | 10 +- dot_config/neofetch/config.conf | 16 +- dot_config/ranger/rc.conf.tmpl | 3 +- dot_vimrc.tmpl | 3 +- 22 files changed, 319 insertions(+), 74 deletions(-) create mode 100644 dot_Xmodmap-laptop-work create mode 100644 dot_Xmodmap-laptop-work-old create mode 100644 dot_config/fish/completions/kogito.fish create mode 100644 dot_config/fish/functions/debug-operator.fish create mode 100644 dot_config/fish/functions/oc-get-events.fish create mode 100644 dot_config/fish/functions/redeploy-operator.fish rename dot_config/i3blocks/scripts/{executable_time => executable_time.tmpl} (81%) diff --git a/aliases/key_aliases.tmpl b/aliases/key_aliases.tmpl index 6016656..cfcba07 100644 --- a/aliases/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -6,6 +6,7 @@ # clear screen c "printf '\033c'" +cpr "cp -r" d "cd ~/Downloads && printf '\033c'" hst "history" # nft "printf '\033c' && neofetch | lolcat" @@ -351,6 +352,8 @@ chr "google-chrome" clc "cloc ." cv "cava" dg "dragon-drag-and-drop -x" +dk "docker" +dki "docker images" ffx "firefox" fh "feh" fi "fish" @@ -415,6 +418,7 @@ tnb "tmux new -s backup" #]]] usn "usernames --num 20" vmd "vimdiff" +wc "weechat" # wg "wego" wg "curl -L wthr.ml" wgm "curl -L wthr.ml/m" @@ -521,7 +525,7 @@ gra "git remote add origin" # grag "git remote add gitea git@ataraxy.tk:Kevin-Mok/.git" grr "git remote remove origin" -grs "git remote show origin" +# grs "git remote show origin" gru "git branch --set-upstream-to=origin/master master" # ]]] branch # @@ -568,8 +572,10 @@ glm "git log master" gcl "git clone" gs "git status -u" -gf "git fetch origin" +gf "git fetch" gfg "git fetch gitea" +gfo "git fetch origin" +gfog "git fetch orig" gch "git checkout" gchn "git checkout -b" @@ -578,6 +584,7 @@ gchnw "git checkout -b wip" gchw "git checkout wip" gchh "git checkout HEAD --" +grs "git reset --hard HEAD" grom "git reset --hard origin/master" gheadm1 "git reset --hard HEAD~1" # show files in git repo @@ -800,19 +807,67 @@ twf "watch -n300 'twitchy-game Fortnite'" gpa "column -ts',' ~/Documents/gpa.md" ssc "mosh mokkar@teach.cs.utoronto.ca" -# 324 -# hk "clear && tmux clear-history && runhaskell TestChups.hs" -hk "clear && tmux clear-history && runhaskell" -rk "clear && tmux clear-history && raco test" -rke "clear && tmux clear-history && raco test ex1.rkt" -rkr "clear && tmux clear-history && racket" -rki "racket -l racket/base -i" - -# 384 -rgp "clear && tmux clear-history && rg -S -t py" -8aa "clear && tmux clear-history && python2 autograder.py" -# 8ap "python2 plane_scheduling.py" -8aq "clear && tmux clear-history && python2 autograder.py --no-graphics -q q6" -8at "clear && tmux clear-history && python2 autograder.py --no-graphics -t test_cases/q6/1-JointParticleObserve" - # ]]] school # + +# red-hat [[[ # + +fp "fpaste" + +# oc [[[ # + +cra "sudo systemctl start libvirtd && crc start" +crs "crc stop" +crcc "crc console" +crcr "crc console --credentials" + +o "oc" +oa "oc apply -f" +od "oc describe" +odp "oc describe pod" +odi "oc describe kogitoinfra" +odr "oc describe kogitoruntime" +odl "oc delete" +odlb "oc delete kogitobuild" +odlc "oc delete configmap" +odlp "oc delete pod" +odlpj "oc delete project" +odlr "oc delete kogitoruntime" +og "oc get pods" +ogw "oc get pods -w" +ogb "oc get kogitobuild" +ogc "oc get configmap" +ogi "oc get imagestream" +ogn "oc get" +ogr "oc get kogitoruntime" +ol "oc logs -f" +oli "oc login -u kubeadmin -p" +on "oc new-project" +op "oc project" +opa "oc projects | rg kogito" +opd "oc project default" +ot "oc status" + +# ]]] oc # + +jk "java -jar ~/Downloads/jenkins-cli.jar -s https://rhba-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/ -auth kmok:\$JENKINS_RHBA_TOKEN" + +# kogito [[[ # + +k "kogito" +kp "kogito deploy-service" +kl "kogito delete-service" +kph "kogito deploy-service hw" +klh "kogito delete-service hw" +chw "curl -X POST -H 'Content-Type:application/json' -H 'Accept:application/json' -d '{\"name\" : \"john\"}' http://hw-2113.apps-crc.testing/scripts" + +# do "make mod clean && DEBUG=true operator-sdk run --local --watch-namespace=3376-2" +# dop "git pull --rebase && make mod clean && DEBUG=true operator-sdk run --local --watch-namespace=3376-2" + +# ]]] kogito # + +po "podman" +poi "podman image" +pos "podman images" +pot "podman image tag" + +# ]]] red-hat # diff --git a/aliases/key_dirs.tmpl b/aliases/key_dirs.tmpl index 063febb..ad84b45 100644 --- a/aliases/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -9,7 +9,7 @@ cff ~/.config/fish dl ~/Downloads # dw ~/dwm D ~/Documents -k ~/ +kh ~/ lc ~/linux-config lf /mnt/linux-files Lfp /mnt/linux-files/Pictures @@ -114,7 +114,13 @@ tcd /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader sc ~/school lt ~/school/latex-notes -ph ~/school/phl -phe ~/school/phl/w8-10-mind-machines/essay - # ]]] sch # + +kg ~/coding/kogito +ke ~/coding/kogito/kogito-examples +keqs ~/coding/kogito/kogito-examples/process-scripts-quarkus +keqe ~/coding/kogito/kogito-examples/process-quarkus-example +# kg ~/coding/kogito/github-release-test +# ko ~/coding/kogito/kogito-cloud-operator +ko ~/go/src/github.com/kiegroup/kogito-cloud-operator +wcl ~/.weechat/logs diff --git a/dot_Xmodmap-laptop-work b/dot_Xmodmap-laptop-work new file mode 100644 index 0000000..603a3df --- /dev/null +++ b/dot_Xmodmap-laptop-work @@ -0,0 +1,7 @@ +clear Lock + +keycode 9 = Caps_Lock +keycode 22 = BackSpace +keycode 66 = Escape + +pointer = 1 2 3 4 5 6 7 8 9 10 11 12 diff --git a/dot_Xmodmap-laptop-work-old b/dot_Xmodmap-laptop-work-old new file mode 100644 index 0000000..6fc3ab3 --- /dev/null +++ b/dot_Xmodmap-laptop-work-old @@ -0,0 +1,7 @@ +clear Lock + +keycode 22 = Caps_Lock +keycode 66 = BackSpace +keycode 78 = End + +pointer = 1 2 3 4 5 6 7 8 9 10 11 12 diff --git a/dot_config/fish/completions/kogito.fish b/dot_config/fish/completions/kogito.fish new file mode 100644 index 0000000..22a3325 --- /dev/null +++ b/dot_config/fish/completions/kogito.fish @@ -0,0 +1,137 @@ +# fish completion for kogito -*- shell-script -*- + +function __kogito_debug + set file "$BASH_COMP_DEBUG_FILE" + if test -n "$file" + echo "$argv" >> $file + end +end + +function __kogito_perform_completion + __kogito_debug "Starting __kogito_perform_completion with: $argv" + + set args (string split -- " " "$argv") + set lastArg "$args[-1]" + + __kogito_debug "args: $args" + __kogito_debug "last arg: $lastArg" + + set emptyArg "" + if test -z "$lastArg" + __kogito_debug "Setting emptyArg" + set emptyArg \"\" + end + __kogito_debug "emptyArg: $emptyArg" + + set requestComp "$args[1] __complete $args[2..-1] $emptyArg" + __kogito_debug "Calling $requestComp" + + set results (eval $requestComp 2> /dev/null) + set comps $results[1..-2] + set directiveLine $results[-1] + + # For Fish, when completing a flag with an = (e.g., -n=) + # completions must be prefixed with the flag + set flagPrefix (string match -r -- '-.*=' "$lastArg") + + __kogito_debug "Comps: $comps" + __kogito_debug "DirectiveLine: $directiveLine" + __kogito_debug "flagPrefix: $flagPrefix" + + for comp in $comps + printf "%s%s\n" "$flagPrefix" "$comp" + end + + printf "%s\n" "$directiveLine" +end + +# This function does three things: +# 1- Obtain the completions and store them in the global __kogito_comp_results +# 2- Set the __kogito_comp_do_file_comp flag if file completion should be performed +# and unset it otherwise +# 3- Return true if the completion results are not empty +function __kogito_prepare_completions + # Start fresh + set --erase __kogito_comp_do_file_comp + set --erase __kogito_comp_results + + # Check if the command-line is already provided. This is useful for testing. + if not set --query __kogito_comp_commandLine + set __kogito_comp_commandLine (commandline) + end + __kogito_debug "commandLine is: $__kogito_comp_commandLine" + + set results (__kogito_perform_completion "$__kogito_comp_commandLine") + set --erase __kogito_comp_commandLine + __kogito_debug "Completion results: $results" + + if test -z "$results" + __kogito_debug "No completion, probably due to a failure" + # Might as well do file completion, in case it helps + set --global __kogito_comp_do_file_comp 1 + return 0 + end + + set directive (string sub --start 2 $results[-1]) + set --global __kogito_comp_results $results[1..-2] + + __kogito_debug "Completions are: $__kogito_comp_results" + __kogito_debug "Directive is: $directive" + + if test -z "$directive" + set directive 0 + end + + set compErr (math (math --scale 0 $directive / 1) % 2) + if test $compErr -eq 1 + __kogito_debug "Received error directive: aborting." + # Might as well do file completion, in case it helps + set --global __kogito_comp_do_file_comp 1 + return 0 + end + + set nospace (math (math --scale 0 $directive / 2) % 2) + set nofiles (math (math --scale 0 $directive / 4) % 2) + + __kogito_debug "nospace: $nospace, nofiles: $nofiles" + + # Important not to quote the variable for count to work + set numComps (count $__kogito_comp_results) + __kogito_debug "numComps: $numComps" + + if test $numComps -eq 1; and test $nospace -ne 0 + # To support the "nospace" directive we trick the shell + # by outputting an extra, longer completion. + __kogito_debug "Adding second completion to perform nospace directive" + set --append __kogito_comp_results $__kogito_comp_results[1]. + end + + if test $numComps -eq 0; and test $nofiles -eq 0 + __kogito_debug "Requesting file completion" + set --global __kogito_comp_do_file_comp 1 + end + + # If we don't want file completion, we must return true even if there + # are no completions found. This is because fish will perform the last + # completion command, even if its condition is false, if no other + # completion command was triggered + return (not set --query __kogito_comp_do_file_comp) +end + +# Remove any pre-existing completions for the program since we will be handling all of them +# TODO this cleanup is not sufficient. Fish completions are only loaded once the user triggers +# them, so the below deletion will not work as it is run too early. What else can we do? +complete -c kogito -e + +# The order in which the below two lines are defined is very important so that __kogito_prepare_completions +# is called first. It is __kogito_prepare_completions that sets up the __kogito_comp_do_file_comp variable. +# +# This completion will be run second as complete commands are added FILO. +# It triggers file completion choices when __kogito_comp_do_file_comp is set. +complete -c kogito -n 'set --query __kogito_comp_do_file_comp' + +# This completion will be run first as complete commands are added FILO. +# The call to __kogito_prepare_completions will setup both __kogito_comp_results abd __kogito_comp_do_file_comp. +# It provides the program's completion choices. +complete -c kogito -n '__kogito_prepare_completions' -f -a '$__kogito_comp_results' + diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 0845e99..76d3300 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -26,11 +26,17 @@ abbr hum "cd $mfs_dir && hugo serve -D --disableFastRender" {{ end }}#]]] # system[[[ -set -x PATH $PATH ~/.local/bin ~/scripts ~/scripts/colors ~/go/bin ~/.minetest/minetest/bin ~/.gem/ruby/2.6.0/bin set -x CLASSPATH $CLASSPATH /home/kevin/java/*.jar +set -x GOPATH ~/go +set -x HASTE_SERVER https://pste.gq +set -x GRAALVM_HOME /usr/lib/jvm/graalvm-ce-java11-20.1.0 +set -x GRAALVM_BIN $GRAALVM_HOME/bin +# set -x JAVA_HOME /usr/lib/jvm/java-11-openjdk +set -x JAVA_HOME $GRAALVM_HOME set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64 +set -x MAVEN_HOME /opt/maven +set -x PATH $GRAALVM_BIN $PATH ~/.local/bin ~/scripts ~/scripts/colors $GOPATH/bin ~/.minetest/minetest/bin ~/.gem/ruby/2.6.0/bin $MAVEN_HOME/bin set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig -set -x HASTE_SERVER https://pste.gq {{ if eq .chezmoi.fullHostname "nzxt" }} set -x CALCURSE_CALDAV_PASSWORD (pass show technology/linux/baikal | head -n1) status --is-interactive; and source (pyenv init -|psub) @@ -62,6 +68,8 @@ set -xU BROWSER "firefox" set -xU FZF_DEFAULT_COMMAND "find ." +set -xU KOGITO_SERVICE_URL "http://example-quarkus-3376.apps-crc.testing/" + # ]]] universal var's # # fish-specific [[[ # @@ -140,6 +148,8 @@ abbr cpp "copy echo (pwd)" abbr cff "create-fish-function" abbr ctr "systemctl-restart" abbr def "define" +abbr do "debug-operator" +abbr dop "debug-operator pull" abbr ens "enable-site" abbr ev "evince-silent" # abbr fbg "find-bg" @@ -168,6 +178,7 @@ abbr mn "man-vim" abbr ma "man-vim task" abbr mat "math" abbr mdf "mkdir-cd" +abbr oge "oc-get-events" abbr pgr "grep-pdf" abbr pgrf "grep-pdf-file" abbr pst "pastebin" @@ -191,13 +202,7 @@ abbr xya "export-pkgs" # school [[[ # -# 369 -abbr grc "grep-c" -abbr grh "grep-headers" -abbr rgh "rg-headers" - -abbr jcr "java-compile-run" -abbr jct "java-compile-test" +abbr rdo "redeploy-operator" # ]]] school # diff --git a/dot_config/fish/functions/debug-operator.fish b/dot_config/fish/functions/debug-operator.fish new file mode 100644 index 0000000..2eed83f --- /dev/null +++ b/dot_config/fish/functions/debug-operator.fish @@ -0,0 +1,7 @@ +function debug-operator + if test (count $argv) -gt 0 + git pull --rebase + end + make mod clean + and DEBUG=true operator-sdk run --local --watch-namespace=3376 &| tee debug-operator.log +end diff --git a/dot_config/fish/functions/oc-get-events.fish b/dot_config/fish/functions/oc-get-events.fish new file mode 100644 index 0000000..73832b9 --- /dev/null +++ b/dot_config/fish/functions/oc-get-events.fish @@ -0,0 +1,3 @@ +function oc-get-events + oc get events --field-selector involvedObject.name="$argv[1]" +end diff --git a/dot_config/fish/functions/redeploy-operator.fish b/dot_config/fish/functions/redeploy-operator.fish new file mode 100644 index 0000000..036e395 --- /dev/null +++ b/dot_config/fish/functions/redeploy-operator.fish @@ -0,0 +1,5 @@ +function redeploy-operator + oc delete deployment kogito-operator + make deploy-operator-on-ocp + oc get pods -w +end diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index 992c916..9cd8c99 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -16,7 +16,8 @@ exec xbacklight -set 10 exec wal -i $(/home/kevin/scripts/shuffler "$HOME/Pictures/Backgrounds/dim/non-editing") {{ end }} # exec xrdb ~/.Xresources && grep wallpaper ~/.cache/wal/colors.sh | cut -d\' -f2 | xargs wal -i > /dev/null -exec --no-startup-id i3-msg 'workspace $ws2; exec $term -e fish -c "tmux-attach fortnite"' +# exec --no-startup-id i3-msg 'workspace $ws2; exec $term -e fish -c "tmux-attach fortnite"' +exec --no-startup-id i3-msg 'workspace $ws1; exec $term' exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' # exec --no-startup-id i3-msg 'workspace $ws5; exec $term -e twitchy' # exec --no-startup-id i3-msg 'workspace $ws6; exec discord' @@ -27,7 +28,7 @@ exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' set $mod Mod1 set $browser "firefox" -# set $browser "chromium" +# set $browser "chromium-browser" set $scripts_path "/home/kevin/scripts" set $sch_dir "$HOME/Documents/School" @@ -40,7 +41,8 @@ bindsym Control+Shift+Return exec st -A1 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 /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg" +# bindsym Mod4+Return exec /home/kevin/scripts/dmenu-history -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg" +bindsym Mod4+Return exec ~/scripts/dmenu-history -nb "$fg" -nf "$bg" -sb "$bg" -sf "$fg" # 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 @@ -90,8 +92,8 @@ bindsym Print --release exec "scrot -s ~/tmp/screenshot-$(date +%F_%T).png -e 'x bindsym Control+Print --release exec "scrot -u ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" {{ else }} bindsym Mod4+x exec xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE -bindsym Control+$mod+p --release exec "scrot -s /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" -bindsym Control+Shift+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 "maim -s ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" +bindsym Control+Shift+p --release exec "maim -u ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" {{ end }} # ]]] app shortcuts # @@ -103,13 +105,13 @@ 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 +bindsym $mod+Mod4+grave exec Redshift -x # ]]] redshift # # backlight [[[ # -{{ if eq .chezmoi.fullHostname "x1-carbon" }} +{{ if or (eq .chezmoi.fullHostname "x1-carbon") (eq .linux_os "fedora") }} bindsym Shift+F1 exec xbacklight -set 10 bindsym Shift+F2 exec xbacklight -set 20 bindsym Shift+F3 exec xbacklight -set 30 @@ -119,7 +121,8 @@ 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 Shift+F10 exec xbacklight -set 100 +bindsym Shift+grave exec xbacklight -set 0 bindsym Control+$mod+plus exec xbacklight -inc 2 bindsym Control+$mod+minus exec xbacklight -dec 2 @@ -175,8 +178,8 @@ for_window [class="^.*"] border pixel 3 # gaps inner $inner_gaps # gaps outer $outer_gaps # gaps bottom 0 -gaps inner 0 -gaps outer 0 +# gaps inner 0 +# gaps outer 0 {{ if eq .chezmoi.fullHostname "nzxt" }} border_radius $border_radius {{ end }} @@ -278,7 +281,7 @@ bindsym Control+$mod+a floating enable; resize set 400px 150px; move absolute po set $make_st_script "/home/kevin/st/make-st.sh" # test -{{ if eq .chezmoi.fullHostname "x1-carbon" }} +{{ if or (eq .chezmoi.fullHostname "x1-carbon") (eq .linux_os "fedora") }} bindsym Control+Shift+q exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Backgrounds/bright/editing") && $make_st_script bindsym Control+Shift+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 @@ -294,9 +297,12 @@ bindsym Control+$mod+y exec wal -i $($scripts_path/shuffler "$HOME/Pictures/Back # ws names [[[ # set $ws1 "1 " -{{ if eq .chezmoi.fullHostname "x1-carbon" }} +{{ if or (eq .chezmoi.fullHostname "x1-carbon") (eq .linux_os "fedora") }} set $secondary "HDMI2" set $main "eDP1" +# {{ else if eq .linux_os "fedora" }} +# set $secondary "HDMI2" +# set $main "eDP-1" {{ else if eq .chezmoi.fullHostname "nzxt" }} set $secondary "DVI-I-1" set $main "HDMI-0" @@ -504,6 +510,9 @@ bar { i3bar_command i3bar -t {{ if eq .chezmoi.fullHostname "x1-carbon" }} font pango:$sb_font 17 + {{ else if eq .linux_os "fedora" }} + # font pango:$sb_font 23 + font pango:$sb_font 25 {{ else }} # font pango:$sb_font 17 font pango:$sb_font 16 diff --git a/dot_config/i3blocks/i3blocks.conf.tmpl b/dot_config/i3blocks/i3blocks.conf.tmpl index c1eb04f..974449e 100755 --- a/dot_config/i3blocks/i3blocks.conf.tmpl +++ b/dot_config/i3blocks/i3blocks.conf.tmpl @@ -15,12 +15,12 @@ color=#cbe4ff # volume/spotify [[[ # -{{ if eq .chezmoi.fullHostname "nzxt" }} [volume] interval=once signal=1 interval=60 +{{ if eq .chezmoi.fullHostname "nzxt" }} [spotify] label= LONG_NAME= @@ -32,9 +32,9 @@ interval=5 # laptop [[[ # -{{ if eq .chezmoi.fullHostname "x1-carbon" }} +{{ if or (eq .chezmoi.fullHostname "x1-carbon") (eq .linux_os "fedora") }} [battery] -label=⚡ +label=⚡ interval=30 [wifi] @@ -43,7 +43,7 @@ instance=wlp3s0 interval=10 [backlight] -label= +label= interval=5 {{ end }} @@ -54,12 +54,8 @@ interval=5 [calendar] interval=30 label= -{{ if eq .chezmoi.fullHostname "nzxt" }} DATEFMT=+%H:%M -{{ else }} -DATEFMT=+%H:%M.%a-%m-%d -{{ end }} -# SHORTFMT=+%H:%M:%S +# DATEFMT=+%H:%M.%a-%m-%d HEIGHT=180 WIDTH=220 @@ -85,10 +81,9 @@ interval=5 {{ end }} [cpu_usage] -label= +label= interval=5 -{{ if eq .chezmoi.fullHostname "nzxt" }} [memory] label= # color=#3da061 @@ -98,6 +93,7 @@ interval=5 # name [[[ # +{{ if eq .chezmoi.fullHostname "nzxt" }} [name] label= interval=30 diff --git a/dot_config/i3blocks/scripts/executable_backlight b/dot_config/i3blocks/scripts/executable_backlight index 0419d0b..dddc90e 100755 --- a/dot_config/i3blocks/scripts/executable_backlight +++ b/dot_config/i3blocks/scripts/executable_backlight @@ -5,7 +5,7 @@ round() echo $(printf %.$2f $(echo "scale=$2;(((10^$2)*$1)+0.5)/(10^$2)" | bc)) }; -. "/home/kevin/.cache/wal/colors.sh" +. "/home/$USER/.cache/wal/colors.sh" cur_bl=$(xbacklight -get) # echo "$(round "$cur_bl" 0)%" -printf "$(round "$cur_bl" 0)\n\n%s\n" "$color7" +printf " $(round "$cur_bl" 0)\n\n%s\n" "$color7" diff --git a/dot_config/i3blocks/scripts/executable_calendar b/dot_config/i3blocks/scripts/executable_calendar index 44a72e1..018664b 100755 --- a/dot_config/i3blocks/scripts/executable_calendar +++ b/dot_config/i3blocks/scripts/executable_calendar @@ -37,7 +37,7 @@ case "$BLOCK_BUTTON" in > /dev/null" # --close-on-unfocus \ esac -. "/home/kevin/.cache/wal/colors.sh" +. "/home/$USER/.cache/wal/colors.sh" echo "$LABEL$(date "$DATEFMT")" echo "$LABEL$(date "$SHORTFMT")" echo "$color7" diff --git a/dot_config/i3blocks/scripts/executable_cpu_usage b/dot_config/i3blocks/scripts/executable_cpu_usage index 77e8432..47304d4 100755 --- a/dot_config/i3blocks/scripts/executable_cpu_usage +++ b/dot_config/i3blocks/scripts/executable_cpu_usage @@ -1,8 +1,7 @@ #!/bin/bash -. "/home/kevin/.cache/wal/colors.sh" - +. "/home/$USER/.cache/wal/colors.sh" idle="$(mpstat 1 1 -P ALL | sed -n -e '4{p;q}' | awk '{print $NF}')" used=$(echo 100 - "$idle" | bc) used_rounded=$(printf %.0f "$used") -printf "%s%%\n\n%s\n" "$used_rounded" "$color7" +printf " %s%%\n\n%s\n" "$used_rounded" "$color7" diff --git a/dot_config/i3blocks/scripts/executable_memory b/dot_config/i3blocks/scripts/executable_memory index 1d92d7c..383c53e 100755 --- a/dot_config/i3blocks/scripts/executable_memory +++ b/dot_config/i3blocks/scripts/executable_memory @@ -15,7 +15,7 @@ # along with this program. If not, see . TYPE="${BLOCK_INSTANCE:-mem}" -. "/home/kevin/.cache/wal/colors.sh" +. "/home/$USER/.cache/wal/colors.sh" awk -v type=$TYPE ' /^MemTotal:/ { diff --git a/dot_config/i3blocks/scripts/executable_time b/dot_config/i3blocks/scripts/executable_time.tmpl similarity index 81% rename from dot_config/i3blocks/scripts/executable_time rename to dot_config/i3blocks/scripts/executable_time.tmpl index bd5b1f9..7961e1d 100755 --- a/dot_config/i3blocks/scripts/executable_time +++ b/dot_config/i3blocks/scripts/executable_time.tmpl @@ -1,6 +1,5 @@ #!/bin/bash -. "/home/kevin/.cache/wal/colors.sh" printf "$(date '+%H:%M.%a-%m-%d')\n\n%s\n" "$color7" # echo "$(date '+%H:%M.%a-%m-%d')%s" "$color2" # printf "%s" "$color2" diff --git a/dot_config/i3blocks/scripts/executable_volume b/dot_config/i3blocks/scripts/executable_volume index 2f8c00e..64c9718 100755 --- a/dot_config/i3blocks/scripts/executable_volume +++ b/dot_config/i3blocks/scripts/executable_volume @@ -17,7 +17,7 @@ AUDIO_LOW_SYMBOL=${AUDIO_LOW_SYMBOL:-''} AUDIO_MUTED_SYMBOL=${AUDIO_MUTED_SYMBOL:-''} -. "/home/kevin/.cache/wal/colors.sh" +. "/home/$USER/.cache/wal/colors.sh" # DEFAULT_COLOR=${DEFAULT_COLOR:-"#ffffff"} DEFAULT_COLOR="$color7" MUTED_COLOR=${MUTED_COLOR:-"#a0a0a0"} diff --git a/dot_config/i3blocks/scripts/executable_wifi b/dot_config/i3blocks/scripts/executable_wifi index 85d3aee..08c2b99 100755 --- a/dot_config/i3blocks/scripts/executable_wifi +++ b/dot_config/i3blocks/scripts/executable_wifi @@ -39,7 +39,7 @@ W_name=$(nmcli d | grep "$W_inter" | awk '{print $4}') echo $QUALITY% # full text echo $QUALITY% # short text -. "/home/kevin/.cache/wal/colors.sh" +. "/home/$USER/.cache/wal/colors.sh" # color if [[ $QUALITY -lt 50 ]]; then echo "#FF0000" diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index 167b056..5930efd 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -1,7 +1,13 @@ include ~/.cache/wal/colors-kitty.conf -background_opacity .8 +background_opacity .6 +/* background_opacity .7 */ +clipboard_control write-clipboard write-primary +enable_audio_bell no # font -font_size 12 +cursor_blink_interval 0 +# font_size 12.5 +# font_size 14 +font_size 14.5 map ctrl+alt+up change_font_size all +1.0 map ctrl+alt+down change_font_size all -1.0 diff --git a/dot_config/neofetch/config.conf b/dot_config/neofetch/config.conf index 758cb72..6d6f9fe 100755 --- a/dot_config/neofetch/config.conf +++ b/dot_config/neofetch/config.conf @@ -20,17 +20,17 @@ print_info() { info "Shell" shell info "Packages" packages info "WM" wm - info "WM Theme" wm_theme + info "WM Theme" wm_theme # info "Font" font - info "Theme" theme - info "Icons" icons + # info "Theme" theme + # info "Icons" icons info "CPU" cpu info "CPU Usage" cpu_usage - info "GPU" gpu - info "GPU Driver" gpu_driver # Linux only + # info "GPU" gpu + # info "GPU Driver" gpu_driver # Linux only info "Memory" memory info "Disk" disk - info "Resolution" resolution + # info "Resolution" resolution # }}} enabled # @@ -337,7 +337,9 @@ public_ip_host="http://ident.me" # 'Disk (/): 74G / 118G (66%)' # # disk_show=('/' '/home' '/mnt/linux-files' ) -disk_show=('/dev/sda1' '/dev/sda3' '/dev/sdc2' ) +# disk_show=('/dev/sda1' '/dev/sda3' '/dev/sdc2' ) +# disk_show=('/dev/sda2' ) +disk_show=('/' '/home' ) # Disk subtitle. # What to append to the Disk subtitle. diff --git a/dot_config/ranger/rc.conf.tmpl b/dot_config/ranger/rc.conf.tmpl index ac26516..e01e90e 100755 --- a/dot_config/ranger/rc.conf.tmpl +++ b/dot_config/ranger/rc.conf.tmpl @@ -665,9 +665,10 @@ set preview_images true # * urxvt-full: # The same as urxvt but utilizing not only the preview pane but the # whole terminal window. -set preview_images_method w3m +# set preview_images_method w3m # set preview_images_method ueberzug # set preview_images_method urxvt +set preview_images_method kitty # set preview_images_method urxvt-full # ]]] image preview # diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index eed49b3..0fd55ff 100644 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -66,6 +66,7 @@ autocmd FileType *css,gitcommit,haskell,htmldjango,html,javascript,json,lisp,mar autocmd BufNewFile,BufRead *.gd set expandtab! autocmd Filetype go set expandtab! sw=4 autocmd FileType html,javascript,python,lua set fdm=indent +autocmd Filetype Jenkinsfile,taskdata set tw=0 autocmd Filetype markdown let g:AutoPairs = {'(':')', '[':']', '{':'}','"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''", "*":"*"} " autocmd Filetype markdown map :LivedownToggle autocmd Filetype markdown map :InstantMarkdownPreview @@ -95,7 +96,6 @@ autocmd Filetype json set foldmethod=marker autocmd Filetype racket set commentstring=;%s; autocmd Filetype racket let g:AutoPairs = {'(':')', '[':']', '{':'}','"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} autocmd FileType sh map :!clear && shellcheck % -autocmd Filetype taskdata set tw=0 autocmd FileType tex set updatetime=1000 timeoutlen=300 autocmd FileType tex map :VimtexCompile autocmd VimEnter *.tex VimtexCompile @@ -329,6 +329,7 @@ Plug 'masukomi/vim-markdown-folding' autocmd FileType markdown set foldexpr=NestedMarkdownFolds() Plug 'cespare/vim-toml' Plug 'dpelle/vim-LanguageTool' +Plug 'martinda/Jenkinsfile-vim-syntax' " ]]] vim-plug " " Mappings [[[ "