Skip to content

Commit

Permalink
move decrypdf to .linux-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
victory-sokolov committed Nov 3, 2024
1 parent 641e920 commit bf79cc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
6 changes: 6 additions & 0 deletions linux/.linux-functions
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ cutpdf() # Cut PDF pages
fi
done
}

decryptpdf() # Decrypt PDF file
{
echo "Enter password followed by <enter> followed by <ctrl-D>"
qpdf --decrypt --password-file=- --replace-input "${1}"
}
17 changes: 2 additions & 15 deletions zsh/.functions
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ colormap() # Colormap
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
}

man() # Shows pretty man page
# Override default man page
function man() # Shows pretty man page
{
env \
LESS_TERMCAP_mb="$(printf '\e[1;31m')" \
Expand Down Expand Up @@ -460,14 +461,6 @@ pngtojpg() # Bulk convert png to jpg
for i in *.png ; do convert "$i" "${i%.*}.jpg" ; done
}

# C++ snippets
cpp-run() # compile and run executable
{
echo "Compiling file..."
g++ -o "$1" "$1.cpp"
./"$1".cpp
}

spy() # Watch file
{
file=$1
Expand Down Expand Up @@ -700,9 +693,3 @@ poetry-update() ## Update Poetry packages interactively
{
poetry show --outdated -T | fzf -m | awk '{printf $1"@latest" " "}' | xargs -I {} poetry add {}
}

decryptpdf() # Decrypt PDF file
{
echo "Enter password followed by <enter> followed by <ctrl-D>"
qpdf --decrypt --password-file=- --replace-input "${1}"
}

0 comments on commit bf79cc4

Please sign in to comment.