From b488a22b92dc0b365566c114df439181793426ae Mon Sep 17 00:00:00 2001 From: David Runge Date: Wed, 24 Nov 2021 21:46:35 +0100 Subject: zsh: Start sway-session on tty1 .zprofile: Remove custom less exports (they are better handled in aliases). When on tty1, start sway. --- .zprofile | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to '.zprofile') diff --git a/.zprofile b/.zprofile index 0d11dbd..3a4ed26 100644 --- a/.zprofile +++ b/.zprofile @@ -19,19 +19,6 @@ path=( $path ) -# -# Less -# - -# Set the default Less options. -# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). -# Remove -X and -F (exit if the content fits on one screen) to enable it. -export LESS='-F -g -i -M -R -S -w -X -z-4' - -# Set the Less input preprocessor. -if (( $+commands[lesspipe.sh] )); then - export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-' -fi # # Temporary Files @@ -50,3 +37,13 @@ TMPPREFIX="${TMPDIR%/}/zsh" if [[ ! -d "$TMPPREFIX" ]]; then mkdir -p "$TMPPREFIX" fi + + +[[ "$TTY" == /dev/tty* ]] || return 0 + +export $(systemctl --user show-environment) +if [[ -z $DISPLAY && "$TTY" == "/dev/tty1" ]]; then + systemd-cat -t sway sway + systemctl --user stop sway-session.target + systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK +fi -- cgit v1.2.3-54-g00ecf