Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make xinitrc path configurable #393

Merged
merged 2 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions res/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
# xorg server command
#x_cmd = /usr/bin/X

# xinitrc
#xinitrc = ~/.xinitrc

# xorg setup command
#x_cmd_setup = /etc/ly/xsetup.sh

Expand Down
3 changes: 3 additions & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ void config_load(const char *cfg_path)
{"wayland_specifier", &config.wayland_specifier, config_handle_bool},
{"waylandsessions", &config.waylandsessions, config_handle_str},
{"x_cmd", &config.x_cmd, config_handle_str},
{"xinitrc", &config.xinitrc, config_handle_str},
{"x_cmd_setup", &config.x_cmd_setup, config_handle_str},
{"xauth_cmd", &config.xauth_cmd, config_handle_str},
{"xsessions", &config.xsessions, config_handle_str},
Expand Down Expand Up @@ -296,6 +297,7 @@ void config_defaults()
config.wayland_specifier = false;
config.waylandsessions = strdup("/usr/share/wayland-sessions");
config.x_cmd = strdup("/usr/bin/X");
config.xinitrc = strdup("~/.xinitrc");
config.x_cmd_setup = strdup(DATADIR "/xsetup.sh");
config.xauth_cmd = strdup("/usr/bin/xauth");
config.xsessions = strdup("/usr/share/xsessions");
Expand Down Expand Up @@ -364,6 +366,7 @@ void config_free()
free(config.wayland_cmd);
free(config.waylandsessions);
free(config.x_cmd);
free(config.xinitrc);
free(config.x_cmd_setup);
free(config.xauth_cmd);
free(config.xsessions);
Expand Down
1 change: 1 addition & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ struct config
bool wayland_specifier;
char* waylandsessions;
char* x_cmd;
char* xinitrc;
char* x_cmd_setup;
char* xauth_cmd;
char* xsessions;
Expand Down
2 changes: 1 addition & 1 deletion src/inputs.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void input_desktop(struct desktop* target)
target->len = 0;

input_desktop_add(target, strdup(lang.shell), strdup(""), DS_SHELL);
input_desktop_add(target, strdup(lang.xinitrc), strdup("~/.xinitrc"), DS_XINITRC);
input_desktop_add(target, strdup(lang.xinitrc), strdup(config.xinitrc), DS_XINITRC);
#if 0
input_desktop_add(target, strdup(lang.wayland), strdup(""), DS_WAYLAND);
#endif
Expand Down