par_term_config/defaults/window.rs
1//! Default values for window and visual-appearance settings.
2
3/// Default terminal width in columns.
4pub fn cols() -> usize {
5 80
6}
7
8/// Default terminal height in rows.
9pub fn rows() -> usize {
10 24
11}
12
13/// Default window title string.
14pub fn window_title() -> String {
15 "par-term".to_string()
16}
17
18/// Default color theme identifier.
19pub fn theme() -> String {
20 "dark-background".to_string()
21}
22
23/// Default light color theme identifier.
24pub fn light_theme() -> String {
25 "light-background".to_string()
26}
27
28/// Default dark color theme identifier.
29pub fn dark_theme() -> String {
30 "dark-background".to_string()
31}
32
33/// Default screenshot file format (`"png"`, `"jpg"`, etc.).
34pub fn screenshot_format() -> String {
35 "png".to_string()
36}
37
38/// Default maximum render frames per second.
39pub fn max_fps() -> u32 {
40 60
41}
42
43/// Default window padding in pixels around the terminal content.
44pub fn window_padding() -> f32 {
45 1.0
46}
47
48/// Default window opacity (1.0 = fully opaque).
49pub fn window_opacity() -> f32 {
50 1.0 // Fully opaque by default
51}
52
53/// Default background image opacity (1.0 = fully opaque).
54pub fn background_image_opacity() -> f32 {
55 1.0 // Fully opaque by default
56}
57
58/// Default pane background darkening amount (0.0 = no darkening).
59pub fn pane_background_darken() -> f32 {
60 0.0 // No darkening by default
61}
62
63/// Default terminal background color as RGB bytes.
64pub fn background_color() -> [u8; 3] {
65 [30, 30, 30] // Dark gray
66}
67
68/// Default text opacity (1.0 = fully opaque).
69pub fn text_opacity() -> f32 {
70 1.0 // Fully opaque text by default
71}
72
73/// Default tab bar height in pixels.
74pub fn tab_bar_height() -> f32 {
75 28.0 // Default tab bar height in pixels
76}
77
78/// Default tab bar width in pixels (used when tab bar is in left/right position).
79pub fn tab_bar_width() -> f32 {
80 160.0 // Default tab bar width in pixels (for left position)
81}
82
83/// Default render FPS when the window is not focused.
84pub fn unfocused_fps() -> u32 {
85 30 // Reduced FPS when window is not focused
86}
87
88/// Default render FPS for inactive (non-visible) tabs.
89pub fn inactive_tab_fps() -> u32 {
90 2 // Very low FPS for inactive (non-visible) tabs - just enough for activity detection
91}
92
93/// Default opacity for inactive tabs (0.0–1.0).
94pub fn inactive_tab_opacity() -> f32 {
95 0.6 // Default opacity for inactive tabs (60%)
96}
97
98/// Default minimum tab width in pixels before tab bar scrolling activates.
99pub fn tab_min_width() -> f32 {
100 120.0 // Minimum tab width in pixels before scrolling kicks in
101}
102
103/// Default flag controlling whether tabs stretch to fill available bar width.
104pub fn tab_stretch_to_fill() -> bool {
105 true // Tabs stretch to share available width by default
106}
107
108/// Default flag enabling HTML rendering in tab titles.
109pub fn tab_html_titles() -> bool {
110 false // Render tab titles as plain text unless explicitly enabled
111}
112
113/// Default tab border width in pixels.
114pub fn tab_border_width() -> f32 {
115 1.0 // 1 pixel border
116}
117
118/// Default flag enabling cubemap sampling for shader channel 2.
119pub fn cubemap_enabled() -> bool {
120 true // Cubemap sampling enabled by default when a path is configured
121}
122
123/// Default flag enabling window size snapping to the terminal cell grid.
124pub fn snap_window_to_grid() -> bool {
125 true
126}
127
128/// Default flag controlling whether the background image is used as shader channel 0.
129pub fn use_background_as_channel0() -> bool {
130 false // By default, use configured channel0 texture, not background image
131}