From 2fd7c770982960aeb0f4344a12012fb3af1e913f Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Fri, 4 Dec 2020 14:50:50 +0100 Subject: [PATCH] run x as a service --- services/x/env/HOME | 1 + services/x/env/SHELL | 1 + services/x/env/TERM | 1 + services/x/log/run | 4 ++++ services/x/run | 31 +++++++++++++++++++++++++++++++ 5 files changed, 38 insertions(+) create mode 100644 services/x/env/HOME create mode 100644 services/x/env/SHELL create mode 100644 services/x/env/TERM create mode 100755 services/x/log/run create mode 100755 services/x/run diff --git a/services/x/env/HOME b/services/x/env/HOME new file mode 100644 index 0000000..963a47f --- /dev/null +++ b/services/x/env/HOME @@ -0,0 +1 @@ +/home/ninewise diff --git a/services/x/env/SHELL b/services/x/env/SHELL new file mode 100644 index 0000000..69699df --- /dev/null +++ b/services/x/env/SHELL @@ -0,0 +1 @@ +/bin/yash diff --git a/services/x/env/TERM b/services/x/env/TERM new file mode 100644 index 0000000..a08e1f3 --- /dev/null +++ b/services/x/env/TERM @@ -0,0 +1 @@ +linux diff --git a/services/x/log/run b/services/x/log/run new file mode 100755 index 0000000..1e80400 --- /dev/null +++ b/services/x/log/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec vlogger -t ninewise-x +#[ -d /var/log/ninewise/x ] || mkdir /var/log/ninewise/x +#exec svlogd -tt /var/log/ninewise/x diff --git a/services/x/run b/services/x/run new file mode 100755 index 0000000..d1c0a2a --- /dev/null +++ b/services/x/run @@ -0,0 +1,31 @@ +#!/bin/sh +cd "$HOME" + +# XDG dirs +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_RUNTIME_DIR="/tmp/runtime-$(whoami)" +mkdir -p "$XDG_RUNTIME_DIR" +chmod 0700 "$XDG_RUNTIME_DIR" +export XDG_DOWNLOAD_DIR="/tmp" + +# Local scripts +export CABAL_HOME="$HOME/.cabal" +export CARGO_HOME="$HOME/.cargo" +export RBENV_HOME="$HOME/.rbenv" +export JAVA_HOME="/usr/lib/jvm/openjdk11/" +export TEX_BIN="/opt/texlive/2019/bin/x86_64-linux/" +export PATH="$HOME/.local/bin:$CABAL_HOME/bin:$RBENV_HOME/shims:$CARGO_HOME/bin:$JAVA_HOME/bin:$TEX_BIN:$PATH" + +# Environmental settings +export ESCDELAY=50 # for dvtm e.a. +export EDITOR="vis" +export LEDGER_FILE="/data/documents/ledger/all.journal" +export LESSHISTFILE=- +export FZF_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || rg --files) 2> /dev/null' +export SKIM_DEFAULT_COMMAND='(git ls-files -co --exclude-standard || rg --files) 2> /dev/null' +export LC_ALL=en_US.utf8 +export TERMINAL=st + +exec xinit 2>&1