diff --git a/README.md b/README.md index 5bb5cc1..fd13e05 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,6 @@ The is an administration tool designed from and for Kevin Veen-Birkenbach. Licensed under GNU GENERAL PUBLIC LICENSE Version 3 ``` -## Todo - -- Implement ssh configuration -- Implement wifi automation -- Install client software depentend on hardware -- Use travis -- Move repository folder ## Description This repository contains scripts to set up an working client system, maintain it and to save all important and configuration data on an USB stick. The data is stored encrypted with [EncFS](https://en.wikipedia.org/wiki/EncFS). @@ -93,5 +86,13 @@ To backup a image execute: sudo bash ./scripts/image/backup.sh ``` +## Todo + +- Implement ssh configuration +- Implement wifi automation +- Install client software depentend on hardware +- Use travis +- Move repository folder + ## License The ["GNU GENERAL PUBLIC LICENSE Version 3"](./LICENSE.txt) applies to this project. diff --git a/configuration/templates/home/.profile b/configuration/templates/home/.profile index 0f80c52..7d58221 100644 --- a/configuration/templates/home/.profile +++ b/configuration/templates/home/.profile @@ -1,3 +1,2 @@ export QT_QPA_PLATFORMTHEME="qt5ct" export EDITOR=/usr/bin/nano -xbindkeys & diff --git a/configuration/templates/home/.xbindkeysrc b/configuration/templates/home/.xbindkeysrc deleted file mode 100644 index e91fca7..0000000 --- a/configuration/templates/home/.xbindkeysrc +++ /dev/null @@ -1,62 +0,0 @@ -# For the benefit of emacs users: -*- shell-script -*- -########################### -# xbindkeys configuration # -########################### -# -# Version: 1.8.6 -# -# If you edit this file, do not forget to uncomment any lines -# that you change. -# The pound(#) symbol may be used anywhere for comments. -# -# To specify a key, you can use 'xbindkeys --key' or -# 'xbindkeys --multikey' and put one of the two lines in this file. -# -# The format of a command line is: -# "command to start" -# associated key -# -# -# A list of keys is in /usr/include/X11/keysym.h and in -# /usr/include/X11/keysymdef.h -# The XK_ is not needed. -# -# List of modifier: -# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock), -# Mod3 (CapsLock), Mod4, Mod5 (Scroll). -# - -# The release modifier is not a standard X modifier, but you can -# use it if you want to catch release events instead of press events - -# By defaults, xbindkeys does not pay attention with the modifiers -# NumLock, CapsLock and ScrollLock. -# Uncomment the lines above if you want to pay attention to them. - -#keystate_numlock = enable -#keystate_capslock = enable -#keystate_scrolllock= enable - -"atom" - control+alt+a - -"eclipse" - control+alt+e - -"firefox" - control+alt+f - -"keepassxc" - control+alt+k - -"gnome-terminal -e /bin/bash" - control+alt+t - -"vlc" - control+alt+v - -"rhythmbox" - control+alt+r - -"gnome-screenshot -i" - control+alt+c diff --git a/scripts/client/setup.sh b/scripts/client/setup.sh index ac9d83e..8ae9058 100644 --- a/scripts/client/setup.sh +++ b/scripts/client/setup.sh @@ -107,12 +107,6 @@ if [ ! "$(pacman -Qi "virtualbox")" ] ; then info "Keep in mind to install the guest additions in the virtualized system. See https://wiki.manjaro.org/index.php?title=VirtualBox" fi -if [ "$XDG_SESSION_TYPE" == "x11" ]; then - info "Synchronizing xserver tools..." && - install_yay_packages_if_needed xbindkeys && - xbindkeys --poll-rc || error -fi - install_gnome_extension(){ info "Install GNOME extension \"$1\"..." extension_folder="$HOME/.local/share/gnome-shell/extensions/$1/" diff --git a/scripts/data/make-home-cloud-compatible.sh b/scripts/data/make-home-cloud-compatible.sh new file mode 100644 index 0000000..3534cd5 --- /dev/null +++ b/scripts/data/make-home-cloud-compatible.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# This script syncronizes home folders with the cloud +# @param $1 clouddomain.tld +# +directories=("Documents" "Pictures" "Music" "Books" "Videos"); +for folder in "${directories[@]}"; do + home_directory="$HOME/$folder"; + cloud_directory="$HOME/Clouds/$1/$folder"; + if [ -L "$home_directory" ] + then + if [ "$(readlink -f "$home_directory")" == "$(realpath "$cloud_directory")" ] + then + "Folder $home_directory is allready symlinked with $cloud_directory. Skipped."; + else + "ERROR: Folder $home_directory links to a wrong target. Solve manually!" && exit 1; + fi + else + if [ -d "$cloud_directory" ] + then + mv --backup -v "$home_directory/"* "$cloud_directory/" && + rmdir -v "$home_directory" && + ln -vs "$cloud_directory" "$home_directory" && + echo "Folder $home_directory is now syncronized with cloud." || exit 1 + else + echo "Directory $home_directory skipped, because it doesn't exist here $cloud_directory." && + echo "Please create $cloud_directory or syncronize the cloud folder!"; + fi + fi +done