From d638f631f4f03a7b359a4c12d7d679602c8d733a Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 18 Jan 2024 20:20:20 +0100 Subject: config --- c_exec.go | 3 +++ c_hardflip.go | 2 +- conf/config.sample.yml | 13 +++++++++++++ config.sample.yml | 0 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 conf/config.sample.yml delete mode 100644 config.sample.yml diff --git a/c_exec.go b/c_exec.go index da97346..407c0f7 100644 --- a/c_exec.go +++ b/c_exec.go @@ -147,6 +147,9 @@ func c_format_cmd(host *HostNode, term string) { c_die("type not found", nil) } if len(term) > 0 { + if term == "$TERMINAL" { + term = os.Getenv("TERMINAL") + } cmd_fmt = append([]string{term, "-e"}, cmd_fmt...) } c_exec_cmd(cmd_fmt) diff --git a/c_hardflip.go b/c_hardflip.go index ac73658..73b19bc 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -63,7 +63,7 @@ type HardData struct { func main() { data_dir := c_get_data_dir() - opts := HardOpts{true, true, false, "alacritty"} + opts := HardOpts{true, true, false, "$TERMINAL"} ldirs := c_load_data_dir(data_dir, opts) litems := c_load_litems(ldirs) data := HardData{ diff --git a/conf/config.sample.yml b/conf/config.sample.yml new file mode 100644 index 0000000..b711d45 --- /dev/null +++ b/conf/config.sample.yml @@ -0,0 +1,13 @@ +# straight forward +icons: true + +# keeps going after a successful login +loop: true + +# displays the percentage in the bottom right +percent: false + +# if set, will open your command in the specified terminal emulator. +# will handle the env variable $TERMINAL if set to this. if commented or unset, +# the command will replace hardflip +#terminal: alacritty diff --git a/config.sample.yml b/config.sample.yml deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3