From 9b5bc2806beae1fd9754d44134a594d502e4e81d Mon Sep 17 00:00:00 2001
From: Andres Montano <andres.montano@tecnalia.com>
Date: Thu, 16 Jun 2022 11:17:03 +0200
Subject: [PATCH] Update dotfiles

---
 dotfiles/ros.bash          | 25 ++++++++++++++++++++-----
 dotfiles/terminator/config | 26 ++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 5 deletions(-)
 create mode 100644 dotfiles/terminator/config

diff --git a/dotfiles/ros.bash b/dotfiles/ros.bash
index 9c0b746..7e25f21 100644
--- a/dotfiles/ros.bash
+++ b/dotfiles/ros.bash
@@ -1,29 +1,44 @@
 ###################################################################
-# ROS
+# ROS aliases and functions
 ###################################################################
 
+# Define ROS_DISTRO before source ROS
 if [ -z $ROS_DISTRO ]; then export ROS_DISTRO=noetic; fi
 
+# Determine shell extension
 if [ -z $SHELL ]; then echo "SHELL not set"; else ext=$(basename ${SHELL}); fi
 
 # Source rosmon
 function smon(){
-	source /opt/ros/${ROS_DISTRO}/etc/catkin/profile.d/50-rosmon.${ext}
+    source /opt/ros/${ROS_DISTRO}/etc/catkin/profile.d/50-rosmon.${ext}
+}
+
+# cd to the root of the workspace
+function roshome(){
+    roscd && cd ..
+}
+
+# Source the current workspace
+function sourcews(){
+    source ./devel/setup.${ext} && smon
 }
 
 # Source the current workspace
 function sourcethis(){
-	source ./devel/setup.${ext} && smon
+    roshome && source ./devel/setup.${ext} && smon
 }
 
 # Automatic catkin build
 function cb() {
-  catkin build --summarize "$@"
+    pwd_bck=${PWD}
+    catkin build --summarize "$@"
+    sourcethis()
+    cd ${pwd_bck}
 }
 
 # Clean workspace (delete the generated folders, then catkin build)
 function cbclean(){
-	roscd && cd .. && rm -rf build devel install && cb
+    roshome && rm -rf build devel install && cb
 }
 
 function cib(){
diff --git a/dotfiles/terminator/config b/dotfiles/terminator/config
new file mode 100644
index 0000000..0b86a0a
--- /dev/null
+++ b/dotfiles/terminator/config
@@ -0,0 +1,26 @@
+[global_config]
+  window_state = maximise
+  borderless = True
+  tab_position = hidden
+  title_hide_sizetext = True
+  title_use_system_font = False
+  title_font = Hack NF Bold 12
+[keybindings]
+[profiles]
+  [[default]]
+    cursor_shape = ibeam
+    cursor_color = "#aaaaaa"
+    font = Hack Nerd Font Mono 12
+    show_titlebar = False
+    scrollback_infinite = True
+    use_system_font = False
+    copy_on_selection = True
+[layouts]
+  [[default]]
+    [[[window0]]]
+      type = Window
+      parent = ""
+    [[[child1]]]
+      type = Terminal
+      parent = window0
+[plugins]
-- 
GitLab