From 9e559088a235159fd1f45f8f68ee8b5fec2ee57d Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Wed, 1 Jul 2020 01:14:09 -0400 Subject: [PATCH] dmenu Twitch emote script, copy full path function --- aliases/key_aliases.tmpl | 15 ++++++++----- aliases/key_dirs.tmpl | 9 ++++++++ aliases/key_files.tmpl | 5 +++-- dot_config/fish/config.fish.tmpl | 9 +------- dot_config/fish/functions/readlink-cp.fish | 3 +++ dot_config/i3/config.tmpl | 25 +++++++++++++++------- dot_config/kitty/kitty.conf | 4 ++-- dot_config/ranger/rc.conf.tmpl | 2 +- dot_taskrc | 3 ++- dot_vimrc.tmpl | 2 +- scripts/executable_dmenu-twitch | 3 +++ 11 files changed, 52 insertions(+), 28 deletions(-) create mode 100644 dot_config/fish/functions/readlink-cp.fish create mode 100644 scripts/executable_dmenu-twitch diff --git a/aliases/key_aliases.tmpl b/aliases/key_aliases.tmpl index 9d9d702..3cff0de 100644 --- a/aliases/key_aliases.tmpl +++ b/aliases/key_aliases.tmpl @@ -93,6 +93,7 @@ sdh "mosh --ssh='ssh -p 399' kevin@165.22.239.234 htop" sfd "sftp -rP 399 kevin@165.22.239.234" # phone ssp "mosh --ssh='ssh -p 8022' $PHONE_IP" +scpp "scp -P 8022 $PHONE_IP:" sfp "sftp -rP 8022 $PHONE_IP" # test server sites # svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk" @@ -302,8 +303,6 @@ aap "task add proj:" aacm "task add proj:codm" aacr "task add proj:crim" aas "task add proj:sch" -aa2 "task add proj:sch +c324" -aa8 "task add proj:sch +c384" aay "task add proj:pey" ac "task context" acn "task context none && task" @@ -315,6 +314,7 @@ afcm "task proj:codm" afcr "task proj:crim" afs "task proj:sch" afy "task proj:pey" +aj "task +jira" apl "task completed" al "task limit:15" alg "task log" @@ -381,6 +381,7 @@ msf "mpv --sub-file=" mra "man ranger" # mt "minetest" n "nvim" +np "nvim --" ndu "ncdu" p3 "python3" pdft "pdftotext" @@ -397,7 +398,7 @@ rx "redshift -x" scm "sc-im" sn "sudo nvim" sqlb "sqlitebrowser" -ss "mosh" +# ss "mosh" stp "termdown" # sw "swex" t "tmux"#[[[ @@ -576,7 +577,7 @@ glm "git log master" gcl "git clone" gs "git status -u" -gf "git fetch origin" +gf "git fetch" gfo "git fetch orig" gfg "git fetch gitea" @@ -588,7 +589,8 @@ gchw "git checkout wip" gchh "git checkout HEAD --" grom "git reset --hard origin/master" -gheadm1 "git reset --hard HEAD~1" +grh "git reset --hard HEAD" +grh1 "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" @@ -818,6 +820,7 @@ ssc "mosh mokkar@teach.cs.utoronto.ca" loe "libreoffice ~/Documents/expenses/2020.ods &" ssw "mosh $WORK_LAPTOP_IP tmux a" ssi "mosh $WORK_LAPTOP_IP -- tmux a -t weechat" +scw "scp $WORK_LAPTOP_IP:" sfw "sftp $WORK_LAPTOP_IP" fp "fpaste" @@ -838,5 +841,7 @@ ot "oc status" # ]]] oc # jk "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:112ef7228e7a8cea5435473f9416cb56e1" +jkb "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:112ef7228e7a8cea5435473f9416cb56e1 build -s -v" +jkc "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:112ef7228e7a8cea5435473f9416cb56e1 console -f" # ]]] red-hat # diff --git a/aliases/key_dirs.tmpl b/aliases/key_dirs.tmpl index 5c7f416..ff28abb 100644 --- a/aliases/key_dirs.tmpl +++ b/aliases/key_dirs.tmpl @@ -18,6 +18,7 @@ me /run/media/kevin o / pd ~/.password-store P ~/Pictures +ss ~/Pictures/screenshots/desktop/unsorted std ~/st # tm /tmp tm ~/tmp @@ -119,10 +120,18 @@ lt ~/school/latex-notes # pey [[[ # rh ~/Documents/red-hat +rhc ~/Documents/red-hat/chat + +# kogito [[[ # + k ~/coding/kogito +kex ~/coding/kogito/kogito-examples kg ~/coding/kogito/github-release-test kl ~/coding/kogito/shared-libraries ko ~/coding/kogito/kogito-cloud-operator +kp ~/Documents/red-hat/pull-requests kr ~/coding/kogito/runtimes +# ]]] kogito # + # ]]] pey # diff --git a/aliases/key_files.tmpl b/aliases/key_files.tmpl index c42828b..36ab31d 100644 --- a/aliases/key_files.tmpl +++ b/aliases/key_files.tmpl @@ -10,7 +10,7 @@ dw ~/dwm/config.def.h f ~/linux-config/aliases/key_files.tmpl fh ~/.local/share/fish/fish_history n ~/linux-config/dot_vimrc.tmpl -p ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt +pkg ~/linux-config/txt/pacman-pkgs/pacman-pkgs.txt r ~/linux-config/dot_config/ranger/rc.conf.tmpl sr ~/linux-config/configs/ranger/shortcuts.conf ss ~/.shortcuts @@ -98,5 +98,6 @@ tc /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader/clips.txt # ]]] gaming # -klg ~/coding/kogito/shared-libraries/vars/githubscm.groovy +kl ~/coding/kogito/shared-libraries/vars/githubscm.groovy rht ~/Documents/red-hat/todo.md +j Jenkinsfile diff --git a/dot_config/fish/config.fish.tmpl b/dot_config/fish/config.fish.tmpl index 809a721..6b766d6 100755 --- a/dot_config/fish/config.fish.tmpl +++ b/dot_config/fish/config.fish.tmpl @@ -186,6 +186,7 @@ abbr pgrf "grep-pdf-file" abbr pst "pastebin" abbr qh "qalc-history" abbr rf "refresh-config" +abbr rl "readlink-cp" abbr rs "redshift-set" abbr sma "smol-add" abbr smd "smol-delete" @@ -204,14 +205,6 @@ 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" - # ]]] school # # ]]] fxn abbr's # diff --git a/dot_config/fish/functions/readlink-cp.fish b/dot_config/fish/functions/readlink-cp.fish new file mode 100644 index 0000000..a1f5b33 --- /dev/null +++ b/dot_config/fish/functions/readlink-cp.fish @@ -0,0 +1,3 @@ +function readlink-cp + readlink -f $argv[1] | xclip -selection clipboard +end diff --git a/dot_config/i3/config.tmpl b/dot_config/i3/config.tmpl index f5f51c8..0c07c53 100755 --- a/dot_config/i3/config.tmpl +++ b/dot_config/i3/config.tmpl @@ -60,6 +60,7 @@ bindsym Mod4+f exec firefox --private-window bindsym Mod4+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca' # bindsym Mod4+$mod+h exec sleep .2 && xdotool type '.hint' bindsym Mod4+$mod+i exec sleep .2 && xdotool type '.info latest' +bindsym Mod4+l exec ~/scripts/dmenu-twitch # bindsym Mod4+m exec $term -e ~/scripts/vim-man bindsym Mod4+m exec $type_delay_cmd && xdotool type 'me@kevin-mok.com' # bindsym Mod4+$mod+m exec pass -c uoft/markus @@ -88,17 +89,24 @@ bindsym Control+Mod4+w exec $term -e nvim /home/kevin/.config/watson/state.tmp # bindsym Mod4+x exec $swex bindsym Control+$mod+x exec $type_delay_cmd && xdotool type 'http://codm.ataraxy.tk/' bindsym Mod4+z exec cliqz + +# screenshot [[[ # + +set $screenshot_folder "/home/kevin/Pictures/screenshots/desktop/unsorted" +set $scripts_path "/home/kevin/scripts" {{ if .ext_kb }} bindsym Mod4+x exec ~/scripts/xmodmap-custom -# bindsym Print --release exec "scrot -s ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" -bindsym Print --release exec "maim -su | tee ~/tmp/screenshot-$(date +%F_%T).png | xclip -selection clipboard -t image/png" -bindsym Control+Print --release exec "scrot -u ~/tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" +# bindsym Print --release exec "scrot -s $screenshot_folder/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'" +bindsym Print --release exec "maim -su | tee ~/Pictures/screenshots/desktop/unsorted/screenshot-$(date +%F_%T).png | xclip -selection clipboard -t image/png" +bindsym Control+Print --release exec "scrot -u ~/Pictures/screenshots/desktop/unsorted/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'" {{ end }} +# ]]] screenshot # + # ]]] app shortcuts # # redshift [[[ # @@ -316,8 +324,9 @@ set $ws2 "2 " set $wl_ip_nast_num "5" workspace $ws2 output $secondary bindsym $mod+F2 workspace $ws2; exec $term -bindsym Control+Shift+F2 workspace $ws2; exec $term -e mosh kmok@192.168.0.1$wl_ip_nast_num -- tmux a -t nzxt +# bindsym Control+Shift+F2 workspace $ws2; exec $term -e mosh kmok@192.168.0.1$wl_ip_nast_num -- tmux a -t nzxt # bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach fortnite' +bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach red-hat-2' set $ws3 "3 " # set $ws3 "3 " @@ -334,7 +343,7 @@ bindsym Mod4+g workspace $ws3; layout tabbed; exec gimp set $ws4 "4 " workspace $ws4 output $secondary bindsym $mod+F4 workspace $ws4; exec $term -bindsym Mod4+$mod+F4 workspace $ws4; exec urxvt +bindsym Mod4+$mod+F4 workspace $ws4; exec urxvt -e ranger $screenshot_folder set $ws5 "5 " # workspace $ws5 output $secondary @@ -372,13 +381,13 @@ bindsym Mod4+$mod+d workspace $ws6; exec discord # bindsym Mod4+d workspace $ws6; exec firefox --new-window https://discordapp.com/channels/430798446723727367/443950744996020228 # bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app bindsym Mod4+k workspace $ws6; exec slack +bindsym Mod4+i workspace $ws6; exec $term -e fish -c 'mosh kmok@192.168.0.1$wl_ip_nast_num -- tmux a -t weechat' set $ws7 "7 " workspace $ws7 output $secondary # bindsym $mod+F7 workspace $ws7; exec $term -bindsym $mod+F7 workspace $ws7; exec $term -e mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a -# bindsym Mod4+$mod+F7 workspace $ws7; exec $term -e fish -c 'mosh kmok@192.168.0.16 -- tmux a -t weechat' -bindsym Mod4+i workspace $ws7; exec $term -e fish -c 'mosh kmok@192.168.0.1$wl_ip_nast_num -- tmux a -t weechat' +bindsym $mod+F7 workspace $ws7; exec $term -e mosh kmok@192.168.0.1$wl_ip_nast_num -- tmux a -t nzxt +bindsym Mod4+$mod+F7 workspace $ws7; exec $term -e mosh --ssh='ssh -p 399' kevin@165.22.239.234 tmux a bindsym Mod4+a workspace $ws7; exec android-file-transfer # bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index 9df52c1..0641b5b 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -1,6 +1,6 @@ include ~/.cache/wal/colors-kitty.conf -/* background_opacity .7 */ -background_opacity .8 +/* background_opacity .8 */ +background_opacity .9 clipboard_control write-clipboard write-primary enable_audio_bell no diff --git a/dot_config/ranger/rc.conf.tmpl b/dot_config/ranger/rc.conf.tmpl index 153e686..21d493d 100755 --- a/dot_config/ranger/rc.conf.tmpl +++ b/dot_config/ranger/rc.conf.tmpl @@ -168,7 +168,7 @@ set show_cursor false # One of: size, natural, basename, atime, ctime, mtime, type, random # set sort natural # set sort extension -set sort ctime +set sort mtime # Additional sorting options set sort_reverse false diff --git a/dot_taskrc b/dot_taskrc index d4add9a..942b788 100644 --- a/dot_taskrc +++ b/dot_taskrc @@ -60,7 +60,8 @@ urgency.user.project.sch.coefficient=7 urgency.uda.priority.H.coefficient=10 urgency.uda.priority.L.coefficient=-7 urgency.uda.priority..coefficient=1 -urgency.user.tag.nx.coefficient=15 +urgency.user.tag.jira.coefficient=5 +# urgency.user.tag.nx.coefficient=15 # }}} urgency # diff --git a/dot_vimrc.tmpl b/dot_vimrc.tmpl index 13b6ba2..d3c5435 100644 --- a/dot_vimrc.tmpl +++ b/dot_vimrc.tmpl @@ -91,12 +91,12 @@ autocmd Filetype markdown inoremap >> > " ]]] format options " " autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=acjMqtvw autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=cjMqtvw +autocmd Filetype Jenkinsfile,taskdata set tw=0 autocmd Filetype json nnoremap j :%!python -m json.tool 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 diff --git a/scripts/executable_dmenu-twitch b/scripts/executable_dmenu-twitch new file mode 100644 index 0000000..a6b1767 --- /dev/null +++ b/scripts/executable_dmenu-twitch @@ -0,0 +1,3 @@ +#!/bin/bash + +cat ~/Documents/twitch-emotes.md | dmenu -i | sed -z 's/\n/ /' | xclip -selection clipboard