diff --git a/dockerfiles/DevenvMelodic.Dockerfile b/dockerfiles/DevenvMelodic.Dockerfile index ca70dd8a39caff62fb3bf0f6ac209acfc19d0780..cabe0b532f50add694363a3ce4d019fe5c8624a4 100644 --- a/dockerfiles/DevenvMelodic.Dockerfile +++ b/dockerfiles/DevenvMelodic.Dockerfile @@ -1,5 +1,7 @@ FROM osrf/ros:melodic-desktop-full + ENV ROS_DISTRO melodic +ENV RUNNING_IN_DOCKER true # Avoid warnings by switching to noninteractive ENV DEBIAN_FRONTEND=noninteractive @@ -194,7 +196,9 @@ RUN apt-get update && apt-get install -y \ ros-melodic-interactive-marker-twist-server \ ros-melodic-industrial-core \ ros-melodic-lms1xx \ - ros-melodic-serial + ros-melodic-serial \ + ros-melodic-spacenav-node \ + spacenavd # Update final image RUN apt-get update && apt-get -y upgrade && apt-get -y autoremove diff --git a/dotfiles/.p10k.zsh b/dotfiles/.p10k.zsh index 3a99c7ac02c60915fa4f5c0a756a73803e35c395..477a4a3f0ae24e4142ab6d0a2d3d7d2f7585f987 100644 --- a/dotfiles/.p10k.zsh +++ b/dotfiles/.p10k.zsh @@ -1591,7 +1591,7 @@ # p10k segment -f 208 -i '⭐' -t '%n' #} function prompt_docker() { - if [[ -f /ros_entrypoint.sh ]]; then + if [[ -n $RUNNING_IN_DOCKER ]]; then p10k segment -f 226 -i $'\uF308' fi } diff --git a/dotfiles/docker.bash b/dotfiles/docker.bash index 484cbedbc11a4c5e541cb5f1d35221f10c8672bd..167813544a4ab978db1ab94f3dd8a384bed4ad27 100644 --- a/dotfiles/docker.bash +++ b/dotfiles/docker.bash @@ -45,15 +45,19 @@ function drma() { } function dat() { - docker exec -it melodic bash -c "cd ~/ros/melodic/$1 && bash" + docker exec -it melodic bash -c "cd ~/ros/melodic/$1 && $ext" +} + +function datmelodic() { + docker exec -it melodic bash -c "cd ~/ros/melodic/$1 && zsh" } function datnoetic() { - docker exec -it noetic bash + docker exec -it noetic -c "cd ~/ros/noetic/$1 && $ext" } function datkinetic() { - docker exec -it kinetic bash + docker exec -it kinetic -c "cd ~/ros/kinetic/$1 && $ext" } function runpythonsyntax(){ diff --git a/dotfiles/ros.bash b/dotfiles/ros.bash index a45dbd9faddcc4f1b1765b4bbcd55f1086091369..42b2b088d3975ded9df693969e6ce923e1091978 100644 --- a/dotfiles/ros.bash +++ b/dotfiles/ros.bash @@ -25,29 +25,32 @@ function sourcews(){ # Source the current workspace function sourcethis(){ - pwd_bck=${PWD} + pwd_st=${PWD} roshome && source ./devel/setup.${ext} && smon - cd ${pwd_bck} + cd ${pwd_st} } # Automatic catkin build function cb() { + pwd_cb=${PWD} + roshome catkin build --summarize "$@" sourcethis + cd ${pwd_cb} } # Clean workspace (delete the generated folders, then catkin build) function cbclean(){ - roshome && rm -rf build devel install && cb + roshome && rm -rf build devel install && catkin build --summarize } # Initialize catkin workspace, configure and build it function cib(){ - catkin init && catkin config --extend /opt/ros/${ROS_DISTRO} && cb + catkin init && catkin config --extend /opt/ros/${ROS_DISTRO} && catkin build --summarize } # If terminal starts in a ws, auto source it (useful for vscode) -pwd_bck=${PWD} +pwd_init=${PWD} cropped=${PWD#${HOME}/ros/${ROS_DISTRO}/} WS_name=${cropped%%/*} WS_path=${HOME}/ros/${ROS_DISTRO}/${WS_name} @@ -55,7 +58,7 @@ FILE=${WS_path}/devel/setup.${ext} if [[ -f $FILE ]]; then cd ${WS_path} source $FILE - cd ${pwd_bck} + cd ${pwd_init} else source /opt/ros/${ROS_DISTRO}/setup.${ext} fi diff --git a/dotfiles/terminator/config b/dotfiles/terminator/config index 0b86a0ad3501573f81e31f15f442b4172034dec5..5c0686c32e4805a3bd280680c0f7666180520ef3 100644 --- a/dotfiles/terminator/config +++ b/dotfiles/terminator/config @@ -12,7 +12,9 @@ cursor_color = "#aaaaaa" font = Hack Nerd Font Mono 12 show_titlebar = False + scrollbar_position = hidden scrollback_infinite = True + custom_command = byobu use_system_font = False copy_on_selection = True [layouts]