From 782e66df1a5161ec165206e1865ed4e3574927a6 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Mon, 27 May 2019 13:40:58 -0400 Subject: [PATCH] xprofile distinct for DM users --- .xinitrc | 24 +++++++++++++----------- .xprofile | 27 ++++++++++++++++++++++++++- 2 files changed, 39 insertions(+), 12 deletions(-) mode change 120000 => 100644 .xprofile diff --git a/.xinitrc b/.xinitrc index 8b3910d..9bb70b1 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,17 +1,19 @@ #!/bin/sh -setbg & # Set the background -sxhkd & # Bind keys -# Switch to US international with Caps as Mod/Escape -setxkbmap -option caps:super -variant altgr-intl && killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape' & -# Properties button extra Mod/Escape -xmodmap -e 'keycode 135 = Super_R' & -xset r rate 300 50 & # Speed xrate up -unclutter & # Remove mouse when idle -xcompmgr & # xcompmgr for transparency -dunst & # dunst for notifications +# xinitrc runs automatically when you run startx. + +# There are some small but important commands that need to be run when we start +# the graphical environment. I keep those commands in ~/.xprofile because that +# file is run automatically if someone uses a display manager (login screen) +# and so they are needed there. To prevent doubling up commands, I source them +# here with the line below. + +[ -f ~/.xprofile ] && . ~/.xprofile + + +# Here we start dwm. +# The loop is just to enable dwm's "restart" feature (mod+F2). while :; do - dwmbar & ssh-agent dwm || break done diff --git a/.xprofile b/.xprofile deleted file mode 120000 index aa7da3a..0000000 --- a/.xprofile +++ /dev/null @@ -1 +0,0 @@ -.profile \ No newline at end of file diff --git a/.xprofile b/.xprofile new file mode 100644 index 0000000..bd4be7a --- /dev/null +++ b/.xprofile @@ -0,0 +1,26 @@ +#!/bin/sh + +# This file runs when a DM logs you into a graphical session. +# If you use startx/xinit like a Chad, this file will also be sourced. + +setbg & # set the background with the `setbg` script +xcompmgr & # xcompmgr for transparency +dwmbar & # script for updating the status bar +dunst & # dunst for notifications +sxhkd & # Bind keys with sxhkd +xset r rate 300 50 & # Speed xrate up +unclutter & # Remove mouse when idle + +# Switch to US international with Caps as Mod/Escape +setxkbmap -option caps:super -variant altgr-intl && killall xcape 2>/dev/null ; xcape -e 'Super_L=Escape' & +# Properties button extra Mod/Escape +xmodmap -e 'keycode 135 = Super_R' & + +xrandr -q | grep "DP2 con" >/dev/null 2>&1 && xrandr --output DP1 --auto --output LVDS1 --off + +# This loop will run the `refbar` script to refresh the statusbar whenever a +# command changes the music player's status. +while : ; do + mpc idle >/dev/null 2>&1 + refbar +done &