diff --git a/x/.xinitrc b/x/.xinitrc new file mode 100755 index 0000000..1df3fa8 --- /dev/null +++ b/x/.xinitrc @@ -0,0 +1,19 @@ +#!/bin/sh + +# This file is used by xinit and its wrapper startx. +# Display managers like xdm doesn't use this file at all +# +# See: man startx +# Use this script with the following commands: +# startx +# startx +# startx $HOME/.xinitrc i3 +# xinit -- $DISPLAY -nolisten tcp vt$XDG_VTNR + +if [ -f $HOME/.Xresources ]; then + xrdb -merge $HOME/.Xresources +fi + +# invoke local X session script +. $HOME/.xsession + diff --git a/x/.xprofile b/x/.xprofile new file mode 100755 index 0000000..02f20a5 --- /dev/null +++ b/x/.xprofile @@ -0,0 +1,16 @@ +#!/bin/sh + +# This file is sourced on Debian and derivates only by basically all +# graphical interface launchers (xinit, startx, xdm, GDM, LightDM, etc..). + +# It's loaded only by the following Display Managers: +# - GDM +# - LightDM +# - LXDM +# - SDDM +# +# It's NOT loaded (unless it's sourced) by any DM that loads the following files: +# - ~/.xinitrc +# - ~/.xsession +# For example XDM or the command xinit and its wrapper startx + diff --git a/x/.xsession b/x/.xsession new file mode 100755 index 0000000..4864e2b --- /dev/null +++ b/x/.xsession @@ -0,0 +1,23 @@ +#!/bin/sh + +# Commands and env variables that are common at startup to all graphical +# interfaces launchers (all DM and xinitrc/startx) should go in ~/.xsessionrc . +# This file is only sourced on Debian and derivates, so here a rudimentary +# check to source it in case we're not on Debian or derivative distro. +if [ ! -f /etc/debian_version]; then + [ -f $HOME/.xsessionrc ] && . $HOME/.xsessionrc +fi + +# Set i3 as default if no argument is passed +session=${1:-i3} + +# Launch a known WM/DE, otherwise launch as a command +case $session in + dwm ) exec dwm;; + i3|i3wm ) exec i3;; + bspwm ) exec bspwm;; + xfce|xfce4 ) exec startxfce4;; + xmonad ) exec xmonad;; + *) exec $1;; +esac + diff --git a/x/.xsessionrc b/x/.xsessionrc new file mode 100755 index 0000000..3327ae4 --- /dev/null +++ b/x/.xsessionrc @@ -0,0 +1,21 @@ +#!/bin/sh + +# This file is sourced only on Debian and derivates by basically all +# graphical interface launchers (xinit, startx, xdm, GDM, LightDM, etc..). + +# Uniform qt apps to gtk themes +# Dependencies: qt5-style-plugins adwaita-qt +export QT_QPA_PLATFORMTHEME=gtk3 +export QT_STYLE_OVERRIDE=adwaita-dark + +# Add `~/.local/bin` to $PATH +C_PATH="$HOME/.local/bin" +[ -d "$C_PATH" ] && export PATH="$C_PATH:$PATH" || \ + echo "Custom PATH dir not found: $C_PATH" +unset C_PATH + +# Mount remote volumes +if $(fsmartconnect --version > /dev/null); then + fsmartconnect & +fi +