From c15a393112e1b7ead683955148fa527c0d28160f Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 6 Feb 2020 22:21:15 +0000 Subject: [PATCH] Start lorri daemon in ~/.profile This does two things: 1. Starts lorri daemon 2. Moves ssh-agent and docker daemon startup calls to ~/.profile I'm still not entirely sure when ~/.profile is evaluated... I'd like to use systemd to startup and manage these background services, but I currently don't have a strong enough desire to do this. --- configs/shared/.profile | 25 +++++++++++++++---------- configs/shared/.xsessionrc.shared | 7 +------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configs/shared/.profile b/configs/shared/.profile index 30b980469..1ec3a33aa 100644 --- a/configs/shared/.profile +++ b/configs/shared/.profile @@ -3,6 +3,7 @@ # everytime a new shell is created. The ~/.profile, on the other hand, is # typically sourced only once at login. +# TODO: Consider getting rid of all of these variables and prefer using lorri. PATH+=":$HOME/bin" # personal PATH+=":$HOME/.local/bin" # personal PATH+=":$HOME/.cargo/bin" # Rust @@ -20,19 +21,13 @@ fi # Application preferences export BROWSER=google-chrome-stable -export TERMINAL=alacritty # temporary; change this back to `st` +export TERMINAL=alacritty export VISUAL=emacsclient export EDITOR=emacsclient export ALTERNATE_EDITOR=nvim # Rust integration. Keep here so programs like Emacs can read this value. -RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" -export RUST_SRC_PATH - -# TODO: Decide if clipmenu is compatible with EXWM. -# Ensure clipmenu uses rofi instead of dmenu -# TODO: Remove this after fully supporting Emacs client for clipmenu. -export CM_LAUNCHER=rofi +export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src" # Application configuration export FZF_DEFAULT_COMMAND='fd --hidden --follow --exclude ".git"' @@ -48,8 +43,13 @@ export XSECURELOCK_NO_COMPOSITE=1 # This fixes nixpkgs that rely on glibc-2.27, which allegedly breaks locale # issues. # See this thread for more details: https://github.com/NixOS/nixpkgs/issues/8398 -LOCALE_ARCHIVE=$(readlink ~/.nix-profile/lib/locale)/locale-archive -export LOCALE_ARCHIVE +export LOCALE_ARCHIVE="$(readlink ~/.nix-profile/lib/locale)/locale-archive" + +# Start ssh-agent +eval "$(ssh-agent -s)" + +# TODO: Prefer `systemctl start docker.service` +dockerd & # Set environment variables for Nix. Don't run this for systems running NixOS. # TODO: Learn why I can't use the variables from ~/briefcase/.envrc. @@ -58,3 +58,8 @@ case $(hostname) in seneca) . ~/.nix-profile/etc/profile.d/nix.sh;; wpcarro.c.googlers.com) . ~/.nix-profile/etc/profile.d/nix.sh;; esac + +# NOTE: `lorri` needs to be below the calls to source Nix environment since it's +# installed with `nix-env -iA nixpkgs.lorri`. +# Start lorri daemon +lorri daemon & diff --git a/configs/shared/.xsessionrc.shared b/configs/shared/.xsessionrc.shared index 4df221df6..d9c77e3b3 100644 --- a/configs/shared/.xsessionrc.shared +++ b/configs/shared/.xsessionrc.shared @@ -1,4 +1,5 @@ #!/bin/sh + # Might be unnecessary... . ~/.profile @@ -10,12 +11,6 @@ xsetroot -solid "#333333" # Set fallback cursor. xsetroot -cursor_name left_ptr -# Start ssh-agent -eval "$(ssh-agent -s)" - -# TODO: Prefer `systemctl start docker.service` -dockerd & - # start compton for shadows, transparency, fading, etc. # TODO: Consider starting this with `systemctl --user enable compton.service` compton &