diff --git a/build.zig b/build.zig index 71508cf..d59d0d1 100644 --- a/build.zig +++ b/build.zig @@ -198,6 +198,8 @@ fn install_ly(allocator: std.mem.Allocator, patch_map: PatchMap, install_config: const patched_setup = try patchFile(allocator, "res/setup.sh", patch_map); try installText(patched_setup, config_dir, ly_config_directory, "setup.sh", .{ .mode = 0o755 }); + try installFile("res/startup.sh", config_dir, ly_config_directory, "startup.sh", .{ .override_mode = 0o755 }); + try installFile("res/example.dur", config_dir, ly_config_directory, "example.dur", .{ .override_mode = 0o755 }); } diff --git a/res/config.ini b/res/config.ini index cbebcde..f2793d4 100644 --- a/res/config.ini +++ b/res/config.ini @@ -337,8 +337,8 @@ sleep_cmd = null sleep_key = F3 # Command executed when starting Ly (before the TTY is taken control of) -# If null, no command will be executed -start_cmd = null +# See file at path below for an example of changing the default TTY colors +start_cmd = $CONFIG_DIRECTORY/ly/startup.sh # Center the session name. text_in_center = false diff --git a/res/startup.sh b/res/startup.sh new file mode 100644 index 0000000..6685403 --- /dev/null +++ b/res/startup.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# This file is executed when starting Ly (before the TTY is taken control of) +# Custom startup code can be placed in this file or the start_cmd var can be pointed to a different file + + +# Uncomment the example below for an example of changing the default TTY colors to an alternitive palette on linux +# Colors are in red/green/blue hex (the current colors are a brighter palette than default) +# +#if [ "$TERM" = "linux" ]; then +# declare -a colors=( +# [0]="232323" # black +# [1]="D75F5F" # dark red +# [2]="87AF5F" # dark green +# [3]="D7AF87" # dark yellow +# [4]="8787AF" # dark blue +# [5]="BD53A5" # dark magenta +# [6]="5FAFAF" # dark cyan +# [7]="E5E5E5" # light gray +# [8]="2B2B2B" # dark gray +# [9]="E33636" # red +# [10]="98E34D" # green +# [11]="FFD75F" # yellow +# [12]="7373C9" # blue +# [13]="D633B2" # magenta +# [14]="44C9C9" # cyan +# [15]="FFFFFF" # white +# ) +# +# control_palette_str="\e]P" +# +# for i in ${!colors[@]} +# do +# echo -en "${control_palette_str}$( printf "%x" ${i} )${colors[i]}" +# done +# +# clear # for fixing background artifacting after changing color +#fi +