dartokloning

dartokloning / Synth-Shell

Last active 1 week ago

Like 0

Customization of synth-shell for personal use

dartokloning revised this gist 1 month ago · 33d773f

1 file changed, 52 insertions, 1 deletion

shell-prompt.sh
@@ -272,6 +272,53 @@ font_color_input="45"
272 272 background_input="none"
273 273 texteffect_input="bold"
274 274
275 + ##==============================================================================
276 + ## ROOT WARNING PALETTE
277 + ##==============================================================================
278 + # Jika shell berjalan sebagai root, pertahankan layout/informasi prompt,
279 + # tetapi gunakan warna warning agar sesi privileged langsung terlihat.
280 + if [ "${EUID:-$(id -u)}" -eq 0 ]; then
281 + font_color_user="white"
282 + background_user="red"
283 + texteffect_user="bold"
284 +
285 + font_color_host="white"
286 + background_host="light-red"
287 + texteffect_host="bold"
288 +
289 + font_color_pwd="black"
290 + background_pwd="yellow"
291 + texteffect_pwd="bold"
292 +
293 + font_color_git="white"
294 + background_git="red"
295 + texteffect_git="bold"
296 +
297 + font_color_pyenv="white"
298 + background_pyenv="light-red"
299 + texteffect_pyenv="bold"
300 +
301 + font_color_kube="black"
302 + background_kube="light-yellow"
303 + texteffect_kube="bold"
304 +
305 + font_color_tf="white"
306 + background_tf="red"
307 + texteffect_tf="bold"
308 +
309 + font_color_date="white"
310 + background_date="light-red"
311 + texteffect_date="bold"
312 +
313 + font_color_clock="white"
314 + background_clock="red"
315 + texteffect_clock="bold"
316 +
317 + font_color_input="light-red"
318 + background_input="none"
319 + texteffect_input="bold"
320 + fi
321 +
275 322 ##==============================================================================
276 323 ## EXTERNAL DEPENDENCIES
277 324 ##==============================================================================
@@ -590,7 +637,11 @@ prompt_command_hook()
590 637 local new_line_link_top="╭"
591 638 local new_line_link_bottom="╰>"
592 639 local prompt_command_separation="\n"
593 - local bash_symbol="\$"
640 + if [ "${EUID:-$(id -u)}" -eq 0 ]; then
641 + local bash_symbol="#"
642 + else
643 + local bash_symbol="\$"
644 + fi
594 645 else
595 646 local new_line_link_top=""
596 647 local new_line_link_bottom=""

dartokloning revised this gist 2 months ago · 46f5433

1 file changed, 330 insertions, 394 deletions

shell-prompt.sh

Diff is too large to be shown

dartokloning revised this gist 2 years ago · d747ee2

1 file changed, 3 insertions, 3 deletions

shell-prompt.sh
@@ -262,8 +262,8 @@ enable_command_on_new_line=true # Add new line between prompt and command
262 262 ##==============================================================================
263 263 ## USER
264 264 ##==============================================================================
265 - font_color_user="white"
266 - background_user="blue"
265 + font_color_user="black"
266 + background_user="green"
267 267 texteffect_user="bold"
268 268 ##==============================================================================
269 269 ## HOST
@@ -316,7 +316,7 @@ texteffect_tf="bold"
316 316 ## CLOCK
317 317 ##==============================================================================
318 318 font_color_clock="white"
319 - background_clock="light-blue"
319 + background_clock="black"
320 320 texteffect_clock="bold"
321 321 clock_format="%H:%M:%S"
322 322 ##==============================================================================

dartokloning revised this gist 2 years ago · b94d98f

1 file changed, 722 insertions

shell-prompt.sh (file created)

Diff is too large to be shown