mirror of https://github.com/fairyglade/ly.git
removed config duplicate and added better defaults and documentation
This commit is contained in:
parent
ce56ce4313
commit
7557e0fae1
|
|
@ -60,7 +60,7 @@ force_update=1
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
All the configuration takes place in `/etc/ly/config.ini`.
|
All the configuration takes place in `/etc/ly/config.ini`.
|
||||||
A complete reference is available on the wiki.
|
The file is commented, and includes useful defaults.
|
||||||
|
|
||||||
### Controls
|
### Controls
|
||||||
Use the up and down arrow keys to change the current field, and the
|
Use the up and down arrow keys to change the current field, and the
|
||||||
|
|
@ -70,6 +70,8 @@ while on the desktop field (above the login field).
|
||||||
### Tips
|
### Tips
|
||||||
The numlock and capslock state is printed in the top-right corner.
|
The numlock and capslock state is printed in the top-right corner.
|
||||||
Use the F1 and F2 keys to respectively shutdown and reboot.
|
Use the F1 and F2 keys to respectively shutdown and reboot.
|
||||||
|
Take a look at your .xsession if X doesn't start, as it can interfere
|
||||||
|
(this filed is launched with X to configure the display properly).
|
||||||
|
|
||||||
### Additionnal informations
|
### Additionnal informations
|
||||||
The name "Ly" is a tribute to the fairy from the game Rayman.
|
The name "Ly" is a tribute to the fairy from the game Rayman.
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,67 @@
|
||||||
[box_main]
|
[box_main]
|
||||||
bg=0x000000
|
# spaces between border and content
|
||||||
fg=0x00ff00
|
#margin_box_main_h=2
|
||||||
margin_box_main_h=2
|
#margin_box_main_v=1
|
||||||
margin_box_main_v=1
|
|
||||||
input_len=34
|
# visible input characters limit
|
||||||
blank_box=1
|
#input_len=34
|
||||||
min_refresh_delta=10
|
|
||||||
force_update=1
|
# background and foreground truecolors
|
||||||
animate=1
|
#bg=0x000000
|
||||||
|
#fg=0xffffff
|
||||||
|
|
||||||
|
# total input characters limit - the values here are safe static defaults
|
||||||
|
# these are detected automatically if empty, though
|
||||||
|
#max_desktop_len=100
|
||||||
|
#max_login_len=255
|
||||||
|
#max_password_len=255
|
||||||
|
|
||||||
|
# animation stuff - the values here enable the example spiral
|
||||||
|
# event timeout in millis
|
||||||
|
#min_refresh_delta=10
|
||||||
|
# blank the background of the main box on update
|
||||||
|
#blank_box=1
|
||||||
|
# force update the screen on event timeout
|
||||||
|
#force_update=1
|
||||||
|
# use a background animation
|
||||||
|
#animate=1
|
||||||
|
|
||||||
|
# xsessions path
|
||||||
|
#xsessions=/usr/share/xsessions
|
||||||
|
|
||||||
|
# do not set this, pam requires it to be "login"
|
||||||
|
#service_name=login
|
||||||
|
|
||||||
|
#x_cmd=/usr/bin/X
|
||||||
|
#x_cmd_setup=/etc/ly/xsetup.sh
|
||||||
|
#mcookie_cmd=/usr/bin/mcookie
|
||||||
|
#xauthority=.lyxauth
|
||||||
|
#path=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/env
|
||||||
|
|
||||||
|
# shutdown is given parameters, do not use an alternative
|
||||||
|
# this is here only to allow you to change its location
|
||||||
|
#shutdown_cmd=/sbin/shutdown
|
||||||
|
|
||||||
|
# reflect this change in ly.service as well
|
||||||
|
#console_dev=/dev/console
|
||||||
|
#tty=2
|
||||||
|
|
||||||
|
# login and desktop environment fields persistence
|
||||||
save=1
|
save=1
|
||||||
load=1
|
load=1
|
||||||
|
#save_file=/etc/ly/ly.save
|
||||||
|
|
||||||
|
# if your screen resolution is not detected properly
|
||||||
|
# and the main box is not center, you can force it here
|
||||||
|
#custom_res=1
|
||||||
|
#res_width=100
|
||||||
|
#res_height=50
|
||||||
|
# also, if you endure an nvidia graphics card, this might help you
|
||||||
|
# https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks#Fixing_terminal_resolution
|
||||||
|
|
||||||
|
# x log visibility and output
|
||||||
hide_x=1
|
hide_x=1
|
||||||
|
#hide_x_save_log=/dev/null
|
||||||
|
|
||||||
|
# pour les compatriotes
|
||||||
|
#lang=fr
|
||||||
|
|
|
||||||
25
src/config.c
25
src/config.c
|
|
@ -369,10 +369,6 @@ int config_config_handler(void* user, const char* section, const char* name, con
|
||||||
{
|
{
|
||||||
cfg_dup(&config.service_name, value);
|
cfg_dup(&config.service_name, value);
|
||||||
}
|
}
|
||||||
else if (strcmp(name, "tty_id") == 0)
|
|
||||||
{
|
|
||||||
config.tty_id = abs(atoi(value));
|
|
||||||
}
|
|
||||||
else if (strcmp(name, "x_cmd") == 0)
|
else if (strcmp(name, "x_cmd") == 0)
|
||||||
{
|
{
|
||||||
cfg_dup(&config.x_cmd, value);
|
cfg_dup(&config.x_cmd, value);
|
||||||
|
|
@ -508,23 +504,6 @@ void config_config_patch()
|
||||||
{
|
{
|
||||||
config.min_refresh_delta = 1000;
|
config.min_refresh_delta = 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// commenting theses because the defaults are 0
|
|
||||||
//#if 0
|
|
||||||
if (config.blank_box == 0)
|
|
||||||
{
|
|
||||||
config.blank_box = false;
|
|
||||||
}
|
|
||||||
if (config.force_update == 0)
|
|
||||||
{
|
|
||||||
config.force_update = false;
|
|
||||||
}
|
|
||||||
if (config.animate == 0)
|
|
||||||
{
|
|
||||||
config.animate = 0;
|
|
||||||
}
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
if (config.xsessions == 0)
|
if (config.xsessions == 0)
|
||||||
{
|
{
|
||||||
config.xsessions = strdup("/usr/share/xsessions");
|
config.xsessions = strdup("/usr/share/xsessions");
|
||||||
|
|
@ -533,10 +512,6 @@ void config_config_patch()
|
||||||
{
|
{
|
||||||
config.service_name = strdup("login");
|
config.service_name = strdup("login");
|
||||||
}
|
}
|
||||||
if (config.tty_id == 0)
|
|
||||||
{
|
|
||||||
config.tty_id = 2;
|
|
||||||
}
|
|
||||||
if (config.x_cmd == 0)
|
if (config.x_cmd == 0)
|
||||||
{
|
{
|
||||||
config.x_cmd = strdup("/usr/bin/X");
|
config.x_cmd = strdup("/usr/bin/X");
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@ struct config
|
||||||
u16 animate;
|
u16 animate;
|
||||||
char* xsessions;
|
char* xsessions;
|
||||||
char* service_name;
|
char* service_name;
|
||||||
u16 tty_id;
|
|
||||||
char* x_cmd;
|
char* x_cmd;
|
||||||
char* x_cmd_setup;
|
char* x_cmd_setup;
|
||||||
char* mcookie_cmd;
|
char* mcookie_cmd;
|
||||||
|
|
|
||||||
|
|
@ -273,8 +273,8 @@ enum err login_desktop(struct desktop* desktop,
|
||||||
|
|
||||||
display_id = get_free_display();
|
display_id = get_free_display();
|
||||||
snprintf(display_name, sizeof(display_name), ":%d", display_id);
|
snprintf(display_name, sizeof(display_name), ":%d", display_id);
|
||||||
snprintf(tty_id, sizeof(tty_id), "%d", config.tty_id);
|
snprintf(tty_id, sizeof(tty_id), "%d", config.tty);
|
||||||
snprintf(vt, sizeof(vt), "vt%d", config.tty_id);
|
snprintf(vt, sizeof(vt), "vt%d", config.tty);
|
||||||
|
|
||||||
// starting pam transations
|
// starting pam transations
|
||||||
pam_result = pam_start(config.service_name, login->text, &conv, &handle);
|
pam_result = pam_start(config.service_name, login->text, &conv, &handle);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue