diff options
| -rw-r--r-- | public/.bashrc | 2 | ||||
| -rwxr-xr-x | public/.local/bin/laptop-backup.sh | 2 | ||||
| -rwxr-xr-x | public/.local/bin/myfile-handler.sh | 1 | ||||
| -rw-r--r-- | public/.local/share/applications/myfile-handler.desktop | 6 |
4 files changed, 9 insertions, 2 deletions
diff --git a/public/.bashrc b/public/.bashrc index 065e12e..9449af8 100644 --- a/public/.bashrc +++ b/public/.bashrc @@ -79,7 +79,7 @@ ds=( "$HOME/code/tex-live-native/build/bin/x86_64-linux" "$HOME/.local/share/gem/ruby/3.0.0/bin" "$HOME/.local/bin" - "$HOME/mahcode/dotfiles/local/bin" + "$HOME/mahcode/dotfiles/public/.local/bin" ) for d in "${ds[@]}"; do if ! echo $PATH | grep -qE "(^|:)$d($|:)"; then diff --git a/public/.local/bin/laptop-backup.sh b/public/.local/bin/laptop-backup.sh index a22c179..0fcd0cd 100755 --- a/public/.local/bin/laptop-backup.sh +++ b/public/.local/bin/laptop-backup.sh @@ -31,7 +31,7 @@ rsync $rsync_options /var /mnt/$name # <10G rsync $rsync_options /home /mnt/$name # <900G rsync $rsync_options /etc /mnt/$name # <20M echo "Backup complete." -df -h #| grep -E "${name}|var|home|etc" +df -h umount /mnt/$name cryptsetup close $name diff --git a/public/.local/bin/myfile-handler.sh b/public/.local/bin/myfile-handler.sh index 40360b8..52496cd 100755 --- a/public/.local/bin/myfile-handler.sh +++ b/public/.local/bin/myfile-handler.sh @@ -3,5 +3,6 @@ url="$1" file_path="${url#myfile://}" +file_path=$(echo "$file_path" | sed 's/%20/ /g') file_path="${file_path/\~/$HOME}" xdg-open "$file_path" diff --git a/public/.local/share/applications/myfile-handler.desktop b/public/.local/share/applications/myfile-handler.desktop new file mode 100644 index 0000000..576f7d5 --- /dev/null +++ b/public/.local/share/applications/myfile-handler.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Name=Custom Protocol Handler +Exec=myfile-handler.sh %u +Type=Application +NoDisplay=true +MimeType=x-scheme-handler/myfile; |
