diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b18f6a..ea2606a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.1] - 2020-05-30 +### Added +- Add profile.sh for installation in /etc/profile.d/stdm.sh + ## [0.1.0] - 2020-05-13 ### Added - Initial release diff --git a/Cargo.toml b/Cargo.toml index 4c8f3d5..e828310 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stdm" -version = "0.1.0" +version = "0.1.1" authors = ["Jan Christian Grünhage "] edition = "2018" description = "A simple terminal display manager" diff --git a/README.md b/README.md index 395cbe1..11afe1e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # STDM -STDM is a simple terminal display manager. It's inspired by cdm, but way simpler. -Right now it can only start Wayland sessions, and apparently only some of those too. -I might extend it to do more myself, but I use it for starting sway, and that works. +STDM is a simple terminal display manager. It's inspired by cdm, but way +simpler. Right now it can only start Wayland sessions, and apparently only some +of those too. I might extend it to do more myself, but I use it for starting +sway, and that works. ## Installation @@ -10,12 +11,12 @@ Install it with `cargo` like any old rust project ## Usage -Run it, done. Running it automatically is left as an exercise for the reader. -A profile.d file will be provided in the future, for now go check on -[cdm's profile.sh](https://github.com/evertiro/cdm/blob/master/src/profile.sh). +Put the `contrib/profile.sh` file into `/etc/profile.d/` as `stdm.sh`. This +starts stdm automatically when logging in on `tty1`. ## Contributing -Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. +Pull requests are welcome. For major changes, please open an issue first to +discuss what you would like to change. Please make sure to update tests as appropriate. diff --git a/contrib/profile.sh b/contrib/profile.sh new file mode 100644 index 0000000..d16291f --- /dev/null +++ b/contrib/profile.sh @@ -0,0 +1,8 @@ +# To avoid potential situation where cdm(1) crashes on every TTY, here we +# default to execute cdm(1) on tty1 only, and leave other TTYs untouched. +if [[ "$(tty)" == '/dev/tty1' ]]; then + [[ -n "$STDM_SPAWN" ]] && return + # Avoid executing cdm(1) when X11 has already been started. + STDM_SPAWN=true exec stdm +fi +