diff options
| author | Mitsuo Tokumori <[email protected]> | 2024-09-11 03:39:28 +0900 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2024-09-11 03:39:28 +0900 |
| commit | dca319b8d9d221f1aaf3a00ee457d202096c66ac (patch) | |
| tree | 7450c668226aea29b02f8fd9bd36240d1b9d2d20 | |
| parent | 4bc0383c5745d5fbd7e83d7ae68f765a9b2024e3 (diff) | |
| download | dotfiles-dca319b8d9d221f1aaf3a00ee457d202096c66ac.tar.gz dotfiles-dca319b8d9d221f1aaf3a00ee457d202096c66ac.tar.bz2 dotfiles-dca319b8d9d221f1aaf3a00ee457d202096c66ac.zip | |
Update custom bash scripts
| -rwxr-xr-x | local/bin/laptop-backup.sh | 2 | ||||
| -rwxr-xr-x | local/bin/laptop-xrandr.sh | 3 | ||||
| -rwxr-xr-x | local/bin/myfile-handler.sh | 7 |
3 files changed, 10 insertions, 2 deletions
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" |
