From 3b3c3a856db3ab989d5ff7ca740e3f447433be52 Mon Sep 17 00:00:00 2001 From: Maximilian Stiefel Date: Fri, 25 Aug 2017 17:29:40 +0200 Subject: [PATCH] Modified some scripts. --- i3wm_cmd_wrapper.sh | 16 ++++++++++------ mount_enc.sh | 20 ++++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/i3wm_cmd_wrapper.sh b/i3wm_cmd_wrapper.sh index 164f1cc..935c0e8 100755 --- a/i3wm_cmd_wrapper.sh +++ b/i3wm_cmd_wrapper.sh @@ -5,11 +5,11 @@ # managers like i3wm (e.g. bash scripts). # # # # Author: Maximilian Stiefel # -# Last modified: 29. April 2017 # +# Last modified: 25. August 2017 # # CLI usage: Put in autostart script (e.g. ~/.i3/config) # # ./i3wm_cmd_wrapper.sh window_name # # path_to_script # -# Required PKGs: xterm # +# Required PKGs: gnome-terminal # # # ################################################################# @@ -21,8 +21,12 @@ SCRIPT="$2" # Extracting window name WDW_NAME="$1" -# Command to execute -MYCMD1="xterm -T $WDW_NAME -e \"$SCRIPT\"" +# Command 1 +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 NU_PARAMS=2; @@ -37,5 +41,5 @@ then echo "./i3wm_cmd_wrapper.sh window_name path_to_script" exit 1; fi -echo "$MYCMD1" -xterm -T $WDW_NAME -e "$SCRIPT" +echo "$MYCMD3" +$MYCMD3 diff --git a/mount_enc.sh b/mount_enc.sh index d73fdfd..cab1b07 100755 --- a/mount_enc.sh +++ b/mount_enc.sh @@ -5,7 +5,7 @@ # in it. # # # # Author: Maximilian Stiefel # -# Last modified: 23. April 2017 # +# Last modified: 25. August 2017 # # CLI usage: ./mount_enc.sh # # Required PKGs: encfs, sudo # # # @@ -15,17 +15,17 @@ # Vars # ################################################################# # Mountpoint for external drive -MOUNT_POINT="/media/sack/xxxx" +MOUNT_POINT="/media/blabla/xxx" # Device identifier -DEVICE="/dev/sdc34" +DEVICE="/dev/sdax" # File system (-t option of mount) -FILE_SYSTEM="fat32" +FILE_SYSTEM="ext4" # Encfs enrypted files location -ENC_LOC="$MOUNT_POINT/.sexy" +ENC_LOC="$MOUNT_POINT/.xxx" # Encfs mount point -ENC_MP="$MOUNT_POINT/sexy" +ENC_MP="$MOUNT_POINT/xxx" # Link to mount point -LINK="/home/sack/sssss" +LINK="/home/maximilian/linki" # Command to execute for mounting MYCMD1="sudo mount -t $FILE_SYSTEM $DEVICE $MOUNT_POINT" @@ -37,6 +37,8 @@ MYCMD3=$(mount | grep $DEVICE) MYCMD4="encfs $ENC_LOC $ENC_MP" # Command to create 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 # @@ -87,5 +89,7 @@ then echo 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;