From 445f6eaeb94d97aa271970b0fdbbb6841dd349a4 Mon Sep 17 00:00:00 2001 From: Jackson Taylor Date: Mon, 1 Feb 2021 18:58:28 -0500 Subject: Add profile, xinitrc and xprofile --- .profile | 39 +++++++++++++++++++++++++++++++++++++++ .xinitrc | 26 ++++++++++++++++++++++++++ .xprofile | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 .profile create mode 100644 .xinitrc create mode 100644 .xprofile 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 & -- cgit v1.2.3