firestarter/README.md

85 lines
4.5 KiB
Markdown
Raw Normal View History

2019-05-21 20:03:18 -05:00
# ![firestarter icon](icon.png) Firestarter
2019-04-27 00:01:25 -05:00
## Overview
2020-06-07 08:13:14 -05:00
**Firestarter** is a desktop environment startup script/service manager. Its job is to abstract out the startup and configuration of basic X session components. It will attempt to piece together a fully functional desktop environment based on currently available programs and configuration files found in `~/.config/firestarter`.
2019-04-27 00:01:25 -05:00
## Installation
2020-06-07 08:13:14 -05:00
Execute `firestarter` in your `.xinitrc`, ideally by `exec`ing it after performing your own basic setup.
2019-04-27 00:01:25 -05:00
2020-06-07 08:13:14 -05:00
Additionally, you will need to configure Firestarter. See the section below on how to do that.
2019-06-22 02:01:24 -05:00
2020-06-07 08:13:14 -05:00
Lastly, make sure you're not executing a bunch of stuff from your WM's config. Firestarter will handle the startup of bars, Pulse, etc. by itself. Double-executing will just cause more problems.
2019-06-22 02:01:24 -05:00
2019-04-27 00:01:25 -05:00
## Configuration
In the `contrib` directory of this repository is a series of example configuration files. These files consist of several lines that look somewhat like the following:
2019-04-27 00:01:25 -05:00
2019-06-21 19:57:35 -05:00
```bash
2019-06-22 01:53:32 -05:00
#.fsdefaults
2019-06-21 19:57:35 -05:00
command -v i3
i3
2019-06-22 01:53:32 -05:00
command -v openbox
openbox
2019-06-21 19:57:35 -05:00
```
2019-04-27 00:01:25 -05:00
2019-06-22 01:53:32 -05:00
Every first uncommented line is a "check" command that must succeed in order for the following "target" line to be executed. Once a target command is selected, parsing stops and the target is executed. When Firestarter is invoked with no arguments, any file with a first line of `#.fsdefaults` is parsed this way.
2019-06-22 01:53:32 -05:00
Any file that does *not* have the initial "crunchdot" is executed normally. You can keep shell scripts or symlinks in here and they will be executed without issue.
2019-04-27 00:01:25 -05:00
After all these programs have been started, firestarter executes `~/.firestarterrc` if it exists and then starts XDG autostart applications.
2019-06-21 19:23:42 -05:00
## Logging
2019-06-21 16:39:11 -05:00
All STDOUT and STDERR messages from these commands are saved to a logfile in `~/.local/share/firestarter/logs` under the same name as the configuration file. By default, these logfiles are rotated every time you log in.
2019-06-21 19:31:00 -05:00
## Integration
2019-06-22 02:22:36 -05:00
Firestarter, in addition to spawning the programs in the default configs, also integrates with the following utilities, should the requirements be installed:
* `$PATH`: `~/.bin` and `~/.local/bin` are added to `$PATH` at the lowest priority.
2019-06-21 19:31:00 -05:00
* dbus: A dbus socket is either created or hooked into, depending on the environment, and the relevant variables are exposed to child processes.
2019-06-21 22:34:56 -05:00
* loginctl: When firestarter dies, loginctl will be called to eliminate the remainder of the session. If loginctl is not available, firestarter will kill off *only* the processes that it spawned.
2019-06-21 19:31:00 -05:00
2019-06-21 19:50:16 -05:00
* Plasma: If `kcminit` is installed, it will be invoked to configure device and theme settings. When this is the case, `XDG_CURRENT_DESKTOP` is changed to `KDE` in order for themes to actually take.
2019-06-21 19:31:00 -05:00
* Qt5ct: Assuming Plasma is *not* installed, qt5ct will be used as a fallback for Qt theming.
2019-06-21 22:34:56 -05:00
* xhost: Firestarter will open up the current session to other sessions by your user, allowing you to open a TTY and spawn your WM back in if you have to.
2019-06-21 19:31:00 -05:00
* xrdb: Xresources are loaded in.
2019-06-21 19:31:00 -05:00
* xset: Firestarter will disable that annoying goddamn X bell. Re-enable it in `.firestarterrc` if you enjoy pain.
2019-06-21 19:23:42 -05:00
## Exit Codes
| code | meaning |
| --: | --- |
| 0 | Success |
| 40 | Firestarter is already running |
| 50 | Unrecognized argument |
| 51 | Invalid option for an argument |
| 52 | Failed to create configuration directory |
2020-05-15 03:24:47 -05:00
| 53 | Failed to create logging directory |
| 54 | `HOME` does not exist or is unreadable |
2020-07-08 00:33:21 -05:00
| 55 | Firestarter is already running |
2020-08-08 02:46:59 -05:00
| 56 | Firestarter is not running |
2020-06-07 08:01:46 -05:00
| 70 | No configuration files available |
## Idiosyncracies
2019-06-21 22:34:56 -05:00
* The `wm` config file is special; if it exists and a target can be found for it, firestarter will watch the `_NET_WM_NAME` atom on the root window, waiting for it to initialize before starting XDG autostarts. This prevents applications from being started before the WM is ready to manage them. You can disable this by setting `FS_NOWAITWM`.
2019-06-22 02:37:19 -05:00
* In addition to this, setting the `FS_DIEONWM` variable makes firestarter automatically end the session if the WM were to die for any reason. This requires that the target be a simple invocation of the WM; `TERMINAL=urxvt i3` will not work.
2019-04-27 00:01:25 -05:00
## Contribution
Firestarter by no means contains an exhaustive list of all possible programs. If you know of or have created a program that should be added, *please* open an issue about it. The script should be light but its choices massive.
2019-06-19 07:47:32 -05:00
Bug reports are also more than welcome.
2020-05-15 03:24:47 -05:00
If you can't reach me on this instance, feel free to reach out via email. It's listed in the header of the script.