mirror of
https://github.com/fairyglade/ly.git
synced 2026-03-25 09:46:06 +00:00
Add shell script showing how change TTY colors (#920)
## What are the changes about? What was discussed in !912 before I accidentally caused it to auto merge (still not sure how that happened). I assume this is what was meant when asking for it to be in the startup script commented out. ## What existing issue does this resolve? N/A ## Pre-requisites - [x] I have tested & confirmed the changes work locally Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/920 Reviewed-by: AnErrupTion <anerruption@disroot.org> Co-authored-by: hynak <hynak@noreply.codeberg.org> Co-committed-by: hynak <hynak@noreply.codeberg.org>
This commit is contained in:
@@ -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);
|
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 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 });
|
try installFile("res/example.dur", config_dir, ly_config_directory, "example.dur", .{ .override_mode = 0o755 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -337,8 +337,8 @@ sleep_cmd = null
|
|||||||
sleep_key = F3
|
sleep_key = F3
|
||||||
|
|
||||||
# Command executed when starting Ly (before the TTY is taken control of)
|
# Command executed when starting Ly (before the TTY is taken control of)
|
||||||
# If null, no command will be executed
|
# See file at path below for an example of changing the default TTY colors
|
||||||
start_cmd = null
|
start_cmd = $CONFIG_DIRECTORY/ly/startup.sh
|
||||||
|
|
||||||
# Center the session name.
|
# Center the session name.
|
||||||
text_in_center = false
|
text_in_center = false
|
||||||
|
|||||||
38
res/startup.sh
Normal file
38
res/startup.sh
Normal file
@@ -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
|
||||||
|
|
||||||
Reference in New Issue
Block a user