From bb2662e956bfcf8dffd1a9382a3f128878df7366 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Mon, 7 Oct 2019 08:58:21 +0200 Subject: [PATCH] Implemented key bindings via xbindkeys --- README.md | 13 +++++++++- scripts/base.sh | 1 + scripts/system-setup.sh | 13 ++++++---- templates/.xbindkeysrc | 53 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 templates/.xbindkeysrc diff --git a/README.md b/README.md index cb6f4d6..a88c0a6 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,20 @@ It's adapted to the needs of Kevin Veen-Birkenbach aka. Frantz. Feel free to mod ## Requirements This script is optimized for a [Manjaro Linux](https://manjaro.org) with [GNOME desktop](https://www.gnome.org/?). ## System +### Key Bindings +The following *Core System* specific key bindings exist: + +|Combination |Result | +|------------|-----------------| +|Ctrl+Alt+A |Opens Atom | +|Ctrl+Alt+E |Opens Eclipse | +|Ctrl+Alt+F |Opens Firefox | +|Ctrl+Alt+K |Opens KeePassXC | +|Ctrl+Alt+T |Opens a terminal | + ### User Data Right now the software expects that the *Core System Owner* has on all systems the same username. By executing the *import script* it automatic backups the application configuration data, ssh keys and other important data which is saved in well defined configuration files and folders. -#### Specific Folders +#### Folders Next to this the following specific folders exist: ##### $HOME/Documents/certificates/ Contains certificates to authenticate via [certificate based authentication](https://blog.couchbase.com/x-509-certificate-based-authentication/). diff --git a/scripts/base.sh b/scripts/base.sh index fd615dd..2fd6f96 100644 --- a/scripts/base.sh +++ b/scripts/base.sh @@ -10,3 +10,4 @@ DECRYPTED_PATH="$REPOSITORY_PATH/decrypted"; SCRIPT_PATH="$REPOSITORY_PATH/scripts"; DATA_PATH="$DECRYPTED_PATH/data"; BACKUP_PATH="$DECRYPTED_PATH/backup"; +TEMPLATE_PATH="$REPOSITORY_PATH/templates" diff --git a/scripts/system-setup.sh b/scripts/system-setup.sh index 3da439c..e96e4df 100644 --- a/scripts/system-setup.sh +++ b/scripts/system-setup.sh @@ -15,20 +15,23 @@ echo "Synchronizing administration tools..." sudo pacman --needed -S htop tree git base-devel yay make gcc cmake echo "Synchronizing security tools..." sudo pacman --needed -S ecryptfs-utils encfs keepassxc -echo "Setup SSH key" +echo "Setup SSH key..." ssh_key_path="$HOME/.ssh/id_rsa" if [ ! -f "$ssh_key_path" ]; then - echo "SSH key $ssh_key_path doesn't exists!" + echo "->SSH key $ssh_key_path doesn't exists!" if [ ! -f "./data$ssh_key_path" ]; then - echo "Importing ssh key from data..." + echo "->Importing ssh key from data..." bash ./scripts/export-data-to-system.sh else - echo "Generating ssh key" + echo "->Generating ssh key..." ssh-keygen -t rsa -b 4096 -C "$USER@$HOSTNAME" fi fi echo "Synchronizing gui tools..." -sudo pacman --needed -S gnome-shell-extensions +sudo pacman --needed -S gnome-shell-extensions xbindkeys +echo "->Setting up key bindings..." +cp -fv "$TEMPLATE_PATH/.xbindkeysrc" $HOME +xbindkeys --poll-rc echo "->Install NASA picture of the day GNOME extension..." git clone https://github.com/Elinvention/gnome-shell-extension-nasa-apod.git "$HOME/.local/share/gnome-shell/extensions/nasa_apod@elinvention.ovh" gnome-shell-extension-tool -e nasa_apod@elinvention.ovh diff --git a/templates/.xbindkeysrc b/templates/.xbindkeysrc new file mode 100644 index 0000000..04071dd --- /dev/null +++ b/templates/.xbindkeysrc @@ -0,0 +1,53 @@ +# 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