summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Taylor <jackson@jacksontaylor.xyz>2021-02-01 18:58:28 -0500
committerJackson Taylor <jackson@jacksontaylor.xyz>2021-02-01 18:58:28 -0500
commit445f6eaeb94d97aa271970b0fdbbb6841dd349a4 (patch)
treee494e69305d53339490eb6df6510304d79dbe12a
parente5d3687bf9c7c83e9841f9e70c73a05d8ae56c02 (diff)
Add profile, xinitrc and xprofile
-rw-r--r--.profile39
-rw-r--r--.xinitrc26
-rw-r--r--.xprofile55
3 files changed, 120 insertions, 0 deletions
diff --git a/.profile b/.profile
new file mode 100644
index 0000000..43757e2
--- /dev/null
+++ b/.profile
@@ -0,0 +1,39 @@
+# Runs on login and sets some environment variables and stuff
+
+# set local bin folder and sub folders in PATH
+export PATH="$PATH:$(du "$HOME/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')"
+
+# Set Golang paths and add to PATH
+export GOPATH=$HOME/code/go
+export GOBIN=$HOME/code/go/bin
+export PATH=$PATH:$GOBIN
+
+# Set wallpaper to use
+export WALLPAPER=$HOME/Pictures/wallpapers/spike_and_julia.jpg
+
+# Set default programs
+export BROWSER="brave"
+export EDITOR="nvim"
+export FILE="ranger"
+export READER="zathura"
+export TERMINAL="st"
+
+# Used in weather scripts
+export LOCATION="Raleigh"
+
+# Home dir cleanup
+export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
+export NOTMUCH_CONFIG="$HOME/.config/notmuch-config"
+export GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0"
+export LESSHISTFILE="-"
+export WGETRC="$HOME/.config/wget/wgetrc"
+export INPUTRC="$HOME/.config/inputrc"
+export ZDOTDIR="$HOME/.config/zsh"
+export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
+# This is for signing git commits, unlocks the gpg key
+export GPG_TTY=$(tty)
+
+export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
+
+# Start tty if in tty1 and not already running
+[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x Xorg >/dev/null && exec startx
diff --git a/.xinitrc b/.xinitrc
new file mode 100644
index 0000000..25a7cc3
--- /dev/null
+++ b/.xinitrc
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# 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
+
+# Your default LARBS WM is determined in your `~/.profile` on login. Here we
+# run the proper command to run when the graphical environment starts.
+
+# case "$LARBSWM" in
+# dwm) while :; do
+# ssh-agent dwm || break
+# done ;;
+# i3) exec i3 ;;
+# *) echo "No valid LARBS window manager detected." ;;
+# esac
+
+exec dwm
+# exec i3
+# exec bspwm
diff --git a/.xprofile b/.xprofile
new file mode 100644
index 0000000..cafddcd
--- /dev/null
+++ b/.xprofile
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/etc/X11/xinit/Xresources
+sysmodmap=/etc/X11/xinit/Xmodmap
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f "$userresources" ]; then
+ xrdb -merge "$userresources"
+fi
+
+if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+fi
+
+if [ -d /etc/X11/xinit/xinitrc.d ] ; then
+ for f in /etc/X11/xinit/xinitrc.d/?* ; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+# xautolock -time 10 -locker slock -corners 00-0 &
+xss-lock slock &
+
+# compositor for transparency/blur
+picom -b
+
+# set wallpaper or wallpaper script to change papes
+# xwallpaper --zoom $WALLPAPER
+
+# Set wallpaper and terminal colors
+set_wallpaper
+
+# program for keybindings
+sxhkd &
+
+unclutter &
+
+# Start music player daemon
+mpd &
+
+# helps if you start the status bar after dwm, duh
+# /home/jackson/.local/src/dwm-bar/dwm_bar.sh &
+dwmblocks &
+
+dunst &