From a9f9b352565eec79da7dcf74f48a0c1d75fcff1c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 29 Jul 2022 15:13:03 -0500 Subject: Add README and Makefile --- Makefile | 31 +++++++++++++++++++++++++++++++ README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 Makefile create mode 100644 README.md diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1153401 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +NAME = autoshart +DESC = autostart programs without a DE +LICENSE = Good Choices + +BIND = $(DESTDIR)$(PREFIX)/bin +BIN = $(BIND)/$(NAME) + +.PHONY: help install link uninstall + +help: + @echo "$(NAME) : $(DESCRIPTION)" + @echo "(C) 2021--2022 Case Duckworth " + @echo "Licensed under the $(LICENSE) license; see COPYING for details." + @echo + @echo "TARGETS:" + @echo " install Install $(NAME) to $(BIN)." + @echo " link Install $(NAME) using symlinks." + @echo " Probably only useful for development." + @echo " uninstall Uninstall $(NAME)-related files." + +$(BIND): + mkdir -p $@ + +install: $(NAME) + install -D $< $(BIND) + +link: $(NAME) $(BIND) + ln -sf $(PWD)/$(NAME) $(BIN) + +uninstall: + rm -rf $(BIN) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e868c83 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# autoshart +## auto-start .desktop files on login + +*dedicated to my friend m455* + +Autostart programs are a modern ... thingy. I'm not sure how I feel about em, +but many programs ship with an autostart `*.desktop` file in +`~/.config/autostart` or wherever. + +If you don't have a full-on DE, starting these programs can be a chore. [Other +programs](https://github.com/jceb/dex) have been written to address this, but +those are (A) in Python and (B) not by me. So here's my solution, in (I'm +pretty sure it's) POSIX sh. + +## usage + +``` +AUTOSHART: autostart without the shit +USAGE: autoshart -h +autoshart [-k] [-n] [-q] + +FLAGS: + -h Show this help and exit. + -k Kill all processes started by autoshart and exit. + -n Only print what would happen; don't execute anything. + -q Don't print any output. +``` + +Drop something like the following in your `~/.xinitrc`: + +``` +autostart -q +``` + +And if you have some kind of logout script, put this in it: + +``` +autostart -k +``` + +## installation + +This is just a shell script, so you can copy or link it to your `$PATH`. That's +what the provided `Makefile` does. + +## contributing + +Send me an [email](mailto:git+autoshart@acdw.net)! + +## license + +[Good Choices License](https://acdw.casa/gcl/). See COPYING for details. -- cgit 1.4.1-21-gabe81