mirror of https://github.com/fairyglade/ly.git
Use config in `XDG_CONFIG_HOME`
Read config file from `$XDG_CONFIG_HOME/ly/config.ini` instead of `/etc/ly/config.ini`.
This commit is contained in:
parent
4ee2b3ecc7
commit
b77892938d
10
readme.md
10
readme.md
|
|
@ -121,7 +121,7 @@ $ make
|
||||||
# ln -s /etc/sv/ly /var/service/
|
# ln -s /etc/sv/ly /var/service/
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, ly will run on tty2. To change the tty it must be set in `/etc/ly/config.ini`
|
By default, ly will run on tty2. To change the tty it must be set in `~/.config/ly/config.ini`
|
||||||
|
|
||||||
You should as well disable your existing display manager service if needed, e.g.:
|
You should as well disable your existing display manager service if needed, e.g.:
|
||||||
|
|
||||||
|
|
@ -129,7 +129,7 @@ You should as well disable your existing display manager service if needed, e.g.
|
||||||
# rm /var/service/lxdm
|
# rm /var/service/lxdm
|
||||||
```
|
```
|
||||||
|
|
||||||
The agetty service for the tty console where you are running ly should be disabled. For instance, if you are running ly on tty2 (that's the default, check your `/etc/ly/config.ini`) you should disable the agetty-tty2 service like this:
|
The agetty service for the tty console where you are running ly should be disabled. For instance, if you are running ly on tty2 (that's the default, check your `~/.config/ly/.config.ini` or `/etc/ly/config.ini`) you should disable the agetty-tty2 service like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
# rm /var/service/agetty-tty2
|
# rm /var/service/agetty-tty2
|
||||||
|
|
@ -142,8 +142,8 @@ $ sudo pacman -S ly
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
You can find all the configuration in `/etc/ly/config.ini`.
|
You can find the default configuration in `/etc/ly/config.ini`. The file is commented, and includes the default values.
|
||||||
The file is commented, and includes the default values.
|
Copy it to `~/.config/ly/config.ini`.
|
||||||
|
|
||||||
## 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
|
||||||
|
|
@ -169,7 +169,7 @@ Take a look at your .xsession if X doesn't start, as it can interfere
|
||||||
|
|
||||||
## PSX DOOM fire animation
|
## PSX DOOM fire animation
|
||||||
To enable the famous PSX DOOM fire described by [Fabien Sanglard](http://fabiensanglard.net/doom_fire_psx/index.html),
|
To enable the famous PSX DOOM fire described by [Fabien Sanglard](http://fabiensanglard.net/doom_fire_psx/index.html),
|
||||||
just uncomment `animate = true` in `/etc/ly/config.ini`. You may also
|
just uncomment `animate = true` in `~/.config/ly/config.ini`. You may also
|
||||||
disable the main box borders with `hide_borders = true`.
|
disable the main box borders with `hide_borders = true`.
|
||||||
|
|
||||||
## Additional Information
|
## Additional Information
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Get the tty from the conf file
|
## Get the tty from the conf file
|
||||||
CONFTTY=$(cat /etc/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p')
|
CONFTTY=$(cat ~/.config/ly/config.ini | sed -n 's/^tty.*=[^1-9]*// p')
|
||||||
|
|
||||||
## The execution vars
|
## The execution vars
|
||||||
# If CONFTTY is empty then default to 2
|
# If CONFTTY is empty then default to 2
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,5 @@ fi
|
||||||
BAUD_RATE=38400
|
BAUD_RATE=38400
|
||||||
TERM_NAME=linux
|
TERM_NAME=linux
|
||||||
|
|
||||||
auxtty=$(/bin/cat /etc/ly/config.ini 2>/dev/null 1| /bin/sed -n 's/\(^[[:space:]]*tty[[:space:]]*=[[:space:]]*\)\([[:digit:]][[:digit:]]*\)\(.*\)/\2/p')
|
auxtty=$(/bin/cat ~/.config/ly/config.ini 2>/dev/null 1| /bin/sed -n 's/\(^[[:space:]]*tty[[:space:]]*=[[:space:]]*\)\([[:digit:]][[:digit:]]*\)\(.*\)/\2/p')
|
||||||
TTY=tty${auxtty:-2}
|
TTY=tty${auxtty:-2}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
#define INI_LANG DATADIR "/lang/%s.ini"
|
#define INI_LANG DATADIR "/lang/%s.ini"
|
||||||
#define INI_CONFIG "/etc/ly/config.ini"
|
#define INI_CONFIG strcat(getenv("HOME"), "/.config/ly/config.ni")
|
||||||
#else
|
#else
|
||||||
#define INI_LANG "../res/lang/%s.ini"
|
#define INI_LANG "../res/lang/%s.ini"
|
||||||
#define INI_CONFIG "../res/config.ini"
|
#define INI_CONFIG "../res/config.ini"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue