Added Screenshot script for i3, fixed writeup path for ranger, added aws centos to ssh, added some abbrevs for *.go in vim, added metasploit alias to .zshrc~
parent
b19a19751f
commit
68b7df6495
|
@ -147,9 +147,16 @@ bindsym $mod+p exec firefox --private-window https://mos4.de
|
|||
bindsym $mod+e exec urxvtc -e ranger
|
||||
bindsym $mod+m exec thunderbird
|
||||
|
||||
bindsym Print exec --no-startup-id maim -f png ~/Pictures/Screenshots/$(date +%G-%m)/$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png
|
||||
bindsym control+Shift+Print --release exec --no-startup-id maim -u -s -f png ~/Pictures/Screenshots/$(date +%G-%m)/$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png
|
||||
bindsym Shift+Print --release exec --no-startup-id maim -u -i $(xdotool getactivewindow) -f png ~/Pictures/Screenshots/$(date +%G-%m)/$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png
|
||||
# Whole Screen
|
||||
bindsym Control+Print exec --no-startup-id ~/.scripts/screenshot.sh screen
|
||||
|
||||
# Window
|
||||
bindsym Mod1+Print --release exec --no-startup-id ~/.scripts/screenshot.sh window
|
||||
|
||||
# Area
|
||||
bindsym Print --release exec --no-startup-id ~/.scripts/screenshot.sh area
|
||||
|
||||
# Kill Window
|
||||
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill
|
||||
|
||||
# change focus
|
||||
|
|
|
@ -9,4 +9,4 @@ map nrg shell cp ~/Templates/LaTeX/Invoice/elektro_invoice.tex Gefeba_Elektr
|
|||
map nrb shell cp ~/Templates/LaTeX/Invoice/engineering_invoice.tex Gefeba_Engineering_-_Rechnung_$(date +%g-%m)_-Engineering.tex; ~/Templates/LaTeX/Invoice/InvNum.sh
|
||||
map nu shell touch L_$(basename %f .pdf)\.md
|
||||
map ntu shell cp ~/Templates/LaTeX/UniversityAssignmets/assignment.tex .
|
||||
map nw shell sed "s/# $/# $(pwd | rev | cut -d/ -f1 | rev)/" ~/Templates/writeup.md > ./writeup.md
|
||||
map nw shell sed "s/# $/# $(pwd | rev | cut -d/ -f1 | rev)/" ~/.vim/templates/writeup.md > ./writeup.md
|
||||
|
|
|
@ -4,9 +4,10 @@ o:/home/tuan/.dotfiles/config
|
|||
m:/run/media/tuan
|
||||
a:/home/tuan/Documents/Arbeit
|
||||
l:/home/tuan/Local
|
||||
c:/home/tuan/Documents/CTF/picoCTF
|
||||
c:/home/tuan/Documents/CTF
|
||||
t:/home/tuan/Templates
|
||||
w:/home/tuan/workspace_l/Projects
|
||||
k:/home/tuan
|
||||
k:/home/tuan/Documents/CTF/TryHackMe/VulnUniversity
|
||||
q:/home/tuan/.nextcloud/Quick Drop
|
||||
':/home/tuan/.vim
|
||||
':/usr/share/byobu/keybindings
|
||||
e:/home/tuan/Documents/CTF/TryHackMe/Ice/2_Recon
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
d=$HOME/Pictures/Screenshots/$(date +%G-%m);
|
||||
case $1 in
|
||||
"screen"*)
|
||||
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png;
|
||||
maim -f png $d/$filename;
|
||||
dunstify -r 2 "Saved screenshot of screen in $d/$filename";
|
||||
;;
|
||||
"window"*)
|
||||
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png
|
||||
maim -u -i $(xdotool getactivewindow) -f png $d/$filename;
|
||||
dunstify -r 2 "Saved screenshot of window in $d/$filename";
|
||||
;;
|
||||
"area"*)
|
||||
dunstify -r 2 'Taking screenshot from area.';
|
||||
filename=$(cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm)_$(date +%G-%m-%d_%H-%M-%S).png;
|
||||
maim -u -s -f png $d/$filename;
|
||||
dunstify -r 2 "Saved in $d/$filename.";
|
||||
;;
|
||||
esac
|
|
@ -1,15 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
defaultsink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3);
|
||||
defaultSink=$(pactl info | grep 'Default Sink' | cut -d' ' -f3);
|
||||
curVolume=$(amixer get Master | grep -o \[0-9\]\\+% -m 1);
|
||||
|
||||
case $1 in
|
||||
"up"*)
|
||||
pactl set-sink-volume $defaultsink +5%;
|
||||
pactl set-sink-volume $defaultSink +5%;
|
||||
dunstify -r 2 'sound up'\ \($curVolume\);
|
||||
;;
|
||||
"down"*)
|
||||
pactl set-sink-volume $defaultsink -5%;
|
||||
pactl set-sink-volume $defaultSink -5%;
|
||||
dunstify -r 2 'sound up'\ \($curVolume\);
|
||||
;;
|
||||
"toggle"*)
|
||||
|
@ -17,7 +17,7 @@ case $1 in
|
|||
if amixer get Master | grep -q off; then
|
||||
msg='unmuted';
|
||||
fi
|
||||
pactl set-sink-mute $defaultsink toggle;
|
||||
pactl set-sink-mute $defaultSink toggle;
|
||||
dunstify -r 2 'sound'\ $msg;
|
||||
echo $msg
|
||||
;;
|
||||
|
|
|
@ -63,3 +63,9 @@ Host picoCTF
|
|||
Port 22
|
||||
User mos4
|
||||
IdentityFile "/home/tuan/Documents/CTF/picoCTF/2018/30 - ssh-keyz/picoCTF"
|
||||
|
||||
Host CentOS
|
||||
HostName 3.125.43.27
|
||||
Port 22
|
||||
User centos
|
||||
IdentityFile /mnt/veracrypt1/mos4.de
|
||||
|
|
|
@ -3,14 +3,17 @@ set autoindent noexpandtab tabstop=4 shiftwidth=4
|
|||
" Shortcuts
|
||||
abbrev funct func Test(t *testing.T) {<CR>}<Esc>kwwi
|
||||
abbrev trun t.Run("", func(t *testing.T) {<CR>})<Esc>%la
|
||||
abbrev terr t.Errorf("got %d, want %d", got, want)
|
||||
abbrev terr t.Errorf("got %v, want %v", got, want)<Esc>02f,lcaw
|
||||
abbrev thelp func(t *testing.T) {<CR>t.Helper()<CR>}<Esc>ko
|
||||
abbrev fori for i := 0; i <; i++{<CR>}<Esc>k2f;i
|
||||
abbrev fore for i, c := range{<CR>}<Esc>kf{i
|
||||
|
||||
" Compiling
|
||||
nnoremap <C-c><C-f> <Esc>:GoFmt<CR>
|
||||
nnoremap <C-c><C-c> <Esc>:!clear<CR><CR>:GoRun<CR>
|
||||
nnoremap <C-c><C-b> <CR>:GoBuild<CR>
|
||||
nnoremap <C-c><C-t> <CR>:GoTest<CR>
|
||||
nnoremap <F9> <CR>:GoImports<CR>
|
||||
nnoremap <C-c><C-d> <CR>:GoDebugStart<CR>
|
||||
nnoremap gd <Esc>:GoDef
|
||||
nnoremap <F1> <Esc>:GoDoc<CR>
|
||||
|
|
|
@ -3,7 +3,6 @@ syntax on
|
|||
filetype indent plugin on
|
||||
set background=light
|
||||
set encoding=utf-8
|
||||
set autowrite
|
||||
set smartcase
|
||||
set incsearch
|
||||
set hlsearch
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
autocmd BufNewFile,BufRead *.razor setf html
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
" This callback will be executed when the entire command is completed
|
||||
function! BackgroundCommandClose(channel)
|
||||
" Read the output from the command into the quickfix window
|
||||
unlet g:backgroundCommandOutput
|
||||
endfunction
|
||||
|
||||
function! RunBackgroundCommand(command)
|
||||
" Make sure we're running VIM version 8 or higher.
|
||||
if v:version < 800
|
||||
echoerr 'RunBackgroundCommand requires VIM version 8 or higher'
|
||||
return
|
||||
endif
|
||||
if exists('g:backgroundCommandOutput')
|
||||
echo 'Already running task in background'
|
||||
else
|
||||
echo 'Running task in background'
|
||||
" Launch the job.
|
||||
" Notice that we're only capturing out, and not err here. This is because, for some reason, the callback
|
||||
" will not actually get hit if we write err out to the same file. Not sure if I'm doing this wrong or?
|
||||
let g:backgroundCommandOutput = tempname()
|
||||
call job_start(a:command, {'close_cb': 'BackgroundCommandClose', 'out_io': 'file', 'out_name': g:backgroundCommandOutput})
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" So we can use :BackgroundCommand to call our function.
|
||||
command! -nargs=+ -complete=shellcmd RunBackgroundCommand call RunBackgroundCommand(<q-args>)
|
||||
|
||||
function! GetCWD()
|
||||
let l:cwd = system('pwd | rev |cut -d- -f1 | rev | xargs | sed "s/[[:space:]]/\\\\&/g\"')
|
||||
echo l:cwd
|
||||
call setline('.', l:cwd)
|
||||
unlet l:cwd
|
||||
endfunction
|
|
@ -14,3 +14,4 @@ let g:polyglot_disabled = ['latex']
|
|||
let g:UltiSnipsExpandTrigger="<tab>"
|
||||
let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
||||
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
||||
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
author: Tuan-Dat Tran
|
||||
date: [:VIM_EVAL:]strftime('%Y-%m-%d')[:END_EVAL:]
|
||||
...
|
||||
|
||||
# [:VIM_EVAL:]system ("basename $(pwd)")[:END_EVAL:]
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# Paths
|
||||
export ZSH="/home/tuan/.oh-my-zsh"
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
export PATH="$PATH:$HOME/.go/bin:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.dotnet/tools"
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
export DOTNET_ROOT=/opt/dotnet
|
||||
export SecList=$HOME/Local/PenTesting/SecLists/
|
||||
|
||||
|
||||
# Alias
|
||||
alias q="exit"
|
||||
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'
|
||||
alias xsel='xsel -ib'
|
||||
alias msfconsole="msfconsole -x \"db_connect metasploit@msf\""
|
||||
|
||||
# Theme
|
||||
ZSH_THEME="agnoster"
|
||||
|
|
Loading…
Reference in New Issue