Updated: mount-all-volumes
* Added switch for foh mode instead of using symlinks * Updated i3/openbox shortcuts
This commit is contained in:
parent
183ef78ea9
commit
6bbc15d4f1
5 changed files with 3 additions and 32 deletions
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
## Wizard Kit: Volume mount tool
|
|
||||||
|
|
||||||
# Mount all volumes (read only)
|
|
||||||
echo "Mounting all volumes"
|
|
||||||
regex="/dev/((h|s)d[a-z]|md)[0-9]+"
|
|
||||||
for volume in $(inxi -Dopxx | grep -E "$regex" | sed -r "s#.*($regex).*#\1#" | sort); do
|
|
||||||
if grep -q "$volume" /proc/mounts; then
|
|
||||||
if ! mount | grep "/run/archiso/bootmnt" | grep -q "$volume"; then
|
|
||||||
# Show what's already mounted except the WK_ARCH boot device
|
|
||||||
echo "$volume: (Already) mounted $(mount | grep "$volume" | sed -r 's/^\S+ (on.*) type .*/\1/') ($(df -h "$volume" | tail -1 | awk '{print $3, $4}' | sed -r 's/(K|M|G|T|) (.*[0-9])(K|M|G|T|)$/ \1b used, \2 \3b free/'))"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if udevil mount -o ro $volume >/dev/null 2>&1; then
|
|
||||||
echo "$volume: Mounted $(mount | grep "$volume" | sed -r 's/^\S+ (on.*) type .*/\1/') ($(df -h "$volume" | tail -1 | awk '{print $3, $4}' | sed -r 's/(K|M|G|T|) (.*[0-9])(K|M|G|T|)$/ \1b used, \2 \3b free/'))"
|
|
||||||
else
|
|
||||||
echo "$volume: Failed to mount"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Open folder?
|
|
||||||
if echo "$0" | grep -iq foh; then
|
|
||||||
thunar /media
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Done."
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
mount-all-volumes
|
|
||||||
|
|
@ -27,7 +27,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
print_standard('\nDone.')
|
print_standard('\nDone.')
|
||||||
if 'foh' in __file__:
|
if 'foh' in sys.argv:
|
||||||
pause("Press Enter to exit...")
|
pause("Press Enter to exit...")
|
||||||
popen_program(['thunar', '/media'])
|
popen_program(['thunar', '/media'])
|
||||||
exit_script()
|
exit_script()
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ bindsym $mod+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
|
||||||
bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
|
bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
|
||||||
bindsym $mod+f exec "thunar ~"
|
bindsym $mod+f exec "thunar ~"
|
||||||
bindsym $mod+i exec "hardinfo"
|
bindsym $mod+i exec "hardinfo"
|
||||||
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes"
|
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes foh"
|
||||||
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags foh"
|
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags foh"
|
||||||
bindsym $mod+t exec "urxvt"
|
bindsym $mod+t exec "urxvt"
|
||||||
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e hw-diags-sensors"
|
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e hw-diags-sensors"
|
||||||
|
|
|
||||||
|
|
@ -314,7 +314,7 @@
|
||||||
</keybind>
|
</keybind>
|
||||||
<keybind key="W-m">
|
<keybind key="W-m">
|
||||||
<action name="Execute">
|
<action name="Execute">
|
||||||
<command>urxvt -title "Mount all Volumes" -e mount-all-volumes-foh</command>
|
<command>urxvt -title "Mount all Volumes" -e mount-all-volumes foh</command>
|
||||||
</action>
|
</action>
|
||||||
</keybind>
|
</keybind>
|
||||||
<keybind key="W-r">
|
<keybind key="W-r">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue