From 309179506338914c20517e13cbdbaa2a500954da Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 23 Jan 2021 08:18:33 +0100 Subject: [PATCH 1/5] Removed xbindkeys --- configuration/templates/home/.profile | 1 - configuration/templates/home/.xbindkeysrc | 62 ----------------------- scripts/client/setup.sh | 6 --- 3 files changed, 69 deletions(-) delete mode 100644 configuration/templates/home/.xbindkeysrc 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 f5f3cfc..a814aec 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/" From 50d5b43744237ebffae3dc531382dd9608c7703d Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 23 Jan 2021 08:20:02 +0100 Subject: [PATCH 2/5] Moved todo --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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. From df11df9f2521f7202548368276119ec751633b63 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 23 Jan 2021 10:53:09 +0100 Subject: [PATCH 3/5] created make-home-cloud-compatible.sh --- scripts/data/make-home-cloud-compatible.sh | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 scripts/data/make-home-cloud-compatible.sh diff --git a/scripts/data/make-home-cloud-compatible.sh b/scripts/data/make-home-cloud-compatible.sh new file mode 100644 index 0000000..035ab76 --- /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 -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!" && exit 1; + fi + fi +done From 7b583ef0dd5504cdd35efd60170dcc2815dece8e Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 23 Jan 2021 11:03:48 +0100 Subject: [PATCH 4/5] Added backup option --- scripts/data/make-home-cloud-compatible.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data/make-home-cloud-compatible.sh b/scripts/data/make-home-cloud-compatible.sh index 035ab76..883cfe5 100644 --- a/scripts/data/make-home-cloud-compatible.sh +++ b/scripts/data/make-home-cloud-compatible.sh @@ -18,7 +18,7 @@ for folder in "${directories[@]}"; do else if [ -d "$cloud_directory" ] then - mv -v "$home_directory/"* "$cloud_directory/" && + 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 From 73b99912ec5395e9253a3046cdd3ae0222ac9a9e Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Sat, 23 Jan 2021 11:08:19 +0100 Subject: [PATCH 5/5] Removed exit --- scripts/data/make-home-cloud-compatible.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data/make-home-cloud-compatible.sh b/scripts/data/make-home-cloud-compatible.sh index 883cfe5..3534cd5 100644 --- a/scripts/data/make-home-cloud-compatible.sh +++ b/scripts/data/make-home-cloud-compatible.sh @@ -24,7 +24,7 @@ for folder in "${directories[@]}"; do 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!" && exit 1; + echo "Please create $cloud_directory or syncronize the cloud folder!"; fi fi done