aboutsummaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2021-11-24 21:46:35 +0100
committerDavid Runge <dave@sleepmap.de>2021-11-24 21:46:35 +0100
commitb488a22b92dc0b365566c114df439181793426ae (patch)
tree3897b473a59d94ed1574d9cdf3fcd26e12beae8f /.zprofile
parent2b9d126c4789dc1d0341d94ef4e46bab9ee58e23 (diff)
downloaddotfiles-b488a22b92dc0b365566c114df439181793426ae.tar.gz
dotfiles-b488a22b92dc0b365566c114df439181793426ae.tar.bz2
dotfiles-b488a22b92dc0b365566c114df439181793426ae.tar.xz
dotfiles-b488a22b92dc0b365566c114df439181793426ae.zip
zsh: Start sway-session on tty1
.zprofile: Remove custom less exports (they are better handled in aliases). When on tty1, start sway.
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile23
1 files changed, 10 insertions, 13 deletions
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