From 001ac0517a6956899160bd103e45f4f70cffad4c Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Thu, 30 Mar 2023 11:04:43 -0400 Subject: Setup repo and define em script Create bin stow repo and emacsclient helper script --- README.org | 25 +++++++++++++++++++++++++ em | 16 ++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 README.org create mode 100755 em diff --git a/README.org b/README.org new file mode 100644 index 0000000..36eaab0 --- /dev/null +++ b/README.org @@ -0,0 +1,25 @@ +* Custom Binary Files + +This is a place to stow ~/usr/local/bin~ programs/scripts. + +** TODO Installing programs + +I haven't set it up yet but LIKELY it's just: + +#+begin_src shell + $ stow . +#+end_src + +** Programs + +*** em + +~em~ is an ~emacsclient~ script that makes it easier to envoke ~emacsclient~ in the necessary states. ~nem~ is setup as a bash alias for ~emacsclient -nw~ but this file allows running as a GUI. + +This requires ~systemctl --user enable|start emacs~ or ~emacs --daemon~ to have been run. + +** LICENSE + +I've licensed all scripts under 0BSD here. Most of the scripts here are just bash scripts and other simple files that you should feel free to use. Attribute is nice but not needed. I can't guarantee any of these to /actually work/ outside of my systems - so take caution! + +View [[https://opensource.org/license/0bsd/][Zero Clause BSD License]] site. diff --git a/em b/em new file mode 100755 index 0000000..f4b2d44 --- /dev/null +++ b/em @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Run emacs as a GUI - creating a new frame + +## default file that can be configured as needed +DEFAULT_EMACS_FILE=~/.emacs.d/.default_file + +if [ $# -eq 0 ]; then + if [ -L $DEFAULT_EMACS_FILE ]; then + emacsclient -n -c $DEFAULT_EMACS_FILE + else + emacsclient -n -c + fi +else + emacsclient -n $@ +fi -- cgit v1.2.3-54-g00ecf