From 708aef6d49a41f614fd0a03c3711d01dca22adde Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Tue, 23 Jul 2024 21:53:15 +0800 Subject: [PATCH] Set PATH (more...) sanely and use XFCE4. --- bash/.bashrc | 14 +++++++++++++- xorg-xinit/.xinitrc | 19 +++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) mode change 100644 => 100755 xorg-xinit/.xinitrc diff --git a/bash/.bashrc b/bash/.bashrc index 12b5184..f185983 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -31,4 +31,16 @@ export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" -export PATH="$PATH:$HOME/scripts" +# Append "$1" to $PATH when not already in. +append_path () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + +# Append our default paths +append_path '/home/frederik/scripts' + diff --git a/xorg-xinit/.xinitrc b/xorg-xinit/.xinitrc old mode 100644 new mode 100755 index a8ad133..12e77cc --- a/xorg-xinit/.xinitrc +++ b/xorg-xinit/.xinitrc @@ -1,3 +1,4 @@ +#!/bin/sh if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" @@ -7,7 +8,7 @@ fi # Effectively disable DPMS by setting values to 0 as laptop screen does not resume # Use standard blank screen saver after 5 minutes -export DISPLAY=:0.0 +#export DISPLAY=:0.0 xset s 300 xset s blank xset dpms 0 0 0 @@ -47,6 +48,20 @@ xsetroot -solid "#333333" # Enable core dumps in case something goes wrong ulimit -c unlimited +# Append "$1" to $PATH when not already in. +append_path () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + +# Append our default paths +append_path '/home/frederik/scripts' + # Start i3 and log to ~/.i3logfile echo "Starting at $(date)" >> ~/.i3logfile -exec /usr/bin/i3 -V -d all >> ~/.i3logfile +#exec /usr/bin/i3 +exec startxfce4 -- 2.39.5