Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .config/conky/conky-esp-config/.conky_esp32
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ conky.config = {
background = false,
double_buffer = true,
alignment = 'top_left',
gap_x = 300,
gap_y = 200,
gap_x = 680,
gap_y = 180,
minimum_width = 200, minimum_height = 50,
draw_outline = true,
draw_borders = false,
use_xft = true,
font = 'DejaVu Sans Mono:size=128',
font = 'Ubuntu Regular:size=28',
default_color = 'white',
default_outline_color = 'grey',
default_shade_color = 'black',
Expand All @@ -26,4 +26,5 @@ conky.config = {
conky.text = [[
${exec awk '{getline v < "/sys/class/power_supply/BAT0/voltage_now"; printf "%.1f W\n", v * $1 / 1000000000000}' /sys/class/power_supply/BAT0/current_now}
]];
-- ${execi 1 /home/ditrobotics/.config/conky/conky-esp-config/conky_esp32.sh} V

-- ${execi 1 /home/ditrobotics/.config/conky/conky-esp-config/conky_esp32.sh} V
18 changes: 1 addition & 17 deletions 00-pre-installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,23 +181,7 @@ flip_screen() {
# Restore user preference
restore_user_preference() {

# Restore firefox configuration
echo -e "\033[32mRestoring firefox user preference...\033[0m"
# You need to open firefox first to create the folder
read -p "Please open firefox first. Press [Enter] key to continue..."
find /home/ditrobotics/snap/firefox/common/.mozilla/firefox/ -type d -name "*.default" -exec cp -r /home/ditrobotics/DIT-Scripts/.mozilla/firefox/dit_config.default/* {} \;

# Restore desktop configuration
echo -e "\033[32mRestoring desktop user preference...\033[0m"
cp -r /home/ditrobotics/DIT-Scripts/desktop/* /home/ditrobotics/Desktop/

# Restore plymouth theme configuration
echo -e "\033[32mRestoring plymouth theme preference...\033[0m"
cp -r /home/ditrobotics/DIT-Scripts/system/plymouth-themes/abstract_ring_alt /usr/share/plymouth/themes/
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/abstract_ring_alt/abstract_ring_alt.plymouth 100
echo -e "\033[32mSelect the number for installed theme...\033[0m"
update-alternatives --config default.plymouth
update-initramfs -u
./15-user_preference.sh all

sleep 1
progress_bar $step $total_steps
Expand Down
64 changes: 64 additions & 0 deletions 15-user_preference.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash

# Check if the current user is root
if [ "$(id -u)" != "0" ]; then
echo -e "This script must be run as root. \nPlease run again with 'sudo $0'"
exit 1
fi

# Restore firefox configuration
restore_firefox() {
echo -e "\033[32mRestoring firefox user preference...\033[0m"
# You need to open firefox first to create the folder
read -p "Please open firefox first. Press [Enter] key to continue..."
find /home/ditrobotics/snap/firefox/common/.mozilla/firefox/ -type d -name "*.default" -exec cp -r /home/ditrobotics/DIT-Scripts/.mozilla/firefox/dit_config.default/* {} \;
}

# Restore desktop configuration
restore_desktop() {
echo -e "\033[32mRestoring desktop user preference...\033[0m"

cp -r /home/ditrobotics/DIT-Scripts/desktop/* /home/ditrobotics/Desktop/

if [ ! -d /home/share/scripts/ ]; then
mkdir -p /home/share/scripts/
fi
cp -r /home/ditrobotics/DIT-Scripts/share/scripts/* /home/share/scripts/

if [ ! -d /home/share/data/ ]; then
mkdir -p /home/share/data/
fi
cp -r /home/ditrobotics/DIT-Scripts/share/data/* /home/share/data/
}

# Restore plymouth theme configuration
restore_plymouth() {
echo -e "\033[32mRestoring plymouth theme preference...\033[0m"
cp -r /home/ditrobotics/DIT-Scripts/system/plymouth-themes/abstract_ring_alt /usr/share/plymouth/themes/
update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/abstract_ring_alt/abstract_ring_alt.plymouth 100
echo -e "\033[32mSelect the number for installed theme...\033[0m"
update-alternatives --config default.plymouth
update-initramfs -u
}

if [ "$1" == "all" ]; then
restore_firefox
restore_desktop
restore_plymouth
else
case "$1" in
firefox)
restore_firefox
;;
desktop)
restore_desktop
;;
plymouth)
restore_plymouth
;;
*)
echo "Usage: $0 {all|firefox|desktop|plymouth}"
exit 1
;;
esac
fi
2 changes: 1 addition & 1 deletion desktop/DIT.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=DIT Launcher
Exec=firefox http://localhost:5000
Exec=firefox http://localhost:8080/?ds=foxglove-websocket&ds.url=ws://192.168.50.11:8765
Icon=/home/ditrobotics/DIT-Scripts/dit/DIT_logo.png
Terminal=false
Comment=Launch DIT script
Expand Down
4 changes: 2 additions & 2 deletions desktop/localization.desktop → desktop/blue.desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=Application
Name=Localization
Exec=/bin/bash -c "/home/share/scripts/localization.run"
Name=Blue
Exec=/bin/bash -c "/home/share/scripts/blue.run"
Icon=utilities-terminal
Terminal=true
Comment=Launch DIT script
Expand Down
8 changes: 8 additions & 0 deletions desktop/nav.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Navigation
Exec=/bin/bash -c "/home/share/scripts/nav.run"
Icon=utilities-terminal
Terminal=true
Comment=Launch DIT script

8 changes: 8 additions & 0 deletions desktop/yellow.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Yellow
Exec=/bin/bash -c "/home/share/scripts/yellow.run"
Icon=utilities-terminal
Terminal=true
Comment=Launch DIT script

2 changes: 1 addition & 1 deletion share/data/voltage.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.5
00.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions share/scripts/nav.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Run a new session
tmux new-session -d -s eurobot-script-nav

# Run navigation
tmux send-keys -t 0 "echo 'ditrobotics' | sudo -S docker compose -p navigation-run -f /home/navigation/Eurobot-2025-machine-ws/src/Eurobot-2025-Navigation2-envs/Navigation2-humble-deploy/docker-compose.yaml up" C-m

# Attach to the session
tmux attach-session -d
12 changes: 12 additions & 0 deletions share/scripts/remove.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/bash

# Run a new session
tmux new-session -d -s eurobot-kill-script

# Remove localization
tmux send-keys -t 0 "echo 'ditrobotics' | sudo -S docker compose -p communication -f /home/localization/Eurobot-2025-Localization/docker/testBot/OdomComm/docker/yellow-compose.yml down" C-m
tmux send-keys -t 0 "echo 'ditrobotics' | sudo -S docker compose -p communication -f /home/localization/Eurobot-2025-Localization/docker/testBot/OdomComm/docker/blue-compose.yml down" C-m
# Remove navigation
tmux send-keys -t 0 "echo 'ditrobotics' | sudo -S docker compose -p navigation-run -f /home/navigation/Eurobot-2025-machine-ws/src/Eurobot-2025-Navigation2-envs/Navigation2-humble-deploy/docker-compose.yaml down" C-m

# Attach to the session
tmux attach-session -d

# Delete the tmux session
#tmux kill-session -t eurobot-script
tmux kill-server
10 changes: 10 additions & 0 deletions share/scripts/yellow.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Run a new session
tmux new-session -d -s eurobot-script

# Run localization
tmux send-keys -t 0 "echo 'ditrobotics' | sudo -S docker compose -p communication -f /home/localization/Eurobot-2025-Localization/docker/testBot/OdomComm/docker/yellow-compose.yml up" C-m

# Attach to the session
tmux attach-session -d