From 30cab7d90bbbe3572f116d8d3277834b58bbff30 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Sun, 4 Nov 2018 00:23:34 +0000 Subject: [PATCH] xprofile: split xinitrc into xprofile Finally adding "proper" display-manager support instead of just using the xlogin shim service that isn't a proper login session --- .config/X11/xinitrc | 25 +++---------------------- .config/X11/xprofile | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 .config/X11/xprofile diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index ef95847..6b42d1c 100644 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Run all system xinitrc shell scripts xinitdir="/etc/X11/xinit/xinitrc.d" @@ -11,27 +11,8 @@ if [ -d "$xinitdir" ]; then done fi -source $HOME/.profile - -xrdb -merge $XDG_CONFIG_HOME/X11/xresources -xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2) - -setxkbmap -option caps:none -xset r rate 200 18 - - -export TERMINAL="termite" -export BROWSER="chromium" -export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" -export QT_QPA_PLATFORMTHEME=gtk2 -export QT_STYLE_OVERRIDE=gtk2 -export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open - -# Merge system clipboards -if [ -n "$DISPLAY" ] && exists autocutsel && ! pidof autocutsel 1>/dev/null; then - autocutsel -fork - autocutsel -selection PRIMARY -fork -fi +# Source generic xprofile stuff +source "$(dirname "${BASH_SOURCE[0]}")/xprofile" # Start the gnome-keyring if it's installed if exists gnome-keyring-daemon; then diff --git a/.config/X11/xprofile b/.config/X11/xprofile new file mode 100644 index 0000000..8046c45 --- /dev/null +++ b/.config/X11/xprofile @@ -0,0 +1,24 @@ +#!/bin/sh + +# Graphical-specific environment variables +export TERMINAL="termite" +export BROWSER="chromium" +export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" +export QT_QPA_PLATFORMTHEME=gtk2 +export QT_STYLE_OVERRIDE=gtk2 +export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open + + +# Load Xorg resources and set the DPI +xrdb -merge $XDG_CONFIG_HOME/X11/xresources +xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2) + +setxkbmap -option caps:none +xset r rate 200 18 + + +# Merge system clipboards +if [ -n "$DISPLAY" ] && exists autocutsel && ! pidof autocutsel 1>/dev/null; then + autocutsel -fork + autocutsel -selection PRIMARY -fork +fi