Преглед на файлове

Support 256 colours in the terminal

Bob Mottram преди 7 години
родител
ревизия
d551818ff0
променени са 1 файла, в които са добавени 15 реда и са изтрити 0 реда
  1. 15
    0
      src/freedombone-utils-setup

+ 15
- 0
src/freedombone-utils-setup Целия файл

@@ -85,6 +85,18 @@ CHECK_MESSAGE="Check your internet connection, /etc/network/interfaces and /etc/
85 85
 # Default diffie-hellman key length in bits
86 86
 DH_KEYLENGTH=2048
87 87
 
88
+function support_256_colours {
89
+    if ! grep 'xterm-256color' /etc/skel/.profile; then
90
+        echo '' >> /etc/skel/.profile
91
+        echo 'export TERM=xterm-256color' >> /etc/skel/.profile
92
+    fi
93
+
94
+    if ! grep 'xterm-256color' /home/$MY_USERNAME/.profile; then
95
+        echo '' >> /home/$MY_USERNAME/.profile
96
+        echo 'export TERM=xterm-256color' >> /home/$MY_USERNAME/.profile
97
+    fi
98
+}
99
+
88 100
 function detect_usb_drive {
89 101
     # sets to the highest available drive letter
90 102
     # which is likely to be the last drive connected
@@ -679,6 +691,9 @@ function setup_utils {
679 691
     function_check remove_management_engine_interface
680 692
     remove_management_engine_interface
681 693
 
694
+    function_check support_256_colours
695
+    support_256_colours
696
+
682 697
     function_check enable_predictable_device_names
683 698
     enable_predictable_device_names
684 699