A collection of Nautilus Script for you to copy and paste
Created
November 14, 2025 13:07
-
-
Save szeyu/698a37d134f0797c5e2d3c08e8c4a49c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for FILE in "$@"; do | |
| # Convert filename to lowercase | |
| LOWER_FILE="${FILE,,}" | |
| # Check if the file has a supported extension | |
| if [[ "$LOWER_FILE" == *.pptx || "$LOWER_FILE" == *.docx || "$LOWER_FILE" == *.doc ]]; then | |
| # Get the directory and filename without extension | |
| DIR="$(dirname "$FILE")" | |
| BASENAME="$(basename "$FILE")" | |
| # Convert to PDF using LibreOffice | |
| libreoffice --headless --convert-to pdf --outdir "$DIR" "$FILE" | |
| # Optional: Notify the user of completion | |
| notify-send "Conversion Complete" "Converted '$BASENAME' to PDF." | |
| else | |
| notify-send "Invalid File" "'$FILE' is not a supported document (.pptx/.docx/.doc)." | |
| fi | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Get full path of selected file | |
| input="$1" | |
| # Check if input ends with .webm | |
| if [[ "$input" != *.webm ]]; then | |
| zenity --error --text="This script only works on .webm files." | |
| exit 1 | |
| fi | |
| # Generate output file name | |
| output="${input%.webm}.mp4" | |
| # Launch in terminal to show progress | |
| gnome-terminal -- bash -c " | |
| echo 'Converting \"$input\" to \"$output\"...'; | |
| ffmpeg -i \"$input\" -vcodec libx264 -crf 23 \"$output\"; | |
| echo ''; | |
| echo 'Done!'; | |
| read -p 'Press Enter to close...' var | |
| " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Nautilus script to merge selected PDFs with pdfunite | |
| # Get directory of the first selected file | |
| dir="$(dirname "$1")" | |
| output="$dir/Merged.pdf" | |
| # Run pdfunite on all selected files | |
| pdfunite "$@" "$output" | |
| # Notify user | |
| if [ $? -eq 0 ]; then | |
| notify-send "PDF Merge" "Merged into $output" | |
| else | |
| notify-send "PDF Merge Failed" "Something went wrong." | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment