From dca319b8d9d221f1aaf3a00ee457d202096c66ac Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Wed, 11 Sep 2024 03:39:28 +0900 Subject: Update custom bash scripts --- local/bin/laptop-backup.sh | 2 +- local/bin/laptop-xrandr.sh | 3 ++- local/bin/myfile-handler.sh | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 local/bin/myfile-handler.sh (limited to 'local') diff --git a/local/bin/laptop-backup.sh b/local/bin/laptop-backup.sh index dffaf96..a22c179 100755 --- a/local/bin/laptop-backup.sh +++ b/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 #| grep -E "${name}|var|home|etc" umount /mnt/$name cryptsetup close $name diff --git a/local/bin/laptop-xrandr.sh b/local/bin/laptop-xrandr.sh index 01b0c52..cbe9479 100755 --- a/local/bin/laptop-xrandr.sh +++ b/local/bin/laptop-xrandr.sh @@ -19,4 +19,5 @@ simple_2_monitor() { # Thank you: https://www.maketecheasier.com/how-to-setup-dual-monitors-with-xrandr/ # xrandr --auto --output HDMI-A-0 --mode 1920x1080 --right-of eDP -simple_2_monitor +#simple_2_monitor +xrandr --auto --output HDMI-A-0 --mode 1920x1080 --right-of eDP diff --git a/local/bin/myfile-handler.sh b/local/bin/myfile-handler.sh new file mode 100755 index 0000000..40360b8 --- /dev/null +++ b/local/bin/myfile-handler.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# A script to handle custom protocol +url="$1" + +file_path="${url#myfile://}" +file_path="${file_path/\~/$HOME}" +xdg-open "$file_path" -- cgit v1.2.3