config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit db84d3f678bb5da6b2eda0241f384eb1d7884759
parent 73c275b3d9102355678eeae970946425b4b694f9
Author: jacob@nzxt <jacobouno@protonmail.com>
Date:   Sun,  1 Mar 2020 16:51:23 -0800

added ssh detection, its not perfect and its ugly but ill fix it later

Diffstat:
Mprofile/.profile | 26++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/profile/.profile b/profile/.profile @@ -9,23 +9,37 @@ export COMPOSITOR='xcompmgr' export PAGER='less' export LOCKER='slock' -# set platform variable + +# i'll clean it up later. if [ -d '/sys/class/power_supply/BAT0' ]; then export PLATFORM='laptop' else export PLATFORM='desktop' fi +if [ "$( tty | cut -d '/' -f 3 )" = 'tty' ]; then + export Xorg=1 +else + export Xorg=0 +fi +if [ -n "$SSH_CLIENT" ] | [ -n "$SSH_TTY" ]; then + export SSH=1 +else + export SSH=0 +fi + + # variables for my scripts export WALLPAPERS="$HOME/wallpapers" export DATAHOME="$HOME/data" export NOTES="$DATAHOME/notes" export STICKY="$DATAHOME/sticky" -if [ "$(basename $(tty) | head -c 3)" = 'tty' ]; then - setfont /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz # serious - #setfont /usr/share/kbd/consolefonts/972.cp.gz -16 # handwritten - setterm -blength 0 -else + +if [ "$SSH" -ne 1 ] | [ "$Xorg" -eq 1 ]; then xrdb -load ~/.Xresources +elif [ "$Xorg" -ne 1 ] | [ "$SSH" -ne 1 ]; then + setfont /usr/share/kbd/consolefonts/Lat2-Terminus16.psfu.gz + #setfont /usr/share/kbd/consolefonts/972.cp.gz -16 # handwritten look + setterm -blength 0 fi