Merge branch 'main' of git.zander.im:Zander671/random-scripts
This commit is contained in:
commit
c492350351
@ -1,2 +1,8 @@
|
||||
#!/usr/bin/env zsh
|
||||
maim -k -s -f png | tesseract stdin stdout -l eng | xclip -selection clipboard
|
||||
|
||||
local text="$(maim -k -s -f png | tesseract stdin stdout -l eng 2>/dev/null)"
|
||||
let char_count="$(printf '%s' "${text}" | wc -c)"
|
||||
|
||||
printf '%s' "${text}" | xclip -selection clipboard
|
||||
|
||||
notify-send -t 5000 "Coppied Text" "Coppied ${char_count} characters"
|
||||
|
@ -12,6 +12,9 @@ fi
|
||||
|
||||
exec nvim 63<&0 0</dev/null \
|
||||
-u NONE \
|
||||
-c 'packadd leap.nvim' \
|
||||
-c "lua require('leap').add_default_mappings()" \
|
||||
-c 'highlight link LeapBackdrop Comment' \
|
||||
-c "map <silent> q :qa!<CR>" \
|
||||
-c "set scrollback=100000 nonumber termguicolors laststatus=0 clipboard+=unnamedplus" \
|
||||
-c "autocmd TermEnter * stopinsert" \
|
||||
|
@ -1,13 +1,16 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
local maim_args=("-f" "png")
|
||||
local outfile="${HOME}/downloads/screenshot--$(date +'%F_%k-%M-%S').png"
|
||||
local outfile="screenshot--$(date +'%F_%k-%M-%S').png"
|
||||
local outpath="${HOME}/downloads/${outfile}"
|
||||
|
||||
case "${1}" in;
|
||||
'-root')
|
||||
maim ${maim_args} "${outfile}"
|
||||
maim ${maim_args} "${outpath}" || exit
|
||||
;;
|
||||
'-select' | *)
|
||||
maim ${maim_args} -s "${outfile}"
|
||||
maim ${maim_args} -s "${outpath}" || exit
|
||||
;;
|
||||
esac
|
||||
|
||||
notify-send -t 5000 "Screenshot Taken" "Screenshot saved to \"${outfile}\""
|
||||
|
Loading…
Reference in New Issue
Block a user