Browse Source

Modified some scripts.

master
Maximilian Stiefel 7 years ago
parent
commit
3b3c3a856d
  1. 16
      i3wm_cmd_wrapper.sh
  2. 20
      mount_enc.sh

16
i3wm_cmd_wrapper.sh

@ -5,11 +5,11 @@
# managers like i3wm (e.g. bash scripts). # # managers like i3wm (e.g. bash scripts). #
# # # #
# Author: Maximilian Stiefel # # Author: Maximilian Stiefel #
# Last modified: 29. April 2017 # # Last modified: 25. August 2017 #
# CLI usage: Put in autostart script (e.g. ~/.i3/config) # # CLI usage: Put in autostart script (e.g. ~/.i3/config) #
# ./i3wm_cmd_wrapper.sh window_name # # ./i3wm_cmd_wrapper.sh window_name #
# path_to_script # # path_to_script #
# Required PKGs: xterm # # Required PKGs: gnome-terminal #
# # # #
################################################################# #################################################################
@ -21,8 +21,12 @@ SCRIPT="$2"
# Extracting window name # Extracting window name
WDW_NAME="$1" WDW_NAME="$1"
# Command to execute # Command 1
MYCMD1="xterm -T $WDW_NAME -e \"$SCRIPT\"" MYCMD1="gnome-terminal --hide-menubar --name $WDW_NAME --window-with-profile=max_term_preferences -e "
# Command 2
MYCMD2="$SCRIPT"
# Command 3
MYCMD3=$MYCMD1$MYCMD2
# Expected number of params # Expected number of params
NU_PARAMS=2; NU_PARAMS=2;
@ -37,5 +41,5 @@ then
echo "./i3wm_cmd_wrapper.sh window_name path_to_script" echo "./i3wm_cmd_wrapper.sh window_name path_to_script"
exit 1; exit 1;
fi fi
echo "$MYCMD1" echo "$MYCMD3"
xterm -T $WDW_NAME -e "$SCRIPT" $MYCMD3

20
mount_enc.sh

@ -5,7 +5,7 @@
# in it. # # in it. #
# # # #
# Author: Maximilian Stiefel # # Author: Maximilian Stiefel #
# Last modified: 23. April 2017 # # Last modified: 25. August 2017 #
# CLI usage: ./mount_enc.sh # # CLI usage: ./mount_enc.sh #
# Required PKGs: encfs, sudo # # Required PKGs: encfs, sudo #
# # # #
@ -15,17 +15,17 @@
# Vars # # Vars #
################################################################# #################################################################
# Mountpoint for external drive # Mountpoint for external drive
MOUNT_POINT="/media/sack/xxxx" MOUNT_POINT="/media/blabla/xxx"
# Device identifier # Device identifier
DEVICE="/dev/sdc34" DEVICE="/dev/sdax"
# File system (-t option of mount) # File system (-t option of mount)
FILE_SYSTEM="fat32" FILE_SYSTEM="ext4"
# Encfs enrypted files location # Encfs enrypted files location
ENC_LOC="$MOUNT_POINT/.sexy" ENC_LOC="$MOUNT_POINT/.xxx"
# Encfs mount point # Encfs mount point
ENC_MP="$MOUNT_POINT/sexy" ENC_MP="$MOUNT_POINT/xxx"
# Link to mount point # Link to mount point
LINK="/home/sack/sssss" LINK="/home/maximilian/linki"
# Command to execute for mounting # Command to execute for mounting
MYCMD1="sudo mount -t $FILE_SYSTEM $DEVICE $MOUNT_POINT" MYCMD1="sudo mount -t $FILE_SYSTEM $DEVICE $MOUNT_POINT"
@ -37,6 +37,8 @@ MYCMD3=$(mount | grep $DEVICE)
MYCMD4="encfs $ENC_LOC $ENC_MP" MYCMD4="encfs $ENC_LOC $ENC_MP"
# Command to create link # Command to create link
MYCMD5="ln -s $MOUNT_POINT $LINK" MYCMD5="ln -s $MOUNT_POINT $LINK"
# Command to fire rhythmbox (do not fire rhythmbox before music lib is encrypted)
MYCMD6="bash ~/launch_in_bg.sh rhythmbox"
################################################################# #################################################################
# Action # # Action #
@ -87,5 +89,7 @@ then
echo echo
fi fi
read -n1 -r -p "Waiting for termination. Press any key ... " key echo "$MYCMD6"
eval $MYCMD6
read -r -p "Waiting for termination. Press any key ... " key
exit 0; exit 0;

Loading…
Cancel
Save