mirror of
https://github.com/rileyrg/linux-init.git
synced 2024-09-29 05:37:29 +02:00
rclone-mount
This commit is contained in:
parent
1f96aa3a09
commit
22c4a8e6d9
6 changed files with 62 additions and 69 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -134,6 +134,7 @@
|
|||
!/directories/bin/pulse-restart
|
||||
!/directories/bin/pulse-volume
|
||||
!/directories/bin/random-man-page
|
||||
!/directories/bin/rclone-mount
|
||||
!/directories/bin/resgithub
|
||||
!/directories/bin/remove-broken-symlinks
|
||||
!/directories/bin/remove-conflicted-copies
|
||||
|
|
56
README.md
56
README.md
|
@ -2037,7 +2037,7 @@ but in both cases we check if it exists in the sway tree, and, if not, set it it
|
|||
notify-send -t 3000 "${@}" || true
|
||||
|
||||
|
||||
<a id="org8f4e103"></a>
|
||||
<a id="orgecb5ce9"></a>
|
||||
|
||||
### ~/bin/sway/sway-screen
|
||||
|
||||
|
@ -2083,7 +2083,7 @@ See <https://www.reddit.com/r/swaywm/comments/10ys0oy/comment/j80lu88/?context=3
|
|||
|
||||
### ~/bin/sway/sway-screen-menu
|
||||
|
||||
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#org8f4e103).
|
||||
Gui to select a display and enable/disable it. Calls down to [~/bin/sway/sway-screen](#orgecb5ce9).
|
||||
|
||||
:ID: 82455cae-1c48-48b2-a8b3-cb5d44eeaee9
|
||||
|
||||
|
@ -3368,7 +3368,7 @@ strip debug info and store elsewhere
|
|||
|
||||
pulse/pipeline volume control.
|
||||
Pass in a volume string to change the volume (man pactl) or on/off/toggle. It wont allow larger than 100% volume. Always returns the current volume volume/status.
|
||||
See [examples](#org135cfc2).
|
||||
See [examples](#org4c0c6af).
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
|
@ -3402,7 +3402,7 @@ See [examples](#org135cfc2).
|
|||
echo "$(getVolume)"
|
||||
|
||||
|
||||
<a id="org135cfc2"></a>
|
||||
<a id="org4c0c6af"></a>
|
||||
|
||||
### Examples:
|
||||
|
||||
|
@ -3658,12 +3658,6 @@ See [XMGNeo 15 keyboard backlight controller](https://github.com/pobrn/ite8291r3
|
|||
<https://rclone.org/>
|
||||
|
||||
|
||||
## script
|
||||
|
||||
|
||||
### ~/bin/syncrclone-gdrive-sync
|
||||
|
||||
|
||||
### ~/bin/hetzner-du
|
||||
|
||||
1. script
|
||||
|
@ -3673,34 +3667,34 @@ See [XMGNeo 15 keyboard backlight controller](https://github.com/pobrn/ite8291r3
|
|||
echo "df -h" | sftp u377059@u377059.your-storagebox.de
|
||||
|
||||
|
||||
### ~/bin/hetzner-mount
|
||||
### ~/bin/rclone-mount
|
||||
|
||||
1. script
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/hetzner ]; then
|
||||
umount ~/hetzner
|
||||
rmdir ~/hetzner
|
||||
echo "Closed ~/hetzner"
|
||||
else
|
||||
mkdir -p ~/hetzner
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") hetzner: ~/hetzner &> /dev/null &
|
||||
echo "Mounted ~/hetzner"
|
||||
fi
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
remote=${1:-"hetzner"}
|
||||
if [ -d ~/$remote ]; then
|
||||
umount ~/${remote}
|
||||
rmdir ~/${remote}
|
||||
echo "Closed ~/${remote}"
|
||||
else
|
||||
mkdir -p ~/${remote}
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") ${remote}: ~/${remote} &> /dev/null &
|
||||
echo "Mounted ~/${remote}"
|
||||
fi
|
||||
|
||||
|
||||
### ~/bin/gdrive-mount
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/gdrive ]; then
|
||||
umount ~/gdrive
|
||||
rmdir ~/gdrive
|
||||
else
|
||||
mkdir -p ~/gdrive
|
||||
rclone mount --read-only gdrive: ~/gdrive &> /dev/null &
|
||||
fi
|
||||
rclone-mount gdrive
|
||||
|
||||
|
||||
### ~/bin/hetzner-mount
|
||||
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
rclone-mount hetzner
|
||||
|
||||
|
||||
## Power Monitoring
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/gdrive ]; then
|
||||
umount ~/gdrive
|
||||
rmdir ~/gdrive
|
||||
else
|
||||
mkdir -p ~/gdrive
|
||||
rclone mount --read-only gdrive: ~/gdrive &> /dev/null &
|
||||
fi
|
||||
rclone-mount gdrive
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/hetzner ]; then
|
||||
umount ~/hetzner
|
||||
rmdir ~/hetzner
|
||||
echo "Closed ~/hetzner"
|
||||
else
|
||||
mkdir -p ~/hetzner
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") hetzner: ~/hetzner &> /dev/null &
|
||||
echo "Mounted ~/hetzner"
|
||||
fi
|
||||
rclone-mount hetzner
|
||||
|
|
12
directories/bin/rclone-mount
Executable file
12
directories/bin/rclone-mount
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
remote=${1:-"hetzner"}
|
||||
if [ -d ~/$remote ]; then
|
||||
umount ~/${remote}
|
||||
rmdir ~/${remote}
|
||||
echo "Closed ~/${remote}"
|
||||
else
|
||||
mkdir -p ~/${remote}
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") ${remote}: ~/${remote} &> /dev/null &
|
||||
echo "Mounted ~/${remote}"
|
||||
fi
|
|
@ -4376,7 +4376,6 @@ See [[https://github.com/pobrn/ite8291r3-ctl][XMGNeo 15 keyboard backlight contr
|
|||
#+RESULTS:
|
||||
** rclone
|
||||
https://rclone.org/
|
||||
** script
|
||||
*** CANCELLED ~/bin/rclone-gdrive-sync :CANCELLED:
|
||||
CLOSED: [2023-11-16 Thu 12:17]
|
||||
:LOGBOOK:
|
||||
|
@ -4425,10 +4424,10 @@ CLOSED: [2023-11-16 Thu 12:17]
|
|||
echo "rclone bisync finished." >> "$LOGFILE"
|
||||
fi
|
||||
#+end_src
|
||||
*** ~/bin/syncrclone-gdrive-sync
|
||||
**** CANCELLED scrtipt :CANCELLED:
|
||||
CLOSED: [2023-11-16 Thu 12:16]
|
||||
*** CANCELLED ~/bin/syncrclone-gdrive-sync :CANCELLED:
|
||||
CLOSED: [2023-11-21 Tue 08:43]
|
||||
:LOGBOOK:
|
||||
- State "CANCELLED" from [2023-11-21 Tue 08:43]
|
||||
- State "CANCELLED" from [2023-11-16 Thu 12:16] \\
|
||||
use syncrclone directly
|
||||
:END:
|
||||
|
@ -4457,34 +4456,35 @@ https://github.com/Jwink3101/syncrclone
|
|||
# Maintained in linux-config.org
|
||||
echo "df -h" | sftp u377059@u377059.your-storagebox.de
|
||||
#+end_src
|
||||
*** ~/bin/hetzner-mount
|
||||
**** script
|
||||
#+begin_src bash :tangle "~/bin/hetzner-mount"
|
||||
|
||||
*** ~/bin/rclone-mount
|
||||
#+begin_src bash :tangle "~/bin/rclone-mount"
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/hetzner ]; then
|
||||
umount ~/hetzner
|
||||
rmdir ~/hetzner
|
||||
echo "Closed ~/hetzner"
|
||||
remote=${1:-"hetzner"}
|
||||
if [ -d ~/$remote ]; then
|
||||
umount ~/${remote}
|
||||
rmdir ~/${remote}
|
||||
echo "Closed ~/${remote}"
|
||||
else
|
||||
mkdir -p ~/hetzner
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") hetzner: ~/hetzner &> /dev/null &
|
||||
echo "Mounted ~/hetzner"
|
||||
mkdir -p ~/${remote}
|
||||
rclone mount $( [ ! "$1" = "rw" ] && echo "--read-only") ${remote}: ~/${remote} &> /dev/null &
|
||||
echo "Mounted ~/${remote}"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
*** ~/bin/gdrive-mount
|
||||
#+begin_src bash :tangle "~/bin/gdrive-mount"
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
if [ -d ~/gdrive ]; then
|
||||
umount ~/gdrive
|
||||
rmdir ~/gdrive
|
||||
else
|
||||
mkdir -p ~/gdrive
|
||||
rclone mount --read-only gdrive: ~/gdrive &> /dev/null &
|
||||
fi
|
||||
rclone-mount gdrive
|
||||
#+end_src
|
||||
*** ~/bin/hetzner-mount
|
||||
#+begin_src bash :tangle "~/bin/hetzner-mount"
|
||||
#!/usr/bin/env bash
|
||||
# Maintained in linux-config.org
|
||||
rclone-mount hetzner
|
||||
#+end_src
|
||||
|
||||
** Power Monitoring
|
||||
*** ~/bin/acpi-powerstate
|
||||
#+begin_src bash :tangle "~/bin/acpi-powerstate"
|
||||
|
|
Loading…
Reference in a new issue