write own X initialization scripts
This commit is contained in:
parent
388896d08c
commit
0c777c4d5d
10 changed files with 453 additions and 254 deletions
98
.config/X11/startx
Executable file
98
.config/X11/startx
Executable file
|
@ -0,0 +1,98 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xserverrc" ]; then
|
||||||
|
server=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xserverrc
|
||||||
|
elif [ -r "$HOME/.xserverrc" ]; then
|
||||||
|
server=$HOME/.xserverrc
|
||||||
|
else
|
||||||
|
server=/etc/X11/xinit/xserverrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession" ]; then
|
||||||
|
client=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession
|
||||||
|
elif [ -r "$HOME/.xsession" ]; then
|
||||||
|
client="$HOME/.xsession"
|
||||||
|
else
|
||||||
|
client=/etc/X11/xinit/xinitrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Automatically determine an unused $DISPLAY
|
||||||
|
d=0
|
||||||
|
while true ; do
|
||||||
|
[ -e "/tmp/.X$d-lock" ] || [ -S "/tmp/.X11-unix/X$d" ] || break
|
||||||
|
d=$((d + 1))
|
||||||
|
done
|
||||||
|
display=":$d"
|
||||||
|
unset d
|
||||||
|
|
||||||
|
if [ -n "${XAUTHORITY+x}" ]; then
|
||||||
|
XAUTHORITY=$HOME/.Xauthority
|
||||||
|
export XAUTHORITY
|
||||||
|
fi
|
||||||
|
|
||||||
|
removelist=
|
||||||
|
|
||||||
|
# check for GNU hostname
|
||||||
|
if hostname --version > /dev/null 2>&1; then
|
||||||
|
if ! hostname --version 2>&1 | grep GNU -q; then
|
||||||
|
hostname=$(hostname -f)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$hostname" ]; then
|
||||||
|
hostname=$(hostname)
|
||||||
|
fi
|
||||||
|
|
||||||
|
authdisplay=${display:-:0}
|
||||||
|
|
||||||
|
mcookie=$(/usr/bin/mcookie)
|
||||||
|
|
||||||
|
if [ -n "${mcookie+x}" ]; then
|
||||||
|
echo "Couldn't create cookie"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
dummy=0
|
||||||
|
|
||||||
|
# create a file with auth information for the server. ':0' is a dummy.
|
||||||
|
xserverauthfile=$(mktemp --tmpdir serverauth.XXXXXXXXXX)
|
||||||
|
trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP BUS TERM
|
||||||
|
xauth -q -f "$xserverauthfile" << EOF
|
||||||
|
add :$dummy . $mcookie
|
||||||
|
EOF
|
||||||
|
|
||||||
|
serverargs=${serverargs}" -auth "${xserverauthfile}
|
||||||
|
|
||||||
|
# now add the same credentials to the client authority file
|
||||||
|
# if '$displayname' already exists do not overwrite it as another
|
||||||
|
# server may need it. Add them to the '$xserverauthfile' instead.
|
||||||
|
for displayname in $authdisplay $hostname$authdisplay; do
|
||||||
|
authcookie=$(xauth list "$displayname" | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p") 2>/dev/null;
|
||||||
|
if [ -n "${authcookie+x}" ]; then
|
||||||
|
xauth -q << EOF
|
||||||
|
add $displayname . $mcookie
|
||||||
|
EOF
|
||||||
|
removelist="$displayname $removelist"
|
||||||
|
else
|
||||||
|
dummy=$((dummy+1));
|
||||||
|
xauth -q -f "$xserverauthfile" << EOF
|
||||||
|
add :$dummy . $authcookie
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
xinit $client -- $server $serverargs $display
|
||||||
|
|
||||||
|
retval=$?
|
||||||
|
|
||||||
|
if [ -z "${removelist+x}" ]; then
|
||||||
|
xauth remove $removelist
|
||||||
|
fi
|
||||||
|
if [ x"$xserverauthfile" != x ]; then
|
||||||
|
rm -f "$xserverauthfile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v deallocvt > /dev/null 2>&1; then
|
||||||
|
deallocvt
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $retval
|
220
.config/X11/xprofile
Executable file
220
.config/X11/xprofile
Executable file
|
@ -0,0 +1,220 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Graphical program vars
|
||||||
|
export XCURSOR_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/icons"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
||||||
|
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
||||||
|
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
||||||
|
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||||
|
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
|
||||||
|
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
|
||||||
|
|
||||||
|
# xsecurelock vars
|
||||||
|
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b"
|
||||||
|
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5"
|
||||||
|
export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e"
|
||||||
|
export XSECURELOCK_BACKGROUND_COLOR="#15161E"
|
||||||
|
export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M"
|
||||||
|
export XSECURELOCK_PASSWORD_PROMPT="time_hex"
|
||||||
|
export XSECURELOCK_AUTH_TIMEOUT=10
|
||||||
|
export XSECURELOCK_SHOW_DATETIME=1
|
||||||
|
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
||||||
|
export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid"
|
||||||
|
export XSECURELOCK_SHOW_DATETIME=1
|
||||||
|
export XSECURELOCK_SHOW_HOSTNAME=1
|
||||||
|
|
||||||
|
xrandr --dpi 109 --fb 4480x1633 \
|
||||||
|
--output DP-2 --mode 2560x1440 --pos 1920x0 \
|
||||||
|
--output HDMI-0 --mode 1920x1080 --pos 0x553
|
||||||
|
setbg &
|
||||||
|
# xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
|
||||||
|
remaps &
|
||||||
|
|
||||||
|
autostart="picom checkup dunst unclutter pipewire dwmblocks remapd"
|
||||||
|
for program in $autostart; do
|
||||||
|
pidof -s "$program" || "$program" &
|
||||||
|
done >/dev/null 2>&1
|
||||||
|
playerctld daemon
|
||||||
|
|
||||||
|
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
||||||
|
gpg-connect-agent /bye 1> /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
unset SSH_AGENT_PID
|
||||||
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
|
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||||
|
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
export SSH_AUTH_SOCK
|
||||||
|
fi
|
||||||
|
GPG_TTY="$(tty)"
|
||||||
|
export GPG_TTY
|
||||||
|
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||||
|
|
||||||
|
xset s 300
|
||||||
|
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
||||||
|
|
||||||
|
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||||
|
# [ -n "$xrdbpid" ] && wait "$xrdbpid"
|
||||||
|
|
||||||
|
# lf icons:
|
||||||
|
export LF_ICONS="\
|
||||||
|
tw=:\
|
||||||
|
st=:\
|
||||||
|
ow=:\
|
||||||
|
dt=:\
|
||||||
|
di=:\
|
||||||
|
fi=:\
|
||||||
|
ln=:\
|
||||||
|
or=:\
|
||||||
|
ex=:\
|
||||||
|
*.c=:\
|
||||||
|
*.cc=:\
|
||||||
|
*.clj=:\
|
||||||
|
*.coffee=:\
|
||||||
|
*.cpp=:\
|
||||||
|
*.css=:\
|
||||||
|
*.d=:\
|
||||||
|
*.dart=:\
|
||||||
|
*.erl=:\
|
||||||
|
*.exs=:\
|
||||||
|
*.fs=:\
|
||||||
|
*.go=:\
|
||||||
|
*.h=:\
|
||||||
|
*.hh=:\
|
||||||
|
*.hpp=:\
|
||||||
|
*.hs=:\
|
||||||
|
*.html=:\
|
||||||
|
*.java=:\
|
||||||
|
*.jl=:\
|
||||||
|
*.js=:\
|
||||||
|
*.json=:\
|
||||||
|
*.lua=:\
|
||||||
|
*.md=:\
|
||||||
|
*.php=:\
|
||||||
|
*.pl=:\
|
||||||
|
*.pro=:\
|
||||||
|
*.py=:\
|
||||||
|
*.rb=:\
|
||||||
|
*.rs=:\
|
||||||
|
*.scala=:\
|
||||||
|
*.ts=:\
|
||||||
|
*.vim=:\
|
||||||
|
*.cmd=:\
|
||||||
|
*.ps1=:\
|
||||||
|
*.sh=:\
|
||||||
|
*.bash=:\
|
||||||
|
*.zsh=:\
|
||||||
|
*.fish=:\
|
||||||
|
*.tar=:\
|
||||||
|
*.tgz=:\
|
||||||
|
*.arc=:\
|
||||||
|
*.arj=:\
|
||||||
|
*.taz=:\
|
||||||
|
*.lha=:\
|
||||||
|
*.lz4=:\
|
||||||
|
*.lzh=:\
|
||||||
|
*.lzma=:\
|
||||||
|
*.tlz=:\
|
||||||
|
*.txz=:\
|
||||||
|
*.tzo=:\
|
||||||
|
*.t7z=:\
|
||||||
|
*.zip=:\
|
||||||
|
*.z=:\
|
||||||
|
*.dz=:\
|
||||||
|
*.gz=:\
|
||||||
|
*.lrz=:\
|
||||||
|
*.lz=:\
|
||||||
|
*.lzo=:\
|
||||||
|
*.xz=:\
|
||||||
|
*.zst=:\
|
||||||
|
*.tzst=:\
|
||||||
|
*.bz2=:\
|
||||||
|
*.bz=:\
|
||||||
|
*.tbz=:\
|
||||||
|
*.tbz2=:\
|
||||||
|
*.tz=:\
|
||||||
|
*.deb=:\
|
||||||
|
*.rpm=:\
|
||||||
|
*.jar=:\
|
||||||
|
*.war=:\
|
||||||
|
*.ear=:\
|
||||||
|
*.sar=:\
|
||||||
|
*.rar=:\
|
||||||
|
*.alz=:\
|
||||||
|
*.ace=:\
|
||||||
|
*.zoo=:\
|
||||||
|
*.cpio=:\
|
||||||
|
*.7z=:\
|
||||||
|
*.rz=:\
|
||||||
|
*.cab=:\
|
||||||
|
*.wim=:\
|
||||||
|
*.swm=:\
|
||||||
|
*.dwm=:\
|
||||||
|
*.esd=:\
|
||||||
|
*.jpg=:\
|
||||||
|
*.jpeg=:\
|
||||||
|
*.mjpg=:\
|
||||||
|
*.mjpeg=:\
|
||||||
|
*.gif=:\
|
||||||
|
*.bmp=:\
|
||||||
|
*.pbm=:\
|
||||||
|
*.pgm=:\
|
||||||
|
*.ppm=:\
|
||||||
|
*.tga=:\
|
||||||
|
*.xbm=:\
|
||||||
|
*.xpm=:\
|
||||||
|
*.tif=:\
|
||||||
|
*.tiff=:\
|
||||||
|
*.png=:\
|
||||||
|
*.svg=:\
|
||||||
|
*.svgz=:\
|
||||||
|
*.mng=:\
|
||||||
|
*.pcx=:\
|
||||||
|
*.mov=:\
|
||||||
|
*.mpg=:\
|
||||||
|
*.mpeg=:\
|
||||||
|
*.m2v=:\
|
||||||
|
*.mkv=:\
|
||||||
|
*.webm=:\
|
||||||
|
*.ogm=:\
|
||||||
|
*.mp4=:\
|
||||||
|
*.m4v=:\
|
||||||
|
*.mp4v=:\
|
||||||
|
*.vob=:\
|
||||||
|
*.qt=:\
|
||||||
|
*.nuv=:\
|
||||||
|
*.wmv=:\
|
||||||
|
*.asf=:\
|
||||||
|
*.rm=:\
|
||||||
|
*.rmvb=:\
|
||||||
|
*.flc=:\
|
||||||
|
*.avi=:\
|
||||||
|
*.fli=:\
|
||||||
|
*.flv=:\
|
||||||
|
*.gl=:\
|
||||||
|
*.dl=:\
|
||||||
|
*.xcf=:\
|
||||||
|
*.xwd=:\
|
||||||
|
*.yuv=:\
|
||||||
|
*.cgm=:\
|
||||||
|
*.emf=:\
|
||||||
|
*.ogv=:\
|
||||||
|
*.ogx=:\
|
||||||
|
*.aac=:\
|
||||||
|
*.au=:\
|
||||||
|
*.flac=:\
|
||||||
|
*.m4a=:\
|
||||||
|
*.mid=:\
|
||||||
|
*.midi=:\
|
||||||
|
*.mka=:\
|
||||||
|
*.mp3=:\
|
||||||
|
*.mpc=:\
|
||||||
|
*.ogg=:\
|
||||||
|
*.ra=:\
|
||||||
|
*.wav=:\
|
||||||
|
*.oga=:\
|
||||||
|
*.opus=:\
|
||||||
|
*.spx=:\
|
||||||
|
*.xspf=:\
|
||||||
|
*.pdf=:\
|
||||||
|
*.nix=:\
|
||||||
|
"
|
4
.config/X11/xserverrc
Executable file
4
.config/X11/xserverrc
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
stty onclr
|
||||||
|
exec /usr/bin/Xorg -nolisten tcp "$@" vt"$XDG_VTNR"
|
127
.config/X11/xsession
Executable file
127
.config/X11/xsession
Executable file
|
@ -0,0 +1,127 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PROGNAME=Xsession
|
||||||
|
|
||||||
|
OPTIONFILE=/etc/X11/Xsession.options
|
||||||
|
|
||||||
|
SYSRESOURCES=/etc/X11/Xresources
|
||||||
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources" ] && USRRESOURCES=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources || USRRESOURCES=$HOME/.Xresources
|
||||||
|
|
||||||
|
SYSSESSIONDIR=/etc/X11/Xsession.d
|
||||||
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession" ] && USERXSESSION=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession || USERXSESSION=$HOME/.xsession
|
||||||
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xsession" ] && ALTUSERXSESSION=${XDG_CONFIG_HOME:-$HOME/.config}/X11/Xsession || ALTUSERXSESSION=$HOME/.Xsession
|
||||||
|
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}X11/xsessionrc" ] && USERXSESSIONRC=${XDG_CONFIG_HOME:-$HOME/.config}X11/xsessionrc || USERXSESSIONRC=$HOME/.xsessionrc
|
||||||
|
[ -r "${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors" ] && ERRFILE=${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors || ERRFILE=$HOME/.xsession-errors
|
||||||
|
|
||||||
|
message () {
|
||||||
|
# pretty-print messages of arbitrary length; use xmessage if it
|
||||||
|
# is available and $DISPLAY is set
|
||||||
|
MESSAGE="$PROGNAME: $*"
|
||||||
|
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
|
||||||
|
if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
|
||||||
|
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
message_nonl () {
|
||||||
|
# pretty-print messages of arbitrary length (no trailing newline); use
|
||||||
|
# xmessage if it is available and $DISPLAY is set
|
||||||
|
MESSAGE="$PROGNAME: $*"
|
||||||
|
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
|
||||||
|
if [ -n "$DISPLAY" ] && command -v xmessage > /dev/null 2>&1; then
|
||||||
|
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
errormsg () {
|
||||||
|
# exit script with error
|
||||||
|
message "$*"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
internal_errormsg () {
|
||||||
|
# exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
|
||||||
|
# One big call to message() for the sake of xmessage; if we had two then
|
||||||
|
# the user would have dismissed the error we want reported before seeing the
|
||||||
|
# request to report it.
|
||||||
|
errormsg "$*" \
|
||||||
|
"Please report the installed version of the \"x11-common\"" \
|
||||||
|
"package and the complete text of this error message to" \
|
||||||
|
"<debian-x@lists.debian.org>."
|
||||||
|
}
|
||||||
|
|
||||||
|
OPTIONS="$(
|
||||||
|
if [ -r "$OPTIONFILE" ]; then
|
||||||
|
cat "$OPTIONFILE"
|
||||||
|
fi
|
||||||
|
if [ -d /etc/X11/Xsession.options.d ]; then
|
||||||
|
run-parts --list --regex '\.conf$' /etc/X11/Xsession.options.d | xargs -d '\n' cat
|
||||||
|
fi
|
||||||
|
)"
|
||||||
|
|
||||||
|
has_option() {
|
||||||
|
# Ensure that a later no-foo overrides an earlier foo
|
||||||
|
if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" = "$1" ]; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# attempt to create an error file; abort if we cannot
|
||||||
|
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
|
||||||
|
[ ! -L "$ERRFILE" ]; then
|
||||||
|
chmod 600 "$ERRFILE"
|
||||||
|
elif ERRFILE=$(mktemp 2> /dev/null); then
|
||||||
|
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
|
||||||
|
message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
|
||||||
|
"\"$ERRFILE\"; look for session log/errors in" \
|
||||||
|
"\"$TMPDIR/xsession-$USER\"."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
errormsg "unable to create X session log/error file; aborting."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# truncate ERRFILE if it is too big to avoid disk usage DoS
|
||||||
|
if [ "$(stat -c%s \""$ERRFILE"\")" -gt 500000 ]; then
|
||||||
|
T=$(mktemp -p "$HOME")
|
||||||
|
tail -c 500000 "$ERRFILE" > "$T" && mv -f "$T" "$ERRFILE" || rm -f "$T"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec >>"$ERRFILE" 2>&1
|
||||||
|
|
||||||
|
# sanity check; is our session script directory present?
|
||||||
|
if [ ! -d "$SYSSESSIONDIR" ]; then
|
||||||
|
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Attempt to create a file of non-zero length in /tmp; a full filesystem can
|
||||||
|
# cause mysterious X session failures. We do not use touch, :, or test -w
|
||||||
|
# because they won't actually create a file with contents. We also let standard
|
||||||
|
# error from mktemp and echo go to the error file to aid the user in
|
||||||
|
# determining what went wrong.
|
||||||
|
WRITE_TEST=$(mktemp)
|
||||||
|
if ! echo "*" >>"$WRITE_TEST"; then
|
||||||
|
message "warning: unable to write to ${WRITE_TEST%/*}; X session may exit" \
|
||||||
|
"with an error"
|
||||||
|
fi
|
||||||
|
rm -f "$WRITE_TEST"
|
||||||
|
|
||||||
|
SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
|
||||||
|
if [ -n "$SESSIONFILES" ]; then
|
||||||
|
set +e
|
||||||
|
for SESSIONFILE in $SESSIONFILES; do
|
||||||
|
. $SESSIONFILE
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xprofile" ]; then
|
||||||
|
. ${XDG_CONFIG_HOME:-$HOME/.config}/X11/xprofile
|
||||||
|
else
|
||||||
|
. $HOME/.xprofile
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec dwm
|
|
@ -1,11 +1,10 @@
|
||||||
#!/bin/zsh
|
#!/bin/sh
|
||||||
|
|
||||||
# profile file. Runs on login. Environmental variables are set here.
|
# profile file. Runs on login. Environmental variables are set here.
|
||||||
|
|
||||||
# Adds `~/.local/bin` to $PATH
|
# Adds `~/.local/bin` to $PATH
|
||||||
export PATH="$PATH:~/.local/share/npm-global/bin:${$(find -L ~/.local/bin -type d -printf %p:)%%:}"
|
localpath="$(find -L ~/.local/bin -type d -printf %p: | sed 's/.$//')"
|
||||||
|
export PATH="$PATH:~/.local/share/npm-global/bin:$localpath"
|
||||||
unsetopt PROMPT_SP
|
|
||||||
|
|
||||||
# Default programs:
|
# Default programs:
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
|
@ -18,20 +17,15 @@ export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
export PYENVS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/virtualenv"
|
export PYENVS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/virtualenv"
|
||||||
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
|
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
|
||||||
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
|
|
||||||
export ZSH_COMPDUMP="${XDG_CACHE_HOME:-$HOME/.cache}/zcompdump"
|
export ZSH_COMPDUMP="${XDG_CACHE_HOME:-$HOME/.cache}/zcompdump"
|
||||||
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs.
|
|
||||||
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
|
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
|
||||||
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
|
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
|
||||||
export LESSHISTFILE="-"
|
export LESSHISTFILE="-"
|
||||||
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
|
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
|
||||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
|
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
|
||||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
||||||
# export ALSA_CONFIG_PATH="$XDG_CONFIG_HOME/alsa/asoundrc"
|
|
||||||
export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg"
|
export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg"
|
||||||
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
|
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
|
||||||
export KODI_DATA="${XDG_DATA_HOME:-$HOME/.local/share}/kodi"
|
|
||||||
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
|
|
||||||
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
||||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
||||||
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
|
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
|
||||||
|
@ -39,28 +33,10 @@ export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
|
||||||
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
|
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
|
||||||
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
|
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
|
||||||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
||||||
export WEECHAT_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/weechat"
|
|
||||||
export MBSYNCRC="${XDG_CONFIG_HOME:-$HOME/.config}/mbsync/config"
|
|
||||||
export ELECTRUMDIR="${XDG_DATA_HOME:-$HOME/.local/share}/electrum"
|
|
||||||
export XCURSOR_PATH="${XDG_DATA_HOME:-$HOME/.local/share}/icons"
|
|
||||||
export GRADLE_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gradle"
|
export GRADLE_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gradle"
|
||||||
|
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # WARN: This line can break some display managers
|
||||||
# xsecurelock settings
|
|
||||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b"
|
|
||||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5"
|
|
||||||
export XSECURELOCK_AUTH_WARNING_COLOR="#f7768e"
|
|
||||||
export XSECURELOCK_BACKGROUND_COLOR="#15161E"
|
|
||||||
export XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M"
|
|
||||||
export XSECURELOCK_PASSWORD_PROMPT="time_hex"
|
|
||||||
export XSECURELOCK_AUTH_TIMEOUT=10
|
|
||||||
export XSECURELOCK_SHOW_DATETIME=1
|
|
||||||
export XSECURELOCK_COMPOSITE_OBSCURER=0
|
|
||||||
export XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid"
|
|
||||||
export XSECURELOCK_SHOW_DATETIME=1
|
|
||||||
export XSECURELOCK_SHOW_HOSTNAME=1
|
|
||||||
|
|
||||||
# Other program settings:
|
# Other program settings:
|
||||||
export SUDO_ASKPASS="$HOME/.local/bin/dmenupass"
|
|
||||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||||
export LESS=-R
|
export LESS=-R
|
||||||
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
|
||||||
|
@ -71,178 +47,5 @@ export LESS_TERMCAP_se="$(printf '%b' '[0m')"
|
||||||
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
|
||||||
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||||
export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme.
|
|
||||||
export MOZ_USE_XINPUT2="1" # Mozilla smooth scrolling/touchpads.
|
|
||||||
export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
|
||||||
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
||||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
|
||||||
export VAULT_ADDR='https://vault.tralios.de'
|
|
||||||
|
|
||||||
# This is the list for lf icons:
|
|
||||||
export LF_ICONS="\
|
|
||||||
tw=:\
|
|
||||||
st=:\
|
|
||||||
ow=:\
|
|
||||||
dt=:\
|
|
||||||
di=:\
|
|
||||||
fi=:\
|
|
||||||
ln=:\
|
|
||||||
or=:\
|
|
||||||
ex=:\
|
|
||||||
*.c=:\
|
|
||||||
*.cc=:\
|
|
||||||
*.clj=:\
|
|
||||||
*.coffee=:\
|
|
||||||
*.cpp=:\
|
|
||||||
*.css=:\
|
|
||||||
*.d=:\
|
|
||||||
*.dart=:\
|
|
||||||
*.erl=:\
|
|
||||||
*.exs=:\
|
|
||||||
*.fs=:\
|
|
||||||
*.go=:\
|
|
||||||
*.h=:\
|
|
||||||
*.hh=:\
|
|
||||||
*.hpp=:\
|
|
||||||
*.hs=:\
|
|
||||||
*.html=:\
|
|
||||||
*.java=:\
|
|
||||||
*.jl=:\
|
|
||||||
*.js=:\
|
|
||||||
*.json=:\
|
|
||||||
*.lua=:\
|
|
||||||
*.md=:\
|
|
||||||
*.php=:\
|
|
||||||
*.pl=:\
|
|
||||||
*.pro=:\
|
|
||||||
*.py=:\
|
|
||||||
*.rb=:\
|
|
||||||
*.rs=:\
|
|
||||||
*.scala=:\
|
|
||||||
*.ts=:\
|
|
||||||
*.vim=:\
|
|
||||||
*.cmd=:\
|
|
||||||
*.ps1=:\
|
|
||||||
*.sh=:\
|
|
||||||
*.bash=:\
|
|
||||||
*.zsh=:\
|
|
||||||
*.fish=:\
|
|
||||||
*.tar=:\
|
|
||||||
*.tgz=:\
|
|
||||||
*.arc=:\
|
|
||||||
*.arj=:\
|
|
||||||
*.taz=:\
|
|
||||||
*.lha=:\
|
|
||||||
*.lz4=:\
|
|
||||||
*.lzh=:\
|
|
||||||
*.lzma=:\
|
|
||||||
*.tlz=:\
|
|
||||||
*.txz=:\
|
|
||||||
*.tzo=:\
|
|
||||||
*.t7z=:\
|
|
||||||
*.zip=:\
|
|
||||||
*.z=:\
|
|
||||||
*.dz=:\
|
|
||||||
*.gz=:\
|
|
||||||
*.lrz=:\
|
|
||||||
*.lz=:\
|
|
||||||
*.lzo=:\
|
|
||||||
*.xz=:\
|
|
||||||
*.zst=:\
|
|
||||||
*.tzst=:\
|
|
||||||
*.bz2=:\
|
|
||||||
*.bz=:\
|
|
||||||
*.tbz=:\
|
|
||||||
*.tbz2=:\
|
|
||||||
*.tz=:\
|
|
||||||
*.deb=:\
|
|
||||||
*.rpm=:\
|
|
||||||
*.jar=:\
|
|
||||||
*.war=:\
|
|
||||||
*.ear=:\
|
|
||||||
*.sar=:\
|
|
||||||
*.rar=:\
|
|
||||||
*.alz=:\
|
|
||||||
*.ace=:\
|
|
||||||
*.zoo=:\
|
|
||||||
*.cpio=:\
|
|
||||||
*.7z=:\
|
|
||||||
*.rz=:\
|
|
||||||
*.cab=:\
|
|
||||||
*.wim=:\
|
|
||||||
*.swm=:\
|
|
||||||
*.dwm=:\
|
|
||||||
*.esd=:\
|
|
||||||
*.jpg=:\
|
|
||||||
*.jpeg=:\
|
|
||||||
*.mjpg=:\
|
|
||||||
*.mjpeg=:\
|
|
||||||
*.gif=:\
|
|
||||||
*.bmp=:\
|
|
||||||
*.pbm=:\
|
|
||||||
*.pgm=:\
|
|
||||||
*.ppm=:\
|
|
||||||
*.tga=:\
|
|
||||||
*.xbm=:\
|
|
||||||
*.xpm=:\
|
|
||||||
*.tif=:\
|
|
||||||
*.tiff=:\
|
|
||||||
*.png=:\
|
|
||||||
*.svg=:\
|
|
||||||
*.svgz=:\
|
|
||||||
*.mng=:\
|
|
||||||
*.pcx=:\
|
|
||||||
*.mov=:\
|
|
||||||
*.mpg=:\
|
|
||||||
*.mpeg=:\
|
|
||||||
*.m2v=:\
|
|
||||||
*.mkv=:\
|
|
||||||
*.webm=:\
|
|
||||||
*.ogm=:\
|
|
||||||
*.mp4=:\
|
|
||||||
*.m4v=:\
|
|
||||||
*.mp4v=:\
|
|
||||||
*.vob=:\
|
|
||||||
*.qt=:\
|
|
||||||
*.nuv=:\
|
|
||||||
*.wmv=:\
|
|
||||||
*.asf=:\
|
|
||||||
*.rm=:\
|
|
||||||
*.rmvb=:\
|
|
||||||
*.flc=:\
|
|
||||||
*.avi=:\
|
|
||||||
*.fli=:\
|
|
||||||
*.flv=:\
|
|
||||||
*.gl=:\
|
|
||||||
*.dl=:\
|
|
||||||
*.xcf=:\
|
|
||||||
*.xwd=:\
|
|
||||||
*.yuv=:\
|
|
||||||
*.cgm=:\
|
|
||||||
*.emf=:\
|
|
||||||
*.ogv=:\
|
|
||||||
*.ogx=:\
|
|
||||||
*.aac=:\
|
|
||||||
*.au=:\
|
|
||||||
*.flac=:\
|
|
||||||
*.m4a=:\
|
|
||||||
*.mid=:\
|
|
||||||
*.midi=:\
|
|
||||||
*.mka=:\
|
|
||||||
*.mp3=:\
|
|
||||||
*.mpc=:\
|
|
||||||
*.ogg=:\
|
|
||||||
*.ra=:\
|
|
||||||
*.wav=:\
|
|
||||||
*.oga=:\
|
|
||||||
*.opus=:\
|
|
||||||
*.spx=:\
|
|
||||||
*.xspf=:\
|
|
||||||
*.pdf=:\
|
|
||||||
*.nix=:\
|
|
||||||
"
|
|
||||||
|
|
||||||
stty onlcr
|
|
||||||
|
|
||||||
[ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && exec startx "$XINITRC"
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/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. There is a link to this file 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.
|
|
||||||
|
|
||||||
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
|
|
||||||
. "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile"
|
|
||||||
else
|
|
||||||
. "$HOME/.xprofile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec dwm
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
xrandr --dpi 109 --fb 4480x1633 \
|
|
||||||
--output DP-2 --mode 2560x1440 --pos 1920x0 \
|
|
||||||
--output HDMI-0 --mode 1920x1080 --pos 0x553
|
|
||||||
setbg &
|
|
||||||
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
|
|
||||||
remaps &
|
|
||||||
|
|
||||||
autostart="picom checkup dunst unclutter pipewire dwmblocks remapd"
|
|
||||||
for program in $autostart; do
|
|
||||||
pidof -s "$program" || "$program" &
|
|
||||||
done >/dev/null 2>&1
|
|
||||||
playerctld daemon
|
|
||||||
|
|
||||||
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
|
||||||
gpg-connect-agent /bye 1> /dev/null 2>&1
|
|
||||||
fi
|
|
||||||
unset SSH_AGENT_PID
|
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
||||||
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
|
||||||
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
||||||
export SSH_AUTH_SOCK
|
|
||||||
fi
|
|
||||||
GPG_TTY="$(tty)"
|
|
||||||
export GPG_TTY
|
|
||||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
|
||||||
|
|
||||||
xset s 300
|
|
||||||
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
|
||||||
|
|
||||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
|
||||||
[ -n "$xrdbpid" ] && wait "$xrdbpid"
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /usr/bin/Xorg -nolisten tcp "$@" vt$XDG_VTNR
|
|
|
@ -1 +0,0 @@
|
||||||
.config/x11/xprofile
|
|
Loading…
Add table
Reference in a new issue