literate-dotfiles/xconfig.org

3.7 KiB

Configuration Files related to Xorg

~/.Xresources

Colors

,*foreground:   #d5c4a1
#ifdef background_opacity
,*background:   [background_opacity]#32302f
#else
,*background:   #32302f
#endif
,*cursorColor:  #d5c4a1

,*color0:       #32302f
,*color1:       #fb4934
,*color2:       #b8bb26
,*color3:       #fabd2f
,*color4:       #83a598
,*color5:       #d3869b
,*color6:       #8ec07c
,*color7:       #d5c4a1

,*color8:       #665c54
,*color9:       #fb4934
,*color10:      #b8bb26
,*color11:      #fabd2f
,*color12:      #83a598
,*color13:      #d3869b
,*color14:      #8ec07c
,*color15:      #fbf1c7

! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
! use 'shell' template to set these if necessary
,*color16:      #fe8019
,*color17:      #d65d0e
,*color18:      #3c3836
,*color19:      #504945
,*color20:      #bdae93
,*color21:      #ebdbb2

Fonts

Xft.dpi:       96
Xft.autohint:  0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting:   1
Xft.antialias: 1
Xft.rgba:      rgb

Cursor

Xcursor.theme: Breeze
Xcursor.size:  0

~/.xinitrc

dbus-update-activation-environment --systemd DISPLAY

Fix for Matlab.

# export _JAVA_AWT_WM_NONREPARENTING=1

Set DISPLAY for dunst when started with systemd.

# systemctl --user import-environment DISPLAY

Merge in defaults and keymaps

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

Start gnome-keyring-daemon.

eval $(gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
[ -f ~/.xprofile ] && . ~/.xprofile
exec i3

~/.xprofile

Keyboard Options:

# Set repetition keyboard rate
xset r rate 200 40 &

# Set International US keyboard layout
setxkbmap -layout us -variant intl -option caps:escape &

Start programs related to display:

# Screen options
xrandr --output eDP-1 --mode 1920x1200 --dpi 192 &

# Set random wallpaper
setbg ~/.local/data/wallpapers/ &

# Hide mouse cursor after x seconds
pgrep -xu "$USER" unclutter >/dev/null || \
  unclutter --timeout 5 &

# Autolock screen after x minutes
xautolock -locker "~/.local/bin/lockscreen" -detectsleep -time 30 -notify 60 -notifier "notify-send -u critical -t 10000 -- 'Locking Screen' '60 seconds'" &

# Redshift
pgrep -xu "$USER" redshift >/dev/null || \
    redshift &

# Run Picom (compositor)
picom --daemon &

# Network Manager Applet
nm-applet &

Manually start mopidy as it seems to not start automatically:

# Mopidy
/usr/local/bin/mopidy --config ~/.config/mopidy/mopidy.conf >/dev/null 2>&1 &

Finally, run SXHKD for the key bindings:

# Start sxhkd
pgrep -xu "$USER" sxhkd >/dev/null || \
  sxhkd -m 1 -c ~/.config/sxhkd/sxhkdrc &