Browse Source

dmenu Twitch emote script, copy full path function

aws
Kevin Mok 5 years ago
parent
commit
9e559088a2
Signed by: Kevin-Mok GPG Key ID: 6E920656BBAD3E6C
  1. 15
      aliases/key_aliases.tmpl
  2. 9
      aliases/key_dirs.tmpl
  3. 5
      aliases/key_files.tmpl
  4. 9
      dot_config/fish/config.fish.tmpl
  5. 3
      dot_config/fish/functions/readlink-cp.fish
  6. 25
      dot_config/i3/config.tmpl
  7. 4
      dot_config/kitty/kitty.conf
  8. 2
      dot_config/ranger/rc.conf.tmpl
  9. 3
      dot_taskrc
  10. 2
      dot_vimrc.tmpl
  11. 3
      scripts/executable_dmenu-twitch

15
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" sfd "sftp -rP 399 kevin@165.22.239.234"
# phone # phone
ssp "mosh --ssh='ssh -p 8022' $PHONE_IP" ssp "mosh --ssh='ssh -p 8022' $PHONE_IP"
scpp "scp -P 8022 $PHONE_IP:"
sfp "sftp -rP 8022 $PHONE_IP" sfp "sftp -rP 8022 $PHONE_IP"
# test server sites # test server sites
# svp "firefox git.ataraxy.tk khkm.tk cal.khkm.tk pste.gq smol.gq twem.tk" # 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" aacm "task add proj:codm"
aacr "task add proj:crim" aacr "task add proj:crim"
aas "task add proj:sch" aas "task add proj:sch"
aa2 "task add proj:sch +c324"
aa8 "task add proj:sch +c384"
aay "task add proj:pey" aay "task add proj:pey"
ac "task context" ac "task context"
acn "task context none && task" acn "task context none && task"
@ -315,6 +314,7 @@ afcm "task proj:codm"
afcr "task proj:crim" afcr "task proj:crim"
afs "task proj:sch" afs "task proj:sch"
afy "task proj:pey" afy "task proj:pey"
aj "task +jira"
apl "task completed" apl "task completed"
al "task limit:15" al "task limit:15"
alg "task log" alg "task log"
@ -381,6 +381,7 @@ msf "mpv --sub-file="
mra "man ranger" mra "man ranger"
# mt "minetest" # mt "minetest"
n "nvim" n "nvim"
np "nvim --"
ndu "ncdu" ndu "ncdu"
p3 "python3" p3 "python3"
pdft "pdftotext" pdft "pdftotext"
@ -397,7 +398,7 @@ rx "redshift -x"
scm "sc-im" scm "sc-im"
sn "sudo nvim" sn "sudo nvim"
sqlb "sqlitebrowser" sqlb "sqlitebrowser"
ss "mosh"
# ss "mosh"
stp "termdown" stp "termdown"
# sw "swex" # sw "swex"
t "tmux"#[[[ t "tmux"#[[[
@ -576,7 +577,7 @@ glm "git log master"
gcl "git clone" gcl "git clone"
gs "git status -u" gs "git status -u"
gf "git fetch origin"
gf "git fetch"
gfo "git fetch orig" gfo "git fetch orig"
gfg "git fetch gitea" gfg "git fetch gitea"
@ -588,7 +589,8 @@ gchw "git checkout wip"
gchh "git checkout HEAD --" gchh "git checkout HEAD --"
grom "git reset --hard origin/master" 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 # show files in git repo
# gls "git ls-tree -r HEAD --name-only" # gls "git ls-tree -r HEAD --name-only"
gls "git ls-tree 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 &" loe "libreoffice ~/Documents/expenses/2020.ods &"
ssw "mosh $WORK_LAPTOP_IP tmux a" ssw "mosh $WORK_LAPTOP_IP tmux a"
ssi "mosh $WORK_LAPTOP_IP -- tmux a -t weechat" ssi "mosh $WORK_LAPTOP_IP -- tmux a -t weechat"
scw "scp $WORK_LAPTOP_IP:"
sfw "sftp $WORK_LAPTOP_IP" sfw "sftp $WORK_LAPTOP_IP"
fp "fpaste" fp "fpaste"
@ -838,5 +841,7 @@ ot "oc status"
# ]]] oc # # ]]] oc #
jk "java -jar ~/java/jenkins-cli.jar -s http://localhost:8090 -auth kevin:112ef7228e7a8cea5435473f9416cb56e1" 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 # # ]]] red-hat #

9
aliases/key_dirs.tmpl

@ -18,6 +18,7 @@ me /run/media/kevin
o / o /
pd ~/.password-store pd ~/.password-store
P ~/Pictures P ~/Pictures
ss ~/Pictures/screenshots/desktop/unsorted
std ~/st std ~/st
# tm /tmp # tm /tmp
tm ~/tmp tm ~/tmp
@ -119,10 +120,18 @@ lt ~/school/latex-notes
# pey [[[ # # pey [[[ #
rh ~/Documents/red-hat rh ~/Documents/red-hat
rhc ~/Documents/red-hat/chat
# kogito [[[ #
k ~/coding/kogito k ~/coding/kogito
kex ~/coding/kogito/kogito-examples
kg ~/coding/kogito/github-release-test kg ~/coding/kogito/github-release-test
kl ~/coding/kogito/shared-libraries kl ~/coding/kogito/shared-libraries
ko ~/coding/kogito/kogito-cloud-operator ko ~/coding/kogito/kogito-cloud-operator
kp ~/Documents/red-hat/pull-requests
kr ~/coding/kogito/runtimes kr ~/coding/kogito/runtimes
# ]]] kogito #
# ]]] pey # # ]]] pey #

5
aliases/key_files.tmpl

@ -10,7 +10,7 @@ dw ~/dwm/config.def.h
f ~/linux-config/aliases/key_files.tmpl f ~/linux-config/aliases/key_files.tmpl
fh ~/.local/share/fish/fish_history fh ~/.local/share/fish/fish_history
n ~/linux-config/dot_vimrc.tmpl 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 r ~/linux-config/dot_config/ranger/rc.conf.tmpl
sr ~/linux-config/configs/ranger/shortcuts.conf sr ~/linux-config/configs/ranger/shortcuts.conf
ss ~/.shortcuts ss ~/.shortcuts
@ -98,5 +98,6 @@ tc /mnt/linux-files/Videos/yt/fortnite/clips/twitch-clip-downloader/clips.txt
# ]]] gaming # # ]]] gaming #
klg ~/coding/kogito/shared-libraries/vars/githubscm.groovy
kl ~/coding/kogito/shared-libraries/vars/githubscm.groovy
rht ~/Documents/red-hat/todo.md rht ~/Documents/red-hat/todo.md
j Jenkinsfile

9
dot_config/fish/config.fish.tmpl

@ -186,6 +186,7 @@ abbr pgrf "grep-pdf-file"
abbr pst "pastebin" abbr pst "pastebin"
abbr qh "qalc-history" abbr qh "qalc-history"
abbr rf "refresh-config" abbr rf "refresh-config"
abbr rl "readlink-cp"
abbr rs "redshift-set" abbr rs "redshift-set"
abbr sma "smol-add" abbr sma "smol-add"
abbr smd "smol-delete" abbr smd "smol-delete"
@ -204,14 +205,6 @@ abbr xya "export-pkgs"
# school [[[ # # 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 # # ]]] school #
# ]]] fxn abbr's # # ]]] fxn abbr's #

3
dot_config/fish/functions/readlink-cp.fish

@ -0,0 +1,3 @@
function readlink-cp
readlink -f $argv[1] | xclip -selection clipboard
end

25
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+h exec $type_delay_cmd && xdotool type 'kevin.mok@live.ca'
# bindsym Mod4+$mod+h exec sleep .2 && xdotool type '.hint' # bindsym Mod4+$mod+h exec sleep .2 && xdotool type '.hint'
bindsym Mod4+$mod+i exec sleep .2 && xdotool type '.info latest' 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 $term -e ~/scripts/vim-man
bindsym Mod4+m exec $type_delay_cmd && xdotool type 'me@kevin-mok.com' bindsym Mod4+m exec $type_delay_cmd && xdotool type 'me@kevin-mok.com'
# bindsym Mod4+$mod+m exec pass -c uoft/markus # 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 Mod4+x exec $swex
bindsym Control+$mod+x exec $type_delay_cmd && xdotool type 'http://codm.ataraxy.tk/' bindsym Control+$mod+x exec $type_delay_cmd && xdotool type 'http://codm.ataraxy.tk/'
bindsym Mod4+z exec cliqz bindsym Mod4+z exec cliqz
# screenshot [[[ #
set $screenshot_folder "/home/kevin/Pictures/screenshots/desktop/unsorted"
set $scripts_path "/home/kevin/scripts"
{{ if .ext_kb }} {{ if .ext_kb }}
bindsym Mod4+x exec ~/scripts/xmodmap-custom 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 }} {{ else }}
bindsym Mod4+x exec xmodmap ~/.Xmodmap-laptop && xset r rate $XSET_DELAY $XSET_RATE 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+$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+Shift+p --release exec "scrot -u /tmp/screenshot-$(date +%F_%T).png -e 'xclip -selection c -t image/png < $f'"
{{ end }} {{ end }}
# ]]] screenshot #
# ]]] app shortcuts # # ]]] app shortcuts #
# redshift [[[ # # redshift [[[ #
@ -316,8 +324,9 @@ set $ws2 "2 "
set $wl_ip_nast_num "5" set $wl_ip_nast_num "5"
workspace $ws2 output $secondary workspace $ws2 output $secondary
bindsym $mod+F2 workspace $ws2; exec $term 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 fortnite'
bindsym Control+Shift+F2 workspace $ws2; exec $term -e fish -c 'tmux-attach red-hat-2'
set $ws3 "3 " set $ws3 "3 "
# set $ws3 "3 " # set $ws3 "3 "
@ -334,7 +343,7 @@ bindsym Mod4+g workspace $ws3; layout tabbed; exec gimp
set $ws4 "4 " set $ws4 "4 "
workspace $ws4 output $secondary workspace $ws4 output $secondary
bindsym $mod+F4 workspace $ws4; exec $term 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 " set $ws5 "5 "
# workspace $ws5 output $secondary # 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+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+i workspace $ws6; exec firefox -new-window https://riot.im/app
bindsym Mod4+k workspace $ws6; exec slack 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 " set $ws7 "7 "
workspace $ws7 output $secondary workspace $ws7 output $secondary
# bindsym $mod+F7 workspace $ws7; exec $term # 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+a workspace $ws7; exec android-file-transfer
# bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1" # bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"

4
dot_config/kitty/kitty.conf

@ -1,6 +1,6 @@
include ~/.cache/wal/colors-kitty.conf include ~/.cache/wal/colors-kitty.conf
/* background_opacity .7 */
background_opacity .8
/* background_opacity .8 */
background_opacity .9
clipboard_control write-clipboard write-primary clipboard_control write-clipboard write-primary
enable_audio_bell no enable_audio_bell no

2
dot_config/ranger/rc.conf.tmpl

@ -168,7 +168,7 @@ set show_cursor false
# One of: size, natural, basename, atime, ctime, mtime, type, random # One of: size, natural, basename, atime, ctime, mtime, type, random
# set sort natural # set sort natural
# set sort extension # set sort extension
set sort ctime
set sort mtime
# Additional sorting options # Additional sorting options
set sort_reverse false set sort_reverse false

3
dot_taskrc

@ -60,7 +60,8 @@ urgency.user.project.sch.coefficient=7
urgency.uda.priority.H.coefficient=10 urgency.uda.priority.H.coefficient=10
urgency.uda.priority.L.coefficient=-7 urgency.uda.priority.L.coefficient=-7
urgency.uda.priority..coefficient=1 urgency.uda.priority..coefficient=1
urgency.user.tag.nx.coefficient=15
urgency.user.tag.jira.coefficient=5
# urgency.user.tag.nx.coefficient=15
# }}} urgency # # }}} urgency #

2
dot_vimrc.tmpl

@ -91,12 +91,12 @@ autocmd Filetype markdown inoremap >> >
" ]]] format options " " ]]] 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=acjMqtvw
autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=cjMqtvw autocmd FileType markdown,tex,text set spell spelllang=en_us formatoptions=cjMqtvw
autocmd Filetype Jenkinsfile,taskdata set tw=0
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR> autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
autocmd Filetype json set foldmethod=marker autocmd Filetype json set foldmethod=marker
autocmd Filetype racket set commentstring=;%s; autocmd Filetype racket set commentstring=;%s;
autocmd Filetype racket let g:AutoPairs = {'(':')', '[':']', '{':'}','"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} autocmd Filetype racket let g:AutoPairs = {'(':')', '[':']', '{':'}','"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"}
autocmd FileType sh map <F8> :!clear && shellcheck %<CR> autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
autocmd Filetype taskdata set tw=0
autocmd FileType tex set updatetime=1000 timeoutlen=300 autocmd FileType tex set updatetime=1000 timeoutlen=300
autocmd FileType tex map <F8> :VimtexCompile<CR> autocmd FileType tex map <F8> :VimtexCompile<CR>
autocmd VimEnter *.tex VimtexCompile autocmd VimEnter *.tex VimtexCompile

3
scripts/executable_dmenu-twitch

@ -0,0 +1,3 @@
#!/bin/bash
cat ~/Documents/twitch-emotes.md | dmenu -i | sed -z 's/\n/ /' | xclip -selection clipboard
Loading…
Cancel
Save